Merge "Add a system API to query hdmi system audio mode" into lmp-dev
diff --git a/Android.mk b/Android.mk
index 35bb66c..35d13d7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -150,7 +150,7 @@
 	core/java/android/hardware/ISerialManager.aidl \
 	core/java/android/hardware/display/IDisplayManager.aidl \
 	core/java/android/hardware/display/IDisplayManagerCallback.aidl \
-	core/java/android/hardware/display/IVirtualDisplayCallbacks.aidl \
+	core/java/android/hardware/display/IVirtualDisplayCallback.aidl \
 	core/java/android/hardware/hdmi/IHdmiControlCallback.aidl \
 	core/java/android/hardware/hdmi/IHdmiControlService.aidl \
 	core/java/android/hardware/hdmi/IHdmiDeviceEventListener.aidl \
@@ -204,6 +204,7 @@
 	core/java/android/os/IUserManager.aidl \
 	core/java/android/os/IVibratorService.aidl \
 	core/java/android/service/notification/INotificationListener.aidl \
+	core/java/android/service/notification/IStatusBarNotificationHolder.aidl \
 	core/java/android/service/notification/IConditionListener.aidl \
 	core/java/android/service/notification/IConditionProvider.aidl \
 	core/java/android/print/ILayoutResultCallback.aidl \
@@ -489,8 +490,11 @@
 	frameworks/base/location/java/android/location/FusedBatchOptions.aidl \
 	frameworks/base/location/java/com/android/internal/location/ProviderProperties.aidl \
 	frameworks/base/location/java/com/android/internal/location/ProviderRequest.aidl \
+	frameworks/base/media/java/android/media/AudioAttributes.aidl \
+	frameworks/base/media/java/android/media/MediaDescription.aidl \
 	frameworks/base/media/java/android/media/MediaMetadata.aidl \
 	frameworks/base/media/java/android/media/Rating.aidl \
+	frameworks/base/media/java/android/media/browse/MediaBrowser.aidl \
 	frameworks/base/media/java/android/media/session/MediaSession.aidl \
 	frameworks/base/media/java/android/media/session/PlaybackState.aidl \
 	frameworks/base/telephony/java/android/telephony/ServiceState.aidl \
diff --git a/api/current.txt b/api/current.txt
index 009b534..bb8bc16 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -260,6 +260,7 @@
 
   public static final class R.attr {
     ctor public R.attr();
+    field public static final int __removed2 = 16843937; // 0x10104a1
     field public static final int absListViewStyle = 16842858; // 0x101006a
     field public static final int accessibilityEventTypes = 16843648; // 0x1010380
     field public static final int accessibilityFeedbackType = 16843650; // 0x1010382
@@ -482,7 +483,7 @@
     field public static final int datePickerMode = 16843956; // 0x10104b4
     field public static final int datePickerStyle = 16843612; // 0x101035c
     field public static final int dateTextAppearance = 16843593; // 0x1010349
-    field public static final int dayOfWeekBackgroundColor = 16843924; // 0x1010494
+    field public static final int dayOfWeekBackground = 16843924; // 0x1010494
     field public static final int dayOfWeekTextAppearance = 16843925; // 0x1010495
     field public static final int debuggable = 16842767; // 0x101000f
     field public static final int defaultValue = 16843245; // 0x10101ed
@@ -612,12 +613,20 @@
     field public static final int format12Hour = 16843722; // 0x10103ca
     field public static final int format24Hour = 16843723; // 0x10103cb
     field public static final int fragment = 16843491; // 0x10102e3
+    field public static final int fragmentAllowEnterTransitionOverlap = 16843977; // 0x10104c9
+    field public static final int fragmentAllowReturnTransitionOverlap = 16843978; // 0x10104ca
     field public static final int fragmentCloseEnterAnimation = 16843495; // 0x10102e7
     field public static final int fragmentCloseExitAnimation = 16843496; // 0x10102e8
+    field public static final int fragmentEnterTransition = 16843972; // 0x10104c4
+    field public static final int fragmentExitTransition = 16843971; // 0x10104c3
     field public static final int fragmentFadeEnterAnimation = 16843497; // 0x10102e9
     field public static final int fragmentFadeExitAnimation = 16843498; // 0x10102ea
     field public static final int fragmentOpenEnterAnimation = 16843493; // 0x10102e5
     field public static final int fragmentOpenExitAnimation = 16843494; // 0x10102e6
+    field public static final int fragmentReenterTransition = 16843976; // 0x10104c8
+    field public static final int fragmentReturnTransition = 16843974; // 0x10104c6
+    field public static final int fragmentSharedElementEnterTransition = 16843973; // 0x10104c5
+    field public static final int fragmentSharedElementReturnTransition = 16843975; // 0x10104c7
     field public static final int freezesText = 16843116; // 0x101016c
     field public static final int fromAlpha = 16843210; // 0x10101ca
     field public static final int fromDegrees = 16843187; // 0x10101b3
@@ -655,7 +664,6 @@
     field public static final int hasCode = 16842764; // 0x101000c
     field public static final int headerAmPmTextAppearance = 16843936; // 0x10104a0
     field public static final int headerBackground = 16843055; // 0x101012f
-    field public static final int headerBackgroundColor = 16843937; // 0x10104a1
     field public static final int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
     field public static final int headerDividersEnabled = 16843310; // 0x101022e
     field public static final int headerMonthTextAppearance = 16843926; // 0x1010496
@@ -960,6 +968,7 @@
     field public static final int pathData = 16843807; // 0x101041f
     field public static final int pathPattern = 16842796; // 0x101002c
     field public static final int pathPrefix = 16842795; // 0x101002b
+    field public static final int patternPathData = 16843979; // 0x10104cb
     field public static final int permission = 16842758; // 0x1010006
     field public static final int permissionFlags = 16843719; // 0x10103c7
     field public static final int permissionGroup = 16842762; // 0x101000a
@@ -1053,6 +1062,7 @@
     field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
     field public static final int restrictedAccountType = 16843733; // 0x10103d5
     field public static final int restrictionType = 16843923; // 0x1010493
+    field public static final int resumeWhilePausing = 16843955; // 0x10104b3
     field public static final int reversible = 16843851; // 0x101044b
     field public static final int right = 16843183; // 0x10101af
     field public static final int ringtonePreferenceStyle = 16842899; // 0x1010093
@@ -1418,7 +1428,7 @@
     field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
     field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
     field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
-    field public static final int windowAllowExitTransitionOverlap = 16843835; // 0x101043b
+    field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b
     field public static final int windowAnimationStyle = 16842926; // 0x10100ae
     field public static final int windowBackground = 16842836; // 0x1010054
     field public static final int windowClipToOutline = 16843948; // 0x10104ac
@@ -2385,7 +2395,6 @@
     field public static final int Widget_Holo_DropDownItem_Spinner = 16973995; // 0x10300ab
     field public static final int Widget_Holo_EditText = 16973971; // 0x1030093
     field public static final int Widget_Holo_ExpandableListView = 16973972; // 0x1030094
-    field public static final int Widget_Holo_FastScroll = 16974341; // 0x1030205
     field public static final int Widget_Holo_GridView = 16973973; // 0x1030095
     field public static final int Widget_Holo_HorizontalScrollView = 16973988; // 0x10300a4
     field public static final int Widget_Holo_ImageButton = 16973974; // 0x1030096
@@ -2406,7 +2415,6 @@
     field public static final int Widget_Holo_Light_ActionMode_Inverse = 16974119; // 0x1030127
     field public static final int Widget_Holo_Light_AutoCompleteTextView = 16974011; // 0x10300bb
     field public static final int Widget_Holo_Light_Button = 16974006; // 0x10300b6
-    field public static final int Widget_Holo_Light_Button_Borderless = 16974343; // 0x1030207
     field public static final int Widget_Holo_Light_Button_Borderless_Small = 16974107; // 0x103011b
     field public static final int Widget_Holo_Light_Button_Inset = 16974008; // 0x10300b8
     field public static final int Widget_Holo_Light_Button_Small = 16974007; // 0x10300b7
@@ -2420,7 +2428,6 @@
     field public static final int Widget_Holo_Light_DropDownItem_Spinner = 16974041; // 0x10300d9
     field public static final int Widget_Holo_Light_EditText = 16974014; // 0x10300be
     field public static final int Widget_Holo_Light_ExpandableListView = 16974015; // 0x10300bf
-    field public static final int Widget_Holo_Light_FastScroll = 16974344; // 0x1030208
     field public static final int Widget_Holo_Light_GridView = 16974016; // 0x10300c0
     field public static final int Widget_Holo_Light_HorizontalScrollView = 16974034; // 0x10300d2
     field public static final int Widget_Holo_Light_ImageButton = 16974017; // 0x10300c1
@@ -2444,7 +2451,6 @@
     field public static final int Widget_Holo_Light_ScrollView = 16974033; // 0x10300d1
     field public static final int Widget_Holo_Light_SeekBar = 16974028; // 0x10300cc
     field public static final int Widget_Holo_Light_Spinner = 16974035; // 0x10300d3
-    field public static final int Widget_Holo_Light_StackView = 16974345; // 0x1030209
     field public static final int Widget_Holo_Light_Tab = 16974052; // 0x10300e4
     field public static final int Widget_Holo_Light_TabWidget = 16974037; // 0x10300d5
     field public static final int Widget_Holo_Light_TextView = 16974010; // 0x10300ba
@@ -2468,7 +2474,6 @@
     field public static final int Widget_Holo_ScrollView = 16973987; // 0x10300a3
     field public static final int Widget_Holo_SeekBar = 16973982; // 0x103009e
     field public static final int Widget_Holo_Spinner = 16973989; // 0x10300a5
-    field public static final int Widget_Holo_StackView = 16974342; // 0x1030206
     field public static final int Widget_Holo_Tab = 16974051; // 0x10300e3
     field public static final int Widget_Holo_TabWidget = 16973991; // 0x10300a7
     field public static final int Widget_Holo_TextView = 16973967; // 0x103008f
@@ -2569,6 +2574,7 @@
     field public static final int Widget_Material_Light_RatingBar_Indicator = 16974531; // 0x10302c3
     field public static final int Widget_Material_Light_RatingBar_Small = 16974532; // 0x10302c4
     field public static final int Widget_Material_Light_ScrollView = 16974533; // 0x10302c5
+    field public static final int Widget_Material_Light_SearchView = 16974575; // 0x10302ef
     field public static final int Widget_Material_Light_SeekBar = 16974534; // 0x10302c6
     field public static final int Widget_Material_Light_SegmentedButton = 16974535; // 0x10302c7
     field public static final int Widget_Material_Light_Spinner = 16974537; // 0x10302c9
@@ -2596,6 +2602,7 @@
     field public static final int Widget_Material_RatingBar_Indicator = 16974468; // 0x1030284
     field public static final int Widget_Material_RatingBar_Small = 16974469; // 0x1030285
     field public static final int Widget_Material_ScrollView = 16974470; // 0x1030286
+    field public static final int Widget_Material_SearchView = 16974574; // 0x10302ee
     field public static final int Widget_Material_SeekBar = 16974471; // 0x1030287
     field public static final int Widget_Material_SegmentedButton = 16974472; // 0x1030288
     field public static final int Widget_Material_Spinner = 16974474; // 0x103028a
@@ -2631,7 +2638,12 @@
     field public static final int Widget_Toolbar = 16974339; // 0x1030203
     field public static final int Widget_Toolbar_Button_Navigation = 16974340; // 0x1030204
     field public static final int Widget_WebView = 16973875; // 0x1030033
-    field public static final int __removed = 16974559; // 0x10302df
+    field public static final int __removed1 = 16974559; // 0x10302df
+    field public static final int __removed3 = 16974341; // 0x1030205
+    field public static final int __removed4 = 16974342; // 0x1030206
+    field public static final int __removed5 = 16974343; // 0x1030207
+    field public static final int __removed6 = 16974344; // 0x1030208
+    field public static final int __removed7 = 16974345; // 0x1030209
     field public static final int l_resource_pad1 = 16974336; // 0x1030200
     field public static final int l_resource_pad10 = 16974327; // 0x10301f7
     field public static final int l_resource_pad11 = 16974326; // 0x10301f6
@@ -3430,7 +3442,6 @@
     method public int getTaskId();
     method public final java.lang.CharSequence getTitle();
     method public final int getTitleColor();
-    method public android.app.VoiceInteractor getVoiceInteractor();
     method public final int getVolumeControlStream();
     method public android.view.Window getWindow();
     method public android.view.WindowManager getWindowManager();
@@ -3442,14 +3453,13 @@
     method public boolean isFinishing();
     method public boolean isImmersive();
     method public boolean isTaskRoot();
-    method public boolean isVoiceInteraction();
     method public final deprecated android.database.Cursor managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String);
     method public boolean moveTaskToBack(boolean);
     method public boolean navigateUpTo(android.content.Intent);
     method public boolean navigateUpToFromChild(android.app.Activity, android.content.Intent);
     method public void onActionModeFinished(android.view.ActionMode);
     method public void onActionModeStarted(android.view.ActionMode);
-    method protected void onActivityReenter(int, android.content.Intent);
+    method public void onActivityReenter(int, android.content.Intent);
     method protected void onActivityResult(int, int, android.content.Intent);
     method public void onAttachFragment(android.app.Fragment);
     method public void onAttachedToWindow();
@@ -3460,7 +3470,7 @@
     method public boolean onContextItemSelected(android.view.MenuItem);
     method public void onContextMenuClosed(android.view.Menu);
     method protected void onCreate(android.os.Bundle);
-    method protected void onCreate(android.os.Bundle, android.os.PersistableBundle);
+    method public void onCreate(android.os.Bundle, android.os.PersistableBundle);
     method public void onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo);
     method public java.lang.CharSequence onCreateDescription();
     method protected deprecated android.app.Dialog onCreateDialog(int);
@@ -3492,7 +3502,7 @@
     method public void onPanelClosed(int, android.view.Menu);
     method protected void onPause();
     method protected void onPostCreate(android.os.Bundle);
-    method protected void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
+    method public void onPostCreate(android.os.Bundle, android.os.PersistableBundle);
     method protected void onPostResume();
     method protected deprecated void onPrepareDialog(int, android.app.Dialog);
     method protected deprecated void onPrepareDialog(int, android.app.Dialog, android.os.Bundle);
@@ -3502,11 +3512,11 @@
     method public void onProvideAssistData(android.os.Bundle);
     method protected void onRestart();
     method protected void onRestoreInstanceState(android.os.Bundle);
-    method protected void onRestoreInstanceState(android.os.Bundle, android.os.PersistableBundle);
+    method public void onRestoreInstanceState(android.os.Bundle, android.os.PersistableBundle);
     method protected void onResume();
     method public deprecated java.lang.Object onRetainNonConfigurationInstance();
     method protected void onSaveInstanceState(android.os.Bundle);
-    method protected void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle);
+    method public void onSaveInstanceState(android.os.Bundle, android.os.PersistableBundle);
     method public boolean onSearchRequested();
     method protected void onStart();
     method protected void onStop();
@@ -3538,8 +3548,8 @@
     method public void setContentView(android.view.View);
     method public void setContentView(android.view.View, android.view.ViewGroup.LayoutParams);
     method public final void setDefaultKeyMode(int);
-    method public void setEnterSharedElementListener(android.app.SharedElementListener);
-    method public void setExitSharedElementListener(android.app.SharedElementListener);
+    method public void setEnterSharedElementCallback(android.app.SharedElementCallback);
+    method public void setExitSharedElementCallback(android.app.SharedElementCallback);
     method public final void setFeatureDrawable(int, android.graphics.drawable.Drawable);
     method public final void setFeatureDrawableAlpha(int, int);
     method public final void setFeatureDrawableResource(int, int);
@@ -3784,7 +3794,6 @@
 
   public class ActivityOptions {
     method public static android.app.ActivityOptions makeCustomAnimation(android.content.Context, int, int);
-    method public static deprecated android.app.ActivityOptions makeLaunchTaskBehindAnimation();
     method public static android.app.ActivityOptions makeScaleUpAnimation(android.view.View, int, int, int, int);
     method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.view.View, java.lang.String);
     method public static android.app.ActivityOptions makeSceneTransitionAnimation(android.app.Activity, android.util.Pair<android.view.View, java.lang.String>...);
@@ -3917,6 +3926,7 @@
     field public static final int MODE_IGNORED = 1; // 0x1
     field public static final java.lang.String OPSTR_COARSE_LOCATION = "android:coarse_location";
     field public static final java.lang.String OPSTR_FINE_LOCATION = "android:fine_location";
+    field public static final java.lang.String OPSTR_GET_USAGE_STATS = "android:get_usage_stats";
     field public static final java.lang.String OPSTR_MONITOR_HIGH_POWER_LOCATION = "android:monitor_location_high_power";
     field public static final java.lang.String OPSTR_MONITOR_LOCATION = "android:monitor_location";
   }
@@ -4245,14 +4255,22 @@
     method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
     method public final boolean equals(java.lang.Object);
     method public final android.app.Activity getActivity();
+    method public boolean getAllowEnterTransitionOverlap();
+    method public boolean getAllowReturnTransitionOverlap();
     method public final android.os.Bundle getArguments();
     method public final android.app.FragmentManager getChildFragmentManager();
+    method public android.transition.Transition getEnterTransition();
+    method public android.transition.Transition getExitTransition();
     method public final android.app.FragmentManager getFragmentManager();
     method public final int getId();
     method public android.app.LoaderManager getLoaderManager();
     method public final android.app.Fragment getParentFragment();
+    method public android.transition.Transition getReenterTransition();
     method public final android.content.res.Resources getResources();
     method public final boolean getRetainInstance();
+    method public android.transition.Transition getReturnTransition();
+    method public android.transition.Transition getSharedElementEnterTransition();
+    method public android.transition.Transition getSharedElementReturnTransition();
     method public final java.lang.String getString(int);
     method public final java.lang.String getString(int, java.lang.Object...);
     method public final java.lang.String getTag();
@@ -4301,11 +4319,21 @@
     method public void onViewCreated(android.view.View, android.os.Bundle);
     method public void onViewStateRestored(android.os.Bundle);
     method public void registerForContextMenu(android.view.View);
+    method public void setAllowEnterTransitionOverlap(boolean);
+    method public void setAllowReturnTransitionOverlap(boolean);
     method public void setArguments(android.os.Bundle);
+    method public void setEnterSharedElementTransitionCallback(android.app.SharedElementCallback);
+    method public void setEnterTransition(android.transition.Transition);
+    method public void setExitSharedElementTransitionCallback(android.app.SharedElementCallback);
+    method public void setExitTransition(android.transition.Transition);
     method public void setHasOptionsMenu(boolean);
     method public void setInitialSavedState(android.app.Fragment.SavedState);
     method public void setMenuVisibility(boolean);
+    method public void setReenterTransition(android.transition.Transition);
     method public void setRetainInstance(boolean);
+    method public void setReturnTransition(android.transition.Transition);
+    method public void setSharedElementEnterTransition(android.transition.Transition);
+    method public void setSharedElementReturnTransition(android.transition.Transition);
     method public void setTargetFragment(android.app.Fragment, int);
     method public void setUserVisibleHint(boolean);
     method public void startActivity(android.content.Intent);
@@ -4405,7 +4433,6 @@
     method public abstract android.app.FragmentTransaction setBreadCrumbTitle(java.lang.CharSequence);
     method public abstract android.app.FragmentTransaction setCustomAnimations(int, int);
     method public abstract android.app.FragmentTransaction setCustomAnimations(int, int, int, int);
-    method public abstract android.app.FragmentTransaction setCustomTransition(int, int);
     method public abstract android.app.FragmentTransaction setTransition(int);
     method public abstract android.app.FragmentTransaction setTransitionStyle(int);
     method public abstract android.app.FragmentTransaction show(android.app.Fragment);
@@ -5168,14 +5195,14 @@
     field public static final int START_STICKY_COMPATIBILITY = 0; // 0x0
   }
 
-  public abstract class SharedElementListener {
-    ctor public SharedElementListener();
-    method public android.os.Parcelable captureSharedElementSnapshot(android.view.View, android.graphics.Matrix, android.graphics.RectF);
-    method public android.view.View createSnapshotView(android.content.Context, android.os.Parcelable);
-    method public void handleRejectedSharedElements(java.util.List<android.view.View>);
-    method public void remapSharedElements(java.util.List<java.lang.String>, java.util.Map<java.lang.String, android.view.View>);
-    method public void setSharedElementEnd(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
-    method public void setSharedElementStart(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
+  public abstract class SharedElementCallback {
+    ctor public SharedElementCallback();
+    method public android.os.Parcelable onCaptureSharedElementSnapshot(android.view.View, android.graphics.Matrix, android.graphics.RectF);
+    method public android.view.View onCreateSnapshotView(android.content.Context, android.os.Parcelable);
+    method public void onMapSharedElements(java.util.List<java.lang.String>, java.util.Map<java.lang.String, android.view.View>);
+    method public void onRejectSharedElements(java.util.List<android.view.View>);
+    method public void onSharedElementEnd(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
+    method public void onSharedElementStart(java.util.List<java.lang.String>, java.util.List<android.view.View>, java.util.List<android.view.View>);
   }
 
   public deprecated class TabActivity extends android.app.ActivityGroup {
@@ -5267,41 +5294,6 @@
     field public static final int MODE_NIGHT_YES = 2; // 0x2
   }
 
-  public class VoiceInteractor {
-    method public boolean submitRequest(android.app.VoiceInteractor.Request);
-    method public boolean[] supportsCommands(java.lang.String[]);
-  }
-
-  public static class VoiceInteractor.AbortVoiceRequest extends android.app.VoiceInteractor.Request {
-    ctor public VoiceInteractor.AbortVoiceRequest(java.lang.CharSequence, android.os.Bundle);
-    method public void onAbortResult(android.os.Bundle);
-  }
-
-  public static class VoiceInteractor.CommandRequest extends android.app.VoiceInteractor.Request {
-    ctor public VoiceInteractor.CommandRequest(java.lang.String, android.os.Bundle);
-    method public void onCommandResult(android.os.Bundle);
-  }
-
-  public static class VoiceInteractor.CompleteVoiceRequest extends android.app.VoiceInteractor.Request {
-    ctor public VoiceInteractor.CompleteVoiceRequest(java.lang.CharSequence, android.os.Bundle);
-    method public void onCompleteResult(android.os.Bundle);
-  }
-
-  public static class VoiceInteractor.ConfirmationRequest extends android.app.VoiceInteractor.Request {
-    ctor public VoiceInteractor.ConfirmationRequest(java.lang.CharSequence, android.os.Bundle);
-    method public void onConfirmationResult(boolean, android.os.Bundle);
-  }
-
-  public static abstract class VoiceInteractor.Request {
-    ctor public VoiceInteractor.Request();
-    method public void cancel();
-    method public android.app.Activity getActivity();
-    method public android.content.Context getContext();
-    method public void onAttached(android.app.Activity);
-    method public void onCancel();
-    method public void onDetached();
-  }
-
   public final class WallpaperInfo implements android.os.Parcelable {
     ctor public WallpaperInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
     method public int describeContents();
@@ -5402,8 +5394,8 @@
     field public static final java.lang.String ACTION_DEVICE_ADMIN_DISABLED = "android.app.action.DEVICE_ADMIN_DISABLED";
     field public static final java.lang.String ACTION_DEVICE_ADMIN_DISABLE_REQUESTED = "android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED";
     field public static final java.lang.String ACTION_DEVICE_ADMIN_ENABLED = "android.app.action.DEVICE_ADMIN_ENABLED";
-    field public static final java.lang.String ACTION_LOCK_TASK_ENTERING = "android.app.action.ACTION_LOCK_TASK_ENTERING";
-    field public static final java.lang.String ACTION_LOCK_TASK_EXITING = "android.app.action.ACTION_LOCK_TASK_EXITING";
+    field public static final java.lang.String ACTION_LOCK_TASK_ENTERING = "android.app.action.LOCK_TASK_ENTERING";
+    field public static final java.lang.String ACTION_LOCK_TASK_EXITING = "android.app.action.LOCK_TASK_EXITING";
     field public static final java.lang.String ACTION_PASSWORD_CHANGED = "android.app.action.ACTION_PASSWORD_CHANGED";
     field public static final java.lang.String ACTION_PASSWORD_EXPIRING = "android.app.action.ACTION_PASSWORD_EXPIRING";
     field public static final java.lang.String ACTION_PASSWORD_FAILED = "android.app.action.ACTION_PASSWORD_FAILED";
@@ -5435,7 +5427,7 @@
     method public boolean getCrossProfileCallerIdDisabled(android.content.ComponentName);
     method public java.util.List<java.lang.String> getCrossProfileWidgetProviders(android.content.ComponentName);
     method public int getCurrentFailedPasswordAttempts();
-    method public java.util.List<byte[]> getInstalledCaCerts();
+    method public java.util.List<byte[]> getInstalledCaCerts(android.content.ComponentName);
     method public int getKeyguardDisabledFeatures(android.content.ComponentName);
     method public int getMaximumFailedPasswordsForWipe(android.content.ComponentName);
     method public long getMaximumTimeToLock(android.content.ComponentName);
@@ -5456,7 +5448,7 @@
     method public boolean getScreenCaptureDisabled(android.content.ComponentName);
     method public boolean getStorageEncryption(android.content.ComponentName);
     method public int getStorageEncryptionStatus();
-    method public boolean hasCaCertInstalled(byte[]);
+    method public boolean hasCaCertInstalled(android.content.ComponentName, byte[]);
     method public boolean hasGrantedPolicy(android.content.ComponentName, int);
     method public boolean installCaCert(android.content.ComponentName, byte[]);
     method public boolean isActivePasswordSufficient();
@@ -5509,7 +5501,7 @@
     method public void uninstallCaCert(android.content.ComponentName, byte[]);
     method public void wipeData(int);
     field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
-    field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.ACTION_PROVISION_MANAGED_PROFILE";
+    field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
     field public static final java.lang.String ACTION_SET_NEW_PASSWORD = "android.app.action.SET_NEW_PASSWORD";
     field public static final java.lang.String ACTION_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
     field public static final int ENCRYPTION_STATUS_ACTIVATING = 2; // 0x2
@@ -5518,25 +5510,24 @@
     field public static final int ENCRYPTION_STATUS_UNSUPPORTED = 0; // 0x0
     field public static final java.lang.String EXTRA_ADD_EXPLANATION = "android.app.extra.ADD_EXPLANATION";
     field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME = "android.app.extra.DEFAULT_MANAGED_PROFILE_NAME";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
-    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.deviceAdminPackageName";
-    field public static final java.lang.String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.ManagedProfileEmailAddress";
-    field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.LOCALE";
-    field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.LOCAL_TIME";
-    field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.TIME_ZONE";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.WIFI_HIDDEN";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.WIFI_PAC_URL";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PASSWORD = "android.app.extra.WIFI_PASSWORD";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS = "android.app.extra.WIFI_PROXY_BYPASS_HOSTS";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_HOST = "android.app.extra.WIFI_PROXY_HOST";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_PORT = "android.app.extra.WIFI_PROXY_PORT";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE = "android.app.extra.WIFI_SECURITY_TYPE";
-    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SSID = "android.app.extra.WIFI_SSID";
-    field public static int FLAG_MANAGED_CAN_ACCESS_PARENT;
-    field public static int FLAG_PARENT_CAN_ACCESS_MANAGED;
+    field public static final java.lang.String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";
+    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
+    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
+    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
+    field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME";
+    field public static final java.lang.String EXTRA_PROVISIONING_LOCALE = "android.app.extra.PROVISIONING_LOCALE";
+    field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.PROVISIONING_LOCAL_TIME";
+    field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.PROVISIONING_TIME_ZONE";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.PROVISIONING_WIFI_HIDDEN";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.PROVISIONING_WIFI_PAC_URL";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PASSWORD = "android.app.extra.PROVISIONING_WIFI_PASSWORD";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS = "android.app.extra.PROVISIONING_WIFI_PROXY_BYPASS";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_HOST = "android.app.extra.PROVISIONING_WIFI_PROXY_HOST";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PROXY_PORT = "android.app.extra.PROVISIONING_WIFI_PROXY_PORT";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE = "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE";
+    field public static final java.lang.String EXTRA_PROVISIONING_WIFI_SSID = "android.app.extra.PROVISIONING_WIFI_SSID";
+    field public static final int FLAG_MANAGED_CAN_ACCESS_PARENT = 2; // 0x2
+    field public static final int FLAG_PARENT_CAN_ACCESS_MANAGED = 1; // 0x1
     field public static final int KEYGUARD_DISABLE_FEATURES_ALL = 2147483647; // 0x7fffffff
     field public static final int KEYGUARD_DISABLE_FEATURES_NONE = 0; // 0x0
     field public static final int KEYGUARD_DISABLE_FINGERPRINT = 32; // 0x20
@@ -5545,6 +5536,7 @@
     field public static final int KEYGUARD_DISABLE_TRUST_AGENTS = 16; // 0x10
     field public static final int KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS = 8; // 0x8
     field public static final int KEYGUARD_DISABLE_WIDGETS_ALL = 1; // 0x1
+    field public static final java.lang.String KEY_PROVISIONING_EMAIL_ADDRESS = "android.app.key.PROVISIONING_EMAIL_ADDRESS";
     field public static final java.lang.String MIME_TYPE_PROVISIONING_NFC = "application/com.android.managedprovisioning";
     field public static final int PASSWORD_QUALITY_ALPHABETIC = 262144; // 0x40000
     field public static final int PASSWORD_QUALITY_ALPHANUMERIC = 327680; // 0x50000
@@ -5716,6 +5708,19 @@
 
 package android.app.usage {
 
+  public final class ConfigurationStats implements android.os.Parcelable {
+    ctor public ConfigurationStats(android.app.usage.ConfigurationStats);
+    method public int describeContents();
+    method public int getActivationCount();
+    method public android.content.res.Configuration getConfiguration();
+    method public long getFirstTimeStamp();
+    method public long getLastTimeActive();
+    method public long getLastTimeStamp();
+    method public long getTotalTimeActive();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+  }
+
   public final class UsageEvents implements android.os.Parcelable {
     method public int describeContents();
     method public boolean getNextEvent(android.app.usage.UsageEvents.Event);
@@ -5728,9 +5733,11 @@
   public static final class UsageEvents.Event {
     ctor public UsageEvents.Event();
     method public java.lang.String getClassName();
+    method public android.content.res.Configuration getConfiguration();
     method public int getEventType();
     method public java.lang.String getPackageName();
     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
@@ -5751,6 +5758,7 @@
 
   public final class UsageStatsManager {
     method public java.util.Map<java.lang.String, android.app.usage.UsageStats> queryAndAggregateUsageStats(long, long);
+    method public java.util.List<android.app.usage.ConfigurationStats> queryConfigurations(int, long, long);
     method public android.app.usage.UsageEvents queryEvents(long, long);
     method public java.util.List<android.app.usage.UsageStats> queryUsageStats(int, long, long);
     field public static final int INTERVAL_BEST = 4; // 0x4
@@ -5869,7 +5877,7 @@
     field public static final int RESIZE_VERTICAL = 2; // 0x2
     field public static final int WIDGET_CATEGORY_HOME_SCREEN = 1; // 0x1
     field public static final int WIDGET_CATEGORY_KEYGUARD = 2; // 0x2
-    field public static final int WIDGET_CATEGORY_RECENTS = 4; // 0x4
+    field public static final int WIDGET_CATEGORY_SEARCHBOX = 4; // 0x4
     field public int autoAdvanceViewId;
     field public android.content.ComponentName configure;
     field public int icon;
@@ -7718,7 +7726,6 @@
     field public static final java.lang.String ACTION_GET_RESTRICTION_ENTRIES = "android.intent.action.GET_RESTRICTION_ENTRIES";
     field public static final java.lang.String ACTION_GTALK_SERVICE_CONNECTED = "android.intent.action.GTALK_CONNECTED";
     field public static final java.lang.String ACTION_GTALK_SERVICE_DISCONNECTED = "android.intent.action.GTALK_DISCONNECTED";
-    field public static final java.lang.String ACTION_HDMI_AUDIO_PLUG = "android.intent.action.HDMI_AUDIO_PLUG";
     field public static final java.lang.String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG";
     field public static final java.lang.String ACTION_INPUT_METHOD_CHANGED = "android.intent.action.INPUT_METHOD_CHANGED";
     field public static final java.lang.String ACTION_INSERT = "android.intent.action.INSERT";
@@ -7827,12 +7834,12 @@
     field public static final java.lang.String CATEGORY_TAB = "android.intent.category.TAB";
     field public static final java.lang.String CATEGORY_TEST = "android.intent.category.TEST";
     field public static final java.lang.String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST";
-    field public static final java.lang.String CATEGORY_VOICE = "android.intent.category.VOICE";
     field public static final android.os.Parcelable.Creator CREATOR;
     field public static final java.lang.String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT";
     field public static final java.lang.String EXTRA_ALLOW_MULTIPLE = "android.intent.extra.ALLOW_MULTIPLE";
     field public static final deprecated java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE";
     field public static final java.lang.String EXTRA_ASSIST_CONTEXT = "android.intent.extra.ASSIST_CONTEXT";
+    field public static final java.lang.String EXTRA_ASSIST_INPUT_HINT_KEYBOARD = "android.intent.extra.ASSIST_INPUT_HINT_KEYBOARD";
     field public static final java.lang.String EXTRA_ASSIST_PACKAGE = "android.intent.extra.ASSIST_PACKAGE";
     field public static final java.lang.String EXTRA_BCC = "android.intent.extra.BCC";
     field public static final java.lang.String EXTRA_BUG_REPORT = "android.intent.extra.BUG_REPORT";
@@ -7879,7 +7886,7 @@
     field public static final java.lang.String EXTRA_TEXT = "android.intent.extra.TEXT";
     field public static final java.lang.String EXTRA_TITLE = "android.intent.extra.TITLE";
     field public static final java.lang.String EXTRA_UID = "android.intent.extra.UID";
-    field public static final java.lang.String EXTRA_USER = "android.intent.extra.user";
+    field public static final java.lang.String EXTRA_USER = "android.intent.extra.USER";
     field public static final int FILL_IN_ACTION = 1; // 0x1
     field public static final int FILL_IN_CATEGORIES = 4; // 0x4
     field public static final int FILL_IN_CLIP_DATA = 128; // 0x80
@@ -8162,8 +8169,8 @@
   }
 
   public class RestrictionsManager {
+    method public android.content.Intent createLocalApprovalIntent();
     method public android.os.Bundle getApplicationRestrictions();
-    method public android.content.Intent getLocalApprovalIntent();
     method public java.util.List<android.content.RestrictionEntry> getManifestRestrictions(java.lang.String);
     method public boolean hasRestrictionsProvider();
     method public void notifyPermissionResponse(java.lang.String, android.os.PersistableBundle);
@@ -8405,6 +8412,7 @@
     field public static final int FLAG_MULTIPROCESS = 1; // 0x1
     field public static final int FLAG_NO_HISTORY = 128; // 0x80
     field public static final int FLAG_RELINQUISH_TASK_IDENTITY = 4096; // 0x1000
+    field public static final int FLAG_RESUME_WHILE_PAUSING = 16384; // 0x4000
     field public static final int FLAG_SINGLE_USER = 1073741824; // 0x40000000
     field public static final int FLAG_STATE_NOT_NEEDED = 16; // 0x10
     field public static final int LAUNCH_MULTIPLE = 0; // 0x0
@@ -8609,21 +8617,16 @@
 
   public class LauncherApps {
     method public void addCallback(android.content.pm.LauncherApps.Callback);
-    method public void addCallback(android.content.pm.LauncherApps.Callback, android.os.Handler);
-    method public void addOnAppsChangedCallback(android.content.pm.LauncherApps.OnAppsChangedCallback);
-    method public void addOnAppsChangedCallback(android.content.pm.LauncherApps.OnAppsChangedCallback, android.os.Handler);
     method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
     method public boolean isActivityEnabled(android.content.ComponentName, android.os.UserHandle);
-    method public boolean isActivityEnabledForProfile(android.content.ComponentName, android.os.UserHandle);
     method public boolean isPackageEnabled(java.lang.String, android.os.UserHandle);
-    method public boolean isPackageEnabledForProfile(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 void removeCallback(android.content.pm.LauncherApps.Callback);
-    method public void removeOnAppsChangedCallback(android.content.pm.LauncherApps.OnAppsChangedCallback);
     method public android.content.pm.LauncherActivityInfo resolveActivity(android.content.Intent, android.os.UserHandle);
-    method public void showAppDetailsForProfile(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
-    method public void startActivityForProfile(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle);
     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 unregisterCallback(android.content.pm.LauncherApps.Callback);
   }
 
   public static abstract class LauncherApps.Callback {
@@ -8635,10 +8638,6 @@
     method public abstract void onPackagesUnavailable(java.lang.String[], android.os.UserHandle, boolean);
   }
 
-  public static abstract class LauncherApps.OnAppsChangedCallback extends android.content.pm.LauncherApps.Callback {
-    ctor public LauncherApps.OnAppsChangedCallback();
-  }
-
   public class PackageInfo implements android.os.Parcelable {
     ctor public PackageInfo();
     method public int describeContents();
@@ -8676,15 +8675,17 @@
 
   public class PackageInstaller {
     method public void abandonSession(int);
-    method public void addSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
-    method public void addSessionCallback(android.content.pm.PackageInstaller.SessionCallback, android.os.Handler);
     method public int createSession(android.content.pm.PackageInstaller.SessionParams) throws java.io.IOException;
     method public java.util.List<android.content.pm.PackageInstaller.SessionInfo> getAllSessions();
     method public java.util.List<android.content.pm.PackageInstaller.SessionInfo> getMySessions();
     method public android.content.pm.PackageInstaller.SessionInfo getSessionInfo(int);
-    method public android.content.pm.PackageInstaller.Session openSession(int);
-    method public void removeSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
+    method public android.content.pm.PackageInstaller.Session openSession(int) throws java.io.IOException;
+    method public void registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
+    method public void registerSessionCallback(android.content.pm.PackageInstaller.SessionCallback, android.os.Handler);
     method public void uninstall(java.lang.String, android.content.IntentSender);
+    method public void unregisterSessionCallback(android.content.pm.PackageInstaller.SessionCallback);
+    method public void updateSessionAppIcon(int, android.graphics.Bitmap);
+    method public void updateSessionAppLabel(int, java.lang.CharSequence);
     field public static final java.lang.String ACTION_SESSION_DETAILS = "android.content.pm.action.SESSION_DETAILS";
     field public static final java.lang.String EXTRA_OTHER_PACKAGE_NAME = "android.content.pm.extra.OTHER_PACKAGE_NAME";
     field public static final java.lang.String EXTRA_PACKAGE_NAME = "android.content.pm.extra.PACKAGE_NAME";
@@ -8711,15 +8712,15 @@
     method public java.lang.String[] getNames() throws java.io.IOException;
     method public java.io.InputStream openRead(java.lang.String) throws java.io.IOException;
     method public java.io.OutputStream openWrite(java.lang.String, long, long) throws java.io.IOException;
-    method public void setProgress(float);
+    method public void setStagingProgress(float);
   }
 
   public static abstract class PackageInstaller.SessionCallback {
     ctor public PackageInstaller.SessionCallback();
-    method public abstract void onClosed(int);
+    method public abstract void onActiveChanged(int, boolean);
+    method public abstract void onBadgingChanged(int);
     method public abstract void onCreated(int);
     method public abstract void onFinished(int, boolean);
-    method public abstract void onOpened(int);
     method public abstract void onProgressChanged(int, float);
   }
 
@@ -8732,7 +8733,7 @@
     method public java.lang.String getInstallerPackageName();
     method public float getProgress();
     method public int getSessionId();
-    method public boolean isOpen();
+    method public boolean isActive();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
   }
@@ -8839,6 +8840,9 @@
     method public abstract android.content.pm.FeatureInfo[] getSystemAvailableFeatures();
     method public abstract java.lang.String[] getSystemSharedLibraryNames();
     method public abstract java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo);
+    method public abstract android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
+    method public abstract android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle);
+    method public abstract java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence, android.os.UserHandle);
     method public abstract android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
     method public abstract boolean hasSystemFeature(java.lang.String);
     method public abstract boolean isSafeMode();
@@ -8869,6 +8873,7 @@
     field public static final java.lang.String EXTRA_VERIFICATION_RESULT = "android.content.pm.extra.VERIFICATION_RESULT";
     field public static final java.lang.String FEATURE_APP_WIDGETS = "android.software.app_widgets";
     field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency";
+    field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
     field public static final java.lang.String FEATURE_BACKUP = "android.software.backup";
     field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth";
     field public static final java.lang.String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le";
@@ -8887,6 +8892,7 @@
     field public static final java.lang.String FEATURE_FAKETOUCH = "android.hardware.faketouch";
     field public static final java.lang.String FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT = "android.hardware.faketouch.multitouch.distinct";
     field public static final java.lang.String FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND = "android.hardware.faketouch.multitouch.jazzhand";
+    field public static final java.lang.String FEATURE_GAMEPAD = "android.hardware.gamepad";
     field public static final java.lang.String FEATURE_HOME_SCREEN = "android.software.home_screen";
     field public static final java.lang.String FEATURE_INPUT_METHODS = "android.software.input_methods";
     field public static final java.lang.String FEATURE_LEANBACK = "android.software.leanback";
@@ -8903,6 +8909,7 @@
     field public static final java.lang.String FEATURE_PRINTING = "android.software.print";
     field public static final java.lang.String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
     field public static final java.lang.String FEATURE_SCREEN_PORTRAIT = "android.hardware.screen.portrait";
+    field public static final java.lang.String FEATURE_SECURELY_REMOVES_USERS = "android.software.securely_removes_users";
     field public static final java.lang.String FEATURE_SENSOR_ACCELEROMETER = "android.hardware.sensor.accelerometer";
     field public static final java.lang.String FEATURE_SENSOR_AMBIENT_TEMPERATURE = "android.hardware.sensor.ambient_temperature";
     field public static final java.lang.String FEATURE_SENSOR_BAROMETER = "android.hardware.sensor.barometer";
@@ -8927,6 +8934,7 @@
     field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND = "android.hardware.touchscreen.multitouch.jazzhand";
     field public static final java.lang.String FEATURE_USB_ACCESSORY = "android.hardware.usb.accessory";
     field public static final java.lang.String FEATURE_USB_HOST = "android.hardware.usb.host";
+    field public static final java.lang.String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
     field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
     field public static final java.lang.String FEATURE_WEBVIEW = "android.software.webview";
     field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
@@ -11431,8 +11439,6 @@
     ctor public PorterDuffColorFilter(int, android.graphics.PorterDuff.Mode);
     method public int getColor();
     method public android.graphics.PorterDuff.Mode getMode();
-    method public void setColor(int);
-    method public void setMode(android.graphics.PorterDuff.Mode);
   }
 
   public class PorterDuffXfermode extends android.graphics.Xfermode {
@@ -12663,27 +12669,27 @@
   public abstract class CameraCaptureSession implements java.lang.AutoCloseable {
     ctor public CameraCaptureSession();
     method public abstract void abortCaptures() throws android.hardware.camera2.CameraAccessException;
-    method public abstract int capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
-    method public abstract int captureBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public abstract int capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public abstract int captureBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
     method public abstract void close();
     method public abstract android.hardware.camera2.CameraDevice getDevice();
-    method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
-    method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public abstract int setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public abstract int setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
     method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
   }
 
-  public static abstract class CameraCaptureSession.CaptureListener {
-    ctor public CameraCaptureSession.CaptureListener();
+  public static abstract class CameraCaptureSession.CaptureCallback {
+    ctor public CameraCaptureSession.CaptureCallback();
     method public void onCaptureCompleted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.TotalCaptureResult);
     method public void onCaptureFailed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureFailure);
     method public void onCaptureProgressed(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureResult);
     method public void onCaptureSequenceAborted(android.hardware.camera2.CameraCaptureSession, int);
     method public void onCaptureSequenceCompleted(android.hardware.camera2.CameraCaptureSession, int, long);
-    method public void onCaptureStarted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, long);
+    method public void onCaptureStarted(android.hardware.camera2.CameraCaptureSession, android.hardware.camera2.CaptureRequest, long, long);
   }
 
-  public static abstract class CameraCaptureSession.StateListener {
-    ctor public CameraCaptureSession.StateListener();
+  public static abstract class CameraCaptureSession.StateCallback {
+    ctor public CameraCaptureSession.StateCallback();
     method public void onActive(android.hardware.camera2.CameraCaptureSession);
     method public void onClosed(android.hardware.camera2.CameraCaptureSession);
     method public abstract void onConfigureFailed(android.hardware.camera2.CameraCaptureSession);
@@ -12770,7 +12776,7 @@
   public abstract class CameraDevice implements java.lang.AutoCloseable {
     method public abstract void close();
     method public abstract android.hardware.camera2.CaptureRequest.Builder createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
-    method public abstract void createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public abstract void createCaptureSession(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
     method public abstract java.lang.String getId();
     field public static final int TEMPLATE_MANUAL = 6; // 0x6
     field public static final int TEMPLATE_PREVIEW = 1; // 0x1
@@ -12780,8 +12786,8 @@
     field public static final int TEMPLATE_ZERO_SHUTTER_LAG = 5; // 0x5
   }
 
-  public static abstract class CameraDevice.StateListener {
-    ctor public CameraDevice.StateListener();
+  public static abstract class CameraDevice.StateCallback {
+    ctor public CameraDevice.StateCallback();
     method public void onClosed(android.hardware.camera2.CameraDevice);
     method public abstract void onDisconnected(android.hardware.camera2.CameraDevice);
     method public abstract void onError(android.hardware.camera2.CameraDevice, int);
@@ -12794,15 +12800,15 @@
   }
 
   public final class CameraManager {
-    method public void addAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener, android.os.Handler);
     method public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(java.lang.String) throws android.hardware.camera2.CameraAccessException;
     method public java.lang.String[] getCameraIdList() throws android.hardware.camera2.CameraAccessException;
-    method public void openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateListener, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
-    method public void removeAvailabilityListener(android.hardware.camera2.CameraManager.AvailabilityListener);
+    method public void openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler) throws android.hardware.camera2.CameraAccessException;
+    method public void registerAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback, android.os.Handler);
+    method public void unregisterAvailabilityCallback(android.hardware.camera2.CameraManager.AvailabilityCallback);
   }
 
-  public static abstract class CameraManager.AvailabilityListener {
-    ctor public CameraManager.AvailabilityListener();
+  public static abstract class CameraManager.AvailabilityCallback {
+    ctor public CameraManager.AvailabilityCallback();
     method public void onCameraAvailable(java.lang.String);
     method public void onCameraUnavailable(java.lang.String);
   }
@@ -13273,7 +13279,7 @@
 
   public final class DisplayManager {
     method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int);
-    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int, android.hardware.display.VirtualDisplay.Callbacks, android.os.Handler);
+    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, android.view.Surface, int, android.hardware.display.VirtualDisplay.Callback, android.os.Handler);
     method public android.view.Display getDisplay(int);
     method public android.view.Display[] getDisplays();
     method public android.view.Display[] getDisplays(java.lang.String);
@@ -13301,11 +13307,11 @@
     method public void setSurface(android.view.Surface);
   }
 
-  public static abstract class VirtualDisplay.Callbacks {
-    ctor public VirtualDisplay.Callbacks();
-    method public void onDisplayPaused();
-    method public void onDisplayResumed();
-    method public void onDisplayStopped();
+  public static abstract class VirtualDisplay.Callback {
+    ctor public VirtualDisplay.Callback();
+    method public void onPaused();
+    method public void onResumed();
+    method public void onStopped();
   }
 
 }
@@ -14011,7 +14017,7 @@
     ctor public SettingInjectorService(java.lang.String);
     method public final android.os.IBinder onBind(android.content.Intent);
     method protected abstract boolean onGetEnabled();
-    method protected deprecated java.lang.String onGetSummary();
+    method protected abstract deprecated java.lang.String onGetSummary();
     method public final void onStart(android.content.Intent, int);
     method public final int onStartCommand(android.content.Intent, int, int);
     field public static final java.lang.String ACTION_INJECTED_SETTING_CHANGED = "android.location.InjectedSettingChanged";
@@ -14041,7 +14047,9 @@
     field public static final int CONTENT_TYPE_SONIFICATION = 4; // 0x4
     field public static final int CONTENT_TYPE_SPEECH = 1; // 0x1
     field public static final int CONTENT_TYPE_UNKNOWN = 0; // 0x0
+    field public static final android.os.Parcelable.Creator CREATOR;
     field public static final int FLAG_AUDIBILITY_ENFORCED = 1; // 0x1
+    field public static final int FLAG_HW_AV_SYNC = 16; // 0x10
     field public static final int USAGE_ALARM = 4; // 0x4
     field public static final int USAGE_ASSISTANCE_ACCESSIBILITY = 11; // 0xb
     field public static final int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12; // 0xc
@@ -14069,29 +14077,6 @@
     method public android.media.AudioAttributes.Builder setUsage(int);
   }
 
-  public class AudioDevice {
-    field public static final int DEVICE_TYPE_AUX_LINE = 19; // 0x13
-    field public static final int DEVICE_TYPE_BLUETOOTH_A2DP = 8; // 0x8
-    field public static final int DEVICE_TYPE_BLUETOOTH_SCO = 7; // 0x7
-    field public static final int DEVICE_TYPE_BUILTIN_EARPIECE = 1; // 0x1
-    field public static final int DEVICE_TYPE_BUILTIN_MIC = 15; // 0xf
-    field public static final int DEVICE_TYPE_BUILTIN_SPEAKER = 2; // 0x2
-    field public static final int DEVICE_TYPE_DOCK = 13; // 0xd
-    field public static final int DEVICE_TYPE_FM = 14; // 0xe
-    field public static final int DEVICE_TYPE_FM_TUNER = 16; // 0x10
-    field public static final int DEVICE_TYPE_HDMI = 9; // 0x9
-    field public static final int DEVICE_TYPE_HDMI_ARC = 10; // 0xa
-    field public static final int DEVICE_TYPE_LINE_ANALOG = 5; // 0x5
-    field public static final int DEVICE_TYPE_LINE_DIGITAL = 6; // 0x6
-    field public static final int DEVICE_TYPE_TELEPHONY = 18; // 0x12
-    field public static final int DEVICE_TYPE_TV_TUNER = 17; // 0x11
-    field public static final int DEVICE_TYPE_UNKNOWN = 0; // 0x0
-    field public static final int DEVICE_TYPE_USB_ACCESSORY = 12; // 0xc
-    field public static final int DEVICE_TYPE_USB_DEVICE = 11; // 0xb
-    field public static final int DEVICE_TYPE_WIRED_HEADPHONES = 4; // 0x4
-    field public static final int DEVICE_TYPE_WIRED_HEADSET = 3; // 0x3
-  }
-
   public class AudioFormat {
     method public int getChannelMask();
     method public int getEncoding();
@@ -14207,6 +14192,8 @@
     method public deprecated void unregisterRemoteControlClient(android.media.RemoteControlClient);
     method public deprecated void unregisterRemoteController(android.media.RemoteController);
     field public static final java.lang.String ACTION_AUDIO_BECOMING_NOISY = "android.media.AUDIO_BECOMING_NOISY";
+    field public static final java.lang.String ACTION_HDMI_AUDIO_PLUG = "android.media.action.HDMI_AUDIO_PLUG";
+    field public static final java.lang.String ACTION_HEADSET_PLUG = "android.intent.action.HEADSET_PLUG";
     field public static final deprecated java.lang.String ACTION_SCO_AUDIO_STATE_CHANGED = "android.media.SCO_AUDIO_STATE_CHANGED";
     field public static final java.lang.String ACTION_SCO_AUDIO_STATE_UPDATED = "android.media.ACTION_SCO_AUDIO_STATE_UPDATED";
     field public static final int ADJUST_LOWER = -1; // 0xffffffff
@@ -14224,6 +14211,9 @@
     field public static final int AUDIO_SESSION_ID_GENERATE = 0; // 0x0
     field public static final int ERROR = -1; // 0xffffffff
     field public static final int ERROR_DEAD_OBJECT = -6; // 0xfffffffa
+    field public static final java.lang.String EXTRA_AUDIO_PLUG_STATE = "android.media.extra.AUDIO_PLUG_STATE";
+    field public static final java.lang.String EXTRA_ENCODINGS = "android.media.extra.ENCODINGS";
+    field public static final java.lang.String EXTRA_MAX_CHANNEL_COUNT = "android.media.extra.MAX_CHANNEL_COUNT";
     field public static final java.lang.String EXTRA_RINGER_MODE = "android.media.EXTRA_RINGER_MODE";
     field public static final java.lang.String EXTRA_SCO_AUDIO_PREVIOUS_STATE = "android.media.extra.SCO_AUDIO_PREVIOUS_STATE";
     field public static final java.lang.String EXTRA_SCO_AUDIO_STATE = "android.media.extra.SCO_AUDIO_STATE";
@@ -14410,6 +14400,7 @@
     field public static final int QUALITY_CIF = 3; // 0x3
     field public static final int QUALITY_HIGH = 1; // 0x1
     field public static final int QUALITY_HIGH_SPEED_1080P = 2004; // 0x7d4
+    field public static final int QUALITY_HIGH_SPEED_2160P = 2005; // 0x7d5
     field public static final int QUALITY_HIGH_SPEED_480P = 2002; // 0x7d2
     field public static final int QUALITY_HIGH_SPEED_720P = 2003; // 0x7d3
     field public static final int QUALITY_HIGH_SPEED_HIGH = 2001; // 0x7d1
@@ -14654,7 +14645,7 @@
   }
 
   public static final class MediaCodec.CodecException extends java.lang.IllegalStateException {
-    method public int getErrorCode();
+    method public java.lang.String getDiagnosticInfo();
     method public boolean isRecoverable();
     method public boolean isTransient();
   }
@@ -14662,6 +14653,7 @@
   public static final class MediaCodec.CryptoException extends java.lang.RuntimeException {
     ctor public MediaCodec.CryptoException(int, java.lang.String);
     method public int getErrorCode();
+    field public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4; // 0x4
     field public static final int ERROR_KEY_EXPIRED = 2; // 0x2
     field public static final int ERROR_NO_KEY = 1; // 0x1
     field public static final int ERROR_RESOURCE_BUSY = 3; // 0x3
@@ -14695,7 +14687,7 @@
 
   public static final class MediaCodecInfo.CodecCapabilities {
     ctor public MediaCodecInfo.CodecCapabilities();
-    method public static android.media.MediaCodecInfo.CodecCapabilities CreateFromProfileLevel(java.lang.String, int, int);
+    method public static android.media.MediaCodecInfo.CodecCapabilities createFromProfileLevel(java.lang.String, int, int);
     method public android.media.MediaCodecInfo.AudioCapabilities getAudioCapabilities();
     method public android.media.MediaFormat getDefaultFormat();
     method public android.media.MediaCodecInfo.EncoderCapabilities getEncoderCapabilities();
@@ -14991,7 +14983,7 @@
 
   public static final class MediaDrm.MediaDrmStateException extends java.lang.IllegalStateException {
     ctor public MediaDrm.MediaDrmStateException(int, java.lang.String);
-    method public int getErrorCode();
+    method public java.lang.String getDiagnosticInfo();
   }
 
   public static abstract interface MediaDrm.OnEventListener {
@@ -15927,13 +15919,13 @@
   }
 
   public abstract class VolumeProvider {
-    ctor public VolumeProvider(int, int);
+    ctor public VolumeProvider(int, int, int);
+    method public final int getCurrentVolume();
     method public final int getMaxVolume();
     method public final int getVolumeControl();
-    method public final void notifyVolumeChanged();
     method public void onAdjustVolume(int);
-    method public abstract int onGetCurrentVolume();
     method public void onSetVolumeTo(int);
+    method public final void setCurrentVolume(int);
     field public static final int VOLUME_CONTROL_ABSOLUTE = 2; // 0x2
     field public static final int VOLUME_CONTROL_FIXED = 0; // 0x0
     field public static final int VOLUME_CONTROL_RELATIVE = 1; // 0x1
@@ -16177,12 +16169,16 @@
     method public short getRoundedStrength() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
     method public boolean getSpeakerAngles(int, int, int[]) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
     method public boolean getStrengthSupported();
-    method public int getVirtualizationMode() throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
+    method public int getVirtualizationMode() throws java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
     method public void setParameterListener(android.media.audiofx.Virtualizer.OnParameterChangeListener);
     method public void setProperties(android.media.audiofx.Virtualizer.Settings) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
     method public void setStrength(short) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException, java.lang.UnsupportedOperationException;
     field public static final int PARAM_STRENGTH = 1; // 0x1
     field public static final int PARAM_STRENGTH_SUPPORTED = 0; // 0x0
+    field public static final int VIRTUALIZATION_MODE_AUTO = 1; // 0x1
+    field public static final int VIRTUALIZATION_MODE_BINAURAL = 2; // 0x2
+    field public static final int VIRTUALIZATION_MODE_OFF = 0; // 0x0
+    field public static final int VIRTUALIZATION_MODE_TRANSAURAL = 3; // 0x3
   }
 
   public static abstract interface Virtualizer.OnParameterChangeListener {
@@ -16250,12 +16246,12 @@
     method public void connect();
     method public void disconnect();
     method public android.os.Bundle getExtras();
-    method public android.net.Uri getRoot();
+    method public java.lang.String getRoot();
     method public android.content.ComponentName getServiceComponent();
     method public android.media.session.MediaSession.Token getSessionToken();
     method public boolean isConnected();
-    method public void subscribe(android.net.Uri, android.media.browse.MediaBrowser.SubscriptionCallback);
-    method public void unsubscribe(android.net.Uri);
+    method public void subscribe(java.lang.String, android.media.browse.MediaBrowser.SubscriptionCallback);
+    method public void unsubscribe(java.lang.String);
   }
 
   public static class MediaBrowser.ConnectionCallback {
@@ -16266,7 +16262,7 @@
   }
 
   public static class MediaBrowser.MediaItem implements android.os.Parcelable {
-    ctor public MediaBrowser.MediaItem(int, android.media.MediaDescription);
+    ctor public MediaBrowser.MediaItem(android.media.MediaDescription, int);
     method public int describeContents();
     method public android.media.MediaDescription getDescription();
     method public int getFlags();
@@ -16281,8 +16277,8 @@
 
   public static abstract class MediaBrowser.SubscriptionCallback {
     ctor public MediaBrowser.SubscriptionCallback();
-    method public void onChildrenLoaded(android.net.Uri, java.util.List<android.media.browse.MediaBrowser.MediaItem>);
-    method public void onError(android.net.Uri);
+    method public void onChildrenLoaded(java.lang.String, java.util.List<android.media.browse.MediaBrowser.MediaItem>);
+    method public void onError(java.lang.String);
   }
 
 }
@@ -16346,7 +16342,7 @@
 
   public final class MediaProjection {
     method public void addCallback(android.media.projection.MediaProjection.Callback, android.os.Handler);
-    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay.Callbacks, android.os.Handler);
+    method public android.hardware.display.VirtualDisplay createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay.Callback, android.os.Handler);
     method public void removeCallback(android.media.projection.MediaProjection.Callback);
     method public void stop();
   }
@@ -16367,8 +16363,6 @@
 
   public final class MediaController {
     ctor public MediaController(android.content.Context, android.media.session.MediaSession.Token);
-    method public void addCallback(android.media.session.MediaController.Callback);
-    method public void addCallback(android.media.session.MediaController.Callback, android.os.Handler);
     method public void adjustVolume(int, int);
     method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
     method public android.os.Bundle getExtras();
@@ -16383,9 +16377,11 @@
     method public android.app.PendingIntent getSessionActivity();
     method public android.media.session.MediaSession.Token getSessionToken();
     method public android.media.session.MediaController.TransportControls getTransportControls();
-    method public void removeCallback(android.media.session.MediaController.Callback);
+    method public void registerCallback(android.media.session.MediaController.Callback);
+    method public void registerCallback(android.media.session.MediaController.Callback, android.os.Handler);
     method public void sendCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver);
     method public void setVolumeTo(int, int);
+    method public void unregisterCallback(android.media.session.MediaController.Callback);
   }
 
   public static abstract class MediaController.Callback {
@@ -16711,10 +16707,10 @@
   }
 
   public final class TvInputInfo implements android.os.Parcelable {
+    method public android.content.Intent createSettingsIntent();
+    method public android.content.Intent createSetupIntent();
     method public int describeContents();
     method public java.lang.String getId();
-    method public android.content.Intent getIntentForSettingsActivity();
-    method public android.content.Intent getIntentForSetupActivity();
     method public java.lang.String getParentId();
     method public android.content.pm.ServiceInfo getServiceInfo();
     method public int getType();
@@ -16722,7 +16718,8 @@
     method public android.graphics.drawable.Drawable loadIcon(android.content.Context);
     method public java.lang.CharSequence loadLabel(android.content.Context);
     method public void writeToParcel(android.os.Parcel, int);
-    field public static final java.lang.String EXTRA_INPUT_ID = "inputId";
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final java.lang.String EXTRA_INPUT_ID = "android.media.tv.extra.INPUT_ID";
     field public static final int TYPE_COMPONENT = 1004; // 0x3ec
     field public static final int TYPE_COMPOSITE = 1001; // 0x3e9
     field public static final int TYPE_DISPLAY_PORT = 1008; // 0x3f0
@@ -16741,23 +16738,23 @@
     method public java.util.List<android.media.tv.TvInputInfo> getTvInputList();
     method public boolean isParentalControlsEnabled();
     method public boolean isRatingBlocked(android.media.tv.TvContentRating);
-    method public void registerListener(android.media.tv.TvInputManager.TvInputListener, android.os.Handler);
-    method public void unregisterListener(android.media.tv.TvInputManager.TvInputListener);
-    field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.TvInputManager.ACTION_BLOCKED_RATINGS_CHANGED";
-    field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.TvInputManager.ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED";
-    field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.TvInputManager.ACTION_QUERY_CONTENT_RATING_SYSTEMS";
+    method public void registerCallback(android.media.tv.TvInputManager.TvInputCallback, android.os.Handler);
+    method public void unregisterCallback(android.media.tv.TvInputManager.TvInputCallback);
+    field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
+    field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
+    field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
     field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
     field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
     field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
-    field public static final java.lang.String META_DATA_CONTENT_RATING_SYSTEMS = "android.media.tv.TvInputManager.META_DATA_CONTENT_RATING_SYSTEMS";
+    field public static final java.lang.String META_DATA_CONTENT_RATING_SYSTEMS = "android.media.tv.metadata.CONTENT_RATING_SYSTEMS";
     field public static final int VIDEO_UNAVAILABLE_REASON_BUFFERING = 3; // 0x3
     field public static final int VIDEO_UNAVAILABLE_REASON_TUNING = 1; // 0x1
     field public static final int VIDEO_UNAVAILABLE_REASON_UNKNOWN = 0; // 0x0
     field public static final int VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL = 2; // 0x2
   }
 
-  public static abstract class TvInputManager.TvInputListener {
-    ctor public TvInputManager.TvInputListener();
+  public static abstract class TvInputManager.TvInputCallback {
+    ctor public TvInputManager.TvInputCallback();
     method public void onInputAdded(java.lang.String);
     method public void onInputRemoved(java.lang.String);
     method public void onInputStateChanged(java.lang.String, int);
@@ -16848,10 +16845,10 @@
     method public boolean onUnhandledInputEvent(android.view.InputEvent);
     method public void reset();
     method public void selectTrack(int, java.lang.String);
+    method public void setCallback(android.media.tv.TvView.TvInputCallback);
     method public void setCaptionEnabled(boolean);
     method public void setOnUnhandledInputEventListener(android.media.tv.TvView.OnUnhandledInputEventListener);
     method public void setStreamVolume(float);
-    method public void setTvInputListener(android.media.tv.TvView.TvInputListener);
     method public void tune(java.lang.String, android.net.Uri);
   }
 
@@ -16859,8 +16856,8 @@
     method public abstract boolean onUnhandledInputEvent(android.view.InputEvent);
   }
 
-  public static abstract class TvView.TvInputListener {
-    ctor public TvView.TvInputListener();
+  public static abstract class TvView.TvInputCallback {
+    ctor public TvView.TvInputCallback();
     method public void onChannelRetuned(java.lang.String, android.net.Uri);
     method public void onConnectionFailed(java.lang.String);
     method public void onContentAllowed(java.lang.String);
@@ -17005,6 +17002,7 @@
 package android.net {
 
   public class ConnectivityManager {
+    method public void addDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
     method public android.net.NetworkInfo getActiveNetworkInfo();
     method public android.net.NetworkInfo[] getAllNetworkInfo();
     method public android.net.Network[] getAllNetworks();
@@ -17018,8 +17016,8 @@
     method public boolean isActiveNetworkMetered();
     method public boolean isDefaultNetworkActive();
     method public static boolean isNetworkTypeValid(int);
-    method public void registerDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
     method public void registerNetworkCallback(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
+    method public void removeDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
     method public void reportBadNetwork(android.net.Network);
     method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
     method public deprecated boolean requestRouteToHost(int, int);
@@ -17027,7 +17025,6 @@
     method public static boolean setProcessDefaultNetwork(android.net.Network);
     method public deprecated int startUsingNetworkFeature(int, java.lang.String);
     method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
-    method public void unregisterDefaultNetworkActiveListener(android.net.ConnectivityManager.OnNetworkActiveListener);
     method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
     field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
     field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
@@ -17101,6 +17098,7 @@
     method public int getPrefixLength();
     method public int getScope();
     method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
   }
 
   public final class LinkProperties implements android.os.Parcelable {
@@ -17313,6 +17311,7 @@
     method public android.net.Uri getPacFileUrl();
     method public int getPort();
     method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
   }
 
   public abstract class PskKeyManager {
@@ -17984,23 +17983,6 @@
     enum_constant public static final android.net.wifi.SupplicantState UNINITIALIZED;
   }
 
-  public class WifiAdapter implements android.os.Parcelable {
-    method public int describeContents();
-    method public java.lang.String getName();
-    method public boolean is5GHzBandSupported();
-    method public boolean isDeviceToApRttSupported();
-    method public boolean isDeviceToDeviceRttSupported();
-    method public boolean isEnhancedPowerReportingSupported();
-    method public boolean isOffChannelTdlsSupported();
-    method public boolean isP2pSupported();
-    method public boolean isPasspointSupported();
-    method public boolean isPortableHotspotSupported();
-    method public boolean isPreferredNetworkOffloadSupported();
-    method public boolean isTdlsSupported();
-    method public boolean isWifiScannerSupported();
-    method public void writeToParcel(android.os.Parcel, int);
-  }
-
   public class WifiConfiguration implements android.os.Parcelable {
     ctor public WifiConfiguration();
     method public int describeContents();
@@ -18134,7 +18116,7 @@
   public class WifiManager {
     method public int addNetwork(android.net.wifi.WifiConfiguration);
     method public static int calculateSignalLevel(int, int);
-    method public void cancelWps(android.net.wifi.WifiManager.ActionListener);
+    method public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
     method public static int compareSignalLevel(int, int);
     method public android.net.wifi.WifiManager.MulticastLock createMulticastLock(java.lang.String);
     method public android.net.wifi.WifiManager.WifiLock createWifiLock(int, java.lang.String);
@@ -18142,13 +18124,18 @@
     method public boolean disableNetwork(int);
     method public boolean disconnect();
     method public boolean enableNetwork(int, boolean);
-    method public java.util.List<android.net.wifi.WifiAdapter> getAdapters();
     method public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
     method public android.net.wifi.WifiInfo getConnectionInfo();
     method public android.net.DhcpInfo getDhcpInfo();
     method public java.util.List<android.net.wifi.ScanResult> getScanResults();
     method public int getWifiState();
+    method public boolean is5GHzBandSupported();
+    method public boolean isDeviceToApRttSupported();
+    method public boolean isEnhancedPowerReportingSupported();
+    method public boolean isP2pSupported();
+    method public boolean isPreferredNetworkOffloadSupported();
     method public boolean isScanAlwaysAvailable();
+    method public boolean isTdlsSupported();
     method public boolean isWifiEnabled();
     method public boolean pingSupplicant();
     method public boolean reassociate();
@@ -18159,12 +18146,10 @@
     method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
     method public boolean setWifiEnabled(boolean);
     method public boolean startScan();
-    method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsListener);
+    method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
     method public int updateNetwork(android.net.wifi.WifiConfiguration);
     field public static final java.lang.String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
     field public static final java.lang.String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
-    field public static final int BUSY = 2; // 0x2
-    field public static final int ERROR = 0; // 0x0
     field public static final int ERROR_AUTHENTICATING = 1; // 0x1
     field public static final java.lang.String EXTRA_BSSID = "bssid";
     field public static final java.lang.String EXTRA_NETWORK_INFO = "networkInfo";
@@ -18175,8 +18160,6 @@
     field public static final java.lang.String EXTRA_SUPPLICANT_ERROR = "supplicantError";
     field public static final java.lang.String EXTRA_WIFI_INFO = "wifiInfo";
     field public static final java.lang.String EXTRA_WIFI_STATE = "wifi_state";
-    field public static final int INVALID_ARGS = 8; // 0x8
-    field public static final int IN_PROGRESS = 1; // 0x1
     field public static final java.lang.String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
     field public static final java.lang.String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
     field public static final java.lang.String RSSI_CHANGED_ACTION = "android.net.wifi.RSSI_CHANGED";
@@ -18199,11 +18182,6 @@
     field public static final int WPS_WEP_PROHIBITED = 4; // 0x4
   }
 
-  public static abstract interface WifiManager.ActionListener {
-    method public abstract void onFailure(int);
-    method public abstract void onSuccess();
-  }
-
   public class WifiManager.MulticastLock {
     method public void acquire();
     method public boolean isHeld();
@@ -18219,10 +18197,11 @@
     method public void setWorkSource(android.os.WorkSource);
   }
 
-  public static abstract interface WifiManager.WpsListener {
-    method public abstract void onCompletion();
-    method public abstract void onFailure(int);
-    method public abstract void onStartSuccess(java.lang.String);
+  public static abstract class WifiManager.WpsCallback {
+    ctor public WifiManager.WpsCallback();
+    method public abstract void onFailed(int);
+    method public abstract void onStarted(java.lang.String);
+    method public abstract void onSucceeded();
   }
 
   public class WpsInfo implements android.os.Parcelable {
@@ -21573,7 +21552,7 @@
     field public static final int JELLY_BEAN_MR2 = 18; // 0x12
     field public static final int KITKAT = 19; // 0x13
     field public static final int KITKAT_WATCH = 20; // 0x14
-    field public static final int L = 10000; // 0x2710
+    field public static final int L = 21; // 0x15
   }
 
   public final class Bundle extends android.os.BaseBundle implements java.lang.Cloneable android.os.Parcelable {
@@ -21611,6 +21590,8 @@
     method public short getShort(java.lang.String);
     method public short getShort(java.lang.String, short);
     method public short[] getShortArray(java.lang.String);
+    method public android.util.Size getSize(java.lang.String);
+    method public android.util.SizeF getSizeF(java.lang.String);
     method public android.util.SparseArray<T> getSparseParcelableArray(java.lang.String);
     method public java.util.ArrayList<java.lang.String> getStringArrayList(java.lang.String);
     method public boolean hasFileDescriptors();
@@ -21635,6 +21616,8 @@
     method public void putSerializable(java.lang.String, java.io.Serializable);
     method public void putShort(java.lang.String, short);
     method public void putShortArray(java.lang.String, short[]);
+    method public void putSize(java.lang.String, android.util.Size);
+    method public void putSizeF(java.lang.String, android.util.SizeF);
     method public void putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>);
     method public void putStringArrayList(java.lang.String, java.util.ArrayList<java.lang.String>);
     method public void readFromParcel(android.os.Parcel);
@@ -22086,6 +22069,8 @@
     method public final android.os.PersistableBundle readPersistableBundle();
     method public final android.os.PersistableBundle readPersistableBundle(java.lang.ClassLoader);
     method public final java.io.Serializable readSerializable();
+    method public final android.util.Size readSize();
+    method public final android.util.SizeF readSizeF();
     method public final android.util.SparseArray readSparseArray(java.lang.ClassLoader);
     method public final android.util.SparseBooleanArray readSparseBooleanArray();
     method public final java.lang.String readString();
@@ -22127,6 +22112,8 @@
     method public final void writeParcelableArray(T[], int);
     method public final void writePersistableBundle(android.os.PersistableBundle);
     method public final void writeSerializable(java.io.Serializable);
+    method public final void writeSize(android.util.Size);
+    method public final void writeSizeF(android.util.SizeF);
     method public final void writeSparseArray(android.util.SparseArray<java.lang.Object>);
     method public final void writeSparseBooleanArray(android.util.SparseBooleanArray);
     method public final void writeString(java.lang.String);
@@ -22466,9 +22453,6 @@
 
   public class UserManager {
     method public android.os.Bundle getApplicationRestrictions(java.lang.String);
-    method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
-    method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle);
-    method public java.lang.CharSequence getBadgedLabelForUser(java.lang.CharSequence, android.os.UserHandle);
     method public long getSerialNumberForUser(android.os.UserHandle);
     method public int getUserCount();
     method public android.os.UserHandle getUserForSerialNumber(long);
@@ -22502,6 +22486,7 @@
     field public static final java.lang.String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources";
     field public static final java.lang.String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts";
     field public static final java.lang.String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";
+    field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam";
     field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls";
     field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user";
     field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location";
@@ -23696,9 +23681,8 @@
     field public static final java.lang.String DATE = "date";
     field public static final java.lang.String DEFAULT_SORT_ORDER = "date DESC";
     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 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_NONE = 0; // 0x0
     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
@@ -24060,11 +24044,11 @@
 
   public static final class ContactsContract.CommonDataKinds.Callable implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     ctor public ContactsContract.CommonDataKinds.Callable();
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final android.net.Uri CONTENT_FILTER_URI;
     field public static final android.net.Uri CONTENT_URI;
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
   }
 
   protected static abstract interface ContactsContract.CommonDataKinds.CommonColumns implements android.provider.ContactsContract.CommonDataKinds.BaseTypes {
@@ -24075,11 +24059,11 @@
 
   public static final class ContactsContract.CommonDataKinds.Contactables implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     ctor public ContactsContract.CommonDataKinds.Contactables();
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final android.net.Uri CONTENT_FILTER_URI;
     field public static final android.net.Uri CONTENT_URI;
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
   }
 
@@ -24087,15 +24071,15 @@
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
     field public static final java.lang.String ADDRESS = "data1";
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final android.net.Uri CONTENT_FILTER_URI;
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/email_v2";
     field public static final android.net.Uri CONTENT_LOOKUP_URI;
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/email_v2";
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String DISPLAY_NAME = "data4";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final int TYPE_HOME = 1; // 0x1
     field public static final int TYPE_MOBILE = 4; // 0x4
     field public static final int TYPE_OTHER = 3; // 0x3
@@ -24105,10 +24089,10 @@
   public static final class ContactsContract.CommonDataKinds.Event implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static int getTypeResource(java.lang.Integer);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_event";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String START_DATE = "data1";
     field public static final int TYPE_ANNIVERSARY = 1; // 0x1
     field public static final int TYPE_BIRTHDAY = 3; // 0x3
@@ -24116,19 +24100,19 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.GroupMembership implements android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/group_membership";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String GROUP_ROW_ID = "data1";
     field public static final java.lang.String GROUP_SOURCE_ID = "group_sourceid";
   }
 
   public static final class ContactsContract.CommonDataKinds.Identity implements android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/identity";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String IDENTITY = "data1";
     field public static final java.lang.String NAMESPACE = "data2";
   }
@@ -24138,11 +24122,11 @@
     method public static final int getProtocolLabelResource(int);
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/im";
     field public static final java.lang.String CUSTOM_PROTOCOL = "data6";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String PROTOCOL = "data5";
     field public static final int PROTOCOL_AIM = 0; // 0x0
     field public static final int PROTOCOL_CUSTOM = -1; // 0xffffffff
@@ -24160,10 +24144,10 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.Nickname implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/nickname";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String NAME = "data1";
     field public static final int TYPE_DEFAULT = 1; // 0x1
     field public static final int TYPE_INITIALS = 5; // 0x5
@@ -24174,22 +24158,22 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.Note implements android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/note";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String NOTE = "data1";
   }
 
   public static final class ContactsContract.CommonDataKinds.Organization implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String COMPANY = "data1";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/organization";
     field public static final java.lang.String DEPARTMENT = "data5";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String JOB_DESCRIPTION = "data6";
     field public static final java.lang.String OFFICE_LOCATION = "data9";
     field public static final java.lang.String PHONETIC_NAME = "data8";
@@ -24202,13 +24186,13 @@
   public static final class ContactsContract.CommonDataKinds.Phone implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final android.net.Uri CONTENT_FILTER_URI;
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/phone_v2";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/phone_v2";
     field public static final android.net.Uri CONTENT_URI;
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String NORMALIZED_NUMBER = "data4";
     field public static final java.lang.String NUMBER = "data1";
     field public static final java.lang.String SEARCH_DISPLAY_NAME_KEY = "search_display_name";
@@ -24236,10 +24220,10 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.Photo implements android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/photo";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String PHOTO = "data15";
     field public static final java.lang.String PHOTO_FILE_ID = "data14";
   }
@@ -24247,10 +24231,10 @@
   public static final class ContactsContract.CommonDataKinds.Relation implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/relation";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String NAME = "data1";
     field public static final int TYPE_ASSISTANT = 1; // 0x1
     field public static final int TYPE_BROTHER = 2; // 0x2
@@ -24271,10 +24255,10 @@
   public static final class ContactsContract.CommonDataKinds.SipAddress implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/sip_address";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String SIP_ADDRESS = "data1";
     field public static final int TYPE_HOME = 1; // 0x1
     field public static final int TYPE_OTHER = 3; // 0x3
@@ -24282,11 +24266,11 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.StructuredName implements android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/name";
     field public static final java.lang.String DISPLAY_NAME = "data1";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String FAMILY_NAME = "data3";
     field public static final java.lang.String FULL_NAME_STYLE = "data10";
     field public static final java.lang.String GIVEN_NAME = "data2";
@@ -24301,14 +24285,14 @@
   public static final class ContactsContract.CommonDataKinds.StructuredPostal implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
     method public static final java.lang.CharSequence getTypeLabel(android.content.res.Resources, int, java.lang.CharSequence);
     method public static final int getTypeLabelResource(int);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CITY = "data7";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/postal-address_v2";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/postal-address_v2";
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String COUNTRY = "data10";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String FORMATTED_ADDRESS = "data1";
     field public static final java.lang.String NEIGHBORHOOD = "data6";
     field public static final java.lang.String POBOX = "data5";
@@ -24321,10 +24305,10 @@
   }
 
   public static final class ContactsContract.CommonDataKinds.Website implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/website";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final int TYPE_BLOG = 2; // 0x2
     field public static final int TYPE_FTP = 6; // 0x6
     field public static final int TYPE_HOME = 4; // 0x4
@@ -24372,7 +24356,6 @@
     method public static deprecated void markAsContacted(android.content.ContentResolver, long);
     method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri, boolean);
     method public static java.io.InputStream openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final android.net.Uri CONTENT_FILTER_URI;
     field public static final android.net.Uri CONTENT_FREQUENT_URI;
     field public static final android.net.Uri CONTENT_GROUP_URI;
@@ -24385,8 +24368,9 @@
     field public static final android.net.Uri CONTENT_URI;
     field public static final java.lang.String CONTENT_VCARD_TYPE = "text/x-vcard";
     field public static final android.net.Uri CONTENT_VCARD_URI;
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
   }
 
   public static final class ContactsContract.Contacts.AggregationSuggestions implements android.provider.BaseColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactStatusColumns android.provider.ContactsContract.ContactsColumns {
@@ -24431,11 +24415,11 @@
 
   public static final class ContactsContract.Data implements android.provider.ContactsContract.DataColumnsWithJoins {
     method public static android.net.Uri getContactLookupUri(android.content.ContentResolver, android.net.Uri);
-    field public static final java.lang.String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
     field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/data";
     field public static final android.net.Uri CONTENT_URI;
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
-    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX = "android.provider.extra.ADDRESS_BOOK_INDEX";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
+    field public static final java.lang.String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
     field public static final java.lang.String VISIBLE_CONTACTS_ONLY = "visible_contacts_only";
   }
 
@@ -24679,7 +24663,7 @@
     ctor public ContactsContract.QuickContact();
     method public static void showQuickContact(android.content.Context, android.view.View, android.net.Uri, int, java.lang.String[]);
     method public static void showQuickContact(android.content.Context, android.graphics.Rect, android.net.Uri, int, java.lang.String[]);
-    field public static final java.lang.String ACTION_QUICK_CONTACT = "com.android.contacts.action.QUICK_CONTACT";
+    field public static final java.lang.String ACTION_QUICK_CONTACT = "android.provider.action.QUICK_CONTACT";
     field public static final java.lang.String EXTRA_EXCLUDE_MIMES = "android.provider.extra.EXCLUDE_MIMES";
     field public static final int MODE_LARGE = 3; // 0x3
     field public static final int MODE_MEDIUM = 2; // 0x2
@@ -25330,14 +25314,12 @@
     field public static final java.lang.String ACTION_SYNC_SETTINGS = "android.settings.SYNC_SETTINGS";
     field public static final java.lang.String ACTION_USAGE_ACCESS_SETTINGS = "android.settings.USAGE_ACCESS_SETTINGS";
     field public static final java.lang.String ACTION_USER_DICTIONARY_SETTINGS = "android.settings.USER_DICTIONARY_SETTINGS";
-    field public static final java.lang.String ACTION_VOICE_CONTROL_AIRPLANE_MODE = "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
     field public static final java.lang.String ACTION_VOICE_INPUT_SETTINGS = "android.settings.VOICE_INPUT_SETTINGS";
     field public static final java.lang.String ACTION_WIFI_IP_SETTINGS = "android.settings.WIFI_IP_SETTINGS";
     field public static final java.lang.String ACTION_WIFI_SETTINGS = "android.settings.WIFI_SETTINGS";
     field public static final java.lang.String ACTION_WIRELESS_SETTINGS = "android.settings.WIRELESS_SETTINGS";
     field public static final java.lang.String AUTHORITY = "settings";
     field public static final java.lang.String EXTRA_ACCOUNT_TYPES = "account_types";
-    field public static final java.lang.String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
     field public static final java.lang.String EXTRA_AUTHORITIES = "authorities";
     field public static final java.lang.String EXTRA_INPUT_METHOD_ID = "input_method_id";
   }
@@ -27063,18 +27045,18 @@
     ctor public MediaBrowserService();
     method public void dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
     method public android.media.session.MediaSession.Token getSessionToken();
-    method public void notifyChildrenChanged(android.net.Uri);
+    method public void notifyChildrenChanged(java.lang.String);
     method public android.os.IBinder onBind(android.content.Intent);
     method public abstract android.service.media.MediaBrowserService.BrowserRoot onGetRoot(java.lang.String, int, android.os.Bundle);
-    method public abstract void onLoadChildren(android.net.Uri, android.service.media.MediaBrowserService.Result<java.util.List<android.media.browse.MediaBrowser.MediaItem>>);
+    method public abstract void onLoadChildren(java.lang.String, android.service.media.MediaBrowserService.Result<java.util.List<android.media.browse.MediaBrowser.MediaItem>>);
     method public void setSessionToken(android.media.session.MediaSession.Token);
-    field public static final java.lang.String SERVICE_ACTION = "android.media.browse.MediaBrowserService";
+    field public static final java.lang.String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
   }
 
   public static final class MediaBrowserService.BrowserRoot {
-    ctor public MediaBrowserService.BrowserRoot(android.net.Uri, android.os.Bundle);
+    ctor public MediaBrowserService.BrowserRoot(java.lang.String, android.os.Bundle);
     method public android.os.Bundle getExtras();
-    method public android.net.Uri getRootUri();
+    method public java.lang.String getRootId();
   }
 
   public class MediaBrowserService.Result {
@@ -27189,9 +27171,9 @@
 package android.service.voice {
 
   public class AlwaysOnHotwordDetector {
-    method public android.content.Intent createIntentToEnroll();
-    method public android.content.Intent createIntentToReEnroll();
-    method public android.content.Intent createIntentToUnEnroll();
+    method public android.content.Intent createEnrollIntent();
+    method public android.content.Intent createReEnrollIntent();
+    method public android.content.Intent createUnEnrollIntent();
     method public int getSupportedRecognitionModes();
     method public boolean startRecognition(int);
     method public boolean stopRecognition();
@@ -27235,52 +27217,14 @@
     ctor public VoiceInteractionSession(android.content.Context);
     ctor public VoiceInteractionSession(android.content.Context, android.os.Handler);
     method public void finish();
-    method public android.view.LayoutInflater getLayoutInflater();
-    method public android.app.Dialog getWindow();
-    method public void hideWindow();
-    method public void onAbortVoice(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
-    method public void onBackPressed();
-    method public abstract void onCancel(android.service.voice.VoiceInteractionSession.Request);
     method public void onCloseSystemDialogs();
-    method public abstract void onCommand(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.String, android.os.Bundle);
-    method public void onCompleteVoice(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
-    method public void onComputeInsets(android.service.voice.VoiceInteractionSession.Insets);
-    method public abstract void onConfirm(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle);
     method public void onCreate(android.os.Bundle);
-    method public android.view.View onCreateContentView();
     method public void onDestroy();
-    method public boolean[] onGetSupportedCommands(android.service.voice.VoiceInteractionSession.Caller, java.lang.String[]);
     method public boolean onKeyDown(int, android.view.KeyEvent);
     method public boolean onKeyLongPress(int, android.view.KeyEvent);
     method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
     method public boolean onKeyUp(int, android.view.KeyEvent);
-    method public void onTaskFinished(android.content.Intent, int);
-    method public void onTaskStarted(android.content.Intent, int);
     method public void setContentView(android.view.View);
-    method public void setTheme(int);
-    method public void showWindow();
-    method public void startVoiceActivity(android.content.Intent);
-  }
-
-  public static class VoiceInteractionSession.Caller {
-  }
-
-  public static final class VoiceInteractionSession.Insets {
-    ctor public VoiceInteractionSession.Insets();
-    field public static final int TOUCHABLE_INSETS_CONTENT = 1; // 0x1
-    field public static final int TOUCHABLE_INSETS_FRAME = 0; // 0x0
-    field public static final int TOUCHABLE_INSETS_REGION = 3; // 0x3
-    field public final android.graphics.Rect contentInsets;
-    field public int touchableInsets;
-    field public final android.graphics.Region touchableRegion;
-  }
-
-  public static class VoiceInteractionSession.Request {
-    method public void sendAbortVoiceResult(android.os.Bundle);
-    method public void sendCancelResult();
-    method public void sendCommandResult(boolean, android.os.Bundle);
-    method public void sendCompleteVoiceResult(android.os.Bundle);
-    method public void sendConfirmResult(boolean, android.os.Bundle);
   }
 
   public abstract class VoiceInteractionSessionService extends android.app.Service {
@@ -27309,6 +27253,7 @@
     method public android.view.SurfaceHolder getSurfaceHolder();
     method public boolean isPreview();
     method public boolean isVisible();
+    method public void onApplyWindowInsets(android.view.WindowInsets);
     method public android.os.Bundle onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean);
     method public void onCreate(android.view.SurfaceHolder);
     method public void onDesiredSizeChanged(int, int);
@@ -27462,11 +27407,12 @@
     ctor public TextToSpeech(android.content.Context, android.speech.tts.TextToSpeech.OnInitListener);
     ctor public TextToSpeech(android.content.Context, android.speech.tts.TextToSpeech.OnInitListener, java.lang.String);
     method public int addEarcon(java.lang.String, java.lang.String, int);
-    method public int addEarcon(java.lang.String, java.lang.String);
+    method public deprecated int addEarcon(java.lang.String, java.lang.String);
+    method public int addEarcon(java.lang.String, java.io.File);
     method public int addSpeech(java.lang.String, java.lang.String, int);
     method public int addSpeech(java.lang.CharSequence, java.lang.String, int);
     method public int addSpeech(java.lang.String, java.lang.String);
-    method public int addSpeech(java.lang.CharSequence, java.lang.String);
+    method public int addSpeech(java.lang.CharSequence, java.io.File);
     method public deprecated boolean areDefaultsEnforced();
     method public java.util.Set<java.util.Locale> getAvailableLanguages();
     method public java.lang.String getDefaultEngine();
@@ -27480,7 +27426,7 @@
     method public java.util.Set<android.speech.tts.Voice> getVoices();
     method public int isLanguageAvailable(java.util.Locale);
     method public boolean isSpeaking();
-    method public int playEarcon(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
+    method public int playEarcon(java.lang.String, int, android.os.Bundle, java.lang.String);
     method public deprecated int playEarcon(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>);
     method public int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
     method public deprecated int playSilence(long, int, java.util.HashMap<java.lang.String, java.lang.String>);
@@ -27493,10 +27439,10 @@
     method public int setSpeechRate(float);
     method public int setVoice(android.speech.tts.Voice);
     method public void shutdown();
-    method public int speak(java.lang.CharSequence, int, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
+    method public int speak(java.lang.CharSequence, int, android.os.Bundle, java.lang.String);
     method public deprecated int speak(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>);
     method public int stop();
-    method public int synthesizeToFile(java.lang.CharSequence, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String, java.lang.String);
+    method public int synthesizeToFile(java.lang.CharSequence, android.os.Bundle, java.io.File, java.lang.String);
     method public deprecated int synthesizeToFile(java.lang.String, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String);
     field public static final java.lang.String ACTION_TTS_QUEUE_PROCESSING_COMPLETED = "android.speech.tts.TTS_QUEUE_PROCESSING_COMPLETED";
     field public static final int ERROR = -1; // 0xffffffff
@@ -27569,15 +27515,15 @@
 
   public abstract class TextToSpeechService extends android.app.Service {
     ctor public TextToSpeechService();
-    method protected int isValidVoiceName(java.lang.String);
     method public android.os.IBinder onBind(android.content.Intent);
     method protected java.lang.String onGetDefaultVoiceNameFor(java.lang.String, java.lang.String, java.lang.String);
     method protected java.util.Set<java.lang.String> onGetFeaturesForLanguage(java.lang.String, java.lang.String, java.lang.String);
     method protected abstract java.lang.String[] onGetLanguage();
-    method protected java.util.List<android.speech.tts.Voice> onGetVoices();
+    method public java.util.List<android.speech.tts.Voice> onGetVoices();
     method protected abstract int onIsLanguageAvailable(java.lang.String, java.lang.String, java.lang.String);
+    method public int onIsValidVoiceName(java.lang.String);
     method protected abstract int onLoadLanguage(java.lang.String, java.lang.String, java.lang.String);
-    method protected int onLoadVoice(java.lang.String);
+    method public int onLoadVoice(java.lang.String);
     method protected abstract void onStop();
     method protected abstract void onSynthesizeText(android.speech.tts.SynthesisRequest, android.speech.tts.SynthesisCallback);
   }
@@ -27598,7 +27544,7 @@
     method public java.util.Locale getLocale();
     method public java.lang.String getName();
     method public int getQuality();
-    method public boolean getRequiresNetworkConnection();
+    method public boolean isNetworkConnectionRequired();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final int LATENCY_HIGH = 400; // 0x190
     field public static final int LATENCY_LOW = 200; // 0xc8
@@ -28255,7 +28201,6 @@
     method public int describeContents();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
-    field public static final int ROUTE_ALL = 15; // 0xf
     field public static final int ROUTE_BLUETOOTH = 2; // 0x2
     field public static final int ROUTE_EARPIECE = 1; // 0x1
     field public static final int ROUTE_SPEAKER = 8; // 0x8
@@ -28268,17 +28213,19 @@
 
   public abstract class Conference {
     ctor public Conference(android.telecomm.PhoneAccountHandle);
-    method public boolean addConnection(android.telecomm.Connection);
-    method public void destroy();
+    method public final boolean addConnection(android.telecomm.Connection);
+    method public final void destroy();
     method public final int getCapabilities();
     method public final java.util.List<android.telecomm.Connection> getConnections();
-    method public final android.telecomm.PhoneAccountHandle getPhoneAccount();
+    method public final android.telecomm.PhoneAccountHandle getPhoneAccountHandle();
     method public final int getState();
     method public void onDisconnect();
     method public void onHold();
+    method public void onMerge();
     method public void onSeparate(android.telecomm.Connection);
+    method public void onSwap();
     method public void onUnhold();
-    method public void removeConnection(android.telecomm.Connection);
+    method public final void removeConnection(android.telecomm.Connection);
     method public final void setActive();
     method public final void setCapabilities(int);
     method public final void setDisconnected(int, java.lang.String);
@@ -28334,7 +28281,6 @@
     method public final void setRequestingRingback(boolean);
     method public final void setRinging();
     method public final void setStatusHints(android.telecomm.StatusHints);
-    method public final void startActivityFromInCall(android.app.PendingIntent);
     method public static java.lang.String stateToString(int);
     field public static final int STATE_ACTIVE = 4; // 0x4
     field public static final int STATE_DIALING = 3; // 0x3
@@ -28346,12 +28292,11 @@
   }
 
   public final class ConnectionRequest implements android.os.Parcelable {
-    ctor public ConnectionRequest(android.telecomm.PhoneAccountHandle, android.net.Uri, int, android.os.Bundle);
+    ctor public ConnectionRequest(android.telecomm.PhoneAccountHandle, android.net.Uri, android.os.Bundle);
     method public int describeContents();
     method public android.telecomm.PhoneAccountHandle getAccountHandle();
+    method public android.net.Uri getAddress();
     method public android.os.Bundle getExtras();
-    method public android.net.Uri getHandle();
-    method public int getHandlePresentation();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
   }
@@ -28365,8 +28310,6 @@
     method public final java.util.Collection<android.telecomm.Connection> getAllConnections();
     method public final android.os.IBinder onBind(android.content.Intent);
     method public void onConference(android.telecomm.Connection, android.telecomm.Connection);
-    method public void onConnectionAdded(android.telecomm.Connection);
-    method public void onConnectionRemoved(android.telecomm.Connection);
     method public android.telecomm.Connection onCreateIncomingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
     method public android.telecomm.Connection onCreateOutgoingConnection(android.telecomm.PhoneAccountHandle, android.telecomm.ConnectionRequest);
     method public void onRemoteConferenceAdded(android.telecomm.RemoteConference);
@@ -28384,32 +28327,36 @@
   }
 
   public class PhoneAccount implements android.os.Parcelable {
-    method public static android.telecomm.PhoneAccount.Builder builder();
+    method public static android.telecomm.PhoneAccount.Builder builder(android.telecomm.PhoneAccountHandle, java.lang.CharSequence);
     method public int describeContents();
     method public android.telecomm.PhoneAccountHandle getAccountHandle();
+    method public android.net.Uri getAddress();
     method public int getCapabilities();
-    method public android.net.Uri getHandle();
     method public android.graphics.drawable.Drawable getIcon(android.content.Context);
     method public int getIconResId();
     method public java.lang.CharSequence getLabel();
     method public java.lang.CharSequence getShortDescription();
-    method public java.lang.String getSubscriptionNumber();
+    method public android.net.Uri getSubscriptionAddress();
+    method public java.util.List<java.lang.String> getSupportedUriSchemes();
+    method public boolean supportsUriScheme(java.lang.String);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final int CAPABILITY_CONNECTION_MANAGER = 1; // 0x1
     field public static final int CAPABILITY_SIM_SUBSCRIPTION = 4; // 0x4
     field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final java.lang.String SCHEME_SIP = "sip";
+    field public static final java.lang.String SCHEME_TEL = "tel";
+    field public static final java.lang.String SCHEME_VOICEMAIL = "voicemail";
   }
 
   public static class PhoneAccount.Builder {
-    ctor public PhoneAccount.Builder();
+    ctor public PhoneAccount.Builder(android.telecomm.PhoneAccountHandle, java.lang.CharSequence);
     method public android.telecomm.PhoneAccount build();
-    method public android.telecomm.PhoneAccount.Builder withAccountHandle(android.telecomm.PhoneAccountHandle);
-    method public android.telecomm.PhoneAccount.Builder withCapabilities(int);
-    method public android.telecomm.PhoneAccount.Builder withHandle(android.net.Uri);
-    method public android.telecomm.PhoneAccount.Builder withIconResId(int);
-    method public android.telecomm.PhoneAccount.Builder withLabel(java.lang.CharSequence);
-    method public android.telecomm.PhoneAccount.Builder withShortDescription(java.lang.CharSequence);
-    method public android.telecomm.PhoneAccount.Builder withSubscriptionNumber(java.lang.String);
+    method public android.telecomm.PhoneAccount.Builder setAddress(android.net.Uri);
+    method public android.telecomm.PhoneAccount.Builder setCapabilities(int);
+    method public android.telecomm.PhoneAccount.Builder setIconResId(int);
+    method public android.telecomm.PhoneAccount.Builder setShortDescription(java.lang.CharSequence);
+    method public android.telecomm.PhoneAccount.Builder setSubscriptionAddress(android.net.Uri);
+    method public android.telecomm.PhoneAccount.Builder setSupportedUriSchemes(java.util.List<java.lang.String>);
   }
 
   public class PhoneAccountHandle implements android.os.Parcelable {
@@ -28425,13 +28372,13 @@
     method public static java.lang.String toString(int);
     field public static final int ADD_CALL = 16; // 0x10
     field public static final int ALL = 255; // 0xff
-    field public static final int GENERIC_CONFERENCE = 128; // 0x80
     field public static final int HOLD = 1; // 0x1
-    field public static final int MERGE_CALLS = 4; // 0x4
+    field public static final int MANAGE_CONFERENCE = 128; // 0x80
+    field public static final int MERGE_CONFERENCE = 4; // 0x4
     field public static final int MUTE = 64; // 0x40
     field public static final int RESPOND_VIA_TEXT = 32; // 0x20
     field public static final int SUPPORT_HOLD = 2; // 0x2
-    field public static final int SWAP_CALLS = 8; // 0x8
+    field public static final int SWAP_CONFERENCE = 8; // 0x8
   }
 
   public class PropertyPresentation {
@@ -28443,7 +28390,7 @@
   }
 
   public final class RemoteConference {
-    method public final void addListener(android.telecomm.RemoteConference.Listener);
+    method public final void addCallback(android.telecomm.RemoteConference.Callback);
     method public void disconnect();
     method public final int getCallCapabilities();
     method public final java.util.List<android.telecomm.RemoteConnection> getConnections();
@@ -28451,13 +28398,13 @@
     method public java.lang.String getDisconnectMessage();
     method public final int getState();
     method public void hold();
-    method public final void removeListener(android.telecomm.RemoteConference.Listener);
+    method public final void removeCallback(android.telecomm.RemoteConference.Callback);
     method public void separate(android.telecomm.RemoteConnection);
     method public void unhold();
   }
 
-  public static abstract class RemoteConference.Listener {
-    ctor public RemoteConference.Listener();
+  public static abstract class RemoteConference.Callback {
+    ctor public RemoteConference.Callback();
     method public void onCapabilitiesChanged(android.telecomm.RemoteConference, int);
     method public void onConnectionAdded(android.telecomm.RemoteConference, android.telecomm.RemoteConnection);
     method public void onConnectionRemoved(android.telecomm.RemoteConference, android.telecomm.RemoteConnection);
@@ -28512,7 +28459,6 @@
     method public void onParentChanged(android.telecomm.RemoteConnection, android.telecomm.RemoteConnection);
     method public void onPostDialWait(android.telecomm.RemoteConnection, java.lang.String);
     method public void onRequestingRingback(android.telecomm.RemoteConnection, boolean);
-    method public void onStartActivityFromInCall(android.telecomm.RemoteConnection, android.app.PendingIntent);
     method public void onStateChanged(android.telecomm.RemoteConnection, int);
     method public void onStatusHintsChanged(android.telecomm.RemoteConnection, android.telecomm.StatusHints);
   }
@@ -28525,11 +28471,11 @@
   public final class StatusHints implements android.os.Parcelable {
     ctor public StatusHints(android.content.ComponentName, java.lang.CharSequence, int, android.os.Bundle);
     method public int describeContents();
-    method public android.content.ComponentName getComponentName();
     method public android.os.Bundle getExtras();
     method public android.graphics.drawable.Drawable getIcon(android.content.Context);
     method public int getIconResId();
     method public java.lang.CharSequence getLabel();
+    method public android.content.ComponentName getPackageName();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
   }
@@ -28538,25 +28484,28 @@
     method public void addNewIncomingCall(android.telecomm.PhoneAccountHandle, android.os.Bundle);
     method public void cancelMissedCallsNotification();
     method public void clearAccounts(java.lang.String);
-    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount();
+    method public android.telecomm.PhoneAccountHandle getConnectionManager();
+    method public android.telecomm.PhoneAccountHandle getDefaultOutgoingPhoneAccount(java.lang.String);
     method public java.util.List<android.telecomm.PhoneAccountHandle> getEnabledPhoneAccounts();
     method public android.telecomm.PhoneAccount getPhoneAccount(android.telecomm.PhoneAccountHandle);
+    method public java.util.List<android.telecomm.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String);
     method public boolean handleMmi(java.lang.String);
     method public boolean hasMultipleEnabledAccounts();
     method public boolean isInCall();
     method public void registerPhoneAccount(android.telecomm.PhoneAccount);
     method public void showInCallScreen(boolean);
     method public void unregisterPhoneAccount(android.telecomm.PhoneAccountHandle);
-    field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.intent.action.CONNECTION_SERVICE_CONFIGURE";
-    field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecomm.intent.action.SHOW_CALL_SETTINGS";
+    field public static final java.lang.String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecomm.action.CHANGE_PHONE_ACCOUNTS";
+    field public static final java.lang.String ACTION_CONNECTION_SERVICE_CONFIGURE = "android.telecomm.action.CONNECTION_SERVICE_CONFIGURE";
+    field public static final java.lang.String ACTION_SHOW_CALL_SETTINGS = "android.telecomm.action.SHOW_CALL_SETTINGS";
     field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
     field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
     field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecomm.extra.CALL_BACK_NUMBER";
     field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
     field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
     field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
-    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.intent.extra.PHONE_ACCOUNT_HANDLE";
-    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
+    field public static final java.lang.String EXTRA_PHONE_ACCOUNT_HANDLE = "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
+    field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
   }
 
 }
@@ -28767,49 +28716,11 @@
     method public int getStatus();
     method public void writeToParcel(android.os.Parcel, int);
     field public static final android.os.Parcelable.Creator CREATOR;
-    field public static int INVALID_CHANNEL;
-    field public static int STATUS_MISSING_RESOURCE;
-    field public static int STATUS_NO_ERROR;
-    field public static int STATUS_NO_SUCH_ELEMENT;
-    field public static int STATUS_UNKNOWN_ERROR;
-  }
-
-  public class MessagingConfigurationManager {
-    method public boolean getCarrierConfigBoolean(java.lang.String, boolean);
-    method public boolean getCarrierConfigBoolean(long, java.lang.String, boolean);
-    method public int getCarrierConfigInt(java.lang.String, int);
-    method public int getCarrierConfigInt(long, java.lang.String, int);
-    method public java.lang.String getCarrierConfigString(java.lang.String, java.lang.String);
-    method public java.lang.String getCarrierConfigString(long, java.lang.String, java.lang.String);
-    method public static android.telephony.MessagingConfigurationManager getDefault();
-    field public static final java.lang.String CONF_ALIAS_ENABLED = "aliasEnabled";
-    field public static final java.lang.String CONF_ALIAS_MAX_CHARS = "aliasMaxChars";
-    field public static final java.lang.String CONF_ALIAS_MIN_CHARS = "aliasMinChars";
-    field public static final java.lang.String CONF_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
-    field public static final java.lang.String CONF_APPEND_TRANSACTION_ID = "enabledTransID";
-    field public static final java.lang.String CONF_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
-    field public static final java.lang.String CONF_HTTP_PARAMS = "httpParams";
-    field public static final java.lang.String CONF_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
-    field public static final java.lang.String CONF_MAX_IMAGE_HEIGHT = "maxImageHeight";
-    field public static final java.lang.String CONF_MAX_IMAGE_WIDTH = "maxImageWidth";
-    field public static final java.lang.String CONF_MAX_MESSAGE_SIZE = "maxMessageSize";
-    field public static final java.lang.String CONF_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
-    field public static final java.lang.String CONF_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
-    field public static final java.lang.String CONF_MMS_ENABLED = "enabledMMS";
-    field public static final java.lang.String CONF_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
-    field public static final java.lang.String CONF_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
-    field public static final java.lang.String CONF_NAI_SUFFIX = "naiSuffix";
-    field public static final java.lang.String CONF_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
-    field public static final java.lang.String CONF_RECIPIENT_LIMIT = "recipientLimit";
-    field public static final java.lang.String CONF_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages";
-    field public static final java.lang.String CONF_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
-    field public static final java.lang.String CONF_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold";
-    field public static final java.lang.String CONF_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
-    field public static final java.lang.String CONF_SUBJECT_MAX_LENGTH = "maxSubjectLength";
-    field public static final java.lang.String CONF_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition";
-    field public static final java.lang.String CONF_UA_PROF_TAG_NAME = "uaProfTagName";
-    field public static final java.lang.String CONF_UA_PROF_URL = "uaProfUrl";
-    field public static final java.lang.String CONF_USER_AGENT = "userAgent";
+    field public static final int INVALID_CHANNEL = -1; // 0xffffffff
+    field public static final int STATUS_MISSING_RESOURCE = 2; // 0x2
+    field public static final int STATUS_NO_ERROR = 1; // 0x1
+    field public static final int STATUS_NO_SUCH_ELEMENT = 3; // 0x3
+    field public static final int STATUS_UNKNOWN_ERROR = 4; // 0x4
   }
 
   public class NeighboringCellInfo implements android.os.Parcelable {
@@ -28954,48 +28865,57 @@
   }
 
   public final class SmsManager {
-    method public android.net.Uri addMultimediaMessageDraft(byte[]);
-    method public android.net.Uri addTextMessageDraft(java.lang.String, java.lang.String);
-    method public boolean archiveStoredConversation(long, boolean);
-    method public boolean deleteStoredConversation(long);
-    method public boolean deleteStoredMessage(android.net.Uri);
     method public java.util.ArrayList<java.lang.String> divideMessage(java.lang.String);
-    method public void downloadMultimediaMessage(java.lang.String, android.content.ContentValues, android.app.PendingIntent);
-    method public void downloadMultimediaMessage(long, java.lang.String, android.content.ContentValues, android.app.PendingIntent);
-    method public boolean getAutoPersisting();
+    method public void downloadMultimediaMessage(java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
+    method public android.os.Bundle getCarrierConfigValues();
     method public static android.telephony.SmsManager getDefault();
-    method public android.net.Uri importMultimediaMessage(byte[], java.lang.String, long, boolean, boolean);
-    method public android.net.Uri importTextMessage(java.lang.String, int, java.lang.String, long, boolean, boolean);
     method public void injectSmsPdu(byte[], java.lang.String, android.app.PendingIntent);
     method public void sendDataMessage(java.lang.String, java.lang.String, short, byte[], android.app.PendingIntent, android.app.PendingIntent);
-    method public void sendMultimediaMessage(byte[], java.lang.String, android.content.ContentValues, android.app.PendingIntent);
-    method public void sendMultimediaMessage(long, byte[], java.lang.String, android.content.ContentValues, android.app.PendingIntent);
+    method public void sendMultimediaMessage(android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent);
     method public void sendMultipartTextMessage(java.lang.String, java.lang.String, java.util.ArrayList<java.lang.String>, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
-    method public void sendStoredMultimediaMessage(android.net.Uri, android.content.ContentValues, android.app.PendingIntent);
-    method public void sendStoredMultimediaMessage(long, android.net.Uri, android.content.ContentValues, android.app.PendingIntent);
-    method public void sendStoredMultipartTextMessage(android.net.Uri, java.lang.String, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
-    method public void sendStoredMultipartTextMessage(long, android.net.Uri, java.lang.String, java.util.ArrayList<android.app.PendingIntent>, java.util.ArrayList<android.app.PendingIntent>);
-    method public void sendStoredTextMessage(android.net.Uri, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
-    method public void sendStoredTextMessage(long, android.net.Uri, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
     method public void sendTextMessage(java.lang.String, java.lang.String, java.lang.String, android.app.PendingIntent, android.app.PendingIntent);
-    method public void setAutoPersisting(boolean);
     method public void updateMmsDownloadStatus(int, byte[]);
     method public void updateMmsSendStatus(int, boolean);
     method public void updateSmsSendStatus(int, boolean);
-    method public boolean updateStoredMessageStatus(android.net.Uri, android.content.ContentValues);
-    field public static final java.lang.String MESSAGE_STATUS_READ = "read";
-    field public static final java.lang.String MESSAGE_STATUS_SEEN = "seen";
+    field public static final java.lang.String EXTRA_MMS_DATA = "android.telephony.extra.MMS_DATA";
+    field public static final java.lang.String MMS_CONFIG_ALIAS_ENABLED = "aliasEnabled";
+    field public static final java.lang.String MMS_CONFIG_ALIAS_MAX_CHARS = "aliasMaxChars";
+    field public static final java.lang.String MMS_CONFIG_ALIAS_MIN_CHARS = "aliasMinChars";
+    field public static final java.lang.String MMS_CONFIG_ALLOW_ATTACH_AUDIO = "allowAttachAudio";
+    field public static final java.lang.String MMS_CONFIG_APPEND_TRANSACTION_ID = "enabledTransID";
+    field public static final java.lang.String MMS_CONFIG_EMAIL_GATEWAY_NUMBER = "emailGatewayNumber";
+    field public static final java.lang.String MMS_CONFIG_GROUP_MMS_ENABLED = "enableGroupMms";
+    field public static final java.lang.String MMS_CONFIG_HTTP_PARAMS = "httpParams";
+    field public static final java.lang.String MMS_CONFIG_HTTP_SOCKET_TIMEOUT = "httpSocketTimeout";
+    field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_HEIGHT = "maxImageHeight";
+    field public static final java.lang.String MMS_CONFIG_MAX_IMAGE_WIDTH = "maxImageWidth";
+    field public static final java.lang.String MMS_CONFIG_MAX_MESSAGE_SIZE = "maxMessageSize";
+    field public static final java.lang.String MMS_CONFIG_MESSAGE_TEXT_MAX_SIZE = "maxMessageTextSize";
+    field public static final java.lang.String MMS_CONFIG_MMS_DELIVERY_REPORT_ENABLED = "enableMMSDeliveryReports";
+    field public static final java.lang.String MMS_CONFIG_MMS_ENABLED = "enabledMMS";
+    field public static final java.lang.String MMS_CONFIG_MMS_READ_REPORT_ENABLED = "enableMMSReadReports";
+    field public static final java.lang.String MMS_CONFIG_MULTIPART_SMS_ENABLED = "enableMultipartSMS";
+    field public static final java.lang.String MMS_CONFIG_NAI_SUFFIX = "naiSuffix";
+    field public static final java.lang.String MMS_CONFIG_NOTIFY_WAP_MMSC_ENABLED = "enabledNotifyWapMMSC";
+    field public static final java.lang.String MMS_CONFIG_RECIPIENT_LIMIT = "recipientLimit";
+    field public static final java.lang.String MMS_CONFIG_SEND_MULTIPART_SMS_AS_SEPARATE_MESSAGES = "sendMultipartSmsAsSeparateMessages";
+    field public static final java.lang.String MMS_CONFIG_SMS_DELIVERY_REPORT_ENABLED = "enableSMSDeliveryReports";
+    field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_LENGTH_THRESHOLD = "smsToMmsTextLengthThreshold";
+    field public static final java.lang.String MMS_CONFIG_SMS_TO_MMS_TEXT_THRESHOLD = "smsToMmsTextThreshold";
+    field public static final java.lang.String MMS_CONFIG_SUBJECT_MAX_LENGTH = "maxSubjectLength";
+    field public static final java.lang.String MMS_CONFIG_SUPPORT_MMS_CONTENT_DISPOSITION = "supportMmsContentDisposition";
+    field public static final java.lang.String MMS_CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
+    field public static final java.lang.String MMS_CONFIG_UA_PROF_URL = "uaProfUrl";
+    field public static final java.lang.String MMS_CONFIG_USER_AGENT = "userAgent";
     field public static final int MMS_ERROR_HTTP_FAILURE = 4; // 0x4
     field public static final int MMS_ERROR_INVALID_APN = 2; // 0x2
+    field public static final int MMS_ERROR_IO_ERROR = 5; // 0x5
     field public static final int MMS_ERROR_UNABLE_CONNECT_MMS = 3; // 0x3
     field public static final int MMS_ERROR_UNSPECIFIED = 1; // 0x1
-    field public static final java.lang.String MMS_EXTRA_DATA = "data";
     field public static final int RESULT_ERROR_GENERIC_FAILURE = 1; // 0x1
     field public static final int RESULT_ERROR_NO_SERVICE = 4; // 0x4
     field public static final int RESULT_ERROR_NULL_PDU = 3; // 0x3
     field public static final int RESULT_ERROR_RADIO_OFF = 2; // 0x2
-    field public static final int SMS_TYPE_INCOMING = 0; // 0x0
-    field public static final int SMS_TYPE_OUTGOING = 1; // 0x1
     field public static final int STATUS_ON_ICC_FREE = 0; // 0x0
     field public static final int STATUS_ON_ICC_READ = 1; // 0x1
     field public static final int STATUS_ON_ICC_SENT = 5; // 0x5
@@ -29062,10 +28982,7 @@
   }
 
   public class TelephonyManager {
-    method public void enableSimplifiedNetworkSettings(boolean);
-    method public void enableSimplifiedNetworkSettings(long, boolean);
     method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
-    method public int getCalculatedPreferredNetworkType();
     method public int getCallState();
     method public android.telephony.CellLocation getCellLocation();
     method public int getDataActivity();
@@ -29082,14 +28999,11 @@
     method public java.lang.String getNetworkOperatorName();
     method public int getNetworkType();
     method public int getPhoneType();
-    method public int getPreferredNetworkType();
     method public java.lang.String getSimCountryIso();
     method public java.lang.String getSimOperator();
     method public java.lang.String getSimOperatorName();
     method public java.lang.String getSimSerialNumber();
     method public int getSimState();
-    method public boolean getSimplifiedNetworkSettingsEnabled();
-    method public boolean getSimplifiedNetworkSettingsEnabled(long);
     method public java.lang.String getSubscriberId();
     method public java.lang.String getVoiceMailAlphaTag();
     method public java.lang.String getVoiceMailNumber();
@@ -29104,11 +29018,9 @@
     method public boolean isSmsCapable();
     method public void listen(android.telephony.PhoneStateListener, int);
     method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
-    method public boolean setCdmaSubscription(int);
+    method public boolean setGlobalPreferredNetworkType();
     method public void setLine1NumberForDisplay(java.lang.String, java.lang.String);
-    method public void setLine1NumberForDisplay(long, java.lang.String, java.lang.String);
-    method public boolean setOperatorBrandOverride(java.lang.String, java.lang.String);
-    method public boolean setPreferredNetworkType(int);
+    method public boolean setOperatorBrandOverride(java.lang.String);
     field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE";
     field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE";
     field public static final int CALL_STATE_IDLE = 0; // 0x0
@@ -29803,6 +29715,9 @@
     method public android.content.pm.FeatureInfo[] getSystemAvailableFeatures();
     method public java.lang.String[] getSystemSharedLibraryNames();
     method public java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo);
+    method public android.graphics.drawable.Drawable getUserBadgedDrawableForDensity(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
+    method public android.graphics.drawable.Drawable getUserBadgedIcon(android.graphics.drawable.Drawable, android.os.UserHandle);
+    method public java.lang.CharSequence getUserBadgedLabel(java.lang.CharSequence, android.os.UserHandle);
     method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo);
     method public boolean hasSystemFeature(java.lang.String);
     method public boolean isSafeMode();
@@ -31566,13 +31481,13 @@
     method public abstract android.graphics.Path getPath(float, float, float, float);
   }
 
-  public class PatternMotion extends android.transition.PathMotion {
-    ctor public PatternMotion();
-    ctor public PatternMotion(android.content.Context, android.util.AttributeSet);
-    ctor public PatternMotion(android.graphics.Path);
+  public class PatternPathMotion extends android.transition.PathMotion {
+    ctor public PatternPathMotion();
+    ctor public PatternPathMotion(android.content.Context, android.util.AttributeSet);
+    ctor public PatternPathMotion(android.graphics.Path);
     method public android.graphics.Path getPath(float, float, float, float);
-    method public android.graphics.Path getPattern();
-    method public void setPattern(android.graphics.Path);
+    method public android.graphics.Path getPatternPath();
+    method public void setPatternPath(android.graphics.Path);
   }
 
   public final class Scene {
@@ -32206,23 +32121,18 @@
     field public static final android.util.Rational ZERO;
   }
 
-  public final class Size implements android.os.Parcelable {
+  public final class Size {
     ctor public Size(int, int);
-    method public int describeContents();
     method public int getHeight();
     method public int getWidth();
     method public static android.util.Size parseSize(java.lang.String) throws java.lang.NumberFormatException;
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator CREATOR;
   }
 
-  public final class SizeF implements android.os.Parcelable {
+  public final class SizeF {
     ctor public SizeF(float, float);
-    method public int describeContents();
     method public float getHeight();
     method public float getWidth();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator CREATOR;
+    method public static android.util.SizeF parseSizeF(java.lang.String) throws java.lang.NumberFormatException;
   }
 
   public class SparseArray implements java.lang.Cloneable {
@@ -32572,8 +32482,6 @@
     method public final long getRefreshPeriodNano();
     method public final long getStartTimeNano();
     field public static final long UNDEFINED_TIME_NANO = -1L; // 0xffffffffffffffffL
-    field protected long[] mFramesPresentedTimeNano;
-    field protected long mRefreshPeriodNano;
   }
 
   public class GestureDetector {
@@ -32995,6 +32903,7 @@
     field public static final int KEYCODE_GUIDE = 172; // 0xac
     field public static final int KEYCODE_H = 36; // 0x24
     field public static final int KEYCODE_HEADSETHOOK = 79; // 0x4f
+    field public static final int KEYCODE_HELP = 259; // 0x103
     field public static final int KEYCODE_HENKAN = 214; // 0xd6
     field public static final int KEYCODE_HOME = 3; // 0x3
     field public static final int KEYCODE_I = 37; // 0x25
@@ -33095,9 +33004,36 @@
     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
+    field public static final int KEYCODE_TV_ANTENNA_CABLE = 242; // 0xf2
+    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION = 252; // 0xfc
+    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254; // 0xfe
+    field public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253; // 0xfd
+    field public static final int KEYCODE_TV_CONTENTS_MENU = 256; // 0x100
     field public static final int KEYCODE_TV_DATA_SERVICE = 230; // 0xe6
     field public static final int KEYCODE_TV_INPUT = 178; // 0xb2
+    field public static final int KEYCODE_TV_INPUT_COMPONENT_1 = 249; // 0xf9
+    field public static final int KEYCODE_TV_INPUT_COMPONENT_2 = 250; // 0xfa
+    field public static final int KEYCODE_TV_INPUT_COMPOSITE_1 = 247; // 0xf7
+    field public static final int KEYCODE_TV_INPUT_COMPOSITE_2 = 248; // 0xf8
+    field public static final int KEYCODE_TV_INPUT_HDMI_1 = 243; // 0xf3
+    field public static final int KEYCODE_TV_INPUT_HDMI_2 = 244; // 0xf4
+    field public static final int KEYCODE_TV_INPUT_HDMI_3 = 245; // 0xf5
+    field public static final int KEYCODE_TV_INPUT_HDMI_4 = 246; // 0xf6
+    field public static final int KEYCODE_TV_INPUT_VGA_1 = 251; // 0xfb
+    field public static final int KEYCODE_TV_MEDIA_CONTEXT_MENU = 257; // 0x101
+    field public static final int KEYCODE_TV_NETWORK = 241; // 0xf1
+    field public static final int KEYCODE_TV_NUMBER_ENTRY = 234; // 0xea
     field public static final int KEYCODE_TV_POWER = 177; // 0xb1
+    field public static final int KEYCODE_TV_RADIO_SERVICE = 232; // 0xe8
+    field public static final int KEYCODE_TV_SATELLITE = 237; // 0xed
+    field public static final int KEYCODE_TV_SATELLITE_BS = 238; // 0xee
+    field public static final int KEYCODE_TV_SATELLITE_CS = 239; // 0xef
+    field public static final int KEYCODE_TV_SATELLITE_SERVICE = 240; // 0xf0
+    field public static final int KEYCODE_TV_TELETEXT = 233; // 0xe9
+    field public static final int KEYCODE_TV_TERRESTRIAL_ANALOG = 235; // 0xeb
+    field public static final int KEYCODE_TV_TERRESTRIAL_DIGITAL = 236; // 0xec
+    field public static final int KEYCODE_TV_TIMER_PROGRAMMING = 258; // 0x102
+    field public static final int KEYCODE_TV_ZOOM_MODE = 255; // 0xff
     field public static final int KEYCODE_U = 49; // 0x31
     field public static final int KEYCODE_UNKNOWN = 0; // 0x0
     field public static final int KEYCODE_V = 50; // 0x32
@@ -34378,7 +34314,7 @@
   }
 
   public final class ViewAnimationUtils {
-    method public static final android.animation.Animator createCircularReveal(android.view.View, int, int, float, float);
+    method public static android.animation.Animator createCircularReveal(android.view.View, int, int, float, float);
   }
 
   public class ViewConfiguration {
@@ -34837,7 +34773,7 @@
     method public abstract void closePanel(int);
     method public android.view.View findViewById(int);
     method public boolean getAllowEnterTransitionOverlap();
-    method public boolean getAllowExitTransitionOverlap();
+    method public boolean getAllowReturnTransitionOverlap();
     method public final android.view.WindowManager.LayoutParams getAttributes();
     method public final android.view.Window.Callback getCallback();
     method public final android.view.Window getContainer();
@@ -34886,7 +34822,7 @@
     method public abstract void restoreHierarchyState(android.os.Bundle);
     method public abstract android.os.Bundle saveHierarchyState();
     method public void setAllowEnterTransitionOverlap(boolean);
-    method public void setAllowExitTransitionOverlap(boolean);
+    method public void setAllowReturnTransitionOverlap(boolean);
     method public void setAttributes(android.view.WindowManager.LayoutParams);
     method public abstract void setBackgroundDrawable(android.graphics.drawable.Drawable);
     method public void setBackgroundDrawableResource(int);
@@ -35026,12 +34962,18 @@
 
   public final class WindowInsets {
     ctor public WindowInsets(android.view.WindowInsets);
+    method public android.view.WindowInsets consumeStableInsets();
     method public android.view.WindowInsets consumeSystemWindowInsets();
+    method public int getStableInsetBottom();
+    method public int getStableInsetLeft();
+    method public int getStableInsetRight();
+    method public int getStableInsetTop();
     method public int getSystemWindowInsetBottom();
     method public int getSystemWindowInsetLeft();
     method public int getSystemWindowInsetRight();
     method public int getSystemWindowInsetTop();
     method public boolean hasInsets();
+    method public boolean hasStableInsets();
     method public boolean hasSystemWindowInsets();
     method public boolean isConsumed();
     method public boolean isRound();
@@ -35903,7 +35845,7 @@
     method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
     method public static final void removeComposingSpans(android.text.Spannable);
     method public boolean reportFullscreenMode(boolean);
-    method public boolean requestUpdateCursorAnchorInfo(int);
+    method public boolean requestCursorUpdates(int);
     method public boolean sendKeyEvent(android.view.KeyEvent);
     method public boolean setComposingRegion(int, int);
     method public static void setComposingSpans(android.text.Spannable);
@@ -35936,35 +35878,32 @@
   public final class CursorAnchorInfo implements android.os.Parcelable {
     ctor public CursorAnchorInfo(android.os.Parcel);
     method public int describeContents();
-    method public android.graphics.RectF getCharacterRect(int);
-    method public int getCharacterRectFlags(int);
+    method public android.graphics.RectF getCharacterBounds(int);
+    method public int getCharacterBoundsFlags(int);
     method public java.lang.CharSequence getComposingText();
     method public int getComposingTextStart();
     method public float getInsertionMarkerBaseline();
     method public float getInsertionMarkerBottom();
+    method public int getInsertionMarkerFlags();
     method public float getInsertionMarkerHorizontal();
     method public float getInsertionMarkerTop();
     method public android.graphics.Matrix getMatrix();
     method public int getSelectionEnd();
     method public int getSelectionStart();
-    method public boolean isInsertionMarkerClipped();
     method public void writeToParcel(android.os.Parcel, int);
-    field public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1; // 0x1
-    field public static final int CHARACTER_RECT_TYPE_INVISIBLE = 3; // 0x3
-    field public static final int CHARACTER_RECT_TYPE_MASK = 15; // 0xf
-    field public static final int CHARACTER_RECT_TYPE_NOT_FEASIBLE = 4; // 0x4
-    field public static final int CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE = 2; // 0x2
-    field public static final int CHARACTER_RECT_TYPE_UNSPECIFIED = 0; // 0x0
     field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int FLAG_HAS_INVISIBLE_REGION = 2; // 0x2
+    field public static final int FLAG_HAS_VISIBLE_REGION = 1; // 0x1
+    field public static final int FLAG_IS_RTL = 4; // 0x4
   }
 
   public static final class CursorAnchorInfo.Builder {
     ctor public CursorAnchorInfo.Builder();
-    method public android.view.inputmethod.CursorAnchorInfo.Builder addCharacterRect(int, float, float, float, float, int);
+    method public android.view.inputmethod.CursorAnchorInfo.Builder addCharacterBounds(int, float, float, float, float, int);
     method public android.view.inputmethod.CursorAnchorInfo build();
     method public void reset();
     method public android.view.inputmethod.CursorAnchorInfo.Builder setComposingText(int, java.lang.CharSequence);
-    method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, boolean);
+    method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, int);
     method public android.view.inputmethod.CursorAnchorInfo.Builder setMatrix(android.graphics.Matrix);
     method public android.view.inputmethod.CursorAnchorInfo.Builder setSelectionRange(int, int);
   }
@@ -36066,15 +36005,15 @@
     method public abstract boolean performEditorAction(int);
     method public abstract boolean performPrivateCommand(java.lang.String, android.os.Bundle);
     method public abstract boolean reportFullscreenMode(boolean);
-    method public abstract boolean requestUpdateCursorAnchorInfo(int);
+    method public abstract boolean requestCursorUpdates(int);
     method public abstract boolean sendKeyEvent(android.view.KeyEvent);
     method public abstract boolean setComposingRegion(int, int);
     method public abstract boolean setComposingText(java.lang.CharSequence, int);
     method public abstract boolean setSelection(int, int);
+    field public static final int CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
+    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 REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE = 1; // 0x1
-    field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 2; // 0x2
   }
 
   public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
@@ -36096,7 +36035,7 @@
     method public boolean performEditorAction(int);
     method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
     method public boolean reportFullscreenMode(boolean);
-    method public boolean requestUpdateCursorAnchorInfo(int);
+    method public boolean requestCursorUpdates(int);
     method public boolean sendKeyEvent(android.view.KeyEvent);
     method public boolean setComposingRegion(int, int);
     method public boolean setComposingText(java.lang.CharSequence, int);
@@ -36546,23 +36485,18 @@
 
   public static abstract class WebChromeClient.FileChooserParams {
     ctor public WebChromeClient.FileChooserParams();
+    method public abstract android.content.Intent createIntent();
     method public abstract java.lang.String[] getAcceptTypes();
     method public abstract java.lang.String getFilenameHint();
     method public abstract int getMode();
     method public abstract java.lang.CharSequence getTitle();
-    method public abstract android.webkit.WebChromeClient.UploadHelper getUploadHelper();
     method public abstract boolean isCaptureEnabled();
+    method public static android.net.Uri[] parseResult(int, android.content.Intent);
     field public static final int MODE_OPEN = 0; // 0x0
     field public static final int MODE_OPEN_MULTIPLE = 1; // 0x1
     field public static final int MODE_SAVE = 3; // 0x3
   }
 
-  public static abstract class WebChromeClient.UploadHelper {
-    ctor public WebChromeClient.UploadHelper();
-    method public abstract android.content.Intent buildIntent();
-    method public abstract android.net.Uri[] parseResult(int, android.content.Intent);
-  }
-
   public class WebHistoryItem implements java.lang.Cloneable {
     method public android.graphics.Bitmap getFavicon();
     method public java.lang.String getOriginalUrl();
@@ -36588,6 +36522,7 @@
     method public abstract java.lang.String getMethod();
     method public abstract java.util.Map<java.lang.String, java.lang.String> getRequestHeaders();
     method public abstract android.net.Uri getUrl();
+    method public abstract boolean hasGesture();
     method public abstract boolean hasUserGestureInsecure();
     method public abstract boolean isForMainFrame();
   }
@@ -36845,7 +36780,6 @@
     method public deprecated void onGlobalFocusChanged(android.view.View, android.view.View);
     method public void onPause();
     method public void onResume();
-    method public static void optOutDataReductionProxy();
     method public boolean overlayHorizontalScrollbar();
     method public boolean overlayVerticalScrollbar();
     method public boolean pageDown(boolean);
@@ -36877,7 +36811,7 @@
     method public void setWebViewClient(android.webkit.WebViewClient);
     method public deprecated boolean showFindDialog(java.lang.String, boolean);
     method public void stopLoading();
-    method public boolean zoomBy(float);
+    method public void zoomBy(float);
     method public boolean zoomIn();
     method public boolean zoomOut();
     field public static final java.lang.String SCHEME_GEO = "geo:0,0?q=";
@@ -37603,6 +37537,7 @@
     method public android.widget.CalendarView getCalendarView();
     method public boolean getCalendarViewShown();
     method public int getDayOfMonth();
+    method public int getFirstDayOfWeek();
     method public long getMaxDate();
     method public long getMinDate();
     method public int getMonth();
@@ -37610,6 +37545,7 @@
     method public int getYear();
     method public void init(int, int, int, android.widget.DatePicker.OnDateChangedListener);
     method public void setCalendarViewShown(boolean);
+    method public void setFirstDayOfWeek(int);
     method public void setMaxDate(long);
     method public void setMinDate(long);
     method public void setSpinnersShown(boolean);
diff --git a/api/removed.txt b/api/removed.txt
index 8915fc3..c8a3b4b 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -1,19 +1,3 @@
-package android {
-
-  public static final class R.attr {
-    field public static final int __removed1 = 16843955; // 0x10104b3
-  }
-
-}
-
-package android.app {
-
-  public class KeyguardManager {
-    method public android.content.Intent getConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence);
-  }
-
-}
-
 package android.media {
 
   public class AudioFormat {
@@ -30,12 +14,10 @@
     method public void wakeUp(long);
   }
 
-}
-
-package android.service.notification {
-
-  public static class NotificationListenerService.Ranking {
-    method public boolean meetsInterruptionFilter();
+  public class UserManager {
+    method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int);
+    method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle);
+    method public java.lang.CharSequence getBadgedLabelForUser(java.lang.CharSequence, android.os.UserHandle);
   }
 
 }
@@ -48,10 +30,37 @@
 
 }
 
-package com.android.internal {
+package android.view.inputmethod {
 
-  public static final class R.attr {
-    field public static final int __removed1 = 16843955; // 0x10104b3
+  public class BaseInputConnection implements android.view.inputmethod.InputConnection {
+    method public final boolean requestUpdateCursorAnchorInfo(int);
+  }
+
+  public final class CursorAnchorInfo implements android.os.Parcelable {
+    method public android.graphics.RectF getCharacterRect(int);
+    method public int getCharacterRectFlags(int);
+    method public boolean isInsertionMarkerClipped();
+    field public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1; // 0x1
+    field public static final int CHARACTER_RECT_TYPE_INVISIBLE = 3; // 0x3
+    field public static final int CHARACTER_RECT_TYPE_MASK = 15; // 0xf
+    field public static final int CHARACTER_RECT_TYPE_NOT_FEASIBLE = 4; // 0x4
+    field public static final int CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE = 2; // 0x2
+    field public static final int CHARACTER_RECT_TYPE_UNSPECIFIED = 0; // 0x0
+  }
+
+  public static final class CursorAnchorInfo.Builder {
+    method public android.view.inputmethod.CursorAnchorInfo.Builder addCharacterRect(int, float, float, float, float, int);
+    method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, boolean);
+  }
+
+  public abstract interface InputConnection {
+    method public abstract boolean requestUpdateCursorAnchorInfo(int);
+    field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 2; // 0x2
+    field public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
+  }
+
+  public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
+    method public final boolean requestUpdateCursorAnchorInfo(int);
   }
 
 }
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index c06ef0d..989b500 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -28,10 +28,15 @@
 import android.app.Instrumentation;
 import android.app.ProfilerInfo;
 import android.app.UiAutomationConnection;
+import android.app.usage.ConfigurationStats;
+import android.app.usage.IUsageStatsManager;
+import android.app.usage.UsageStatsManager;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.IIntentReceiver;
 import android.content.Intent;
 import android.content.pm.IPackageManager;
+import android.content.pm.ParceledListSlice;
 import android.content.pm.ResolveInfo;
 import android.content.res.Configuration;
 import android.graphics.Rect;
@@ -47,6 +52,7 @@
 import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.AndroidException;
+import android.util.ArrayMap;
 import android.view.IWindowManager;
 import android.view.View;
 
@@ -61,6 +67,9 @@
 import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 
@@ -1722,7 +1731,64 @@
         }
     }
 
+    private List<Configuration> getRecentConfigurations(int days) {
+        IUsageStatsManager usm = IUsageStatsManager.Stub.asInterface(ServiceManager.getService(
+                    Context.USAGE_STATS_SERVICE));
+        final long now = System.currentTimeMillis();
+        final long nDaysAgo = now - (days * 24 * 60 * 60 * 1000);
+        try {
+            @SuppressWarnings("unchecked")
+            ParceledListSlice<ConfigurationStats> configStatsSlice = usm.queryConfigurationStats(
+                    UsageStatsManager.INTERVAL_BEST, nDaysAgo, now, "com.android.shell");
+            if (configStatsSlice == null) {
+                return Collections.emptyList();
+            }
+
+            final ArrayMap<Configuration, Integer> recentConfigs = new ArrayMap<>();
+            final List<ConfigurationStats> configStatsList = configStatsSlice.getList();
+            final int configStatsListSize = configStatsList.size();
+            for (int i = 0; i < configStatsListSize; i++) {
+                final ConfigurationStats stats = configStatsList.get(i);
+                final int indexOfKey = recentConfigs.indexOfKey(stats.getConfiguration());
+                if (indexOfKey < 0) {
+                    recentConfigs.put(stats.getConfiguration(), stats.getActivationCount());
+                } else {
+                    recentConfigs.setValueAt(indexOfKey,
+                            recentConfigs.valueAt(indexOfKey) + stats.getActivationCount());
+                }
+            }
+
+            final Comparator<Configuration> comparator = new Comparator<Configuration>() {
+                @Override
+                public int compare(Configuration a, Configuration b) {
+                    return recentConfigs.get(b).compareTo(recentConfigs.get(a));
+                }
+            };
+
+            ArrayList<Configuration> configs = new ArrayList<>(recentConfigs.size());
+            configs.addAll(recentConfigs.keySet());
+            Collections.sort(configs, comparator);
+            return configs;
+
+        } catch (RemoteException e) {
+            return Collections.emptyList();
+        }
+    }
+
     private void runGetConfig() throws Exception {
+        int days = 14;
+        String option = nextOption();
+        if (option != null) {
+            if (!option.equals("--days")) {
+                throw new IllegalArgumentException("unrecognized option " + option);
+            }
+
+            days = Integer.parseInt(nextArgRequired());
+            if (days <= 0) {
+                throw new IllegalArgumentException("--days must be a positive integer");
+            }
+        }
+
         try {
             Configuration config = mAm.getConfiguration();
             if (config == null) {
@@ -1733,6 +1799,17 @@
             System.out.println("config: " + Configuration.resourceQualifierString(config));
             System.out.println("abi: " + TextUtils.join(",", Build.SUPPORTED_ABIS));
 
+            final List<Configuration> recentConfigs = getRecentConfigurations(days);
+            final int recentConfigSize = recentConfigs.size();
+            if (recentConfigSize > 0) {
+                System.out.println("recentConfigs:");
+            }
+
+            for (int i = 0; i < recentConfigSize; i++) {
+                System.out.println("  config: " + Configuration.resourceQualifierString(
+                        recentConfigs.get(i)));
+            }
+
         } catch (RemoteException e) {
         }
     }
diff --git a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
index 5f7a17d..27a03b6 100644
--- a/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
+++ b/core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl
@@ -54,6 +54,10 @@
         int action, in Bundle arguments, int interactionId,
         IAccessibilityInteractionConnectionCallback callback, long threadId);
 
+    boolean computeClickPointInScreen(int accessibilityWindowId, long accessibilityNodeId,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        long threadId);
+
     AccessibilityWindowInfo getWindow(int windowId);
 
     List<AccessibilityWindowInfo> getWindows();
diff --git a/core/java/android/animation/AnimatorInflater.java b/core/java/android/animation/AnimatorInflater.java
index f4e4671..25417ed 100644
--- a/core/java/android/animation/AnimatorInflater.java
+++ b/core/java/android/animation/AnimatorInflater.java
@@ -92,21 +92,27 @@
      */
     public static Animator loadAnimator(Resources resources, Theme theme, int id)
             throws NotFoundException {
+        return loadAnimator(resources, theme, id, 1);
+    }
+
+    /** @hide */
+    public static Animator loadAnimator(Resources resources, Theme theme, int id,
+            float pathErrorScale) throws NotFoundException {
 
         XmlResourceParser parser = null;
         try {
             parser = resources.getAnimation(id);
-            return createAnimatorFromXml(resources, theme, parser);
+            return createAnimatorFromXml(resources, theme, parser, pathErrorScale);
         } catch (XmlPullParserException ex) {
             Resources.NotFoundException rnf =
                     new Resources.NotFoundException("Can't load animation resource ID #0x" +
-                    Integer.toHexString(id));
+                            Integer.toHexString(id));
             rnf.initCause(ex);
             throw rnf;
         } catch (IOException ex) {
             Resources.NotFoundException rnf =
                     new Resources.NotFoundException("Can't load animation resource ID #0x" +
-                    Integer.toHexString(id));
+                            Integer.toHexString(id));
             rnf.initCause(ex);
             throw rnf;
         } finally {
@@ -177,7 +183,7 @@
                         }
                         if (animator == null) {
                             animator = createAnimatorFromXml(context.getResources(),
-                                    context.getTheme(), parser);
+                                    context.getTheme(), parser, 1f);
                         }
 
                         if (animator == null) {
@@ -248,9 +254,11 @@
      * @param arrayAnimator Incoming typed array for Animator's attributes.
      * @param arrayObjectAnimator Incoming typed array for Object Animator's
      *            attributes.
+     * @param pixelSize The relative pixel size, used to calculate the
+     *                  maximum error for path animations.
      */
     private static void parseAnimatorFromTypeArray(ValueAnimator anim,
-            TypedArray arrayAnimator, TypedArray arrayObjectAnimator) {
+            TypedArray arrayAnimator, TypedArray arrayObjectAnimator, float pixelSize) {
         long duration = arrayAnimator.getInt(R.styleable.Animator_duration, 300);
 
         long startDelay = arrayAnimator.getInt(R.styleable.Animator_startOffset, 0);
@@ -303,7 +311,7 @@
         }
 
         if (arrayObjectAnimator != null) {
-            setupObjectAnimator(anim, arrayObjectAnimator, getFloats);
+            setupObjectAnimator(anim, arrayObjectAnimator, getFloats, pixelSize);
         }
     }
 
@@ -351,9 +359,11 @@
      * @param anim The target Animator which will be updated.
      * @param arrayObjectAnimator TypedArray for the ObjectAnimator.
      * @param getFloats True if the value type is float.
+     * @param pixelSize The relative pixel size, used to calculate the
+     *                  maximum error for path animations.
      */
     private static void setupObjectAnimator(ValueAnimator anim, TypedArray arrayObjectAnimator,
-            boolean getFloats) {
+            boolean getFloats, float pixelSize) {
         ObjectAnimator oa = (ObjectAnimator) anim;
         String pathData = arrayObjectAnimator.getString(R.styleable.PropertyAnimator_pathData);
 
@@ -370,7 +380,8 @@
                         + " propertyXName or propertyYName is needed for PathData");
             } else {
                 Path path = PathParser.createPathFromPathData(pathData);
-                PathKeyframes keyframeSet = KeyframeSet.ofPath(path);
+                float error = 0.5f * pixelSize; // max half a pixel error
+                PathKeyframes keyframeSet = KeyframeSet.ofPath(path, error);
                 Keyframes xKeyframes;
                 Keyframes yKeyframes;
                 if (getFloats) {
@@ -487,13 +498,15 @@
         }
     }
 
-    private static Animator createAnimatorFromXml(Resources res, Theme theme, XmlPullParser parser)
+    private static Animator createAnimatorFromXml(Resources res, Theme theme, XmlPullParser parser,
+            float pixelSize)
             throws XmlPullParserException, IOException {
-        return createAnimatorFromXml(res, theme, parser, Xml.asAttributeSet(parser), null, 0);
+        return createAnimatorFromXml(res, theme, parser, Xml.asAttributeSet(parser), null, 0,
+                pixelSize);
     }
 
     private static Animator createAnimatorFromXml(Resources res, Theme theme, XmlPullParser parser,
-            AttributeSet attrs, AnimatorSet parent, int sequenceOrdering)
+            AttributeSet attrs, AnimatorSet parent, int sequenceOrdering, float pixelSize)
             throws XmlPullParserException, IOException {
 
         Animator anim = null;
@@ -513,9 +526,9 @@
             String name = parser.getName();
 
             if (name.equals("objectAnimator")) {
-                anim = loadObjectAnimator(res, theme, attrs);
+                anim = loadObjectAnimator(res, theme, attrs, pixelSize);
             } else if (name.equals("animator")) {
-                anim = loadAnimator(res, theme, attrs, null);
+                anim = loadAnimator(res, theme, attrs, null, pixelSize);
             } else if (name.equals("set")) {
                 anim = new AnimatorSet();
                 TypedArray a;
@@ -526,7 +539,8 @@
                 }
                 int ordering = a.getInt(R.styleable.AnimatorSet_ordering,
                         TOGETHER);
-                createAnimatorFromXml(res, theme, parser, attrs, (AnimatorSet) anim, ordering);
+                createAnimatorFromXml(res, theme, parser, attrs, (AnimatorSet) anim, ordering,
+                        pixelSize);
                 a.recycle();
             } else {
                 throw new RuntimeException("Unknown animator name: " + parser.getName());
@@ -556,11 +570,11 @@
 
     }
 
-    private static ObjectAnimator loadObjectAnimator(Resources res, Theme theme, AttributeSet attrs)
-            throws NotFoundException {
+    private static ObjectAnimator loadObjectAnimator(Resources res, Theme theme, AttributeSet attrs,
+            float pathErrorScale) throws NotFoundException {
         ObjectAnimator anim = new ObjectAnimator();
 
-        loadAnimator(res, theme, attrs, anim);
+        loadAnimator(res, theme, attrs, anim, pathErrorScale);
 
         return anim;
     }
@@ -575,7 +589,7 @@
      *            ObjectAnimator
      */
     private static ValueAnimator loadAnimator(Resources res, Theme theme,
-            AttributeSet attrs, ValueAnimator anim)
+            AttributeSet attrs, ValueAnimator anim, float pathErrorScale)
             throws NotFoundException {
 
         TypedArray arrayAnimator = null;
@@ -601,7 +615,7 @@
             anim = new ValueAnimator();
         }
 
-        parseAnimatorFromTypeArray(anim, arrayAnimator, arrayObjectAnimator);
+        parseAnimatorFromTypeArray(anim, arrayAnimator, arrayObjectAnimator, pathErrorScale);
 
         final int resID =
                 arrayAnimator.getResourceId(R.styleable.Animator_interpolator, 0);
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 9156eeb..0aa8fdd 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -504,6 +504,10 @@
         mStarted = true;
         mPaused = false;
 
+        for (Node node : mNodes) {
+            node.animation.setAllowRunningAsynchronously(false);
+        }
+
         if (mDuration >= 0) {
             // If the duration was set on this AnimatorSet, pass it along to all child animations
             for (Node node : mNodes) {
@@ -632,6 +636,7 @@
         anim.mNodes = new ArrayList<Node>();
         anim.mSortedNodes = new ArrayList<Node>();
         anim.mReversible = mReversible;
+        anim.mSetListener = null;
 
         // Walk through the old nodes list, cloning each node and adding it to the new nodemap.
         // One problem is that the old node dependencies point to nodes in the old AnimatorSet.
diff --git a/core/java/android/animation/KeyframeSet.java b/core/java/android/animation/KeyframeSet.java
index fc9bbb1..8d15db2 100644
--- a/core/java/android/animation/KeyframeSet.java
+++ b/core/java/android/animation/KeyframeSet.java
@@ -154,6 +154,10 @@
         return new PathKeyframes(path);
     }
 
+    public static PathKeyframes ofPath(Path path, float error) {
+        return new PathKeyframes(path, error);
+    }
+
     /**
      * Sets the TypeEvaluator to be used when calculating animated values. This object
      * is required only for KeyframeSets that are not either IntKeyframeSet or FloatKeyframeSet,
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 2503d17..89a9692 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -788,8 +788,8 @@
     final Handler mHandler = new Handler();
 
     ActivityTransitionState mActivityTransitionState = new ActivityTransitionState();
-    SharedElementListener mEnterTransitionListener = SharedElementListener.NULL_LISTENER;
-    SharedElementListener mExitTransitionListener = SharedElementListener.NULL_LISTENER;
+    SharedElementCallback mEnterTransitionListener = SharedElementCallback.NULL_CALLBACK;
+    SharedElementCallback mExitTransitionListener = SharedElementCallback.NULL_CALLBACK;
 
     /** Return the intent that started this activity. */
     public Intent getIntent() {
@@ -955,7 +955,7 @@
      * @see #onRestoreInstanceState
      * @see #onPostCreate
      */
-    protected void onCreate(@Nullable Bundle savedInstanceState,
+    public void onCreate(@Nullable Bundle savedInstanceState,
             @Nullable PersistableBundle persistentState) {
         onCreate(savedInstanceState);
     }
@@ -1040,7 +1040,7 @@
      * @see #onResume
      * @see #onSaveInstanceState
      */
-    protected void onRestoreInstanceState(Bundle savedInstanceState,
+    public void onRestoreInstanceState(Bundle savedInstanceState,
             PersistableBundle persistentState) {
         if (savedInstanceState != null) {
             onRestoreInstanceState(savedInstanceState);
@@ -1130,7 +1130,7 @@
      *
      * @see #onCreate
      */
-    protected void onPostCreate(@Nullable Bundle savedInstanceState,
+    public void onPostCreate(@Nullable Bundle savedInstanceState,
             @Nullable PersistableBundle persistentState) {
         onPostCreate(savedInstanceState);
     }
@@ -1236,18 +1236,22 @@
     }
 
     /**
+     * @hide
      * Check whether this activity is running as part of a voice interaction with the user.
      * If true, it should perform its interaction with the user through the
      * {@link VoiceInteractor} returned by {@link #getVoiceInteractor}.
      */
+    @SystemApi
     public boolean isVoiceInteraction() {
         return mVoiceInteractor != null;
     }
 
     /**
+     * @hide
      * Retrieve the active {@link VoiceInteractor} that the user is going through to
      * interact with this activity.
      */
+    @SystemApi
     public VoiceInteractor getVoiceInteractor() {
         return mVoiceInteractor;
     }
@@ -1376,7 +1380,7 @@
      * @see #onRestoreInstanceState(Bundle, PersistableBundle)
      * @see #onPause
      */
-    protected void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
+    public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
         onSaveInstanceState(outState);
     }
 
@@ -4765,7 +4769,7 @@
      * @param data An Intent, which can return result data to the caller
      *               (various data can be attached to Intent "extras").
      */
-    protected void onActivityReenter(int resultCode, Intent data) {
+    public void onActivityReenter(int resultCode, Intent data) {
     }
 
     /**
@@ -5406,6 +5410,7 @@
             mTranslucentCallback = callback;
             mChangeCanvasToTranslucent =
                     ActivityManagerNative.getDefault().convertToTranslucent(mToken, options);
+            WindowManagerGlobal.getInstance().changeCanvasOpacity(mToken, false);
             drawComplete = true;
         } catch (RemoteException e) {
             // Make callback return as though it timed out.
@@ -5774,33 +5779,33 @@
 
     /**
      * When {@link android.app.ActivityOptions#makeSceneTransitionAnimation(Activity,
-     * android.view.View, String)} was used to start an Activity, <var>listener</var>
+     * android.view.View, String)} was used to start an Activity, <var>callback</var>
      * will be called to handle shared elements on the <i>launched</i> Activity. This requires
      * {@link Window#FEATURE_CONTENT_TRANSITIONS}.
      *
-     * @param listener Used to manipulate shared element transitions on the launched Activity.
+     * @param callback Used to manipulate shared element transitions on the launched Activity.
      */
-    public void setEnterSharedElementListener(SharedElementListener listener) {
-        if (listener == null) {
-            listener = SharedElementListener.NULL_LISTENER;
+    public void setEnterSharedElementCallback(SharedElementCallback callback) {
+        if (callback == null) {
+            callback = SharedElementCallback.NULL_CALLBACK;
         }
-        mEnterTransitionListener = listener;
+        mEnterTransitionListener = callback;
     }
 
     /**
      * When {@link android.app.ActivityOptions#makeSceneTransitionAnimation(Activity,
-     * android.view.View, String)} was used to start an Activity, <var>listener</var>
+     * android.view.View, String)} was used to start an Activity, <var>callback</var>
      * will be called to handle shared elements on the <i>launching</i> Activity. Most
      * calls will only come when returning from the started Activity.
      * This requires {@link Window#FEATURE_CONTENT_TRANSITIONS}.
      *
-     * @param listener Used to manipulate shared element transitions on the launching Activity.
+     * @param callback Used to manipulate shared element transitions on the launching Activity.
      */
-    public void setExitSharedElementListener(SharedElementListener listener) {
-        if (listener == null) {
-            listener = SharedElementListener.NULL_LISTENER;
+    public void setExitSharedElementCallback(SharedElementCallback callback) {
+        if (callback == null) {
+            callback = SharedElementCallback.NULL_CALLBACK;
         }
-        mExitTransitionListener = listener;
+        mExitTransitionListener = callback;
     }
 
     /**
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index bc54055..9486a72 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -18,12 +18,14 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
+import android.annotation.SystemApi;
 import android.graphics.Canvas;
 import android.graphics.Matrix;
 import android.graphics.Point;
 import android.os.BatteryStats;
 import android.os.IBinder;
 import android.os.ParcelFileDescriptor;
+
 import com.android.internal.app.ProcessStats;
 import com.android.internal.os.TransferPipe;
 import com.android.internal.util.FastPrintWriter;
@@ -2464,7 +2466,11 @@
         }
     }
 
-    /** @hide */
+    /**
+     * Gets the userId of the current foreground user. Requires system permissions.
+     * @hide
+     */
+    @SystemApi
     public static int getCurrentUser() {
         UserInfo ui;
         try {
@@ -2650,17 +2656,24 @@
 
         /**
          * Start an activity in this task.  Brings the task to the foreground.  If this task
-         * is not currently active (that is, its id < 0), then the activity being started
-         * needs to be started as a new task and the Intent's ComponentName must match the
-         * base ComponenentName of the recent task entry.  Otherwise, the activity being
-         * started must <b>not</b> be launched as a new task -- not through explicit intent
-         * flags nor implicitly as the singleTask or singleInstance launch modes.
+         * is not currently active (that is, its id < 0), then a new activity for the given
+         * Intent will be launched as the root of the task and the task brought to the
+         * foreground.  Otherwise, if this task is currently active and the Intent does not specify
+         * an activity to launch in a new task, then a new activity for the given Intent will
+         * be launched on top of the task and the task brought to the foreground.  If this
+         * task is currently active and the Intent specifies {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+         * or would otherwise be launched in to a new task, then the activity not launched but
+         * this task be brought to the foreground and a new intent delivered to the top
+         * activity if appropriate.
          *
-         * <p>See {@link Activity#startActivity(android.content.Intent, android.os.Bundle)
-         * Activity.startActivity} for more information.</p>
+         * <p>In other words, you generally want to use an Intent here that does not specify
+         * {@link Intent#FLAG_ACTIVITY_NEW_TASK} or {@link Intent#FLAG_ACTIVITY_NEW_DOCUMENT},
+         * and let the system do the right thing.</p>
          *
          * @param intent The Intent describing the new activity to be launched on the task.
          * @param options Optional launch options.
+         *
+         * @see Activity#startActivity(android.content.Intent, android.os.Bundle)
          */
         public void startActivity(Context context, Intent intent, Bundle options) {
             ActivityThread thread = ActivityThread.currentActivityThread();
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 1f7e450..677fcef 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -509,8 +509,7 @@
         case ACTIVITY_PAUSED_TRANSACTION: {
             data.enforceInterface(IActivityManager.descriptor);
             IBinder token = data.readStrongBinder();
-            PersistableBundle persistentState = data.readPersistableBundle();
-            activityPaused(token, persistentState);
+            activityPaused(token);
             reply.writeNoException();
             return true;
         }
@@ -2296,6 +2295,13 @@
             reply.writeNoException();
             return true;
         }
+
+        case BOOT_ANIMATION_COMPLETE_TRANSACTION: {
+            data.enforceInterface(IActivityManager.descriptor);
+            bootAnimationComplete();
+            reply.writeNoException();
+            return true;
+        }
         }
 
         return super.onTransact(code, data, reply, flags);
@@ -2829,13 +2835,12 @@
         data.recycle();
         reply.recycle();
     }
-    public void activityPaused(IBinder token, PersistableBundle persistentState) throws RemoteException
+    public void activityPaused(IBinder token) throws RemoteException
     {
         Parcel data = Parcel.obtain();
         Parcel reply = Parcel.obtain();
         data.writeInterfaceToken(IActivityManager.descriptor);
         data.writeStrongBinder(token);
-        data.writePersistableBundle(persistentState);
         mRemote.transact(ACTIVITY_PAUSED_TRANSACTION, data, reply, 0);
         reply.readException();
         data.recycle();
@@ -5303,5 +5308,16 @@
         reply.recycle();
     }
 
+    @Override
+    public void bootAnimationComplete() throws RemoteException {
+        Parcel data = Parcel.obtain();
+        Parcel reply = Parcel.obtain();
+        data.writeInterfaceToken(IActivityManager.descriptor);
+        mRemote.transact(BOOT_ANIMATION_COMPLETE_TRANSACTION, data, reply, 0);
+        reply.readException();
+        data.recycle();
+        reply.recycle();
+    }
+
     private IBinder mRemote;
 }
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 9dd4605..213c7f6 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -84,13 +84,13 @@
      * Initial width of the animation.
      * @hide
      */
-    public static final String KEY_ANIM_START_WIDTH = "android:animStartWidth";
+    public static final String KEY_ANIM_WIDTH = "android:animWidth";
 
     /**
      * Initial height of the animation.
      * @hide
      */
-    public static final String KEY_ANIM_START_HEIGHT = "android:animStartHeight";
+    public static final String KEY_ANIM_HEIGHT = "android:animHeight";
 
     /**
      * Callback for when animation is started.
@@ -140,8 +140,8 @@
     private Bitmap mThumbnail;
     private int mStartX;
     private int mStartY;
-    private int mStartWidth;
-    private int mStartHeight;
+    private int mWidth;
+    private int mHeight;
     private IRemoteCallback mAnimationStartedListener;
     private ResultReceiver mTransitionReceiver;
     private boolean mIsReturning;
@@ -238,13 +238,13 @@
      * defines the coordinate space for <var>startX</var> and <var>startY</var>.
      * @param startX The x starting location of the new activity, relative to <var>source</var>.
      * @param startY The y starting location of the activity, relative to <var>source</var>.
-     * @param startWidth The initial width of the new activity.
-     * @param startHeight The initial height of the new activity.
+     * @param width The initial width of the new activity.
+     * @param height The initial height of the new activity.
      * @return Returns a new ActivityOptions object that you can use to
      * supply these options as the options Bundle when starting an activity.
      */
     public static ActivityOptions makeScaleUpAnimation(View source,
-            int startX, int startY, int startWidth, int startHeight) {
+            int startX, int startY, int width, int height) {
         ActivityOptions opts = new ActivityOptions();
         opts.mPackageName = source.getContext().getPackageName();
         opts.mAnimationType = ANIM_SCALE_UP;
@@ -252,8 +252,8 @@
         source.getLocationOnScreen(pts);
         opts.mStartX = pts[0] + startX;
         opts.mStartY = pts[1] + startY;
-        opts.mStartWidth = startWidth;
-        opts.mStartHeight = startHeight;
+        opts.mWidth = width;
+        opts.mHeight = height;
         return opts;
     }
 
@@ -359,9 +359,10 @@
      * @hide
      */
     public static ActivityOptions makeThumbnailAspectScaleUpAnimation(View source,
-            Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {
-        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, listener,
-                true);
+            Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight,
+            OnAnimationStartedListener listener) {
+        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY,
+                targetWidth, targetHeight, listener, true);
     }
 
     /**
@@ -382,13 +383,15 @@
      * @hide
      */
     public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
-            Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) {
-        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY, listener,
-                false);
+            Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight,
+            OnAnimationStartedListener listener) {
+        return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY,
+                targetWidth, targetHeight, listener, false);
     }
 
     private static ActivityOptions makeAspectScaledThumbnailAnimation(View source, Bitmap thumbnail,
-            int startX, int startY, OnAnimationStartedListener listener, boolean scaleUp) {
+            int startX, int startY, int targetWidth, int targetHeight,
+            OnAnimationStartedListener listener, boolean scaleUp) {
         ActivityOptions opts = new ActivityOptions();
         opts.mPackageName = source.getContext().getPackageName();
         opts.mAnimationType = scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP :
@@ -398,6 +401,8 @@
         source.getLocationOnScreen(pts);
         opts.mStartX = pts[0] + startX;
         opts.mStartY = pts[1] + startY;
+        opts.mWidth = targetWidth;
+        opts.mHeight = targetHeight;
         opts.setOnAnimationStartedListener(source.getHandler(), listener);
         return opts;
     }
@@ -515,11 +520,6 @@
         return opts;
     }
 
-    @Deprecated
-    public static ActivityOptions makeLaunchTaskBehindAnimation() {
-        return makeTaskLaunchBehind();
-    }
-
     /** @hide */
     public boolean getLaunchTaskBehind() {
         return mAnimationType == ANIM_LAUNCH_TASK_BEHIND;
@@ -543,8 +543,8 @@
             case ANIM_SCALE_UP:
                 mStartX = opts.getInt(KEY_ANIM_START_X, 0);
                 mStartY = opts.getInt(KEY_ANIM_START_Y, 0);
-                mStartWidth = opts.getInt(KEY_ANIM_START_WIDTH, 0);
-                mStartHeight = opts.getInt(KEY_ANIM_START_HEIGHT, 0);
+                mWidth = opts.getInt(KEY_ANIM_WIDTH, 0);
+                mHeight = opts.getInt(KEY_ANIM_HEIGHT, 0);
                 break;
 
             case ANIM_THUMBNAIL_SCALE_UP:
@@ -554,6 +554,8 @@
                 mThumbnail = (Bitmap) opts.getParcelable(KEY_ANIM_THUMBNAIL);
                 mStartX = opts.getInt(KEY_ANIM_START_X, 0);
                 mStartY = opts.getInt(KEY_ANIM_START_Y, 0);
+                mWidth = opts.getInt(KEY_ANIM_WIDTH, 0);
+                mHeight = opts.getInt(KEY_ANIM_HEIGHT, 0);
                 mAnimationStartedListener = IRemoteCallback.Stub.asInterface(
                         opts.getBinder(KEY_ANIM_START_LISTENER));
                 break;
@@ -605,13 +607,13 @@
     }
 
     /** @hide */
-    public int getStartWidth() {
-        return mStartWidth;
+    public int getWidth() {
+        return mWidth;
     }
 
     /** @hide */
-    public int getStartHeight() {
-        return mStartHeight;
+    public int getHeight() {
+        return mHeight;
     }
 
     /** @hide */
@@ -690,8 +692,8 @@
             case ANIM_SCALE_UP:
                 mStartX = otherOptions.mStartX;
                 mStartY = otherOptions.mStartY;
-                mStartWidth = otherOptions.mStartWidth;
-                mStartHeight = otherOptions.mStartHeight;
+                mWidth = otherOptions.mWidth;
+                mHeight = otherOptions.mHeight;
                 if (mAnimationStartedListener != null) {
                     try {
                         mAnimationStartedListener.sendResult(null);
@@ -707,6 +709,8 @@
                 mThumbnail = otherOptions.mThumbnail;
                 mStartX = otherOptions.mStartX;
                 mStartY = otherOptions.mStartY;
+                mWidth = otherOptions.mWidth;
+                mHeight = otherOptions.mHeight;
                 if (mAnimationStartedListener != null) {
                     try {
                         mAnimationStartedListener.sendResult(null);
@@ -755,8 +759,8 @@
             case ANIM_SCALE_UP:
                 b.putInt(KEY_ANIM_START_X, mStartX);
                 b.putInt(KEY_ANIM_START_Y, mStartY);
-                b.putInt(KEY_ANIM_START_WIDTH, mStartWidth);
-                b.putInt(KEY_ANIM_START_HEIGHT, mStartHeight);
+                b.putInt(KEY_ANIM_WIDTH, mWidth);
+                b.putInt(KEY_ANIM_HEIGHT, mHeight);
                 break;
             case ANIM_THUMBNAIL_SCALE_UP:
             case ANIM_THUMBNAIL_SCALE_DOWN:
@@ -765,6 +769,8 @@
                 b.putParcelable(KEY_ANIM_THUMBNAIL, mThumbnail);
                 b.putInt(KEY_ANIM_START_X, mStartX);
                 b.putInt(KEY_ANIM_START_Y, mStartY);
+                b.putInt(KEY_ANIM_WIDTH, mWidth);
+                b.putInt(KEY_ANIM_HEIGHT, mHeight);
                 b.putBinder(KEY_ANIM_START_LISTENER, mAnimationStartedListener
                         != null ? mAnimationStartedListener.asBinder() : null);
                 break;
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 38999a8..3a39900 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -563,11 +563,11 @@
         }
 
         public final void schedulePauseActivity(IBinder token, boolean finished,
-                boolean userLeaving, int configChanges) {
+                boolean userLeaving, int configChanges, boolean dontReport) {
             sendMessage(
                     finished ? H.PAUSE_ACTIVITY_FINISHING : H.PAUSE_ACTIVITY,
                     token,
-                    (userLeaving ? 1 : 0),
+                    (userLeaving ? 1 : 0) | (dontReport ? 2 : 0),
                     configChanges);
         }
 
@@ -1283,13 +1283,15 @@
                 } break;
                 case PAUSE_ACTIVITY:
                     Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
-                    handlePauseActivity((IBinder)msg.obj, false, msg.arg1 != 0, msg.arg2);
+                    handlePauseActivity((IBinder)msg.obj, false, (msg.arg1&1) != 0, msg.arg2,
+                            (msg.arg1&2) != 0);
                     maybeSnapshot();
                     Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
                     break;
                 case PAUSE_ACTIVITY_FINISHING:
                     Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "activityPause");
-                    handlePauseActivity((IBinder)msg.obj, true, msg.arg1 != 0, msg.arg2);
+                    handlePauseActivity((IBinder)msg.obj, true, (msg.arg1&1) != 0, msg.arg2,
+                            (msg.arg1&1) != 0);
                     Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
                     break;
                 case STOP_ACTIVITY_SHOW:
@@ -1938,7 +1940,7 @@
         if (dumpFullInfo) {
             printRow(pw, HEAP_FULL_COLUMN, "", "Pss", "Pss", "Shared", "Private",
                     "Shared", "Private", "Swapped", "Heap", "Heap", "Heap");
-            printRow(pw, HEAP_FULL_COLUMN, "", "Total", "Clean", "Dirty", "Dirty",
+            printRow(pw, HEAP_FULL_COLUMN, "", "Total", "Clean", "Dirty", "",
                     "Clean", "Clean", "Dirty", "Size", "Alloc", "Free");
             printRow(pw, HEAP_FULL_COLUMN, "", "------", "------", "------", "------",
                     "------", "------", "------", "------", "------", "------");
@@ -3142,7 +3144,7 @@
     }
 
     private void handlePauseActivity(IBinder token, boolean finished,
-            boolean userLeaving, int configChanges) {
+            boolean userLeaving, int configChanges, boolean dontReport) {
         ActivityClientRecord r = mActivities.get(token);
         if (r != null) {
             //Slog.v(TAG, "userLeaving=" + userLeaving + " handling pause of " + r);
@@ -3159,9 +3161,11 @@
             }
 
             // Tell the activity manager we have paused.
-            try {
-                ActivityManagerNative.getDefault().activityPaused(token, r.persistentState);
-            } catch (RemoteException ex) {
+            if (!dontReport) {
+                try {
+                    ActivityManagerNative.getDefault().activityPaused(token);
+                } catch (RemoteException ex) {
+                }
             }
             mSomeActivitiesChanged = true;
         }
@@ -4283,6 +4287,8 @@
             AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
         }
 
+        Message.updateCheckRecycle(data.appInfo.targetSdkVersion);
+
         /*
          * Before spawning a new process, reset the time zone to be the system time zone.
          * This needs to be done because the system time zone could have changed after the
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index a09a2e7..43fa3f0 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -197,7 +197,7 @@
     final protected ArrayList<View> mSharedElements = new ArrayList<View>();
     final protected ArrayList<String> mSharedElementNames = new ArrayList<String>();
     final protected ArrayList<View> mTransitioningViews = new ArrayList<View>();
-    protected SharedElementListener mListener;
+    protected SharedElementCallback mListener;
     protected ResultReceiver mResultReceiver;
     final private FixedEpicenterCallback mEpicenterCallback = new FixedEpicenterCallback();
     final protected boolean mIsReturning;
@@ -205,10 +205,11 @@
     private boolean mIsStartingTransition;
     private ArrayList<GhostViewListeners> mGhostViewListeners =
             new ArrayList<GhostViewListeners>();
+    private ArrayMap<View, Float> mOriginalAlphas = new ArrayMap<View, Float>();
 
     public ActivityTransitionCoordinator(Window window,
             ArrayList<String> allSharedElementNames,
-            SharedElementListener listener, boolean isReturning) {
+            SharedElementCallback listener, boolean isReturning) {
         super(new Handler());
         mWindow = window;
         mListener = listener;
@@ -218,7 +219,7 @@
 
     protected void viewsReady(ArrayMap<String, View> sharedElements) {
         sharedElements.retainAll(mAllSharedElementNames);
-        mListener.remapSharedElements(mAllSharedElementNames, sharedElements);
+        mListener.onMapSharedElements(mAllSharedElementNames, sharedElements);
         mSharedElementNames.addAll(sharedElements.keySet());
         mSharedElements.addAll(sharedElements.values());
         if (getViewsTransition() != null) {
@@ -251,9 +252,11 @@
      */
     protected void setEpicenter() {
         View epicenter = null;
-        if (!mAllSharedElementNames.isEmpty() && !mSharedElementNames.isEmpty() &&
-                mAllSharedElementNames.get(0).equals(mSharedElementNames.get(0))) {
-            epicenter = mSharedElements.get(0);
+        if (!mAllSharedElementNames.isEmpty() && !mSharedElementNames.isEmpty()) {
+            int index = mSharedElementNames.indexOf(mAllSharedElementNames.get(0));
+            if (index >= 0) {
+                epicenter = mSharedElements.get(index);
+            }
         }
         setEpicenter(epicenter);
     }
@@ -458,20 +461,21 @@
                         tempMatrix, tempRect, null);
             }
         }
-        mListener.setSharedElementStart(mSharedElementNames, mSharedElements, snapshots);
+        mListener.onSharedElementStart(mSharedElementNames, mSharedElements, snapshots);
         return originalImageState;
     }
 
     protected void notifySharedElementEnd(ArrayList<View> snapshots) {
-        mListener.setSharedElementEnd(mSharedElementNames, mSharedElements, snapshots);
+        mListener.onSharedElementEnd(mSharedElementNames, mSharedElements, snapshots);
     }
 
     protected void scheduleSetSharedElementEnd(final ArrayList<View> snapshots) {
-        getDecor().getViewTreeObserver().addOnPreDrawListener(
+        final View decorView = getDecor();
+        decorView.getViewTreeObserver().addOnPreDrawListener(
                 new ViewTreeObserver.OnPreDrawListener() {
                     @Override
                     public boolean onPreDraw() {
-                        getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                        decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                         notifySharedElementEnd(snapshots);
                         return true;
                     }
@@ -526,7 +530,7 @@
                 Parcelable parcelable = sharedElementBundle.getParcelable(KEY_SNAPSHOT);
                 View snapshot = null;
                 if (parcelable != null) {
-                    snapshot = mListener.createSnapshotView(context, parcelable);
+                    snapshot = mListener.onCreateSnapshotView(context, parcelable);
                 }
                 if (snapshot != null) {
                     setSharedElementState(snapshot, name, state, null, null, decorLoc);
@@ -577,6 +581,7 @@
         mWindow = null;
         mSharedElements.clear();
         mTransitioningViews.clear();
+        mOriginalAlphas.clear();
         mResultReceiver = null;
         mPendingTransition = null;
         mListener = null;
@@ -586,10 +591,28 @@
         return getWindow().getTransitionBackgroundFadeDuration();
     }
 
-    protected static void setTransitionAlpha(ArrayList<View> views, float alpha) {
+    protected void hideViews(ArrayList<View> views) {
         int count = views.size();
         for (int i = 0; i < count; i++) {
-            views.get(i).setTransitionAlpha(alpha);
+            View view = views.get(i);
+            if (!mOriginalAlphas.containsKey(view)) {
+                mOriginalAlphas.put(view, view.getAlpha());
+            }
+            view.setAlpha(0f);
+        }
+    }
+
+    protected void showViews(ArrayList<View> views, boolean setTransitionAlpha) {
+        int count = views.size();
+        for (int i = 0; i < count; i++) {
+            View view = views.get(i);
+            Float alpha = mOriginalAlphas.remove(view);
+            if (alpha != null) {
+                view.setAlpha(alpha);
+            }
+            if (setTransitionAlpha) {
+                view.setTransitionAlpha(1f);
+            }
         }
     }
 
@@ -618,7 +641,7 @@
         sharedElementBundle.putFloat(KEY_TRANSLATION_Z, view.getTranslationZ());
         sharedElementBundle.putFloat(KEY_ELEVATION, view.getElevation());
 
-        Parcelable bitmap = mListener.captureSharedElementSnapshot(view, tempMatrix, tempBounds);
+        Parcelable bitmap = mListener.onCaptureSharedElementSnapshot(view, tempMatrix, tempBounds);
         if (bitmap != null) {
             sharedElementBundle.putParcelable(KEY_SNAPSHOT, bitmap);
         }
@@ -664,8 +687,7 @@
                 GhostView.addGhost(view, decor);
                 ViewGroup parent = (ViewGroup) view.getParent();
                 if (moveWithParent && !isInTransitionGroup(parent, decor)) {
-                    GhostViewListeners listener =
-                            new GhostViewListeners(view, decor);
+                    GhostViewListeners listener = new GhostViewListeners(view, parent, decor);
                     parent.getViewTreeObserver().addOnPreDrawListener(listener);
                     mGhostViewListeners.add(listener);
                 }
@@ -723,11 +745,12 @@
     }
 
     protected void scheduleGhostVisibilityChange(final int visibility) {
-        getDecor().getViewTreeObserver()
+        final View decorView = getDecor();
+        decorView.getViewTreeObserver()
                 .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                     @Override
                     public boolean onPreDraw() {
-                        getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                        decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                         setGhostVisibility(visibility);
                         return true;
                     }
@@ -769,10 +792,12 @@
     private static class GhostViewListeners implements ViewTreeObserver.OnPreDrawListener {
         private View mView;
         private ViewGroup mDecor;
+        private View mParent;
         private Matrix mMatrix = new Matrix();
 
-        public GhostViewListeners(View view, ViewGroup decor) {
+        public GhostViewListeners(View view, View parent, ViewGroup decor) {
             mView = view;
+            mParent = parent;
             mDecor = decor;
         }
 
@@ -782,10 +807,9 @@
 
         @Override
         public boolean onPreDraw() {
-            ViewGroup parent = ((ViewGroup) mView.getParent());
             GhostView ghostView = GhostView.getGhost(mView);
             if (ghostView == null) {
-                parent.getViewTreeObserver().removeOnPreDrawListener(this);
+                mParent.getViewTreeObserver().removeOnPreDrawListener(this);
             } else {
                 GhostView.calculateMatrix(mView, mDecor, mMatrix);
                 ghostView.setMatrix(mMatrix);
diff --git a/core/java/android/app/ActivityTransitionState.java b/core/java/android/app/ActivityTransitionState.java
index 613e248..ad4a22b 100644
--- a/core/java/android/app/ActivityTransitionState.java
+++ b/core/java/android/app/ActivityTransitionState.java
@@ -151,6 +151,7 @@
             mEnterActivityOptions = options;
             mIsEnterTriggered = false;
             if (mEnterActivityOptions.isReturning()) {
+                restoreExitedViews();
                 int result = mEnterActivityOptions.getResultCode();
                 if (result != 0) {
                     activity.onActivityReenter(result, mEnterActivityOptions.getResultData());
diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java
index a64e0ed..2c596e5 100644
--- a/core/java/android/app/AlarmManager.java
+++ b/core/java/android/app/AlarmManager.java
@@ -17,6 +17,7 @@
 package android.app;
 
 import android.annotation.SdkConstant;
+import android.annotation.SystemApi;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Build;
@@ -385,6 +386,7 @@
     }
 
     /** @hide */
+    @SystemApi
     public void set(int type, long triggerAtMillis, long windowMillis, long intervalMillis,
             PendingIntent operation, WorkSource workSource) {
         setImpl(type, triggerAtMillis, windowMillis, intervalMillis, operation, workSource, null);
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 66928ca..ba9c9d6 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -220,6 +220,9 @@
     /** Continually monitoring location data with a relatively high power request. */
     public static final String OPSTR_MONITOR_HIGH_POWER_LOCATION
             = "android:monitor_location_high_power";
+    /** Access to {@link android.app.usage.UsageStatsManager}. */
+    public static final String OPSTR_GET_USAGE_STATS
+            = "android:get_usage_stats";
     /** Activate a VPN connection without user intervention. @hide */
     @SystemApi
     public static final String OPSTR_ACTIVATE_VPN = "android:activate_vpn";
@@ -331,7 +334,7 @@
             null,
             OPSTR_MONITOR_LOCATION,
             OPSTR_MONITOR_HIGH_POWER_LOCATION,
-            null,
+            OPSTR_GET_USAGE_STATS,
             null,
             null,
             null,
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 6843827..404268c 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -45,14 +45,17 @@
 import android.content.pm.ProviderInfo;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
+import android.content.pm.UserInfo;
 import android.content.pm.VerificationParams;
 import android.content.pm.VerifierDeviceIdentity;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Rect;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
-import android.os.IBinder;
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.UserHandle;
@@ -864,6 +867,49 @@
         return getApplicationLogo(getApplicationInfo(packageName, 0));
     }
 
+    @Override
+    public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
+        final int badgeResId = getBadgeResIdForUser(user.getIdentifier());
+        if (badgeResId == 0) {
+            return icon;
+        }
+        Drawable badgeIcon = getDrawable("system", badgeResId, null);
+        return getBadgedDrawable(icon, badgeIcon, null, true);
+    }
+
+    @Override
+    public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user,
+            Rect badgeLocation, int badgeDensity) {
+        Drawable badgeDrawable = getUserBadgeForDensity(user, badgeDensity);
+        if (badgeDrawable == null) {
+            return drawable;
+        }
+        return getBadgedDrawable(drawable, badgeDrawable, badgeLocation, true);
+    }
+
+    @Override
+    public Drawable getUserBadgeForDensity(UserHandle user, int density) {
+        UserInfo userInfo = getUserIfProfile(user.getIdentifier());
+        if (userInfo != null && userInfo.isManagedProfile()) {
+            if (density <= 0) {
+                density = mContext.getResources().getDisplayMetrics().densityDpi;
+            }
+            return Resources.getSystem().getDrawableForDensity(
+                    com.android.internal.R.drawable.ic_corp_badge, density);
+        }
+        return null;
+    }
+
+    @Override
+    public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) {
+        UserInfo userInfo = getUserIfProfile(user.getIdentifier());
+        if (userInfo != null && userInfo.isManagedProfile()) {
+            return Resources.getSystem().getString(
+                    com.android.internal.R.string.managed_profile_label_badge, label);
+        }
+        return label;
+    }
+
     @Override public Resources getResourcesForActivity(
         ComponentName activityName) throws NameNotFoundException {
         return getResourcesForApplication(
@@ -1640,12 +1686,86 @@
         if (itemInfo.showUserIcon != UserHandle.USER_NULL) {
             return new BitmapDrawable(getUserManager().getUserIcon(itemInfo.showUserIcon));
         }
-        Drawable dr = getDrawable(itemInfo.packageName, itemInfo.icon, appInfo);
+        Drawable dr = null;
+        if (itemInfo.packageName != null) {
+            dr = getDrawable(itemInfo.packageName, itemInfo.icon, appInfo);
+        }
         if (dr == null) {
             dr = itemInfo.loadDefaultIcon(this);
         }
-        return getUserManager().getBadgedDrawableForUser(dr,
-                new UserHandle(mContext.getUserId()));
+        return getUserBadgedIcon(dr, new UserHandle(mContext.getUserId()));
+    }
+
+    private Drawable getBadgedDrawable(Drawable drawable, Drawable badgeDrawable,
+            Rect badgeLocation, boolean tryBadgeInPlace) {
+        final int badgedWidth = drawable.getIntrinsicWidth();
+        final int badgedHeight = drawable.getIntrinsicHeight();
+        final boolean canBadgeInPlace = tryBadgeInPlace
+                && (drawable instanceof BitmapDrawable)
+                && ((BitmapDrawable) drawable).getBitmap().isMutable();
+
+        final Bitmap bitmap;
+        if (canBadgeInPlace) {
+            bitmap = ((BitmapDrawable) drawable).getBitmap();
+        } else {
+            bitmap = Bitmap.createBitmap(badgedWidth, badgedHeight, Bitmap.Config.ARGB_8888);
+        }
+        Canvas canvas = new Canvas(bitmap);
+
+        if (!canBadgeInPlace) {
+            drawable.setBounds(0, 0, badgedWidth, badgedHeight);
+            drawable.draw(canvas);
+        }
+
+        if (badgeLocation != null) {
+            if (badgeLocation.left < 0 || badgeLocation.top < 0
+                    || badgeLocation.width() > badgedWidth || badgeLocation.height() > badgedHeight) {
+                throw new IllegalArgumentException("Badge location " + badgeLocation
+                        + " not in badged drawable bounds "
+                        + new Rect(0, 0, badgedWidth, badgedHeight));
+            }
+            badgeDrawable.setBounds(0, 0, badgeLocation.width(), badgeLocation.height());
+
+            canvas.save();
+            canvas.translate(badgeLocation.left, badgeLocation.top);
+            badgeDrawable.draw(canvas);
+            canvas.restore();
+        } else {
+            badgeDrawable.setBounds(0, 0, badgedWidth, badgedHeight);
+            badgeDrawable.draw(canvas);
+        }
+
+        if (!canBadgeInPlace) {
+            BitmapDrawable mergedDrawable = new BitmapDrawable(mContext.getResources(), bitmap);
+
+            if (drawable instanceof BitmapDrawable) {
+                BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
+                mergedDrawable.setTargetDensity(bitmapDrawable.getBitmap().getDensity());
+            }
+
+            return mergedDrawable;
+        }
+
+        return drawable;
+    }
+
+    private int getBadgeResIdForUser(int userHandle) {
+        // Return the framework-provided badge.
+        UserInfo userInfo = getUserIfProfile(userHandle);
+        if (userInfo != null && userInfo.isManagedProfile()) {
+            return com.android.internal.R.drawable.ic_corp_icon_badge;
+        }
+        return 0;
+    }
+
+    private UserInfo getUserIfProfile(int userHandle) {
+        List<UserInfo> userProfiles = getUserManager().getProfiles(UserHandle.myUserId());
+        for (UserInfo user : userProfiles) {
+            if (user.id == userHandle) {
+                return user;
+            }
+        }
+        return null;
     }
 
     private final ContextImpl mContext;
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 63e8707..0123e16 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -78,7 +78,8 @@
             boolean finished = data.readInt() != 0;
             boolean userLeaving = data.readInt() != 0;
             int configChanges = data.readInt();
-            schedulePauseActivity(b, finished, userLeaving, configChanges);
+            boolean dontReport = data.readInt() != 0;
+            schedulePauseActivity(b, finished, userLeaving, configChanges, dontReport);
             return true;
         }
 
@@ -689,13 +690,14 @@
     }
     
     public final void schedulePauseActivity(IBinder token, boolean finished,
-            boolean userLeaving, int configChanges) throws RemoteException {
+            boolean userLeaving, int configChanges, boolean dontReport) throws RemoteException {
         Parcel data = Parcel.obtain();
         data.writeInterfaceToken(IApplicationThread.descriptor);
         data.writeStrongBinder(token);
         data.writeInt(finished ? 1 : 0);
         data.writeInt(userLeaving ? 1 :0);
         data.writeInt(configChanges);
+        data.writeInt(dontReport ? 1 : 0);
         mRemote.transact(SCHEDULE_PAUSE_ACTIVITY_TRANSACTION, data, null,
                 IBinder.FLAG_ONEWAY);
         data.recycle();
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 67863a5..b09f169 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -23,27 +23,26 @@
 import android.os.Parcelable;
 import android.text.TextUtils;
 import android.transition.Transition;
-import android.transition.TransitionInflater;
 import android.transition.TransitionManager;
 import android.transition.TransitionSet;
+import android.transition.TransitionUtils;
 import android.util.ArrayMap;
 import android.util.Log;
 import android.util.LogWriter;
 import android.util.Pair;
+import android.util.SparseArray;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.Collection;
 
 final class BackStackState implements Parcelable {
     final int[] mOps;
     final int mTransition;
     final int mTransitionStyle;
-    final int mCustomTransition;
-    final int mSceneRoot;
     final String mName;
     final int mIndex;
     final int mBreadCrumbTitleRes;
@@ -96,8 +95,6 @@
         mBreadCrumbTitleText = bse.mBreadCrumbTitleText;
         mBreadCrumbShortTitleRes = bse.mBreadCrumbShortTitleRes;
         mBreadCrumbShortTitleText = bse.mBreadCrumbShortTitleText;
-        mCustomTransition = bse.mCustomTransition;
-        mSceneRoot = bse.mSceneRoot;
         mSharedElementSourceNames = bse.mSharedElementSourceNames;
         mSharedElementTargetNames = bse.mSharedElementTargetNames;
     }
@@ -112,8 +109,6 @@
         mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
         mBreadCrumbShortTitleRes = in.readInt();
         mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
-        mCustomTransition = in.readInt();
-        mSceneRoot = in.readInt();
         mSharedElementSourceNames = in.createStringArrayList();
         mSharedElementTargetNames = in.createStringArrayList();
     }
@@ -164,8 +159,6 @@
         bse.mBreadCrumbTitleText = mBreadCrumbTitleText;
         bse.mBreadCrumbShortTitleRes = mBreadCrumbShortTitleRes;
         bse.mBreadCrumbShortTitleText = mBreadCrumbShortTitleText;
-        bse.mCustomTransition = mCustomTransition;
-        bse.mSceneRoot = mSceneRoot;
         bse.mSharedElementSourceNames = mSharedElementSourceNames;
         bse.mSharedElementTargetNames = mSharedElementTargetNames;
         bse.bumpBackStackNesting(1);
@@ -186,8 +179,6 @@
         TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0);
         dest.writeInt(mBreadCrumbShortTitleRes);
         TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0);
-        dest.writeInt(mCustomTransition);
-        dest.writeInt(mSceneRoot);
         dest.writeStringList(mSharedElementSourceNames);
         dest.writeStringList(mSharedElementTargetNames);
     }
@@ -254,8 +245,6 @@
     int mBreadCrumbShortTitleRes;
     CharSequence mBreadCrumbShortTitleText;
 
-    int mCustomTransition;
-    int mSceneRoot;
     ArrayList<String> mSharedElementSourceNames;
     ArrayList<String> mSharedElementTargetNames;
 
@@ -573,13 +562,6 @@
     }
 
     @Override
-    public FragmentTransaction setCustomTransition(int sceneRootId, int transitionId) {
-        mSceneRoot = sceneRootId;
-        mCustomTransition = transitionId;
-        return this;
-    }
-
-    @Override
     public FragmentTransaction addSharedElement(View sharedElement, String name) {
         String transitionName = sharedElement.getTransitionName();
         if (transitionName == null) {
@@ -760,8 +742,10 @@
 
         bumpBackStackNesting(1);
 
-        TransitionState state = beginTransition(mSharedElementSourceNames,
-                mSharedElementTargetNames);
+        SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+        SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+        calculateFragments(firstOutFragments, lastInFragments);
+        beginTransition(firstOutFragments, lastInFragments, false);
 
         Op op = mHead;
         while (op != null) {
@@ -852,141 +836,565 @@
         if (mAddToBackStack) {
             mManager.addBackStackState(this);
         }
+    }
 
-        if (state != null) {
-            updateTransitionEndState(state, mSharedElementTargetNames);
+    private static void setFirstOut(SparseArray<Fragment> fragments, Fragment fragment) {
+        if (fragment != null) {
+            int containerId = fragment.mContainerId;
+            if (containerId != 0 && !fragment.isHidden() && fragment.isAdded() &&
+                    fragment.getView() != null && fragments.get(containerId) == null) {
+                fragments.put(containerId, fragment);
+            }
         }
     }
 
-    private TransitionState beginTransition(ArrayList<String> sourceNames,
-            ArrayList<String> targetNames) {
-        if (mCustomTransition <= 0 || mSceneRoot <= 0) {
-            return null;
+    private void setLastIn(SparseArray<Fragment> fragments, Fragment fragment) {
+        if (fragment != null) {
+            int containerId = fragment.mContainerId;
+            if (containerId != 0) {
+                fragments.put(containerId, fragment);
+            }
         }
-        View rootView = mManager.mContainer.findViewById(mSceneRoot);
-        if (!(rootView instanceof ViewGroup)) {
-            throw new IllegalArgumentException("SceneRoot is not a ViewGroup");
-        }
-        TransitionState state = new TransitionState();
-        // get Transition scene root and create Transitions
-        state.sceneRoot = (ViewGroup) rootView;
-        state.sceneRoot.captureTransitioningViews(state.transitioningViews);
+    }
 
-        state.exitTransition = TransitionInflater.from(mManager.mActivity)
-                .inflateTransition(mCustomTransition);
-        state.sharedElementTransition = TransitionInflater.from(mManager.mActivity)
-                .inflateTransition(mCustomTransition);
-        state.enterTransition = TransitionInflater.from(mManager.mActivity)
-                .inflateTransition(mCustomTransition);
+    /**
+     * Finds the first removed fragment and last added fragments when going forward.
+     * If none of the fragments have transitions, then both lists will be empty.
+     *
+     * @param firstOutFragments The list of first fragments to be removed, keyed on the
+     *                          container ID. This list will be modified by the method.
+     * @param lastInFragments The list of last fragments to be added, keyed on the
+     *                        container ID. This list will be modified by the method.
+     */
+    private void calculateFragments(SparseArray<Fragment> firstOutFragments,
+            SparseArray<Fragment> lastInFragments) {
+        Op op = mHead;
+        while (op != null) {
+            switch (op.cmd) {
+                case OP_ADD:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+                case OP_REPLACE: {
+                    Fragment f = op.fragment;
+                    if (mManager.mAdded != null) {
+                        for (int i = 0; i < mManager.mAdded.size(); i++) {
+                            Fragment old = mManager.mAdded.get(i);
+                            if (f == null || old.mContainerId == f.mContainerId) {
+                                if (old == f) {
+                                    f = null;
+                                } else {
+                                    setFirstOut(firstOutFragments, old);
+                                }
+                            }
+                        }
+                    }
+                    setLastIn(lastInFragments, f);
+                    break;
+                }
+                case OP_REMOVE:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_HIDE:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_SHOW:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+                case OP_DETACH:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_ATTACH:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+            }
+
+            op = op.next;
+        }
+    }
+
+    /**
+     * Finds the first removed fragment and last added fragments when popping the back stack.
+     * If none of the fragments have transitions, then both lists will be empty.
+     *
+     * @param firstOutFragments The list of first fragments to be removed, keyed on the
+     *                          container ID. This list will be modified by the method.
+     * @param lastInFragments The list of last fragments to be added, keyed on the
+     *                        container ID. This list will be modified by the method.
+     */
+    public void calculateBackFragments(SparseArray<Fragment> firstOutFragments,
+            SparseArray<Fragment> lastInFragments) {
+        Op op = mHead;
+        while (op != null) {
+            switch (op.cmd) {
+                case OP_ADD:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_REPLACE:
+                    if (op.removed != null) {
+                        for (int i = op.removed.size() - 1; i >= 0; i--) {
+                            setLastIn(lastInFragments, op.removed.get(i));
+                        }
+                    }
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_REMOVE:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+                case OP_HIDE:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+                case OP_SHOW:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+                case OP_DETACH:
+                    setLastIn(lastInFragments, op.fragment);
+                    break;
+                case OP_ATTACH:
+                    setFirstOut(firstOutFragments, op.fragment);
+                    break;
+            }
+
+            op = op.next;
+        }
+    }
+
+    /**
+     * When custom fragment transitions are used, this sets up the state for each transition
+     * and begins the transition. A different transition is started for each fragment container
+     * and consists of up to 3 different transitions: the exit transition, a shared element
+     * transition and an enter transition.
+     *
+     * <p>The exit transition operates against the leaf nodes of the first fragment
+     * with a view that was removed. If no such fragment was removed, then no exit
+     * transition is executed. The exit transition comes from the outgoing fragment.</p>
+     *
+     * <p>The enter transition operates against the last fragment that was added. If
+     * that fragment does not have a view or no fragment was added, then no enter
+     * transition is executed. The enter transition comes from the incoming fragment.</p>
+     *
+     * <p>The shared element transition operates against all views and comes either
+     * from the outgoing fragment or the incoming fragment, depending on whether this
+     * is going forward or popping the back stack. When going forward, the incoming
+     * fragment's enter shared element transition is used, but when going back, the
+     * outgoing fragment's return shared element transition is used. Shared element
+     * transitions only operate if there is both an incoming and outgoing fragment.</p>
+     *
+     * @param firstOutFragments The list of first fragments to be removed, keyed on the
+     *                          container ID.
+     * @param lastInFragments The list of last fragments to be added, keyed on the
+     *                        container ID.
+     * @param isBack true if this is popping the back stack or false if this is a
+     *               forward operation.
+     * @return The TransitionState used to complete the operation of the transition
+     * in {@link #setNameOverrides(android.app.BackStackRecord.TransitionState, java.util.ArrayList,
+     * java.util.ArrayList)}.
+     */
+    private TransitionState beginTransition(SparseArray<Fragment> firstOutFragments,
+            SparseArray<Fragment> lastInFragments, boolean isBack) {
+        TransitionState state = new TransitionState();
+
         // Adding a non-existent target view makes sure that the transitions don't target
         // any views by default. They'll only target the views we tell add. If we don't
         // add any, then no views will be targeted.
-        View nonExistentView = new View(mManager.mActivity);
-        state.enterTransition.addTarget(nonExistentView);
-        state.exitTransition.addTarget(nonExistentView);
-        state.sharedElementTransition.addTarget(nonExistentView);
+        state.nonExistentView = new View(mManager.mActivity);
 
-        setSharedElementEpicenter(state.enterTransition, state);
-
-        state.excludingTransition = new TransitionSet()
-                .addTransition(state.exitTransition)
-                .addTransition(state.enterTransition);
-
-        if (sourceNames != null) {
-            // Map shared elements.
-            state.sceneRoot.findNamedViews(state.namedViews);
-            state.namedViews.retainAll(sourceNames);
-            View epicenterView = state.namedViews.get(sourceNames.get(0));
-            if (epicenterView != null) {
-                // The epicenter is only the first shared element.
-                setEpicenter(state.exitTransition, epicenterView);
-                setEpicenter(state.sharedElementTransition, epicenterView);
-            }
-            state.transitioningViews.removeAll(state.namedViews.values());
-            state.excludingTransition.addTransition(state.sharedElementTransition);
-            addTransitioningViews(state.sharedElementTransition, state.namedViews.values());
+        // Go over all leaving fragments.
+        for (int i = 0; i < firstOutFragments.size(); i++) {
+            int containerId = firstOutFragments.keyAt(i);
+            configureTransitions(containerId, state, isBack, firstOutFragments,
+                    lastInFragments);
         }
 
-        // Adds the (maybe) exiting views, not including the shared element.
-        // If some stay, that's ok.
-        addTransitioningViews(state.exitTransition, state.transitioningViews);
-
-        // Prepare for shared element name mapping. This could be chained in the case
-        // of popping several back stack states.
-        state.excludingTransition.setNameOverrides(new ArrayMap<String, String>());
-        setNameOverrides(state, sourceNames, targetNames);
-
-        // Don't include any subtree in the views that are hidden when capturing the
-        // view hierarchy transitions. They should be as if not there.
-        excludeHiddenFragments(state, true);
-
-        TransitionManager.beginDelayedTransition(state.sceneRoot, state.excludingTransition);
+        // Now go over all entering fragments that didn't have a leaving fragment.
+        for (int i = 0; i < lastInFragments.size(); i++) {
+            int containerId = lastInFragments.keyAt(i);
+            if (firstOutFragments.get(containerId) == null) {
+                configureTransitions(containerId, state, isBack, firstOutFragments,
+                        lastInFragments);
+            }
+        }
         return state;
     }
 
-    private void updateTransitionEndState(TransitionState state, ArrayList<String> names) {
-        // Find all views that are entering.
-        ArrayList<View> enteringViews = new ArrayList<View>();
-        state.sceneRoot.captureTransitioningViews(enteringViews);
-        enteringViews.removeAll(state.transitioningViews);
+    private static Transition cloneTransition(Transition transition) {
+        if (transition != null) {
+            transition = transition.clone();
+        }
+        return transition;
+    }
 
-        if (names != null) {
-            // find all shared elements.
-            state.namedViews.clear();
-            state.sceneRoot.findNamedViews(state.namedViews);
-            state.namedViews.retainAll(names);
-            if (!state.namedViews.isEmpty()) {
-                enteringViews.removeAll(state.namedViews.values());
-                addTransitioningViews(state.sharedElementTransition, state.namedViews.values());
-                // now we know the epicenter of the entering transition.
-                state.mEnteringEpicenterView = state.namedViews.get(names.get(0));
+    private static Transition getEnterTransition(Fragment inFragment, boolean isBack) {
+        if (inFragment == null) {
+            return null;
+        }
+        return cloneTransition(isBack ? inFragment.getReenterTransition() :
+                inFragment.getEnterTransition());
+    }
+
+    private static Transition getExitTransition(Fragment outFragment, boolean isBack) {
+        if (outFragment == null) {
+            return null;
+        }
+        return cloneTransition(isBack ? outFragment.getReturnTransition() :
+                outFragment.getExitTransition());
+    }
+
+    private static Transition getSharedElementTransition(Fragment inFragment, Fragment outFragment,
+            boolean isBack) {
+        if (inFragment == null || outFragment == null) {
+            return null;
+        }
+        return cloneTransition(isBack ? outFragment.getSharedElementReturnTransition() :
+                inFragment.getSharedElementEnterTransition());
+    }
+
+    private static ArrayList<View> captureExitingViews(Transition exitTransition,
+            Fragment outFragment) {
+        ArrayList<View> viewList = null;
+        if (exitTransition != null) {
+            viewList = new ArrayList<View>();
+            View root = outFragment.getView();
+            root.captureTransitioningViews(viewList);
+            addTargets(exitTransition, viewList);
+        }
+        return viewList;
+    }
+
+    private ArrayMap<String, View> remapSharedElements(TransitionState state, Fragment outFragment,
+            boolean isBack) {
+        ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
+        if (mSharedElementSourceNames != null) {
+            outFragment.getView().findNamedViews(namedViews);
+            if (isBack) {
+                namedViews.retainAll(mSharedElementTargetNames);
+            } else {
+                namedViews = remapNames(mSharedElementSourceNames, mSharedElementTargetNames,
+                        namedViews);
             }
         }
 
-        // Add all entering views to the enter transition.
-        addTransitioningViews(state.enterTransition, enteringViews);
-
-        // Don't allow capturing state for the newly-hidden fragments.
-        excludeHiddenFragments(state, false);
-
-        // Allow capturing state for the newly-shown fragments
-        includeVisibleFragments(state.excludingTransition);
-    }
-
-    private void addTransitioningViews(Transition transition, Collection<View> views) {
-        if (views.isEmpty()) {
-            // Add a view so that we can modify the valid views at the end of the
-            // fragment transaction.
-            transition.addTarget(new View(mManager.mActivity));
+        if (isBack) {
+            outFragment.mEnterTransitionCallback.onMapSharedElements(
+                    mSharedElementTargetNames, namedViews);
+            setBackNameOverrides(state, namedViews, false);
         } else {
-            for (View view : views) {
-                transition.addTarget(view);
+            outFragment.mExitTransitionCallback.onMapSharedElements(
+                    mSharedElementTargetNames, namedViews);
+            setNameOverrides(state, namedViews, false);
+        }
+
+        return namedViews;
+    }
+
+    /**
+     * Prepares the enter transition by adding a non-existent view to the transition's target list
+     * and setting it epicenter callback. By adding a non-existent view to the target list,
+     * we can prevent any view from being targeted at the beginning of the transition.
+     * We will add to the views before the end state of the transition is captured so that the
+     * views will appear. At the start of the transition, we clear the list of targets so that
+     * we can restore the state of the transition and use it again.
+     *
+     * <p>The shared element transition maps its shared elements immediately prior to
+     * capturing the final state of the Transition.</p>
+     */
+    private ArrayList<View> addTransitionTargets(final TransitionState state,
+            final Transition enterTransition, final Transition sharedElementTransition,
+            final Transition overallTransition, final View container,
+            final Fragment inFragment, final Fragment outFragment,
+            final ArrayList<View> hiddenFragmentViews, final boolean isBack) {
+        if (enterTransition == null && sharedElementTransition == null &&
+                overallTransition == null) {
+            return null;
+        }
+        final ArrayList<View> enteringViews = new ArrayList<View>();
+        container.getViewTreeObserver().addOnPreDrawListener(
+                new ViewTreeObserver.OnPreDrawListener() {
+                    @Override
+                    public boolean onPreDraw() {
+                        container.getViewTreeObserver().removeOnPreDrawListener(this);
+
+                        // Don't include any newly-hidden fragments in the transition.
+                        excludeHiddenFragments(hiddenFragmentViews, inFragment.mContainerId,
+                                overallTransition);
+
+                        if (sharedElementTransition != null) {
+                            ArrayMap<String, View> namedViews = mapSharedElementsIn(
+                                    state, isBack, inFragment);
+
+                            setEpicenterIn(namedViews, state);
+
+                            callSharedElementEnd(state, inFragment, outFragment, isBack,
+                                    namedViews);
+                        }
+
+                        if (enterTransition != null) {
+                            View view = inFragment.getView();
+                            if (view != null) {
+                                view.captureTransitioningViews(enteringViews);
+                                addTargets(enterTransition, enteringViews);
+                            }
+                            setSharedElementEpicenter(enterTransition, state);
+                        }
+                        return true;
+                    }
+                });
+        return enteringViews;
+    }
+
+    private void callSharedElementEnd(TransitionState state, Fragment inFragment,
+            Fragment outFragment, boolean isBack, ArrayMap<String, View> namedViews) {
+        SharedElementCallback sharedElementCallback = isBack ?
+                outFragment.mEnterTransitionCallback :
+                inFragment.mEnterTransitionCallback;
+        ArrayList<String> names = new ArrayList<String>(namedViews.keySet());
+        ArrayList<View> views = new ArrayList<View>(namedViews.values());
+        sharedElementCallback.onSharedElementEnd(names, views, null);
+    }
+
+    private void setEpicenterIn(ArrayMap<String, View> namedViews, TransitionState state) {
+        if (mSharedElementTargetNames != null && !namedViews.isEmpty()) {
+            // now we know the epicenter of the entering transition.
+            View epicenter = namedViews
+                    .get(mSharedElementTargetNames.get(0));
+            if (epicenter != null) {
+                state.enteringEpicenterView = epicenter;
             }
         }
     }
 
-    private void excludeHiddenFragments(TransitionState state, boolean forceExclude) {
-        if (mManager.mAdded != null) {
-            for (int i = 0; i < mManager.mAdded.size(); i++) {
-                Fragment fragment = mManager.mAdded.get(i);
-                if (fragment.mView != null && fragment.mHidden
-                        && (forceExclude || !state.hiddenViews.contains(fragment.mView))) {
-                    state.excludingTransition.excludeTarget(fragment.mView, true);
-                    state.hiddenViews.add(fragment.mView);
+    private ArrayMap<String, View> mapSharedElementsIn(TransitionState state,
+            boolean isBack, Fragment inFragment) {
+        // Now map the shared elements in the incoming fragment
+        ArrayMap<String, View> namedViews = mapEnteringSharedElements(state, inFragment, isBack);
+
+        // remap shared elements and set the name mapping used
+        // in the shared element transition.
+        if (isBack) {
+            inFragment.mExitTransitionCallback.onMapSharedElements(
+                    mSharedElementTargetNames, namedViews);
+            setBackNameOverrides(state, namedViews, true);
+        } else {
+            inFragment.mEnterTransitionCallback.onMapSharedElements(
+                    mSharedElementTargetNames, namedViews);
+            setNameOverrides(state, namedViews, true);
+        }
+        return namedViews;
+    }
+
+    private static Transition mergeTransitions(Transition enterTransition,
+            Transition exitTransition, Transition sharedElementTransition, Fragment inFragment,
+            boolean isBack) {
+        boolean overlap = true;
+        if (enterTransition != null && exitTransition != null) {
+            overlap = isBack ? inFragment.getAllowReturnTransitionOverlap() :
+                    inFragment.getAllowEnterTransitionOverlap();
+        }
+
+        Transition transition;
+        if (overlap) {
+            transition = TransitionUtils.mergeTransitions(enterTransition, exitTransition,
+                    sharedElementTransition);
+        } else {
+            TransitionSet staggered = new TransitionSet()
+                    .addTransition(exitTransition)
+                    .addTransition(enterTransition)
+                    .setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
+            transition = TransitionUtils.mergeTransitions(staggered, sharedElementTransition);
+        }
+        return transition;
+    }
+
+    /**
+     * Configures custom transitions for a specific fragment container.
+     *
+     * @param containerId The container ID of the fragments to configure the transition for.
+     * @param state The Transition State keeping track of the executing transitions.
+     * @param firstOutFragments The list of first fragments to be removed, keyed on the
+     *                          container ID.
+     * @param lastInFragments The list of last fragments to be added, keyed on the
+     *                        container ID.
+     * @param isBack true if this is popping the back stack or false if this is a
+     *               forward operation.
+     */
+    private void configureTransitions(int containerId, TransitionState state, boolean isBack,
+            SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
+        ViewGroup sceneRoot = (ViewGroup) mManager.mContainer.findViewById(containerId);
+        if (sceneRoot != null) {
+            Fragment inFragment = lastInFragments.get(containerId);
+            Fragment outFragment = firstOutFragments.get(containerId);
+
+            Transition enterTransition = getEnterTransition(inFragment, isBack);
+            Transition sharedElementTransition = getSharedElementTransition(inFragment, outFragment,
+                    isBack);
+            Transition exitTransition = getExitTransition(outFragment, isBack);
+
+            if (enterTransition == null && sharedElementTransition == null &&
+                    exitTransition == null) {
+                return; // no transitions!
+            }
+            ArrayList<View> exitingViews = captureExitingViews(exitTransition, outFragment);
+            if (exitingViews == null || exitingViews.isEmpty()) {
+                exitTransition = null;
+            }
+
+            ArrayMap<String, View> namedViews = null;
+            if (sharedElementTransition != null) {
+                namedViews = remapSharedElements(state, outFragment, isBack);
+
+                // Notify the start of the transition.
+                SharedElementCallback callback = isBack ?
+                        outFragment.mEnterTransitionCallback :
+                        inFragment.mEnterTransitionCallback;
+                ArrayList<String> names = new ArrayList<String>(namedViews.keySet());
+                ArrayList<View> views = new ArrayList<View>(namedViews.values());
+                callback.onSharedElementStart(names, views, null);
+            }
+
+            // Set the epicenter of the exit transition
+            if (mSharedElementTargetNames != null && exitTransition != null && namedViews != null) {
+                View epicenterView = namedViews.get(mSharedElementTargetNames.get(0));
+                if (epicenterView != null) {
+                    setEpicenter(exitTransition, epicenterView);
+                }
+            }
+
+            Transition transition = mergeTransitions(enterTransition, exitTransition,
+                    sharedElementTransition, inFragment, isBack);
+
+            if (transition != null) {
+                ArrayList<View> hiddenFragments = new ArrayList<View>();
+                ArrayList<View> enteringViews = addTransitionTargets(state, enterTransition,
+                        sharedElementTransition, transition, sceneRoot, inFragment, outFragment,
+                        hiddenFragments, isBack);
+
+                transition.setNameOverrides(state.nameOverrides);
+                // We want to exclude hidden views later, so we need a non-null list in the
+                // transition now.
+                transition.excludeTarget(state.nonExistentView, true);
+                // Now exclude all currently hidden fragments.
+                excludeHiddenFragments(hiddenFragments, containerId, transition);
+                TransitionManager.beginDelayedTransition(sceneRoot, transition);
+                // Remove the view targeting after the transition starts
+                removeTargetedViewsFromTransitions(sceneRoot, state.nonExistentView,
+                        enterTransition, enteringViews, exitTransition, exitingViews,
+                        transition, hiddenFragments);
+            }
+        }
+    }
+
+    /**
+     * After the transition has started, remove all targets that we added to the transitions
+     * so that the transitions are left in a clean state.
+     */
+    private void removeTargetedViewsFromTransitions(
+            final ViewGroup sceneRoot, final View nonExistingView,
+            final Transition enterTransition, final ArrayList<View> enteringViews,
+            final Transition exitTransition, final ArrayList<View> exitingViews,
+            final Transition overallTransition, final ArrayList<View> hiddenViews) {
+        if (enterTransition != null || exitTransition != null) {
+            sceneRoot.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
+                @Override
+                public boolean onPreDraw() {
+                    sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
+                    if (enterTransition != null) {
+                        enterTransition.removeTarget(nonExistingView);
+                        removeTargets(enterTransition, enteringViews);
+                    }
+                    if (exitTransition != null) {
+                        removeTargets(exitTransition, exitingViews);
+                    }
+                    int numViews = hiddenViews.size();
+                    for (int i = 0; i < numViews; i++) {
+                        overallTransition.excludeTarget(hiddenViews.get(i), false);
+                    }
+                    overallTransition.excludeTarget(nonExistingView, false);
+                    return true;
+                }
+            });
+        }
+    }
+
+    private static void removeTargets(Transition transition, ArrayList<View> views) {
+        int numViews = views.size();
+        for (int i = 0; i < numViews; i++) {
+            transition.removeTarget(views.get(i));
+        }
+    }
+
+    private static void addTargets(Transition transition, ArrayList<View> views) {
+        int numViews = views.size();
+        for (int i = 0; i < numViews; i++) {
+            transition.addTarget(views.get(i));
+        }
+    }
+
+    /**
+     * Remaps a name-to-View map, substituting different names for keys.
+     *
+     * @param inMap A list of keys found in the map, in the order in toGoInMap
+     * @param toGoInMap A list of keys to use for the new map, in the order of inMap
+     * @param namedViews The current mapping
+     * @return a new Map after it has been mapped with the new names as keys.
+     */
+    private static ArrayMap<String, View> remapNames(ArrayList<String> inMap,
+            ArrayList<String> toGoInMap, ArrayMap<String, View> namedViews) {
+        ArrayMap<String, View> remappedViews = new ArrayMap<String, View>();
+        if (!namedViews.isEmpty()) {
+            int numKeys = inMap.size();
+            for (int i = 0; i < numKeys; i++) {
+                View view = namedViews.get(inMap.get(i));
+
+                if (view != null) {
+                    remappedViews.put(toGoInMap.get(i), view);
                 }
             }
         }
-        if (forceExclude && state.hiddenViews.isEmpty()) {
-            state.excludingTransition.excludeTarget(new View(mManager.mActivity), true);
-        }
+        return remappedViews;
     }
 
-    private void includeVisibleFragments(Transition transition) {
+    /**
+     * Maps shared elements to views in the entering fragment.
+     *
+     * @param state The transition State as returned from {@link #beginTransition(
+     * android.util.SparseArray, android.util.SparseArray, boolean)}.
+     * @param inFragment The last fragment to be added.
+     * @param isBack true if this is popping the back stack or false if this is a
+     *               forward operation.
+     */
+    private ArrayMap<String, View> mapEnteringSharedElements(TransitionState state,
+            Fragment inFragment, boolean isBack) {
+        ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
+        View root = inFragment.getView();
+        if (root != null) {
+            if (mSharedElementSourceNames != null) {
+                root.findNamedViews(namedViews);
+                if (isBack) {
+                    namedViews = remapNames(mSharedElementSourceNames,
+                            mSharedElementTargetNames, namedViews);
+                } else {
+                    namedViews.retainAll(mSharedElementTargetNames);
+                }
+            }
+        }
+        return namedViews;
+    }
+
+    private void excludeHiddenFragments(final ArrayList<View> hiddenFragmentViews, int containerId,
+            Transition transition) {
         if (mManager.mAdded != null) {
             for (int i = 0; i < mManager.mAdded.size(); i++) {
                 Fragment fragment = mManager.mAdded.get(i);
-                if (fragment.mView != null && !fragment.mHidden) {
-                    transition.excludeTarget(fragment.mView, false);
+                if (fragment.mView != null && fragment.mContainer != null &&
+                        fragment.mContainerId == containerId) {
+                    if (fragment.mHidden) {
+                        if (!hiddenFragmentViews.contains(fragment.mView)) {
+                            transition.excludeTarget(fragment.mView, true);
+                            hiddenFragmentViews.add(fragment.mView);
+                        }
+                    } else {
+                        transition.excludeTarget(fragment.mView, false);
+                        hiddenFragmentViews.remove(fragment.mView);
+                    }
                 }
             }
         }
@@ -1010,16 +1418,17 @@
 
             @Override
             public Rect onGetEpicenter(Transition transition) {
-                if (mEpicenter == null && state.mEnteringEpicenterView != null) {
+                if (mEpicenter == null && state.enteringEpicenterView != null) {
                     mEpicenter = new Rect();
-                    state.mEnteringEpicenterView.getBoundsOnScreen(mEpicenter);
+                    state.enteringEpicenterView.getBoundsOnScreen(mEpicenter);
                 }
                 return mEpicenter;
             }
         });
     }
 
-    public TransitionState popFromBackStack(boolean doStateMove, TransitionState state) {
+    public TransitionState popFromBackStack(boolean doStateMove, TransitionState state,
+            SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
         if (FragmentManagerImpl.DEBUG) {
             Log.v(TAG, "popFromBackStack: " + this);
             LogWriter logw = new LogWriter(Log.VERBOSE, TAG);
@@ -1029,8 +1438,10 @@
         }
 
         if (state == null) {
-            state = beginTransition(mSharedElementTargetNames, mSharedElementSourceNames);
-        } else {
+            if (firstOutFragments.size() != 0 || lastInFragments.size() != 0) {
+                state = beginTransition(firstOutFragments, lastInFragments, true);
+            }
+        } else if (!doStateMove) {
             setNameOverrides(state, mSharedElementTargetNames, mSharedElementSourceNames);
         }
 
@@ -1109,10 +1520,7 @@
         if (doStateMove) {
             mManager.moveToState(mManager.mCurState,
                     FragmentManagerImpl.reverseTransit(mTransition), mTransitionStyle, true);
-            if (state != null) {
-                updateTransitionEndState(state, mSharedElementSourceNames);
-                state = null;
-            }
+            state = null;
         }
 
         if (mIndex >= 0) {
@@ -1122,15 +1530,17 @@
         return state;
     }
 
-    private static void setNameOverride(Transition transition, String source, String target) {
-        ArrayMap<String, String> overrides = transition.getNameOverrides();
-        for (int index = 0; index < overrides.size(); index++) {
-            if (source.equals(overrides.valueAt(index))) {
-                overrides.setValueAt(index, target);
-                return;
+    private static void setNameOverride(ArrayMap<String, String> overrides,
+            String source, String target) {
+        if (source != null && target != null && !source.equals(target)) {
+            for (int index = 0; index < overrides.size(); index++) {
+                if (source.equals(overrides.valueAt(index))) {
+                    overrides.setValueAt(index, target);
+                    return;
+                }
             }
+            overrides.put(source, target);
         }
-        overrides.put(source, target);
     }
 
     private static void setNameOverrides(TransitionState state, ArrayList<String> sourceNames,
@@ -1139,7 +1549,39 @@
             for (int i = 0; i < sourceNames.size(); i++) {
                 String source = sourceNames.get(i);
                 String target = targetNames.get(i);
-                setNameOverride(state.excludingTransition, source, target);
+                setNameOverride(state.nameOverrides, source, target);
+            }
+        }
+    }
+
+    private void setBackNameOverrides(TransitionState state, ArrayMap<String, View> namedViews,
+            boolean isEnd) {
+        int count = mSharedElementTargetNames.size();
+        for (int i = 0; i < count; i++) {
+            String source = mSharedElementSourceNames.get(i);
+            String originalTarget = mSharedElementTargetNames.get(i);
+            View view = namedViews.get(originalTarget);
+            if (view != null) {
+                String target = view.getTransitionName();
+                if (isEnd) {
+                    setNameOverride(state.nameOverrides, source, target);
+                } else {
+                    setNameOverride(state.nameOverrides, target, source);
+                }
+            }
+        }
+    }
+
+    private void setNameOverrides(TransitionState state, ArrayMap<String, View> namedViews,
+            boolean isEnd) {
+        int count = namedViews.size();
+        for (int i = 0; i < count; i++) {
+            String source = namedViews.keyAt(i);
+            String target = namedViews.valueAt(i).getTransitionName();
+            if (isEnd) {
+                setNameOverride(state.nameOverrides, source, target);
+            } else {
+                setNameOverride(state.nameOverrides, target, source);
             }
         }
     }
@@ -1161,14 +1603,8 @@
     }
 
     public class TransitionState {
-        public ArrayList<View> hiddenViews = new ArrayList<View>();
-        public ArrayList<View> transitioningViews = new ArrayList<View>();
-        public ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
-        public Transition exitTransition;
-        public Transition sharedElementTransition;
-        public Transition enterTransition;
-        public TransitionSet excludingTransition;
-        public ViewGroup sceneRoot;
-        public View mEnteringEpicenterView;
+        public ArrayMap<String, String> nameOverrides = new ArrayMap<String, String>();
+        public View enteringEpicenterView;
+        public View nonExistentView;
     }
 }
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 91a0aed..64eafb0 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -2237,7 +2237,6 @@
         mUser = user;
 
         mPackageInfo = packageInfo;
-        mContentResolver = new ApplicationContentResolver(this, mainThread, user);
         mResourcesManager = ResourcesManager.getInstance();
         mDisplay = display;
         mOverrideConfiguration = overrideConfiguration;
@@ -2284,6 +2283,8 @@
                 mOpPackageName = mBasePackageName;
             }
         }
+
+        mContentResolver = new ApplicationContentResolver(this, mainThread, user);
     }
 
     void installSystemApplicationInfo(ApplicationInfo info, ClassLoader classLoader) {
diff --git a/core/java/android/app/EnterTransitionCoordinator.java b/core/java/android/app/EnterTransitionCoordinator.java
index 47d3fd6..922561d 100644
--- a/core/java/android/app/EnterTransitionCoordinator.java
+++ b/core/java/android/app/EnterTransitionCoordinator.java
@@ -21,8 +21,6 @@
 import android.graphics.Matrix;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
 import android.os.ResultReceiver;
 import android.text.TextUtils;
 import android.transition.Transition;
@@ -71,12 +69,13 @@
         Bundle resultReceiverBundle = new Bundle();
         resultReceiverBundle.putParcelable(KEY_REMOTE_RECEIVER, this);
         mResultReceiver.send(MSG_SET_REMOTE_RECEIVER, resultReceiverBundle);
-        getDecor().getViewTreeObserver().addOnPreDrawListener(
+        final View decorView = getDecor();
+        decorView.getViewTreeObserver().addOnPreDrawListener(
                 new ViewTreeObserver.OnPreDrawListener() {
                     @Override
                     public boolean onPreDraw() {
                         if (mIsReadyForTransition) {
-                            getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                            decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                         }
                         return mIsReadyForTransition;
                     }
@@ -113,9 +112,9 @@
     protected void viewsReady(ArrayMap<String, View> sharedElements) {
         super.viewsReady(sharedElements);
         mIsReadyForTransition = true;
-        setTransitionAlpha(mSharedElements, 0);
+        hideViews(mSharedElements);
         if (getViewsTransition() != null) {
-            setTransitionAlpha(mTransitioningViews, 0);
+            hideViews(mTransitioningViews);
         }
         if (mIsReturning) {
             sendSharedElementDestination();
@@ -137,11 +136,12 @@
         if (sharedElements.isEmpty() || !sharedElements.valueAt(0).isLayoutRequested()) {
             viewsReady(sharedElements);
         } else {
-            sharedElements.valueAt(0).getViewTreeObserver()
+            final View sharedElement = sharedElements.valueAt(0);
+            sharedElement.getViewTreeObserver()
                     .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                 @Override
                 public boolean onPreDraw() {
-                    sharedElements.valueAt(0).getViewTreeObserver().removeOnPreDrawListener(this);
+                    sharedElement.getViewTreeObserver().removeOnPreDrawListener(this);
                     viewsReady(sharedElements);
                     return true;
                 }
@@ -170,7 +170,7 @@
 
     private void sendSharedElementDestination() {
         boolean allReady;
-        if (allowOverlappingTransitions()) {
+        if (allowOverlappingTransitions() && getEnterViewsTransition() != null) {
             allReady = false;
         } else {
             allReady = !getDecor().isLayoutRequested();
@@ -189,11 +189,12 @@
             moveSharedElementsToOverlay();
             mResultReceiver.send(MSG_SHARED_ELEMENT_DESTINATION, state);
         } else {
-            getDecor().getViewTreeObserver()
+            final View decorView = getDecor();
+            decorView.getViewTreeObserver()
                     .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                         @Override
                         public boolean onPreDraw() {
-                            getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                            decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                             if (mResultReceiver != null) {
                                 Bundle state = captureSharedElementState();
                                 setSharedElementMatrices();
@@ -209,7 +210,7 @@
         }
     }
 
-    private static SharedElementListener getListener(Activity activity, boolean isReturning) {
+    private static SharedElementCallback getListener(Activity activity, boolean isReturning) {
         return isReturning ? activity.mExitTransitionListener : activity.mEnterTransitionListener;
     }
 
@@ -240,7 +241,7 @@
         if (!mIsCanceled) {
             mIsCanceled = true;
             if (getViewsTransition() == null || mIsViewsTransitionStarted) {
-                setTransitionAlpha(mSharedElements, 1);
+                showViews(mSharedElements, true);
             } else {
                 mTransitioningViews.addAll(mSharedElements);
             }
@@ -294,13 +295,13 @@
         ArrayList<String> rejectedNames = new ArrayList<String>(mAllSharedElementNames);
         rejectedNames.removeAll(mSharedElementNames);
         ArrayList<View> rejectedSnapshots = createSnapshots(sharedElementState, rejectedNames);
-        mListener.handleRejectedSharedElements(rejectedSnapshots);
+        mListener.onRejectSharedElements(rejectedSnapshots);
         startRejectedAnimations(rejectedSnapshots);
 
         // Now start shared element transition
         ArrayList<View> sharedElementSnapshots = createSnapshots(sharedElementState,
                 mSharedElementNames);
-        setTransitionAlpha(mSharedElements, 1);
+        showViews(mSharedElements, true);
         scheduleSetSharedElementEnd(sharedElementSnapshots);
         ArrayList<SharedElementOriginalState> originalImageViewState =
                 setSharedElementState(sharedElementState, sharedElementSnapshots);
@@ -344,11 +345,12 @@
         }
         final Bundle sharedElementState = mSharedElementsBundle;
         mSharedElementsBundle = null;
-        getDecor().getViewTreeObserver()
+        final View decorView = getDecor();
+        decorView.getViewTreeObserver()
                 .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                     @Override
                     public boolean onPreDraw() {
-                        getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                        decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                         startTransition(new Runnable() {
                             @Override
                             public void run() {
@@ -358,7 +360,7 @@
                         return false;
                     }
                 });
-        getDecor().invalidate();
+        decorView.invalidate();
     }
 
     private void requestLayoutForSharedElements() {
@@ -410,7 +412,7 @@
                     @Override
                     public void onTransitionStart(Transition transition) {
                         mEnterViewsTransition = transition;
-                        setTransitionAlpha(mTransitioningViews, 1);
+                        showViews(mTransitioningViews, false);
                         super.onTransitionStart(transition);
                     }
 
@@ -466,6 +468,7 @@
             Drawable background = getDecor().getBackground();
             if (background != null) {
                 background = background.mutate();
+                getWindow().setBackgroundDrawable(background);
                 mBackgroundAnimator = ObjectAnimator.ofInt(background, "alpha", 255);
                 mBackgroundAnimator.setDuration(getFadeDuration());
                 mBackgroundAnimator.addListener(new AnimatorListenerAdapter() {
diff --git a/core/java/android/app/ExitTransitionCoordinator.java b/core/java/android/app/ExitTransitionCoordinator.java
index f31800d..e85ec63 100644
--- a/core/java/android/app/ExitTransitionCoordinator.java
+++ b/core/java/android/app/ExitTransitionCoordinator.java
@@ -19,6 +19,7 @@
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ObjectAnimator;
 import android.content.Intent;
+import android.graphics.Color;
 import android.graphics.Matrix;
 import android.graphics.RectF;
 import android.graphics.drawable.ColorDrawable;
@@ -78,7 +79,7 @@
         mActivity = activity;
     }
 
-    private static SharedElementListener getListener(Activity activity, boolean isReturning) {
+    private static SharedElementCallback getListener(Activity activity, boolean isReturning) {
         return isReturning ? activity.mEnterTransitionListener : activity.mExitTransitionListener;
     }
 
@@ -125,8 +126,8 @@
     }
 
     public void resetViews() {
-        setTransitionAlpha(mTransitioningViews, 1);
-        setTransitionAlpha(mSharedElements, 1);
+        showViews(mTransitioningViews, true);
+        showViews(mSharedElements, true);
         mIsHidden = true;
         if (!mIsReturning && getDecor() != null) {
             getDecor().suppressLayout(false);
@@ -139,7 +140,8 @@
         if (getDecor() != null) {
             getDecor().suppressLayout(true);
         }
-        if (!mSharedElements.isEmpty() && getSharedElementTransition() != null) {
+        if (mExitSharedElementBundle != null && !mExitSharedElementBundle.isEmpty() &&
+                !mSharedElements.isEmpty() && getSharedElementTransition() != null) {
             startTransition(new Runnable() {
                 public void run() {
                     startSharedElementExit();
@@ -163,18 +165,19 @@
         });
         final ArrayList<View> sharedElementSnapshots = createSnapshots(mExitSharedElementBundle,
                 mSharedElementNames);
-        getDecor().getViewTreeObserver()
+        final View decorView = getDecor();
+        decorView.getViewTreeObserver()
                 .addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
                     @Override
                     public boolean onPreDraw() {
-                        getDecor().getViewTreeObserver().removeOnPreDrawListener(this);
+                        decorView.getViewTreeObserver().removeOnPreDrawListener(this);
                         setSharedElementState(mExitSharedElementBundle, sharedElementSnapshots);
                         return true;
                     }
                 });
         setGhostVisibility(View.INVISIBLE);
         scheduleGhostVisibilityChange(View.INVISIBLE);
-        mListener.setSharedElementEnd(mSharedElementNames, mSharedElements, sharedElementSnapshots);
+        mListener.onSharedElementEnd(mSharedElementNames, mSharedElements, sharedElementSnapshots);
         TransitionManager.beginDelayedTransition(getDecor(), transition);
         scheduleGhostVisibilityChange(View.VISIBLE);
         setGhostVisibility(View.VISIBLE);
@@ -184,7 +187,7 @@
     private void hideSharedElements() {
         moveSharedElementsFromOverlay();
         if (!mIsHidden) {
-            setTransitionAlpha(mSharedElements, 0);
+            hideViews(mSharedElements);
         }
         mSharedElementsHidden = true;
         finishIfNecessary();
@@ -222,10 +225,7 @@
             delayCancel();
             moveSharedElementsToOverlay();
             if (getDecor().getBackground() == null) {
-                ColorDrawable black = new ColorDrawable(0xFF000000);
-                black.setAlpha(0);
-                getWindow().setBackgroundDrawable(black);
-                black.setAlpha(255);
+                getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK));
             }
             ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(mActivity, this,
                     mAllSharedElementNames, resultCode, data);
@@ -261,6 +261,8 @@
             ViewGroup decor = getDecor();
             Drawable background;
             if (decor != null && (background = decor.getBackground()) != null) {
+                background = background.mutate();
+                getWindow().setBackgroundDrawable(background);
                 mBackgroundAnimator = ObjectAnimator.ofInt(background, "alpha", 0);
                 mBackgroundAnimator.addListener(new AnimatorListenerAdapter() {
                     @Override
@@ -294,7 +296,7 @@
                     transition.removeListener(this);
                     exitTransitionComplete();
                     if (mIsHidden) {
-                        setTransitionAlpha(mTransitioningViews, 1);
+                        showViews(mTransitioningViews, true);
                     }
                     if (mSharedElementBundle != null) {
                         delayCancel();
@@ -321,7 +323,7 @@
                     transition.removeListener(this);
                     sharedElementTransitionComplete();
                     if (mIsHidden) {
-                        setTransitionAlpha(mSharedElements, 1);
+                        showViews(mSharedElements, true);
                     }
                 }
             });
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 2ff3d57..4374622 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -23,10 +23,14 @@
 import android.content.Intent;
 import android.content.res.Configuration;
 import android.content.res.Resources;
+import android.content.res.TypedArray;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.transition.Transition;
+import android.transition.TransitionInflater;
+import android.transition.TransitionSet;
 import android.util.AndroidRuntimeException;
 import android.util.ArrayMap;
 import android.util.AttributeSet;
@@ -58,11 +62,11 @@
     final boolean mRetainInstance;
     final boolean mDetached;
     final Bundle mArguments;
-    
+
     Bundle mSavedFragmentState;
-    
+
     Fragment mInstance;
-    
+
     public FragmentState(Fragment frag) {
         mClassName = frag.getClass().getName();
         mIndex = frag.mIndex;
@@ -74,7 +78,7 @@
         mDetached = frag.mDetached;
         mArguments = frag.mArguments;
     }
-    
+
     public FragmentState(Parcel in) {
         mClassName = in.readString();
         mIndex = in.readInt();
@@ -87,18 +91,18 @@
         mArguments = in.readBundle();
         mSavedFragmentState = in.readBundle();
     }
-    
+
     public Fragment instantiate(Activity activity, Fragment parent) {
         if (mInstance != null) {
             return mInstance;
         }
-        
+
         if (mArguments != null) {
             mArguments.setClassLoader(activity.getClassLoader());
         }
-        
+
         mInstance = Fragment.instantiate(activity, mClassName, mArguments);
-        
+
         if (mSavedFragmentState != null) {
             mSavedFragmentState.setClassLoader(activity.getClassLoader());
             mInstance.mSavedFragmentState = mSavedFragmentState;
@@ -117,7 +121,7 @@
 
         return mInstance;
     }
-    
+
     public int describeContents() {
         return 0;
     }
@@ -134,13 +138,13 @@
         dest.writeBundle(mArguments);
         dest.writeBundle(mSavedFragmentState);
     }
-    
+
     public static final Parcelable.Creator<FragmentState> CREATOR
             = new Parcelable.Creator<FragmentState>() {
         public FragmentState createFromParcel(Parcel in) {
             return new FragmentState(in);
         }
-        
+
         public FragmentState[] newArray(int size) {
             return new FragmentState[size];
         }
@@ -162,11 +166,12 @@
  * activity: if the activity is stopped, no fragments inside of it can be
  * started; when the activity is destroyed, all fragments will be destroyed.
  *
- * <p>All subclasses of Fragment must include a public empty constructor.
+ * <p>All subclasses of Fragment must include a public no-argument constructor.
  * The framework will often re-instantiate a fragment class when needed,
  * in particular during state restore, and needs to be able to find this
- * constructor to instantiate it.  If the empty constructor is not available,
- * a runtime exception will occur in some cases during state restore.
+ * constructor to instantiate it.  If the no-argument constructor is not
+ * available, a runtime exception will occur in some cases during state
+ * restore.
  *
  * <p>Topics covered here:
  * <ol>
@@ -299,17 +304,17 @@
  * how you can determine if a fragment placed in a container is no longer
  * running in a layout with that container and avoid creating its view hierarchy
  * in that case.)
- * 
+ *
  * <p>The attributes of the &lt;fragment&gt; tag are used to control the
  * LayoutParams provided when attaching the fragment's view to the parent
  * container.  They can also be parsed by the fragment in {@link #onInflate}
  * as parameters.
- * 
+ *
  * <p>The fragment being instantiated must have some kind of unique identifier
  * so that it can be re-associated with a previous instance if the parent
  * activity needs to be destroyed and recreated.  This can be provided these
  * ways:
- * 
+ *
  * <ul>
  * <li>If nothing is explicitly supplied, the view ID of the container will
  * be used.
@@ -318,7 +323,7 @@
  * <li><code>android:id</code> can be used in &lt;fragment&gt; to provide
  * a specific identifier for the fragment.
  * </ul>
- * 
+ *
  * <a name="BackStack"></a>
  * <h3>Back Stack</h3>
  *
@@ -347,7 +352,7 @@
 public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListener {
     private static final ArrayMap<String, Class<?>> sClassMap =
             new ArrayMap<String, Class<?>>();
-    
+
     static final int INVALID_STATE = -1;   // Invalid state used as a null value.
     static final int INITIALIZING = 0;     // Not yet created.
     static final int CREATED = 1;          // Created.
@@ -355,9 +360,11 @@
     static final int STOPPED = 3;          // Fully created, not started.
     static final int STARTED = 4;          // Created and started, not resumed.
     static final int RESUMED = 5;          // Created started and resumed.
-    
+
+    private static final Transition USE_DEFAULT_TRANSITION = new TransitionSet();
+
     int mState = INITIALIZING;
-    
+
     // Non-null if the fragment's view hierarchy is currently animating away,
     // meaning we need to wait a bit on completely destroying it.  This is the
     // animation that is running.
@@ -370,13 +377,13 @@
     // When instantiated from saved state, this is the saved state.
     Bundle mSavedFragmentState;
     SparseArray<Parcelable> mSavedViewState;
-    
+
     // Index into active fragment array.
     int mIndex = -1;
-    
+
     // Internal unique name for this fragment;
     String mWho;
-    
+
     // Construction arguments;
     Bundle mArguments;
 
@@ -391,25 +398,25 @@
 
     // True if the fragment is in the list of added fragments.
     boolean mAdded;
-    
+
     // If set this fragment is being removed from its activity.
     boolean mRemoving;
 
     // True if the fragment is in the resumed state.
     boolean mResumed;
-    
+
     // Set to true if this fragment was instantiated from a layout file.
     boolean mFromLayout;
-    
+
     // Set to true when the view has actually been inflated in its layout.
     boolean mInLayout;
 
     // True if this fragment has been restored from previously saved state.
     boolean mRestored;
-    
+
     // Number of active back stack entries this fragment is in.
     int mBackStackNesting;
-    
+
     // The fragment manager we are associated with.  Set as soon as the
     // fragment is used in a transaction; cleared after it has been removed
     // from all transactions.
@@ -428,29 +435,29 @@
     // was dynamically added to the view hierarchy, or the ID supplied in
     // layout.
     int mFragmentId;
-    
+
     // When a fragment is being dynamically added to the view hierarchy, this
     // is the identifier of the parent container it is being added to.
     int mContainerId;
-    
+
     // The optional named tag for this fragment -- usually used to find
     // fragments that are not part of the layout.
     String mTag;
-    
+
     // Set to true when the app has requested that this fragment be hidden
     // from the user.
     boolean mHidden;
-    
+
     // Set to true when the app has requested that this fragment be detached.
     boolean mDetached;
 
     // If set this fragment would like its instance retained across
     // configuration changes.
     boolean mRetainInstance;
-    
+
     // If set this fragment is being retained across the current config change.
     boolean mRetaining;
-    
+
     // If set this fragment has menu items to contribute.
     boolean mHasMenu;
 
@@ -459,16 +466,16 @@
 
     // Used to verify that subclasses call through to super class.
     boolean mCalled;
-    
+
     // If app has requested a specific animation, this is the one to use.
     int mNextAnim;
-    
+
     // The parent container of the fragment after dynamically added to UI.
     ViewGroup mContainer;
-    
+
     // The View generated for this fragment.
     View mView;
-    
+
     // Whether this fragment should defer starting until after other fragments
     // have been started and their loaders are finished.
     boolean mDeferStart;
@@ -479,7 +486,19 @@
     LoaderManagerImpl mLoaderManager;
     boolean mLoadersStarted;
     boolean mCheckedForLoaderManager;
-    
+
+    private Transition mEnterTransition = null;
+    private Transition mReturnTransition = USE_DEFAULT_TRANSITION;
+    private Transition mExitTransition = null;
+    private Transition mReenterTransition = USE_DEFAULT_TRANSITION;
+    private Transition mSharedElementEnterTransition = null;
+    private Transition mSharedElementReturnTransition = USE_DEFAULT_TRANSITION;
+    private Boolean mAllowReturnTransitionOverlap;
+    private Boolean mAllowEnterTransitionOverlap;
+
+    SharedElementCallback mEnterTransitionCallback = SharedElementCallback.NULL_CALLBACK;
+    SharedElementCallback mExitTransitionCallback = SharedElementCallback.NULL_CALLBACK;
+
     /**
      * State information that has been retrieved from a fragment instance
      * through {@link FragmentManager#saveFragmentInstanceState(Fragment)
@@ -543,7 +562,7 @@
      * will not be called when the fragment is re-instantiated; instead,
      * arguments can be supplied by the caller with {@link #setArguments}
      * and later retrieved by the Fragment with {@link #getArguments}.
-     * 
+     *
      * <p>Applications should generally not implement a constructor.  The
      * first place application code an run where the fragment is ready to
      * be used is in {@link #onAttach(Activity)}, the point where the fragment
@@ -609,7 +628,7 @@
                     + " empty constructor that is public", e);
         }
     }
-    
+
     final void restoreViewState(Bundle savedInstanceState) {
         if (mSavedViewState != null) {
             mView.restoreHierarchyState(mSavedViewState);
@@ -649,7 +668,7 @@
     @Override final public int hashCode() {
         return super.hashCode();
     }
-    
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder(128);
@@ -669,7 +688,7 @@
         sb.append('}');
         return sb.toString();
     }
-    
+
     /**
      * Return the identifier this fragment is known by.  This is either
      * the android:id value supplied in a layout or the container view ID
@@ -678,14 +697,14 @@
     final public int getId() {
         return mFragmentId;
     }
-    
+
     /**
      * Get the tag name of the fragment, if specified.
      */
     final public String getTag() {
         return mTag;
     }
-    
+
     /**
      * Supply the construction arguments for this fragment.  This can only
      * be called before the fragment has been attached to its activity; that
@@ -760,7 +779,7 @@
     final public Activity getActivity() {
         return mActivity;
     }
-    
+
     /**
      * Return <code>getActivity().getResources()</code>.
      */
@@ -770,7 +789,7 @@
         }
         return mActivity.getResources();
     }
-    
+
     /**
      * Return a localized, styled CharSequence from the application's package's
      * default string table.
@@ -870,7 +889,7 @@
     final public boolean isRemoving() {
         return mRemoving;
     }
-    
+
     /**
      * Return true if the layout is included as part of an activity view
      * hierarchy via the &lt;fragment&gt; tag.  This will always be true when
@@ -889,7 +908,7 @@
     final public boolean isResumed() {
         return mResumed;
     }
-    
+
     /**
      * Return true if the fragment is currently visible to the user.  This means
      * it: (1) has been added, (2) has its view attached to the window, and 
@@ -899,7 +918,7 @@
         return isAdded() && !isHidden() && mView != null
                 && mView.getWindowToken() != null && mView.getVisibility() == View.VISIBLE;
     }
-    
+
     /**
      * Return true if the fragment has been hidden.  By default fragments
      * are shown.  You can find out about changes to this state with
@@ -910,7 +929,7 @@
     final public boolean isHidden() {
         return mHidden;
     }
-    
+
     /**
      * Called when the hidden state (as returned by {@link #isHidden()} of
      * the fragment has changed.  Fragments start out not hidden; this will
@@ -920,7 +939,7 @@
      */
     public void onHiddenChanged(boolean hidden) {
     }
-    
+
     /**
      * Control whether a fragment instance is retained across Activity
      * re-creation (such as from a configuration change).  This can only
@@ -942,16 +961,16 @@
         }
         mRetainInstance = retain;
     }
-    
+
     final public boolean getRetainInstance() {
         return mRetainInstance;
     }
-    
+
     /**
      * Report that this fragment would like to participate in populating
      * the options menu by receiving a call to {@link #onCreateOptionsMenu}
      * and related methods.
-     * 
+     *
      * @param hasMenu If true, the fragment has menu items to contribute.
      */
     public void setHasOptionsMenu(boolean hasMenu) {
@@ -1034,7 +1053,7 @@
     public void startActivity(Intent intent) {
         startActivity(intent, null);
     }
-    
+
     /**
      * Call {@link Activity#startActivity(Intent, Bundle)} from the fragment's
      * containing Activity.
@@ -1081,13 +1100,13 @@
             mActivity.startActivityFromFragment(this, intent, requestCode, options);
         }
     }
-    
+
     /**
      * Receive the result from a previous call to
      * {@link #startActivityForResult(Intent, int)}.  This follows the
      * related Activity API as described there in
      * {@link Activity#onActivityResult(int, int, Intent)}.
-     * 
+     *
      * @param requestCode The integer request code originally supplied to
      *                    startActivityForResult(), allowing you to identify who this
      *                    result came from.
@@ -1098,7 +1117,7 @@
      */
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
     }
-    
+
     /**
      * @hide Hack so that DialogFragment can make its Dialog before creating
      * its views, and the view construction can use the dialog's context for
@@ -1115,7 +1134,7 @@
             return mActivity.getLayoutInflater();
         }
     }
-    
+
     /**
      * @deprecated Use {@link #onInflate(Activity, AttributeSet, Bundle)} instead.
      */
@@ -1131,7 +1150,7 @@
      * tag in a layout file.  Note this is <em>before</em> the fragment's
      * {@link #onAttach(Activity)} has been called; all you should do here is
      * parse the attributes and save them away.
-     * 
+     *
      * <p>This is called every time the fragment is inflated, even if it is
      * being inflated into a new instance with saved state.  It typically makes
      * sense to re-parse the parameters each time, to allow them to change with
@@ -1169,8 +1188,33 @@
     public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) {
         onInflate(attrs, savedInstanceState);
         mCalled = true;
+
+        TypedArray a = activity.obtainStyledAttributes(attrs,
+                com.android.internal.R.styleable.Fragment);
+        mEnterTransition = loadTransition(activity, a, mEnterTransition, null,
+                com.android.internal.R.styleable.Fragment_fragmentEnterTransition);
+        mReturnTransition = loadTransition(activity, a, mReturnTransition, USE_DEFAULT_TRANSITION,
+                com.android.internal.R.styleable.Fragment_fragmentReturnTransition);
+        mExitTransition = loadTransition(activity, a, mExitTransition, null,
+                com.android.internal.R.styleable.Fragment_fragmentExitTransition);
+        mReenterTransition = loadTransition(activity, a, mReenterTransition, USE_DEFAULT_TRANSITION,
+                com.android.internal.R.styleable.Fragment_fragmentReenterTransition);
+        mSharedElementEnterTransition = loadTransition(activity, a, mSharedElementEnterTransition,
+                null, com.android.internal.R.styleable.Fragment_fragmentSharedElementEnterTransition);
+        mSharedElementReturnTransition = loadTransition(activity, a, mSharedElementReturnTransition,
+                USE_DEFAULT_TRANSITION,
+                com.android.internal.R.styleable.Fragment_fragmentSharedElementReturnTransition);
+        if (mAllowEnterTransitionOverlap == null) {
+            mAllowEnterTransitionOverlap = a.getBoolean(
+                    com.android.internal.R.styleable.Fragment_fragmentAllowEnterTransitionOverlap, true);
+        }
+        if (mAllowReturnTransitionOverlap == null) {
+            mAllowReturnTransitionOverlap = a.getBoolean(
+                    com.android.internal.R.styleable.Fragment_fragmentAllowReturnTransitionOverlap, true);
+        }
+        a.recycle();
     }
-    
+
     /**
      * Called when a fragment is first attached to its activity.
      * {@link #onCreate(Bundle)} will be called after this.
@@ -1178,25 +1222,25 @@
     public void onAttach(Activity activity) {
         mCalled = true;
     }
-    
+
     /**
      * Called when a fragment loads an animation.
      */
     public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {
         return null;
     }
-    
+
     /**
      * Called to do initial creation of a fragment.  This is called after
      * {@link #onAttach(Activity)} and before
      * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}.
-     * 
+     *
      * <p>Note that this can be called while the fragment's activity is
      * still in the process of being created.  As such, you can not rely
      * on things like the activity's content view hierarchy being initialized
      * at this point.  If you want to do work once the activity itself is
      * created, see {@link #onActivityCreated(Bundle)}.
-     * 
+     *
      * @param savedInstanceState If the fragment is being re-created from
      * a previous saved state, this is the state.
      */
@@ -1209,10 +1253,10 @@
      * This is optional, and non-graphical fragments can return null (which
      * is the default implementation).  This will be called between
      * {@link #onCreate(Bundle)} and {@link #onActivityCreated(Bundle)}.
-     * 
+     *
      * <p>If you return a View from here, you will later be called in
      * {@link #onDestroyView} when the view is being released.
-     * 
+     *
      * @param inflater The LayoutInflater object that can be used to inflate
      * any views in the fragment,
      * @param container If non-null, this is the parent view that the fragment's
@@ -1220,7 +1264,7 @@
      * but this can be used to generate the LayoutParams of the view.
      * @param savedInstanceState If non-null, this fragment is being re-constructed
      * from a previous saved state as given here.
-     * 
+     *
      * @return Return the View for the fragment's UI, or null.
      */
     @Nullable
@@ -1241,18 +1285,18 @@
      */
     public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
     }
-    
+
     /**
      * Get the root view for the fragment's layout (the one returned by {@link #onCreateView}),
      * if provided.
-     * 
+     *
      * @return The fragment's root view, or null if it has no layout.
      */
     @Nullable
     public View getView() {
         return mView;
     }
-    
+
     /**
      * Called when the fragment's activity has been created and this
      * fragment's view hierarchy instantiated.  It can be used to do final
@@ -1292,7 +1336,7 @@
      */
     public void onStart() {
         mCalled = true;
-        
+
         if (!mLoadersStarted) {
             mLoadersStarted = true;
             if (!mCheckedForLoaderManager) {
@@ -1304,7 +1348,7 @@
             }
         }
     }
-    
+
     /**
      * Called when the fragment is visible to the user and actively running.
      * This is generally
@@ -1314,7 +1358,7 @@
     public void onResume() {
         mCalled = true;
     }
-    
+
     /**
      * Called to ask the fragment to save its current dynamic state, so it
      * can later be reconstructed in a new instance of its process is
@@ -1336,11 +1380,11 @@
      */
     public void onSaveInstanceState(Bundle outState) {
     }
-    
+
     public void onConfigurationChanged(Configuration newConfig) {
         mCalled = true;
     }
-    
+
     /**
      * Called when the Fragment is no longer resumed.  This is generally
      * tied to {@link Activity#onPause() Activity.onPause} of the containing
@@ -1349,7 +1393,7 @@
     public void onPause() {
         mCalled = true;
     }
-    
+
     /**
      * Called when the Fragment is no longer started.  This is generally
      * tied to {@link Activity#onStop() Activity.onStop} of the containing
@@ -1358,11 +1402,11 @@
     public void onStop() {
         mCalled = true;
     }
-    
+
     public void onLowMemory() {
         mCalled = true;
     }
-    
+
     public void onTrimMemory(int level) {
         mCalled = true;
     }
@@ -1379,7 +1423,7 @@
     public void onDestroyView() {
         mCalled = true;
     }
-    
+
     /**
      * Called when the fragment is no longer in use.  This is called
      * after {@link #onStop()} and before {@link #onDetach()}.
@@ -1434,16 +1478,16 @@
     public void onDetach() {
         mCalled = true;
     }
-    
+
     /**
      * Initialize the contents of the Activity's standard options menu.  You
      * should place your menu items in to <var>menu</var>.  For this method
      * to be called, you must have first called {@link #setHasOptionsMenu}.  See
      * {@link Activity#onCreateOptionsMenu(Menu) Activity.onCreateOptionsMenu}
      * for more information.
-     * 
+     *
      * @param menu The options menu in which you place your items.
-     * 
+     *
      * @see #setHasOptionsMenu
      * @see #onPrepareOptionsMenu
      * @see #onOptionsItemSelected
@@ -1458,10 +1502,10 @@
      * dynamically modify the contents.  See
      * {@link Activity#onPrepareOptionsMenu(Menu) Activity.onPrepareOptionsMenu}
      * for more information.
-     * 
+     *
      * @param menu The options menu as last shown or first initialized by
      *             onCreateOptionsMenu().
-     * 
+     *
      * @see #setHasOptionsMenu
      * @see #onCreateOptionsMenu
      */
@@ -1477,7 +1521,7 @@
      */
     public void onDestroyOptionsMenu() {
     }
-    
+
     /**
      * This hook is called whenever an item in your options menu is selected.
      * The default implementation simply returns false to have the normal
@@ -1485,15 +1529,15 @@
      * its Handler as appropriate).  You can use this method for any items
      * for which you would like to do processing without those other
      * facilities.
-     * 
+     *
      * <p>Derived classes should call through to the base class for it to
      * perform the default menu handling.
-     * 
+     *
      * @param item The menu item that was selected.
-     * 
+     *
      * @return boolean Return false to allow normal menu processing to
      *         proceed, true to consume it here.
-     * 
+     *
      * @see #onCreateOptionsMenu
      */
     public boolean onOptionsItemSelected(MenuItem item) {
@@ -1503,13 +1547,13 @@
     /**
      * This hook is called whenever the options menu is being closed (either by the user canceling
      * the menu with the back/menu button, or when an item is selected).
-     *  
+     *
      * @param menu The options menu as last shown or first initialized by
      *             onCreateOptionsMenu().
      */
     public void onOptionsMenuClosed(Menu menu) {
     }
-    
+
     /**
      * Called when a context menu for the {@code view} is about to be shown.
      * Unlike {@link #onCreateOptionsMenu}, this will be called every
@@ -1537,25 +1581,25 @@
      * {@link OnCreateContextMenuListener} on the view to this fragment, so
      * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be
      * called when it is time to show the context menu.
-     * 
+     *
      * @see #unregisterForContextMenu(View)
      * @param view The view that should show a context menu.
      */
     public void registerForContextMenu(View view) {
         view.setOnCreateContextMenuListener(this);
     }
-    
+
     /**
      * Prevents a context menu to be shown for the given view. This method will
      * remove the {@link OnCreateContextMenuListener} on the view.
-     * 
+     *
      * @see #registerForContextMenu(View)
      * @param view The view that should stop showing a context menu.
      */
     public void unregisterForContextMenu(View view) {
         view.setOnCreateContextMenuListener(null);
     }
-    
+
     /**
      * This hook is called whenever an item in a context menu is selected. The
      * default implementation simply returns false to have the normal processing
@@ -1568,7 +1612,7 @@
      * <p>
      * Derived classes should call through to the base class for it to perform
      * the default menu handling.
-     * 
+     *
      * @param item The context menu item that was selected.
      * @return boolean Return false to allow normal context menu processing to
      *         proceed, true to consume it here.
@@ -1576,7 +1620,284 @@
     public boolean onContextItemSelected(MenuItem item) {
         return false;
     }
-    
+
+    /**
+     * When custom transitions are used with Fragments, the enter transition callback
+     * is called when this Fragment is attached or detached when not popping the back stack.
+     *
+     * @param callback Used to manipulate the shared element transitions on this Fragment
+     *                 when added not as a pop from the back stack.
+     */
+    public void setEnterSharedElementTransitionCallback(SharedElementCallback callback) {
+        if (callback == null) {
+            callback = SharedElementCallback.NULL_CALLBACK;
+        }
+        mEnterTransitionCallback = callback;
+    }
+
+    /**
+     * When custom transitions are used with Fragments, the exit transition callback
+     * is called when this Fragment is attached or detached when popping the back stack.
+     *
+     * @param callback Used to manipulate the shared element transitions on this Fragment
+     *                 when added as a pop from the back stack.
+     */
+    public void setExitSharedElementTransitionCallback(SharedElementCallback callback) {
+        if (callback == null) {
+            callback = SharedElementCallback.NULL_CALLBACK;
+        }
+        mExitTransitionCallback = callback;
+    }
+
+    /**
+     * Sets the Transition that will be used to move Views into the initial scene. The entering
+     * Views will be those that are regular Views or ViewGroups that have
+     * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as entering is governed by changing visibility from
+     * {@link View#INVISIBLE} to {@link View#VISIBLE}. If <code>transition</code> is null,
+     * entering Views will remain unaffected.
+     *
+     * @param transition The Transition to use to move Views into the initial Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentEnterTransition
+     */
+    public void setEnterTransition(Transition transition) {
+        mEnterTransition = transition;
+    }
+
+    /**
+     * Returns the Transition that will be used to move Views into the initial scene. The entering
+     * Views will be those that are regular Views or ViewGroups that have
+     * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as entering is governed by changing visibility from
+     * {@link View#INVISIBLE} to {@link View#VISIBLE}.
+     *
+     * @return the Transition to use to move Views into the initial Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentEnterTransition
+     */
+    public Transition getEnterTransition() {
+        return mEnterTransition;
+    }
+
+    /**
+     * Sets the Transition that will be used to move Views out of the scene when the Fragment is
+     * preparing to be removed, hidden, or detached because of popping the back stack. The exiting
+     * Views will be those that are regular Views or ViewGroups that have
+     * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as entering is governed by changing visibility from
+     * {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
+     * entering Views will remain unaffected. If nothing is set, the default will be to
+     * use the same value as set in {@link #setEnterTransition(android.transition.Transition)}.
+     *
+     * @param transition The Transition to use to move Views out of the Scene when the Fragment
+     *                   is preparing to close.
+     * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+     */
+    public void setReturnTransition(Transition transition) {
+        mReturnTransition = transition;
+    }
+
+    /**
+     * Returns the Transition that will be used to move Views out of the scene when the Fragment is
+     * preparing to be removed, hidden, or detached because of popping the back stack. The exiting
+     * Views will be those that are regular Views or ViewGroups that have
+     * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as entering is governed by changing visibility from
+     * {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
+     * entering Views will remain unaffected.
+     *
+     * @return the Transition to use to move Views out of the Scene when the Fragment
+     *         is preparing to close.
+     * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+     */
+    public Transition getReturnTransition() {
+        return mReturnTransition == USE_DEFAULT_TRANSITION ? getEnterTransition()
+                : mReturnTransition;
+    }
+
+    /**
+     * Sets the Transition that will be used to move Views out of the scene when the
+     * fragment is removed, hidden, or detached when not popping the back stack.
+     * The exiting Views will be those that are regular Views or ViewGroups that
+     * have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as exiting is governed by changing visibility
+     * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
+     * remain unaffected.
+     *
+     * @param transition The Transition to use to move Views out of the Scene when the Fragment
+     *                   is being closed not due to popping the back stack.
+     * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+     */
+    public void setExitTransition(Transition transition) {
+        mExitTransition = transition;
+    }
+
+    /**
+     * Returns the Transition that will be used to move Views out of the scene when the
+     * fragment is removed, hidden, or detached when not popping the back stack.
+     * The exiting Views will be those that are regular Views or ViewGroups that
+     * have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+     * {@link android.transition.Visibility} as exiting is governed by changing visibility
+     * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
+     * remain unaffected.
+     *
+     * @return the Transition to use to move Views out of the Scene when the Fragment
+     *         is being closed not due to popping the back stack.
+     * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+     */
+    public Transition getExitTransition() {
+        return mExitTransition;
+    }
+
+    /**
+     * Sets the Transition that will be used to move Views in to the scene when returning due
+     * to popping a back stack. The entering Views will be those that are regular Views
+     * or ViewGroups that have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions
+     * will extend {@link android.transition.Visibility} as exiting is governed by changing
+     * visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null,
+     * the views will remain unaffected. If nothing is set, the default will be to use the same
+     * transition as {@link #setExitTransition(android.transition.Transition)}.
+     *
+     * @param transition The Transition to use to move Views into the scene when reentering from a
+     *                   previously-started Activity.
+     * @attr ref android.R.styleable#Fragment_fragmentReenterTransition
+     */
+    public void setReenterTransition(Transition transition) {
+        mReenterTransition = transition;
+    }
+
+    /**
+     * Returns the Transition that will be used to move Views in to the scene when returning due
+     * to popping a back stack. The entering Views will be those that are regular Views
+     * or ViewGroups that have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions
+     * will extend {@link android.transition.Visibility} as exiting is governed by changing
+     * visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null,
+     * the views will remain unaffected. If nothing is set, the default will be to use the same
+     * transition as {@link #setExitTransition(android.transition.Transition)}.
+     *
+     * @return the Transition to use to move Views into the scene when reentering from a
+     *                   previously-started Activity.
+     * @attr ref android.R.styleable#Fragment_fragmentReenterTransition
+     */
+    public Transition getReenterTransition() {
+        return mReenterTransition == USE_DEFAULT_TRANSITION ? getExitTransition()
+                : mReenterTransition;
+    }
+
+    /**
+     * Sets the Transition that will be used for shared elements transferred into the content
+     * Scene. Typical Transitions will affect size and location, such as
+     * {@link android.transition.ChangeBounds}. A null
+     * value will cause transferred shared elements to blink to the final position.
+     *
+     * @param transition The Transition to use for shared elements transferred into the content
+     *                   Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentSharedElementEnterTransition
+     */
+    public void setSharedElementEnterTransition(Transition transition) {
+        mSharedElementEnterTransition = transition;
+    }
+
+    /**
+     * Returns the Transition that will be used for shared elements transferred into the content
+     * Scene. Typical Transitions will affect size and location, such as
+     * {@link android.transition.ChangeBounds}. A null
+     * value will cause transferred shared elements to blink to the final position.
+     *
+     * @return The Transition to use for shared elements transferred into the content
+     *                   Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentSharedElementEnterTransition
+     */
+    public Transition getSharedElementEnterTransition() {
+        return mSharedElementEnterTransition;
+    }
+
+    /**
+     * Sets the Transition that will be used for shared elements transferred back during a
+     * pop of the back stack. This Transition acts in the leaving Fragment.
+     * Typical Transitions will affect size and location, such as
+     * {@link android.transition.ChangeBounds}. A null
+     * value will cause transferred shared elements to blink to the final position.
+     * If no value is set, the default will be to use the same value as
+     * {@link #setSharedElementEnterTransition(android.transition.Transition)}.
+     *
+     * @param transition The Transition to use for shared elements transferred out of the content
+     *                   Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentSharedElementReturnTransition
+     */
+    public void setSharedElementReturnTransition(Transition transition) {
+        mSharedElementReturnTransition = transition;
+    }
+
+    /**
+     * Return the Transition that will be used for shared elements transferred back during a
+     * pop of the back stack. This Transition acts in the leaving Fragment.
+     * Typical Transitions will affect size and location, such as
+     * {@link android.transition.ChangeBounds}. A null
+     * value will cause transferred shared elements to blink to the final position.
+     * If no value is set, the default will be to use the same value as
+     * {@link #setSharedElementEnterTransition(android.transition.Transition)}.
+     *
+     * @return The Transition to use for shared elements transferred out of the content
+     *                   Scene.
+     * @attr ref android.R.styleable#Fragment_fragmentSharedElementReturnTransition
+     */
+    public Transition getSharedElementReturnTransition() {
+        return mSharedElementReturnTransition == USE_DEFAULT_TRANSITION ?
+                getSharedElementEnterTransition() : mSharedElementReturnTransition;
+    }
+
+    /**
+     * Sets whether the the exit transition and enter transition overlap or not.
+     * When true, the enter transition will start as soon as possible. When false, the
+     * enter transition will wait until the exit transition completes before starting.
+     *
+     * @param allow true to start the enter transition when possible or false to
+     *              wait until the exiting transition completes.
+     * @attr ref android.R.styleable#Fragment_fragmentAllowEnterTransitionOverlap
+     */
+    public void setAllowEnterTransitionOverlap(boolean allow) {
+        mAllowEnterTransitionOverlap = allow;
+    }
+
+    /**
+     * Returns whether the the exit transition and enter transition overlap or not.
+     * When true, the enter transition will start as soon as possible. When false, the
+     * enter transition will wait until the exit transition completes before starting.
+     *
+     * @return true when the enter transition should start as soon as possible or false to
+     * when it should wait until the exiting transition completes.
+     * @attr ref android.R.styleable#Fragment_fragmentAllowEnterTransitionOverlap
+     */
+    public boolean getAllowEnterTransitionOverlap() {
+        return (mAllowEnterTransitionOverlap == null) ? true : mAllowEnterTransitionOverlap;
+    }
+
+    /**
+     * Sets whether the the return transition and reenter transition overlap or not.
+     * When true, the reenter transition will start as soon as possible. When false, the
+     * reenter transition will wait until the return transition completes before starting.
+     *
+     * @param allow true to start the reenter transition when possible or false to wait until the
+     *              return transition completes.
+     * @attr ref android.R.styleable#Fragment_fragmentAllowReturnTransitionOverlap
+     */
+    public void setAllowReturnTransitionOverlap(boolean allow) {
+        mAllowReturnTransitionOverlap = allow;
+    }
+
+    /**
+     * Returns whether the the return transition and reenter transition overlap or not.
+     * When true, the reenter transition will start as soon as possible. When false, the
+     * reenter transition will wait until the return transition completes before starting.
+     *
+     * @return true to start the reenter transition when possible or false to wait until the
+     *         return transition completes.
+     * @attr ref android.R.styleable#Fragment_fragmentAllowReturnTransitionOverlap
+     */
+    public boolean getAllowReturnTransitionOverlap() {
+        return (mAllowReturnTransitionOverlap == null) ? true : mAllowReturnTransitionOverlap;
+    }
+
     /**
      * Print the Fragments's state into the given stream.
      *
@@ -1588,53 +1909,53 @@
      */
     public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
         writer.print(prefix); writer.print("mFragmentId=#");
-                writer.print(Integer.toHexString(mFragmentId));
-                writer.print(" mContainerId=#");
-                writer.print(Integer.toHexString(mContainerId));
-                writer.print(" mTag="); writer.println(mTag);
+        writer.print(Integer.toHexString(mFragmentId));
+        writer.print(" mContainerId=#");
+        writer.print(Integer.toHexString(mContainerId));
+        writer.print(" mTag="); writer.println(mTag);
         writer.print(prefix); writer.print("mState="); writer.print(mState);
-                writer.print(" mIndex="); writer.print(mIndex);
-                writer.print(" mWho="); writer.print(mWho);
-                writer.print(" mBackStackNesting="); writer.println(mBackStackNesting);
+        writer.print(" mIndex="); writer.print(mIndex);
+        writer.print(" mWho="); writer.print(mWho);
+        writer.print(" mBackStackNesting="); writer.println(mBackStackNesting);
         writer.print(prefix); writer.print("mAdded="); writer.print(mAdded);
-                writer.print(" mRemoving="); writer.print(mRemoving);
-                writer.print(" mResumed="); writer.print(mResumed);
-                writer.print(" mFromLayout="); writer.print(mFromLayout);
-                writer.print(" mInLayout="); writer.println(mInLayout);
+        writer.print(" mRemoving="); writer.print(mRemoving);
+        writer.print(" mResumed="); writer.print(mResumed);
+        writer.print(" mFromLayout="); writer.print(mFromLayout);
+        writer.print(" mInLayout="); writer.println(mInLayout);
         writer.print(prefix); writer.print("mHidden="); writer.print(mHidden);
-                writer.print(" mDetached="); writer.print(mDetached);
-                writer.print(" mMenuVisible="); writer.print(mMenuVisible);
-                writer.print(" mHasMenu="); writer.println(mHasMenu);
+        writer.print(" mDetached="); writer.print(mDetached);
+        writer.print(" mMenuVisible="); writer.print(mMenuVisible);
+        writer.print(" mHasMenu="); writer.println(mHasMenu);
         writer.print(prefix); writer.print("mRetainInstance="); writer.print(mRetainInstance);
-                writer.print(" mRetaining="); writer.print(mRetaining);
-                writer.print(" mUserVisibleHint="); writer.println(mUserVisibleHint);
+        writer.print(" mRetaining="); writer.print(mRetaining);
+        writer.print(" mUserVisibleHint="); writer.println(mUserVisibleHint);
         if (mFragmentManager != null) {
             writer.print(prefix); writer.print("mFragmentManager=");
-                    writer.println(mFragmentManager);
+            writer.println(mFragmentManager);
         }
         if (mActivity != null) {
             writer.print(prefix); writer.print("mActivity=");
-                    writer.println(mActivity);
+            writer.println(mActivity);
         }
         if (mParentFragment != null) {
             writer.print(prefix); writer.print("mParentFragment=");
-                    writer.println(mParentFragment);
+            writer.println(mParentFragment);
         }
         if (mArguments != null) {
             writer.print(prefix); writer.print("mArguments="); writer.println(mArguments);
         }
         if (mSavedFragmentState != null) {
             writer.print(prefix); writer.print("mSavedFragmentState=");
-                    writer.println(mSavedFragmentState);
+            writer.println(mSavedFragmentState);
         }
         if (mSavedViewState != null) {
             writer.print(prefix); writer.print("mSavedViewState=");
-                    writer.println(mSavedViewState);
+            writer.println(mSavedViewState);
         }
         if (mTarget != null) {
             writer.print(prefix); writer.print("mTarget="); writer.print(mTarget);
-                    writer.print(" mTargetRequestCode=");
-                    writer.println(mTargetRequestCode);
+            writer.print(" mTargetRequestCode=");
+            writer.println(mTargetRequestCode);
         }
         if (mNextAnim != 0) {
             writer.print(prefix); writer.print("mNextAnim="); writer.println(mNextAnim);
@@ -1648,7 +1969,7 @@
         if (mAnimatingAway != null) {
             writer.print(prefix); writer.print("mAnimatingAway="); writer.println(mAnimatingAway);
             writer.print(prefix); writer.print("mStateAfterAnimating=");
-                    writer.println(mStateAfterAnimating);
+            writer.println(mStateAfterAnimating);
         }
         if (mLoaderManager != null) {
             writer.print(prefix); writer.println("Loader Manager:");
@@ -1886,7 +2207,7 @@
             throw new SuperNotCalledException("Fragment " + this
                     + " did not call through to super.onStop()");
         }
-        
+
         if (mLoadersStarted) {
             mLoadersStarted = false;
             if (!mCheckedForLoaderManager) {
@@ -1929,4 +2250,23 @@
                     + " did not call through to super.onDestroy()");
         }
     }
+
+    private static Transition loadTransition(Context context, TypedArray typedArray,
+            Transition currentValue, Transition defaultValue, int id) {
+        if (currentValue != defaultValue) {
+            return currentValue;
+        }
+        int transitionId = typedArray.getResourceId(id, 0);
+        Transition transition = defaultValue;
+        if (transitionId != 0 && transitionId != com.android.internal.R.transition.no_transition) {
+            TransitionInflater inflater = TransitionInflater.from(context);
+            transition = inflater.inflateTransition(transitionId);
+            if (transition instanceof TransitionSet &&
+                    ((TransitionSet)transition).getTransitionCount() == 0) {
+                transition = null;
+            }
+        }
+        return transition;
+    }
+
 }
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 1df1d42..ef69fdd 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -1497,7 +1497,10 @@
                 return false;
             }
             final BackStackRecord bss = mBackStack.remove(last);
-            bss.popFromBackStack(true, null);
+            SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+            SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+            bss.calculateBackFragments(firstOutFragments, lastInFragments);
+            bss.popFromBackStack(true, null, firstOutFragments, lastInFragments);
             reportBackStackChanged();
         } else {
             int index = -1;
@@ -1541,10 +1544,16 @@
                 states.add(mBackStack.remove(i));
             }
             final int LAST = states.size()-1;
+            SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+            SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+            for (int i=0; i<=LAST; i++) {
+                states.get(i).calculateBackFragments(firstOutFragments, lastInFragments);
+            }
             BackStackRecord.TransitionState state = null;
             for (int i=0; i<=LAST; i++) {
                 if (DEBUG) Log.v(TAG, "Popping back stack state: " + states.get(i));
-                state = states.get(i).popFromBackStack(i == LAST, state);
+                state = states.get(i).popFromBackStack(i == LAST, state,
+                        firstOutFragments, lastInFragments);
             }
             reportBackStackChanged();
         }
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java
index 1077bac..25cd3cc 100644
--- a/core/java/android/app/FragmentTransaction.java
+++ b/core/java/android/app/FragmentTransaction.java
@@ -172,19 +172,16 @@
     public abstract FragmentTransaction setTransition(int transit);
 
     /**
-     * Set a {@link android.transition.Transition} resource id to use with this transaction.
-     * <var>transitionId</var> will be played for fragments when going forward and when popping
-     * the back stack.
-     * @param sceneRootId The ID of the element acting as the scene root for the transition.
-     *                    This should be a ViewGroup containing all Fragments in the transaction.
-     * @param transitionId The resource ID for the Transition used during the Fragment transaction.
+     * TODO: remove from API
+     * @hide
      */
-    public abstract FragmentTransaction setCustomTransition(int sceneRootId, int transitionId);
+    public FragmentTransaction setCustomTransition(int sceneRootId, int transitionId) {
+        return this;
+    }
 
     /**
-     * Used with {@link #setCustomTransition(int, int)} to map a View from a removed or hidden
-     * Fragment to a View from a shown or added Fragment.
-     * <var>sharedElement</var> must have a unique transitionName in the View hierarchy.
+     * Used with to map a View from a removed or hidden Fragment to a View from a shown
+     * or added Fragment.
      * @param sharedElement A View in a disappearing Fragment to match with a View in an
      *                      appearing Fragment.
      * @param name The transitionName for a View in an appearing Fragment to match to the shared
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 99428e8..8fa1fd53 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -111,7 +111,7 @@
     public void activityResumed(IBinder token) throws RemoteException;
     public void activityIdle(IBinder token, Configuration config,
             boolean stopProfiling) throws RemoteException;
-    public void activityPaused(IBinder token, PersistableBundle persistentState) throws RemoteException;
+    public void activityPaused(IBinder token) throws RemoteException;
     public void activityStopped(IBinder token, Bundle state,
             PersistableBundle persistentState, CharSequence description) throws RemoteException;
     public void activitySlept(IBinder token) throws RemoteException;
@@ -327,6 +327,8 @@
     public void notifyActivityDrawn(IBinder token) throws RemoteException;
     public ActivityOptions getActivityOptions(IBinder token) throws RemoteException;
 
+    public void bootAnimationComplete() throws RemoteException;
+
     public void setImmersive(IBinder token, boolean immersive) throws RemoteException;
     public boolean isImmersive(IBinder token) throws RemoteException;
     public boolean isTopActivityImmersive() throws RemoteException;
@@ -772,4 +774,5 @@
     int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
     int RELEASE_ACTIVITY_INSTANCE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+235;
     int RELEASE_SOME_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+236;
+    int BOOT_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+237;
 }
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index a7546d9..f53075c 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -49,7 +49,7 @@
  */
 public interface IApplicationThread extends IInterface {
     void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving,
-            int configChanges) throws RemoteException;
+            int configChanges, boolean dontReport) throws RemoteException;
     void scheduleStopActivity(IBinder token, boolean showWindow,
             int configChanges) throws RemoteException;
     void scheduleWindowVisibility(IBinder token, boolean showWindow) throws RemoteException;
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index dbd180f..7d4512b 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -48,6 +48,9 @@
     void setPackagePriority(String pkg, int uid, int priority);
     int getPackagePriority(String pkg, int uid);
 
+    void setPackageVisibilityOverride(String pkg, int uid, int visibility);
+    int getPackageVisibilityOverride(String pkg, int uid);
+
     // TODO: Remove this when callers have been migrated to the equivalent
     // INotificationListener method.
     StatusBarNotification[] getActiveNotifications(String callingPkg);
@@ -68,6 +71,7 @@
 
     ComponentName getEffectsSuppressor();
     boolean matchesCallFilter(in Bundle extras);
+    boolean matchesCallFilterAsUser(in Bundle extras, int userId);
 
     ZenModeConfig getZenModeConfig();
     boolean setZenModeConfig(in ZenModeConfig config);
diff --git a/core/java/android/app/IWallpaperManager.aidl b/core/java/android/app/IWallpaperManager.aidl
index 181eb63..3b5900b 100644
--- a/core/java/android/app/IWallpaperManager.aidl
+++ b/core/java/android/app/IWallpaperManager.aidl
@@ -16,6 +16,7 @@
 
 package android.app;
 
+import android.graphics.Rect;
 import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 import android.app.IWallpaperManagerCallback;
@@ -73,6 +74,11 @@
     int getHeightHint();
 
     /**
+     * Sets extra padding that we would like the wallpaper to have outside of the display.
+     */
+    void setDisplayPadding(in Rect padding);
+
+    /**
      * Returns the name of the wallpaper. Private API.
      */
     String getName();
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index e055237..cc9aed8 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -56,13 +56,6 @@
     public static final String EXTRA_DESCRIPTION = "android.app.extra.DESCRIPTION";
 
     /**
-     * @removed
-     */
-    public Intent getConfirmDeviceCredentialIntent(CharSequence title, CharSequence description) {
-        return createConfirmDeviceCredentialIntent(title, description);
-    }
-
-    /**
      * Get an intent to prompt the user to confirm credentials (pin, pattern or password)
      * for the current user of the device. The caller is expected to launch this activity using
      * {@link android.app.Activity#startActivityForResult(Intent, int)} and check for
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 966d2ce..f9e4895 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -21,8 +21,8 @@
 import android.annotation.SdkConstant.SdkConstantType;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
-import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.PorterDuff;
@@ -38,7 +38,6 @@
 import android.os.Parcelable;
 import android.os.SystemClock;
 import android.os.UserHandle;
-import android.os.UserManager;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.MathUtils;
@@ -130,6 +129,14 @@
     public static final int DEFAULT_LIGHTS = 4;
 
     /**
+     * Maximum length of CharSequences accepted by Builder and friends.
+     *
+     * <p>
+     * Avoids spamming the system with overly large strings such as full e-mails.
+     */
+    private static final int MAX_CHARSEQUENCE_LENGTH = 5 * 1024;
+
+    /**
      * A timestamp related to this notification, in milliseconds since the epoch.
      *
      * Default value: {@link System#currentTimeMillis() Now}.
@@ -538,8 +545,26 @@
      */
     public int visibility;
 
+    /**
+     * Notification visibility: Show this notification in its entirety on all lockscreens.
+     *
+     * {@see #visibility}
+     */
     public static final int VISIBILITY_PUBLIC = 1;
+
+    /**
+     * Notification visibility: Show this notification on all lockscreens, but conceal sensitive or
+     * private information on secure lockscreens.
+     *
+     * {@see #visibility}
+     */
     public static final int VISIBILITY_PRIVATE = 0;
+
+    /**
+     * Notification visibility: Do not reveal any part of this notification on a secure lockscreen.
+     *
+     * {@see #visibility}
+     */
     public static final int VISIBILITY_SECRET = -1;
 
     /**
@@ -1424,6 +1449,7 @@
             extras.remove(Notification.EXTRA_LARGE_ICON);
             extras.remove(Notification.EXTRA_LARGE_ICON_BIG);
             extras.remove(Notification.EXTRA_PICTURE);
+            extras.remove(Notification.EXTRA_BIG_TEXT);
             // Prevent light notifications from being rebuilt.
             extras.remove(Builder.EXTRA_NEEDS_REBUILD);
         }
@@ -1435,6 +1461,10 @@
      * @hide
      */
     public static CharSequence safeCharSequence(CharSequence cs) {
+        if (cs == null) return cs;
+        if (cs.length() > MAX_CHARSEQUENCE_LENGTH) {
+            cs = cs.subSequence(0, MAX_CHARSEQUENCE_LENGTH);
+        }
         if (cs instanceof Parcelable) {
             Log.e(TAG, "warning: " + cs.getClass().getCanonicalName()
                     + " instance is a custom Parcelable and not allowed in Notification");
@@ -1801,10 +1831,12 @@
                 = "android.rebuild.hudViewActionCount";
 
         /**
-         * The package name of the context used to create the notification via a Builder.
+         * The ApplicationInfo of the package that created the notification, used to create
+         * a context to rebuild the notification via a Builder.
+         * @hide
          */
-        private static final String EXTRA_REBUILD_CONTEXT_PACKAGE =
-                "android.rebuild.contextPackage";
+        private static final String EXTRA_REBUILD_CONTEXT_APPLICATION_INFO =
+                "android.rebuild.applicationInfo";
 
         // Whether to enable stripping (at post time) & rebuilding (at listener receive time) of
         // memory intensive resources.
@@ -1917,7 +1949,7 @@
             mPeople = new ArrayList<String>();
 
             mColorUtil = context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.L ?
-                    NotificationColorUtil.getInstance() : null;
+                    NotificationColorUtil.getInstance(mContext) : null;
         }
 
         /**
@@ -2578,8 +2610,8 @@
         private Drawable getProfileBadgeDrawable() {
             // Note: This assumes that the current user can read the profile badge of the
             // originating user.
-            UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
-            return userManager.getBadgeForUser(new UserHandle(mOriginatingUserId), 0);
+            return mContext.getPackageManager().getUserBadgeForDensity(
+                    new UserHandle(mOriginatingUserId), 0);
         }
 
         private Bitmap getProfileBadge() {
@@ -2623,9 +2655,44 @@
             contentView.setTextViewTextSize(R.id.text, TypedValue.COMPLEX_UNIT_PX, subTextSize);
         }
 
+        private void unshrinkLine3Text(RemoteViews contentView) {
+            float regularTextSize = mContext.getResources().getDimensionPixelSize(
+                    com.android.internal.R.dimen.notification_text_size);
+            contentView.setTextViewTextSize(R.id.text, TypedValue.COMPLEX_UNIT_PX, regularTextSize);
+        }
+
+        private void resetStandardTemplate(RemoteViews contentView) {
+            removeLargeIconBackground(contentView);
+            contentView.setViewPadding(R.id.icon, 0, 0, 0, 0);
+            contentView.setImageViewResource(R.id.icon, 0);
+            contentView.setInt(R.id.icon, "setBackgroundResource", 0);
+            contentView.setViewVisibility(R.id.right_icon, View.GONE);
+            contentView.setInt(R.id.right_icon, "setBackgroundResource", 0);
+            contentView.setImageViewResource(R.id.right_icon, 0);
+            contentView.setImageViewResource(R.id.icon, 0);
+            contentView.setTextViewText(R.id.title, null);
+            contentView.setTextViewText(R.id.text, null);
+            unshrinkLine3Text(contentView);
+            contentView.setTextViewText(R.id.text2, null);
+            contentView.setViewVisibility(R.id.text2, View.GONE);
+            contentView.setViewVisibility(R.id.info, View.GONE);
+            contentView.setViewVisibility(R.id.time, View.GONE);
+            contentView.setViewVisibility(R.id.line3, View.GONE);
+            contentView.setViewVisibility(R.id.overflow_divider, View.GONE);
+            contentView.setViewVisibility(R.id.progress, View.GONE);
+        }
+
         private RemoteViews applyStandardTemplate(int resId) {
-            RemoteViews contentView = new BuilderRemoteViews(mContext.getPackageName(),
-                    mOriginatingUserId, resId);
+            return applyStandardTemplate(resId, true /* hasProgress */);
+        }
+
+        /**
+         * @param hasProgress whether the progress bar should be shown and set
+         */
+        private RemoteViews applyStandardTemplate(int resId, boolean hasProgress) {
+            RemoteViews contentView = new BuilderRemoteViews(mContext.getApplicationInfo(), resId);
+
+            resetStandardTemplate(contentView);
 
             boolean showLine3 = false;
             boolean showLine2 = false;
@@ -2683,10 +2750,10 @@
                 }
             } else {
                 contentView.setViewVisibility(R.id.text2, View.GONE);
-                if (mProgressMax != 0 || mProgressIndeterminate) {
+                if (hasProgress && (mProgressMax != 0 || mProgressIndeterminate)) {
+                    contentView.setViewVisibility(R.id.progress, View.VISIBLE);
                     contentView.setProgressBar(
                             R.id.progress, mProgressMax, mProgress, mProgressIndeterminate);
-                    contentView.setViewVisibility(R.id.progress, View.VISIBLE);
                     showLine2 = true;
                 } else {
                     contentView.setViewVisibility(R.id.progress, View.GONE);
@@ -2698,7 +2765,7 @@
                 shrinkLine3Text(contentView);
             }
 
-            if (mWhen != 0 && mShowWhen) {
+            if (showsTimeOrChronometer()) {
                 if (mUseChronometer) {
                     contentView.setViewVisibility(R.id.chronometer, View.VISIBLE);
                     contentView.setLong(R.id.chronometer, "setBase",
@@ -2732,6 +2799,14 @@
         }
 
         /**
+         * @return true if the built notification will show the time or the chronometer; false
+         *         otherwise
+         */
+        private boolean showsTimeOrChronometer() {
+            return mWhen != 0 && mShowWhen;
+        }
+
+        /**
          * Logic to find out whether the notification is going to have three lines in the contracted
          * layout. This is used to adjust the top padding.
          *
@@ -2740,13 +2815,14 @@
          */
         private boolean hasThreeLines() {
             boolean contentTextInLine2 = mSubText != null && mContentText != null;
-
+            boolean hasProgress = mStyle == null || mStyle.hasProgress();
             // If we have content text in line 2, badge goes into line 2, or line 3 otherwise
             boolean badgeInLine3 = getProfileBadgeDrawable() != null && !contentTextInLine2;
             boolean hasLine3 = mContentText != null || mContentInfo != null || mNumber > 0
                     || badgeInLine3;
             boolean hasLine2 = (mSubText != null && mContentText != null) ||
-                    (mSubText == null && (mProgressMax != 0 || mProgressIndeterminate));
+                    (hasProgress && mSubText == null
+                            && (mProgressMax != 0 || mProgressIndeterminate));
             return hasLine2 && hasLine3;
         }
 
@@ -2769,15 +2845,22 @@
             return Math.round((1 - largeFactor) * padding + largeFactor * largePadding);
         }
 
+        private void resetStandardTemplateWithActions(RemoteViews big) {
+            big.setViewVisibility(R.id.actions, View.GONE);
+            big.setViewVisibility(R.id.action_divider, View.GONE);
+            big.removeAllViews(R.id.actions);
+        }
+
         private RemoteViews applyStandardTemplateWithActions(int layoutId) {
             RemoteViews big = applyStandardTemplate(layoutId);
 
+            resetStandardTemplateWithActions(big);
+
             int N = mActions.size();
             if (N > 0) {
                 big.setViewVisibility(R.id.actions, View.VISIBLE);
                 big.setViewVisibility(R.id.action_divider, View.VISIBLE);
                 if (N>MAX_ACTION_BUTTONS) N=MAX_ACTION_BUTTONS;
-                big.removeAllViews(R.id.actions);
                 for (int i=0; i<N; i++) {
                     final RemoteViews button = generateActionButton(mActions.get(i));
                     big.addView(R.id.actions, button);
@@ -2838,7 +2921,7 @@
         }
 
         private void processLegacyAction(Action action, RemoteViews button) {
-            if (!isLegacy() || mColorUtil.isGrayscale(mContext, action.icon)) {
+            if (!isLegacy() || mColorUtil.isGrayscaleIcon(mContext, action.icon)) {
                 button.setTextViewCompoundDrawablesRelativeColorFilter(R.id.action0, 0,
                         mContext.getResources().getColor(R.color.notification_action_color_filter),
                         PorterDuff.Mode.MULTIPLY);
@@ -2857,7 +2940,7 @@
          * Apply any necessary background to smallIcons being used in the largeIcon spot.
          */
         private void processSmallIconAsLarge(int largeIconId, RemoteViews contentView) {
-            if (!isLegacy() || mColorUtil.isGrayscale(mContext, largeIconId)) {
+            if (!isLegacy() || mColorUtil.isGrayscaleIcon(mContext, largeIconId)) {
                 applyLargeIconBackground(contentView);
             }
         }
@@ -2868,7 +2951,7 @@
          */
         // TODO: also check bounds, transparency, that sort of thing.
         private void processLargeLegacyIcon(Bitmap largeIcon, RemoteViews contentView) {
-            if (isLegacy() && mColorUtil.isGrayscale(largeIcon)) {
+            if (isLegacy() && mColorUtil.isGrayscaleIcon(largeIcon)) {
                 applyLargeIconBackground(contentView);
             } else {
                 removeLargeIconBackground(contentView);
@@ -2904,7 +2987,7 @@
          */
         private void processSmallRightIcon(int smallIconDrawableId,
                 RemoteViews contentView) {
-            if (!isLegacy() || mColorUtil.isGrayscale(mContext, smallIconDrawableId)) {
+            if (!isLegacy() || mColorUtil.isGrayscaleIcon(mContext, smallIconDrawableId)) {
                 contentView.setDrawableParameters(R.id.right_icon, false, -1,
                         0xFFFFFFFF,
                         PorterDuff.Mode.SRC_ATOP, -1);
@@ -3000,7 +3083,8 @@
         public void populateExtras(Bundle extras) {
             // Store original information used in the construction of this object
             extras.putInt(EXTRA_ORIGINATING_USERID, mOriginatingUserId);
-            extras.putString(EXTRA_REBUILD_CONTEXT_PACKAGE, mContext.getPackageName());
+            extras.putParcelable(EXTRA_REBUILD_CONTEXT_APPLICATION_INFO,
+                    mContext.getApplicationInfo());
             extras.putCharSequence(EXTRA_TITLE, mContentTitle);
             extras.putCharSequence(EXTRA_TEXT, mContentText);
             extras.putCharSequence(EXTRA_SUB_TEXT, mSubText);
@@ -3088,13 +3172,14 @@
             extras.remove(EXTRA_NEEDS_REBUILD);
 
             // Re-create notification context so we can access app resources.
-            String packageName = extras.getString(EXTRA_REBUILD_CONTEXT_PACKAGE);
+            ApplicationInfo applicationInfo = extras.getParcelable(
+                    EXTRA_REBUILD_CONTEXT_APPLICATION_INFO);
             Context builderContext;
             try {
-                builderContext = context.createPackageContext(packageName,
+                builderContext = context.createApplicationContext(applicationInfo,
                         Context.CONTEXT_RESTRICTED);
             } catch (NameNotFoundException e) {
-                Log.e(TAG, "Package name " + packageName + " not found");
+                Log.e(TAG, "ApplicationInfo " + applicationInfo + " not found");
                 builderContext = context;  // try with our context
             }
 
@@ -3334,8 +3419,16 @@
      */
     public static abstract class Style {
         private CharSequence mBigContentTitle;
-        private CharSequence mSummaryText = null;
-        private boolean mSummaryTextSet = false;
+
+        /**
+         * @hide
+         */
+        protected CharSequence mSummaryText = null;
+
+        /**
+         * @hide
+         */
+        protected boolean mSummaryTextSet = false;
 
         protected Builder mBuilder;
 
@@ -3488,6 +3581,15 @@
             checkBuilder();
             return mBuilder.build();
         }
+
+        /**
+         * @hide
+         * @return true if the style positions the progress bar on the second line; false if the
+         *         style hides the progress bar
+         */
+        protected boolean hasProgress() {
+            return true;
+        }
     }
 
     /**
@@ -3618,6 +3720,11 @@
      * @see Notification#bigContentView
      */
     public static class BigTextStyle extends Style {
+
+        private static final int MAX_LINES = 13;
+        private static final int LINES_CONSUMED_BY_ACTIONS = 3;
+        private static final int LINES_CONSUMED_BY_SUMMARY = 2;
+
         private CharSequence mBigText;
 
         public BigTextStyle() {
@@ -3684,6 +3791,7 @@
 
             contentView.setTextViewText(R.id.big_text, mBuilder.processLegacyText(mBigText));
             contentView.setViewVisibility(R.id.big_text, View.VISIBLE);
+            contentView.setInt(R.id.big_text, "setMaxLines", calculateMaxLines());
             contentView.setViewVisibility(R.id.text2, View.GONE);
 
             applyTopPadding(contentView);
@@ -3695,6 +3803,24 @@
             return contentView;
         }
 
+        private int calculateMaxLines() {
+            int lineCount = MAX_LINES;
+            boolean hasActions = mBuilder.mActions.size() > 0;
+            boolean hasSummary = (mSummaryTextSet ? mSummaryText : mBuilder.mSubText) != null;
+            if (hasActions) {
+                lineCount -= LINES_CONSUMED_BY_ACTIONS;
+            }
+            if (hasSummary) {
+                lineCount -= LINES_CONSUMED_BY_SUMMARY;
+            }
+
+            // If we have less top padding at the top, we can fit less lines.
+            if (!mBuilder.mHasThreeLines) {
+                lineCount--;
+            }
+            return lineCount;
+        }
+
         /**
          * @hide
          */
@@ -3885,7 +4011,7 @@
      * @see Notification#bigContentView
      */
     public static class MediaStyle extends Style {
-        static final int MAX_MEDIA_BUTTONS_IN_COMPACT = 2;
+        static final int MAX_MEDIA_BUTTONS_IN_COMPACT = 3;
         static final int MAX_MEDIA_BUTTONS = 5;
 
         private int[] mActionsToShowInCompact = null;
@@ -3899,8 +4025,10 @@
         }
 
         /**
-         * Request up to 2 actions (by index in the order of addition) to be shown in the compact
+         * Request up to 3 actions (by index in the order of addition) to be shown in the compact
          * notification view.
+         *
+         * @param actions the indices of the actions to show in the compact notification view
          */
         public MediaStyle setShowActionsInCompactView(int...actions) {
             mActionsToShowInCompact = actions;
@@ -3977,6 +4105,9 @@
             RemoteViews button = new RemoteViews(mBuilder.mContext.getPackageName(),
                     R.layout.notification_material_media_action);
             button.setImageViewResource(R.id.action0, action.icon);
+            button.setDrawableParameters(R.id.action0, false, -1,
+                    0xFFFFFFFF,
+                    PorterDuff.Mode.SRC_ATOP, -1);
             if (!tombstone) {
                 button.setOnClickPendingIntent(R.id.action0, action.actionIntent);
             }
@@ -3986,14 +4117,14 @@
 
         private RemoteViews makeMediaContentView() {
             RemoteViews view = mBuilder.applyStandardTemplate(
-                    R.layout.notification_template_material_media);
+                    R.layout.notification_template_material_media, false /* hasProgress */);
 
             final int numActions = mBuilder.mActions.size();
             final int N = mActionsToShowInCompact == null
                     ? 0
                     : Math.min(mActionsToShowInCompact.length, MAX_MEDIA_BUTTONS_IN_COMPACT);
             if (N > 0) {
-                view.removeAllViews(R.id.actions);
+                view.removeAllViews(com.android.internal.R.id.media_actions);
                 for (int i = 0; i < N; i++) {
                     if (i >= numActions) {
                         throw new IllegalArgumentException(String.format(
@@ -4003,26 +4134,73 @@
 
                     final Action action = mBuilder.mActions.get(mActionsToShowInCompact[i]);
                     final RemoteViews button = generateMediaActionButton(action);
-                    view.addView(R.id.actions, button);
+                    view.addView(com.android.internal.R.id.media_actions, button);
                 }
             }
+            styleText(view);
+            hideRightIcon(view);
             return view;
         }
 
         private RemoteViews makeMediaBigContentView() {
-            RemoteViews big = mBuilder.applyStandardTemplate(
-                    R.layout.notification_template_material_big_media);
+            final int actionCount = Math.min(mBuilder.mActions.size(), MAX_MEDIA_BUTTONS);
+            RemoteViews big = mBuilder.applyStandardTemplate(getBigLayoutResource(actionCount),
+                    false /* hasProgress */);
 
-            final int N = Math.min(mBuilder.mActions.size(), MAX_MEDIA_BUTTONS);
-            if (N > 0) {
-                big.removeAllViews(R.id.actions);
-                for (int i=0; i<N; i++) {
+            if (actionCount > 0) {
+                big.removeAllViews(com.android.internal.R.id.media_actions);
+                for (int i = 0; i < actionCount; i++) {
                     final RemoteViews button = generateMediaActionButton(mBuilder.mActions.get(i));
-                    big.addView(R.id.actions, button);
+                    big.addView(com.android.internal.R.id.media_actions, button);
                 }
             }
+            styleText(big);
+            hideRightIcon(big);
+            applyTopPadding(big);
+            big.setViewVisibility(android.R.id.progress, View.GONE);
             return big;
         }
+
+        private int getBigLayoutResource(int actionCount) {
+            if (actionCount <= 3) {
+                return R.layout.notification_template_material_big_media_narrow;
+            } else {
+                return R.layout.notification_template_material_big_media;
+            }
+        }
+
+        private void hideRightIcon(RemoteViews contentView) {
+            contentView.setViewVisibility(R.id.right_icon, View.GONE);
+        }
+
+        /**
+         * Applies the special text colors for media notifications to all text views.
+         */
+        private void styleText(RemoteViews contentView) {
+            int primaryColor = mBuilder.mContext.getResources().getColor(
+                    R.color.notification_media_primary_color);
+            int secondaryColor = mBuilder.mContext.getResources().getColor(
+                    R.color.notification_media_secondary_color);
+            contentView.setTextColor(R.id.title, primaryColor);
+            if (mBuilder.showsTimeOrChronometer()) {
+                if (mBuilder.mUseChronometer) {
+                    contentView.setTextColor(R.id.chronometer, secondaryColor);
+                } else {
+                    contentView.setTextColor(R.id.time, secondaryColor);
+                }
+            }
+            contentView.setTextColor(R.id.text2, secondaryColor);
+            contentView.setTextColor(R.id.text, secondaryColor);
+            contentView.setTextColor(R.id.info, secondaryColor);
+        }
+
+        /**
+         * @hide
+         */
+        @Override
+        protected boolean hasProgress() {
+            return false;
+        }
     }
 
     // When adding a new Style subclass here, don't forget to update
@@ -4701,8 +4879,8 @@
             super(parcel);
         }
 
-        public BuilderRemoteViews(String packageName, int userId, int layoutId) {
-            super(packageName, userId, layoutId);
+        public BuilderRemoteViews(ApplicationInfo appInfo, int layoutId) {
+            super(appInfo, layoutId);
         }
 
         @Override
diff --git a/core/java/android/app/SharedElementListener.java b/core/java/android/app/SharedElementCallback.java
similarity index 64%
rename from core/java/android/app/SharedElementListener.java
rename to core/java/android/app/SharedElementCallback.java
index f36d05f..82d8e5b 100644
--- a/core/java/android/app/SharedElementListener.java
+++ b/core/java/android/app/SharedElementCallback.java
@@ -22,7 +22,6 @@
 import android.graphics.Matrix;
 import android.graphics.RectF;
 import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
 import android.os.Parcelable;
 import android.view.View;
 
@@ -31,28 +30,23 @@
 
 /**
  * Listener provided in
- * {@link Activity#setEnterSharedElementListener(SharedElementListener)} and
- * {@link Activity#setExitSharedElementListener(SharedElementListener)}
- * to monitor the Activity transitions. The events can be used to customize Activity
- * Transition behavior.
+ * {@link Activity#setEnterSharedElementCallback(SharedElementCallback)} and
+ * {@link Activity#setExitSharedElementCallback(SharedElementCallback)} as well as
+ * {@link Fragment#setEnterSharedElementTransitionCallback(SharedElementCallback)} and
+ * {@link Fragment#setExitSharedElementTransitionCallback(SharedElementCallback)}
+ * to monitor the Shared element transitions. The events can be used to customize Activity
+ * and Fragment Transition behavior.
  */
-public abstract class SharedElementListener {
+public abstract class SharedElementCallback {
     private Matrix mTempMatrix;
 
-    static final SharedElementListener NULL_LISTENER = new SharedElementListener() {
+    static final SharedElementCallback NULL_CALLBACK = new SharedElementCallback() {
     };
 
     /**
-     * Called to allow the listener to customize the start state of the shared element when
-     * transferring in shared element state.
-     * <p>
-     *     The shared element will start at the size and position of the shared element
-     *     in the launching Activity or Fragment. It will also transfer ImageView scaleType
-     *     and imageMatrix if the shared elements in the calling and called Activities are
-     *     ImageViews. Some applications may want to make additional changes, such as
-     *     changing the clip bounds, scaling, or rotation if the shared element end state
-     *     does not map well to the start state.
-     * </p>
+     * Called immediately after the start state is set for the shared element.
+     * The shared element will start at the size and position of the shared element
+     * in the launching Activity or Fragment.
      *
      * @param sharedElementNames The names of the shared elements that were accepted into
      *                           the View hierarchy.
@@ -60,20 +54,21 @@
      * @param sharedElementSnapshots The Views containing snap shots of the shared element
      *                               from the launching Window. These elements will not
      *                               be part of the scene, but will be positioned relative
-     *                               to the Window decor View.
+     *                               to the Window decor View. This list is null for Fragment
+     *                               Transitions.
      */
-    public void setSharedElementStart(List<String> sharedElementNames,
+    public void onSharedElementStart(List<String> sharedElementNames,
             List<View> sharedElements, List<View> sharedElementSnapshots) {}
 
     /**
-     * Called to allow the listener to customize the end state of the shared element when
-     * transferring in shared element state.
+     * Called after the end state is set for the shared element, but before the end state
+     * is captured by the shared element transition.
      * <p>
      *     Any customization done in
-     *     {@link #setSharedElementStart(java.util.List, java.util.List, java.util.List)}
+     *     {@link #onSharedElementStart(java.util.List, java.util.List, java.util.List)}
      *     may need to be modified to the final state of the shared element if it is not
      *     automatically corrected by layout. For example, rotation or scale will not
-     *     be affected by layout and if changed in {@link #setSharedElementStart(java.util.List,
+     *     be affected by layout and if changed in {@link #onSharedElementStart(java.util.List,
      *     java.util.List, java.util.List)}, it will also have to be set here again to correct
      *     the end state.
      * </p>
@@ -84,24 +79,27 @@
      * @param sharedElementSnapshots The Views containing snap shots of the shared element
      *                               from the launching Window. These elements will not
      *                               be part of the scene, but will be positioned relative
-     *                               to the Window decor View.
+     *                               to the Window decor View. This list will be null for
+     *                               Fragment Transitions.
      */
-    public void setSharedElementEnd(List<String> sharedElementNames,
+    public void onSharedElementEnd(List<String> sharedElementNames,
             List<View> sharedElements, List<View> sharedElementSnapshots) {}
 
     /**
-     * Called after {@link #remapSharedElements(java.util.List, java.util.Map)} when
+     * Called after {@link #onMapSharedElements(java.util.List, java.util.Map)} when
      * transferring shared elements in. Any shared elements that have no mapping will be in
      * <var>rejectedSharedElements</var>. The elements remaining in
      * <var>rejectedSharedElements</var> will be transitioned out of the Scene. If a
      * View is removed from <var>rejectedSharedElements</var>, it must be handled by the
-     * <code>SharedElementListener</code>.
+     * <code>SharedElementCallback</code>.
      * <p>
      * Views in rejectedSharedElements will have their position and size set to the
      * position of the calling shared element, relative to the Window decor View and contain
      * snapshots of the View from the calling Activity or Fragment. This
      * view may be safely added to the decor View's overlay to remain in position.
      * </p>
+     * <p>This method is not called for Fragment Transitions. All rejected shared elements
+     * will be handled by the exit transition.</p>
      *
      * @param rejectedSharedElements Views containing visual information of shared elements
      *                               that are not part of the entering scene. These Views
@@ -109,25 +107,27 @@
      *                               View removed from this list will not be transitioned
      *                               automatically.
      */
-    public void handleRejectedSharedElements(List<View> rejectedSharedElements) {}
+    public void onRejectSharedElements(List<View> rejectedSharedElements) {}
 
     /**
-     * Lets the ActivityTransitionListener adjust the mapping of shared element names to
+     * Lets the SharedElementCallback adjust the mapping of shared element names to
      * Views.
      *
      * @param names The names of all shared elements transferred from the calling Activity
-     *              to the started Activity.
+     *              or Fragment in the order they were provided.
      * @param sharedElements The mapping of shared element names to Views. The best guess
      *                       will be filled into sharedElements based on the transitionNames.
      */
-    public void remapSharedElements(List<String> names, Map<String, View> sharedElements) {}
+    public void onMapSharedElements(List<String> names, Map<String, View> sharedElements) {}
 
     /**
      * Creates a snapshot of a shared element to be used by the remote Activity and reconstituted
-     * with {@link #createSnapshotView(android.content.Context, android.os.Parcelable)}. A
+     * with {@link #onCreateSnapshotView(android.content.Context, android.os.Parcelable)}. A
      * null return value will mean that the remote Activity will have a null snapshot View in
-     * {@link #setSharedElementStart(java.util.List, java.util.List, java.util.List)} and
-     * {@link #setSharedElementEnd(java.util.List, java.util.List, java.util.List)}.
+     * {@link #onSharedElementStart(java.util.List, java.util.List, java.util.List)} and
+     * {@link #onSharedElementEnd(java.util.List, java.util.List, java.util.List)}.
+     *
+     * <p>This is not called for Fragment Transitions.</p>
      *
      * @param sharedElement The shared element View to create a snapshot for.
      * @param viewToGlobalMatrix A matrix containing a transform from the view to the screen
@@ -135,11 +135,11 @@
      * @param screenBounds The bounds of shared element in screen coordinate space. This is
      *                     the bounds of the view with the viewToGlobalMatrix applied.
      * @return A snapshot to send to the remote Activity to be reconstituted with
-     * {@link #createSnapshotView(android.content.Context, android.os.Parcelable)} and passed
-     * into {@link #setSharedElementStart(java.util.List, java.util.List, java.util.List)} and
-     * {@link #setSharedElementEnd(java.util.List, java.util.List, java.util.List)}.
+     * {@link #onCreateSnapshotView(android.content.Context, android.os.Parcelable)} and passed
+     * into {@link #onSharedElementStart(java.util.List, java.util.List, java.util.List)} and
+     * {@link #onSharedElementEnd(java.util.List, java.util.List, java.util.List)}.
      */
-    public Parcelable captureSharedElementSnapshot(View sharedElement, Matrix viewToGlobalMatrix,
+    public Parcelable onCaptureSharedElementSnapshot(View sharedElement, Matrix viewToGlobalMatrix,
             RectF screenBounds) {
         int bitmapWidth = Math.round(screenBounds.width());
         int bitmapHeight = Math.round(screenBounds.height());
@@ -160,20 +160,22 @@
 
     /**
      * Reconstitutes a snapshot View from a Parcelable returned in
-     * {@link #captureSharedElementSnapshot(android.view.View, android.graphics.Matrix,
-     * android.graphics.RectF)} to be used in {@link #setSharedElementStart(java.util.List,
-     * java.util.List, java.util.List)} and {@link #setSharedElementEnd(java.util.List,
+     * {@link #onCaptureSharedElementSnapshot(android.view.View, android.graphics.Matrix,
+     * android.graphics.RectF)} to be used in {@link #onSharedElementStart(java.util.List,
+     * java.util.List, java.util.List)} and {@link #onSharedElementEnd(java.util.List,
      * java.util.List, java.util.List)}. The returned View will be sized and positioned after
      * this call so that it is ready to be added to the decor View's overlay.
      *
+     * <p>This is not called for Fragment Transitions.</p>
+     *
      * @param context The Context used to create the snapshot View.
-     * @param snapshot The Parcelable returned by {@link #captureSharedElementSnapshot(
+     * @param snapshot The Parcelable returned by {@link #onCaptureSharedElementSnapshot(
      * android.view.View, android.graphics.Matrix, android.graphics.RectF)}.
-     * @return A View to be sent in {@link #setSharedElementStart(java.util.List, java.util.List,
-     * java.util.List)} and {@link #setSharedElementEnd(java.util.List, java.util.List,
+     * @return A View to be sent in {@link #onSharedElementStart(java.util.List, java.util.List,
+     * java.util.List)} and {@link #onSharedElementEnd(java.util.List, java.util.List,
      * java.util.List)}. A null value will produce a null snapshot value for those two methods.
      */
-    public View createSnapshotView(Context context, Parcelable snapshot) {
+    public View onCreateSnapshotView(Context context, Parcelable snapshot) {
         View view = null;
         if (snapshot instanceof Bitmap) {
             Bitmap bitmap = (Bitmap) snapshot;
diff --git a/core/java/android/app/VoiceInteractor.java b/core/java/android/app/VoiceInteractor.java
index dcdfd78..723cb9b 100644
--- a/core/java/android/app/VoiceInteractor.java
+++ b/core/java/android/app/VoiceInteractor.java
@@ -16,6 +16,7 @@
 
 package android.app;
 
+import android.annotation.SystemApi;
 import android.content.Context;
 import android.os.Bundle;
 import android.os.IBinder;
@@ -33,6 +34,7 @@
 import java.util.ArrayList;
 
 /**
+ * @hide
  * Interface for an {@link Activity} to interact with the user through voice.  Use
  * {@link android.app.Activity#getVoiceInteractor() Activity.getVoiceInteractor}
  * to retrieve the interface, if the activity is currently involved in a voice interaction.
@@ -54,6 +56,7 @@
  * request, rather than holding on to the activity instance yourself, either explicitly
  * or implicitly through a non-static inner class.
  */
+@SystemApi
 public class VoiceInteractor {
     static final String TAG = "VoiceInteractor";
     static final boolean DEBUG = true;
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 48ff5b6..8bfe6d3 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -16,6 +16,7 @@
 
 package android.app;
 
+import android.annotation.SystemApi;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -951,6 +952,48 @@
     }
 
     /**
+     * Specify extra padding that the wallpaper should have outside of the display.
+     * That is, the given padding supplies additional pixels the wallpaper should extend
+     * outside of the display itself.
+     * @param padding The number of pixels the wallpaper should extend beyond the display,
+     * on its left, top, right, and bottom sides.
+     * @hide
+     */
+    @SystemApi
+    public void setDisplayPadding(Rect padding) {
+        try {
+            if (sGlobals.mService == null) {
+                Log.w(TAG, "WallpaperService not running");
+            } else {
+                sGlobals.mService.setDisplayPadding(padding);
+            }
+        } catch (RemoteException e) {
+            // Ignore
+        }
+    }
+
+    /**
+     * Apply a raw offset to the wallpaper window.  Should only be used in
+     * combination with {@link #setDisplayPadding(android.graphics.Rect)} when you
+     * have ensured that the wallpaper will extend outside of the display area so that
+     * it can be moved without leaving part of the display uncovered.
+     * @param x The offset, in pixels, to apply to the left edge.
+     * @param y The offset, in pixels, to apply to the top edge.
+     * @hide
+     */
+    @SystemApi
+    public void setDisplayOffset(IBinder windowToken, int x, int y) {
+        try {
+            //Log.v(TAG, "Sending new wallpaper display offsets from app...");
+            WindowManagerGlobal.getWindowSession().setWallpaperDisplayOffset(
+                    windowToken, x, y);
+            //Log.v(TAG, "...app returning after sending display offset!");
+        } catch (RemoteException e) {
+            // Ignore.
+        }
+    }
+
+    /**
      * Set the position of the current wallpaper within any larger space, when
      * that wallpaper is visible behind the given window.  The X and Y offsets
      * are floating point numbers ranging from 0 to 1, representing where the
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index 15def09..e2f175c 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -177,7 +177,7 @@
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
     public static final String ACTION_LOCK_TASK_ENTERING
-            = "android.app.action.ACTION_LOCK_TASK_ENTERING";
+            = "android.app.action.LOCK_TASK_ENTERING";
 
     /**
      * Action sent to a device administrator to notify that the device is exiting
@@ -190,7 +190,7 @@
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
     public static final String ACTION_LOCK_TASK_EXITING
-            = "android.app.action.ACTION_LOCK_TASK_EXITING";
+            = "android.app.action.LOCK_TASK_EXITING";
 
     /**
      * A boolean describing whether the device is currently entering or exiting
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 69b1139..ea041e8 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -97,8 +97,7 @@
      * Provisioning adds a managed profile and sets the mdm as the profile owner who has full
      * control over the profile
      *
-     * <p>This intent must contain the extras {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME}
-     * {@link #EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME} and {@link #EXTRA_DEVICE_ADMIN}.
+     * <p>This intent must contain the extra {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME}.
      *
      * <p> When managed provisioning has completed, an intent of the type
      * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcasted to the
@@ -112,7 +111,20 @@
      */
     @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
     public static final String ACTION_PROVISION_MANAGED_PROFILE
-        = "android.app.action.ACTION_PROVISION_MANAGED_PROFILE";
+        = "android.app.action.PROVISION_MANAGED_PROFILE";
+
+    /**
+     * A {@link android.os.Parcelable} extra of type {@link android.os.PersistableBundle} that allows
+     * a mobile device management application that starts managed profile provisioning to pass data
+     * to itself on the managed profile when provisioning completes. The mobile device management
+     * application sends this extra in an intent with the action
+     * {@link #ACTION_PROVISION_MANAGED_PROFILE} and receives it in
+     * {@link DeviceAdminReceiver#onProfileProvisioningComplete} via an intent with the action
+     * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE}. The bundle is not changed
+     * during the managed profile provisioning.
+     */
+    public static final String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE =
+            "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";
 
     /**
      * A String extra holding the package name of the mobile device management application that
@@ -126,16 +138,7 @@
      * message containing an Nfc record with MIME type {@link #MIME_TYPE_PROVISIONING_NFC}.
      */
     public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
-        = "android.app.extra.deviceAdminPackageName";
-
-    /**
-     * A String extra holding the default name of the profile that is created during managed profile
-     * provisioning.
-     *
-     * <p>Use with {@link #ACTION_PROVISION_MANAGED_PROFILE}
-     */
-    public static final String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME
-        = "android.app.extra.DEFAULT_MANAGED_PROFILE_NAME";
+        = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME";
 
     /**
      * A String extra that, holds the email address of the account which a managed profile is
@@ -148,8 +151,8 @@
      * device management application that was set as the profile owner during provisioning.
      * It is usually used to avoid that the user has to enter their email address twice.
      */
-    public static final String EXTRA_PROVISIONING_EMAIL_ADDRESS
-        = "android.app.extra.ManagedProfileEmailAddress";
+    public static final String KEY_PROVISIONING_EMAIL_ADDRESS
+        = "android.app.key.PROVISIONING_EMAIL_ADDRESS";
 
     /**
      * A String extra holding the time zone {@link android.app.AlarmManager} that the device
@@ -159,7 +162,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_TIME_ZONE
-        = "android.app.extra.TIME_ZONE";
+        = "android.app.extra.PROVISIONING_TIME_ZONE";
 
     /**
      * A Long extra holding the wall clock time (in milliseconds) to be set on the device's
@@ -169,7 +172,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_LOCAL_TIME
-        = "android.app.extra.LOCAL_TIME";
+        = "android.app.extra.PROVISIONING_LOCAL_TIME";
 
     /**
      * A String extra holding the {@link java.util.Locale} that the device will be set to.
@@ -179,7 +182,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_LOCALE
-        = "android.app.extra.LOCALE";
+        = "android.app.extra.PROVISIONING_LOCALE";
 
     /**
      * A String extra holding the ssid of the wifi network that should be used during nfc device
@@ -189,7 +192,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_SSID
-        = "android.app.extra.WIFI_SSID";
+        = "android.app.extra.PROVISIONING_WIFI_SSID";
 
     /**
      * A boolean extra indicating whether the wifi network in {@link #EXTRA_PROVISIONING_WIFI_SSID}
@@ -199,7 +202,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_HIDDEN
-        = "android.app.extra.WIFI_HIDDEN";
+        = "android.app.extra.PROVISIONING_WIFI_HIDDEN";
 
     /**
      * A String extra indicating the security type of the wifi network in
@@ -209,7 +212,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_SECURITY_TYPE
-        = "android.app.extra.WIFI_SECURITY_TYPE";
+        = "android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE";
 
     /**
      * A String extra holding the password of the wifi network in
@@ -219,7 +222,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_PASSWORD
-        = "android.app.extra.WIFI_PASSWORD";
+        = "android.app.extra.PROVISIONING_WIFI_PASSWORD";
 
     /**
      * A String extra holding the proxy host for the wifi network in
@@ -229,7 +232,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_PROXY_HOST
-        = "android.app.extra.WIFI_PROXY_HOST";
+        = "android.app.extra.PROVISIONING_WIFI_PROXY_HOST";
 
     /**
      * An int extra holding the proxy port for the wifi network in
@@ -239,7 +242,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_PROXY_PORT
-        = "android.app.extra.WIFI_PROXY_PORT";
+        = "android.app.extra.PROVISIONING_WIFI_PROXY_PORT";
 
     /**
      * A String extra holding the proxy bypass for the wifi network in
@@ -249,7 +252,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_PROXY_BYPASS
-        = "android.app.extra.WIFI_PROXY_BYPASS_HOSTS";
+        = "android.app.extra.PROVISIONING_WIFI_PROXY_BYPASS";
 
     /**
      * A String extra holding the proxy auto-config (PAC) URL for the wifi network in
@@ -259,7 +262,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_WIFI_PAC_URL
-        = "android.app.extra.WIFI_PAC_URL";
+        = "android.app.extra.PROVISIONING_WIFI_PAC_URL";
 
     /**
      * A String extra holding a url that specifies the download location of the device admin
@@ -269,7 +272,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION
-        = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
+        = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
 
     /**
      * A String extra holding a http cookie header which should be used in the http request to the
@@ -279,7 +282,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER
-        = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
+        = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
 
     /**
      * A String extra holding the SHA-1 checksum of the file at download location specified in
@@ -291,7 +294,7 @@
      * provisioning via an Nfc bump.
      */
     public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM
-        = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
+        = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
 
     /**
      * This MIME type is used for starting the Device Owner provisioning.
@@ -434,13 +437,13 @@
      * Flag used by {@link #addCrossProfileIntentFilter} to allow access of certain intents from a
      * managed profile to its parent.
      */
-    public static int FLAG_PARENT_CAN_ACCESS_MANAGED = 0x0001;
+    public static final int FLAG_PARENT_CAN_ACCESS_MANAGED = 0x0001;
 
     /**
      * Flag used by {@link #addCrossProfileIntentFilter} to allow access of certain intents from the
      * parent to its managed profile.
      */
-    public static int FLAG_MANAGED_CAN_ACCESS_PARENT = 0x0002;
+    public static final int FLAG_MANAGED_CAN_ACCESS_PARENT = 0x0002;
 
     /**
      * Return true if the given administrator component is currently
@@ -1773,16 +1776,24 @@
      * If a user has installed any certificates by other means than device policy these will be
      * included too.
      *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
      * @return a List of byte[] arrays, each encoding one user CA certificate.
      */
-    public List<byte[]> getInstalledCaCerts() {
-        final TrustedCertificateStore certStore = new TrustedCertificateStore();
+    public List<byte[]> getInstalledCaCerts(ComponentName admin) {
         List<byte[]> certs = new ArrayList<byte[]>();
-        for (String alias : certStore.userAliases()) {
+        if (mService != null) {
             try {
-                certs.add(certStore.getCertificate(alias).getEncoded());
-            } catch (CertificateException ce) {
-                Log.w(TAG, "Could not encode certificate: " + alias, ce);
+                mService.enforceCanManageCaCerts(admin);
+                final TrustedCertificateStore certStore = new TrustedCertificateStore();
+                for (String alias : certStore.userAliases()) {
+                    try {
+                        certs.add(certStore.getCertificate(alias).getEncoded());
+                    } catch (CertificateException ce) {
+                        Log.w(TAG, "Could not encode certificate: " + alias, ce);
+                    }
+                }
+            } catch (RemoteException re) {
+                Log.w(TAG, "Failed talking with device policy service", re);
             }
         }
         return certs;
@@ -1809,13 +1820,19 @@
     /**
      * Returns whether this certificate is installed as a trusted CA.
      *
+     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
      * @param certBuffer encoded form of the certificate to look up.
      */
-    public boolean hasCaCertInstalled(byte[] certBuffer) {
-        try {
-            return getCaCertAlias(certBuffer) != null;
-        } catch (CertificateException ce) {
-            Log.w(TAG, "Could not parse certificate", ce);
+    public boolean hasCaCertInstalled(ComponentName admin, byte[] certBuffer) {
+        if (mService != null) {
+            try {
+                mService.enforceCanManageCaCerts(admin);
+                return getCaCertAlias(certBuffer) != null;
+            } catch (RemoteException re) {
+                Log.w(TAG, "Failed talking with device policy service", re);
+            } catch (CertificateException ce) {
+                Log.w(TAG, "Could not parse certificate", ce);
+            }
         }
         return false;
     }
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index c984cf9..57d8b95 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -124,6 +124,7 @@
 
     boolean installCaCert(in ComponentName admin, in byte[] certBuffer);
     void uninstallCaCert(in ComponentName admin, in String alias);
+    void enforceCanManageCaCerts(in ComponentName admin);
 
     void addPersistentPreferredActivity(in ComponentName admin, in IntentFilter filter, in ComponentName activity);
     void clearPackagePersistentPreferredActivities(in ComponentName admin, String packageName);
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index 1bb4eba..9151a16 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -218,6 +218,7 @@
      */
     @SystemApi
     public boolean isBackupEnabled() {
+        checkServiceBinder();
         if (sService != null) {
             try {
                 return sService.isBackupEnabled();
diff --git a/core/java/android/app/job/JobScheduler.java b/core/java/android/app/job/JobScheduler.java
index ca7022d..89efeb2 100644
--- a/core/java/android/app/job/JobScheduler.java
+++ b/core/java/android/app/job/JobScheduler.java
@@ -21,14 +21,24 @@
 import android.content.Context;
 
 /**
- * Class for scheduling various types of jobs with the scheduling framework on the device.
+ * This is an API for scheduling various types of jobs against the framework that will be executed
+ * in your application's own process.
+ * <p>
  * See {@link android.app.job.JobInfo} for more description of the types of jobs that can be run
- * and how to construct them.
+ * and how to construct them. You will construct these JobInfo objects and pass them to the
+ * JobScheduler with {@link #schedule(JobInfo)}. When the criteria declared are met, the
+ * system will execute this job on your application's {@link android.app.job.JobService}.
+ * You identify which JobService is meant to execute the logic for your job when you create the
+ * JobInfo with
+ * {@link android.app.job.JobInfo.Builder#JobInfo.Builder(int,android.content.ComponentName)}.
+ * </p>
+ * <p>
  * The framework will be intelligent about when you receive your callbacks, and attempt to batch
  * and defer them as much as possible. Typically if you don't specify a deadline on your job, it
  * can be run at any moment depending on the current state of the JobScheduler's internal queue,
  * however it might be deferred as long as until the next time the device is connected to a power
  * source.
+ * </p>
  * <p>You do not
  * instantiate this class directly; instead, retrieve it through
  * {@link android.content.Context#getSystemService
diff --git a/core/java/android/app/usage/ConfigurationStats.java b/core/java/android/app/usage/ConfigurationStats.java
new file mode 100644
index 0000000..080216c
--- /dev/null
+++ b/core/java/android/app/usage/ConfigurationStats.java
@@ -0,0 +1,161 @@
+/**
+ * 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 android.app.usage;
+
+import android.content.res.Configuration;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Represents the usage statistics of a device {@link android.content.res.Configuration} for a
+ * specific time range.
+ */
+public final class ConfigurationStats implements Parcelable {
+
+    /**
+     * {@hide}
+     */
+    public Configuration mConfiguration;
+
+    /**
+     * {@hide}
+     */
+    public long mBeginTimeStamp;
+
+    /**
+     * {@hide}
+     */
+    public long mEndTimeStamp;
+
+    /**
+     * {@hide}
+     */
+    public long mLastTimeActive;
+
+    /**
+     * {@hide}
+     */
+    public long mTotalTimeActive;
+
+    /**
+     * {@hide}
+     */
+    public int mActivationCount;
+
+    /**
+     * {@hide}
+     */
+    public ConfigurationStats() {
+    }
+
+    public ConfigurationStats(ConfigurationStats stats) {
+        mConfiguration = stats.mConfiguration;
+        mBeginTimeStamp = stats.mBeginTimeStamp;
+        mEndTimeStamp = stats.mEndTimeStamp;
+        mLastTimeActive = stats.mLastTimeActive;
+        mTotalTimeActive = stats.mTotalTimeActive;
+        mActivationCount = stats.mActivationCount;
+    }
+
+    public Configuration getConfiguration() {
+        return mConfiguration;
+    }
+
+    /**
+     * Get the beginning of the time range this {@link ConfigurationStats} represents,
+     * measured in milliseconds since the epoch.
+     * <p/>
+     * See {@link System#currentTimeMillis()}.
+     */
+    public long getFirstTimeStamp() {
+        return mBeginTimeStamp;
+    }
+
+    /**
+     * Get the end of the time range this {@link ConfigurationStats} represents,
+     * measured in milliseconds since the epoch.
+     * <p/>
+     * See {@link System#currentTimeMillis()}.
+     */
+    public long getLastTimeStamp() {
+        return mEndTimeStamp;
+    }
+
+    /**
+     * Get the last time this configuration was active, measured in milliseconds since the epoch.
+     * <p/>
+     * See {@link System#currentTimeMillis()}.
+     */
+    public long getLastTimeActive() {
+        return mLastTimeActive;
+    }
+
+    /**
+     * Get the total time this configuration was active, measured in milliseconds.
+     */
+    public long getTotalTimeActive() {
+        return mTotalTimeActive;
+    }
+
+    /**
+     * Get the number of times this configuration was active.
+     */
+    public int getActivationCount() {
+        return mActivationCount;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        if (mConfiguration != null) {
+            dest.writeInt(1);
+            mConfiguration.writeToParcel(dest, flags);
+        } else {
+            dest.writeInt(0);
+        }
+
+        dest.writeLong(mBeginTimeStamp);
+        dest.writeLong(mEndTimeStamp);
+        dest.writeLong(mLastTimeActive);
+        dest.writeLong(mTotalTimeActive);
+        dest.writeInt(mActivationCount);
+    }
+
+    public static final Creator<ConfigurationStats> CREATOR = new Creator<ConfigurationStats>() {
+        @Override
+        public ConfigurationStats createFromParcel(Parcel source) {
+            ConfigurationStats stats = new ConfigurationStats();
+            if (source.readInt() != 0) {
+                stats.mConfiguration = Configuration.CREATOR.createFromParcel(source);
+            }
+            stats.mBeginTimeStamp = source.readLong();
+            stats.mEndTimeStamp = source.readLong();
+            stats.mLastTimeActive = source.readLong();
+            stats.mTotalTimeActive = source.readLong();
+            stats.mActivationCount = source.readInt();
+            return stats;
+        }
+
+        @Override
+        public ConfigurationStats[] newArray(int size) {
+            return new ConfigurationStats[size];
+        }
+    };
+}
diff --git a/core/java/android/app/usage/IUsageStatsManager.aidl b/core/java/android/app/usage/IUsageStatsManager.aidl
index 3b09888..4ed1489 100644
--- a/core/java/android/app/usage/IUsageStatsManager.aidl
+++ b/core/java/android/app/usage/IUsageStatsManager.aidl
@@ -27,5 +27,7 @@
 interface IUsageStatsManager {
     ParceledListSlice queryUsageStats(int bucketType, long beginTime, long endTime,
             String callingPackage);
+    ParceledListSlice queryConfigurationStats(int bucketType, long beginTime, long endTime,
+            String callingPackage);
     UsageEvents queryEvents(long beginTime, long endTime, String callingPackage);
 }
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index fb80de2..1a947ec 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -16,6 +16,7 @@
 package android.app.usage;
 
 import android.content.ComponentName;
+import android.content.res.Configuration;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -63,6 +64,11 @@
         public static final int CONTINUE_PREVIOUS_DAY = 4;
 
         /**
+         * An event type denoting that the device configuration has changed.
+         */
+        public static final int CONFIGURATION_CHANGE = 5;
+
+        /**
          * {@hide}
          */
         public String mPackage;
@@ -83,6 +89,12 @@
         public int mEventType;
 
         /**
+         * Only present for {@link #CONFIGURATION_CHANGE} event types.
+         * {@hide}
+         */
+        public Configuration mConfiguration;
+
+        /**
          * TODO(adamlesinski): Removed before release.
          * {@hide}
          */
@@ -123,6 +135,14 @@
         public int getEventType() {
             return mEventType;
         }
+
+        /**
+         * Returns a {@link Configuration} for this event if the event is of type
+         * {@link #CONFIGURATION_CHANGE}, otherwise it returns null.
+         */
+        public Configuration getConfiguration() {
+            return mConfiguration;
+        }
     }
 
     // Only used when creating the resulting events. Not used for reading/unparceling.
@@ -201,23 +221,9 @@
             return false;
         }
 
-        final int packageIndex = mParcel.readInt();
-        if (packageIndex >= 0) {
-            eventOut.mPackage = mStringPool[packageIndex];
-        } else {
-            eventOut.mPackage = null;
-        }
+        readEventFromParcel(mParcel, eventOut);
 
-        final int classIndex = mParcel.readInt();
-        if (classIndex >= 0) {
-            eventOut.mClass = mStringPool[classIndex];
-        } else {
-            eventOut.mClass = null;
-        }
-        eventOut.mEventType = mParcel.readInt();
-        eventOut.mTimeStamp = mParcel.readLong();
         mIndex++;
-
         if (mIndex >= mEventCount) {
             mParcel.recycle();
             mParcel = null;
@@ -235,11 +241,6 @@
         }
     }
 
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
     private int findStringIndex(String str) {
         final int index = Arrays.binarySearch(mStringPool, str);
         if (index < 0) {
@@ -248,6 +249,66 @@
         return index;
     }
 
+    /**
+     * Writes a single event to the parcel. Modify this when updating {@link Event}.
+     */
+    private void writeEventToParcel(Event event, Parcel p, int flags) {
+        final int packageIndex;
+        if (event.mPackage != null) {
+            packageIndex = findStringIndex(event.mPackage);
+        } else {
+            packageIndex = -1;
+        }
+
+        final int classIndex;
+        if (event.mClass != null) {
+            classIndex = findStringIndex(event.mClass);
+        } else {
+            classIndex = -1;
+        }
+        p.writeInt(packageIndex);
+        p.writeInt(classIndex);
+        p.writeInt(event.mEventType);
+        p.writeLong(event.mTimeStamp);
+
+        if (event.mEventType == Event.CONFIGURATION_CHANGE) {
+            event.mConfiguration.writeToParcel(p, flags);
+        }
+    }
+
+    /**
+     * Reads a single event from the parcel. Modify this when updating {@link Event}.
+     */
+    private void readEventFromParcel(Parcel p, Event eventOut) {
+        final int packageIndex = p.readInt();
+        if (packageIndex >= 0) {
+            eventOut.mPackage = mStringPool[packageIndex];
+        } else {
+            eventOut.mPackage = null;
+        }
+
+        final int classIndex = p.readInt();
+        if (classIndex >= 0) {
+            eventOut.mClass = mStringPool[classIndex];
+        } else {
+            eventOut.mClass = null;
+        }
+        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;
+        }
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
     @Override
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(mEventCount);
@@ -262,25 +323,9 @@
                     p.setDataPosition(0);
                     for (int i = 0; i < mEventCount; i++) {
                         final Event event = mEventsToWrite.get(i);
-
-                        final int packageIndex;
-                        if (event.mPackage != null) {
-                            packageIndex = findStringIndex(event.mPackage);
-                        } else {
-                            packageIndex = -1;
-                        }
-
-                        final int classIndex;
-                        if (event.mClass != null) {
-                            classIndex = findStringIndex(event.mClass);
-                        } else {
-                            classIndex = -1;
-                        }
-                        p.writeInt(packageIndex);
-                        p.writeInt(classIndex);
-                        p.writeInt(event.getEventType());
-                        p.writeLong(event.getTimeStamp());
+                        writeEventToParcel(event, p, flags);
                     }
+
                     final int listByteLength = p.dataPosition();
 
                     // Write the total length of the data.
diff --git a/core/java/android/app/usage/UsageStatsManager.java b/core/java/android/app/usage/UsageStatsManager.java
index 5830fcf..bc6099a 100644
--- a/core/java/android/app/usage/UsageStatsManager.java
+++ b/core/java/android/app/usage/UsageStatsManager.java
@@ -125,9 +125,9 @@
      * @see #INTERVAL_YEARLY
      * @see #INTERVAL_BEST
      */
-    @SuppressWarnings("unchecked")
     public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) {
         try {
+            @SuppressWarnings("unchecked")
             ParceledListSlice<UsageStats> slice = mService.queryUsageStats(intervalType, beginTime,
                     endTime, mContext.getOpPackageName());
             if (slice != null) {
@@ -136,7 +136,32 @@
         } catch (RemoteException e) {
             // fallthrough and return null.
         }
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
+    }
+
+    /**
+     * Gets the hardware configurations the device was in for the given time range, aggregated by
+     * the specified interval. The results are ordered as in
+     * {@link #queryUsageStats(int, long, long)}.
+     *
+     * @param intervalType The time interval by which the stats are aggregated.
+     * @param beginTime The inclusive beginning of the range of stats to include in the results.
+     * @param endTime The exclusive end of the range of stats to include in the results.
+     * @return A list of {@link ConfigurationStats} or null if none are available.
+     */
+    public List<ConfigurationStats> queryConfigurations(int intervalType, long beginTime,
+            long endTime) {
+        try {
+            @SuppressWarnings("unchecked")
+            ParceledListSlice<ConfigurationStats> slice = mService.queryConfigurationStats(
+                    intervalType, beginTime, endTime, mContext.getOpPackageName());
+            if (slice != null) {
+                return slice.getList();
+            }
+        } catch (RemoteException e) {
+            // fallthrough and return the empty list.
+        }
+        return Collections.emptyList();
     }
 
     /**
diff --git a/core/java/android/app/usage/UsageStatsManagerInternal.java b/core/java/android/app/usage/UsageStatsManagerInternal.java
index 119d705..083a48a 100644
--- a/core/java/android/app/usage/UsageStatsManagerInternal.java
+++ b/core/java/android/app/usage/UsageStatsManagerInternal.java
@@ -17,6 +17,7 @@
 package android.app.usage;
 
 import android.content.ComponentName;
+import android.content.res.Configuration;
 
 /**
  * UsageStatsManager local system service interface.
@@ -28,14 +29,19 @@
     /**
      * Reports an event to the UsageStatsManager.
      *
-     * @param component The component for which this event ocurred.
+     * @param component The component for which this event occurred.
      * @param userId The user id to which the component belongs to.
-     * @param timeStamp The time at which this event ocurred.
-     * @param eventType The event that occured. Valid values can be found at
+     * @param eventType The event that occurred. Valid values can be found at
      * {@link UsageEvents}
      */
-    public abstract void reportEvent(ComponentName component, int userId,
-            long timeStamp, int eventType);
+    public abstract void reportEvent(ComponentName component, int userId, int eventType);
+
+    /**
+     * Reports a configuration change to the UsageStatsManager.
+     *
+     * @param config The new device configuration.
+     */
+    public abstract void reportConfigurationChange(Configuration config, int userId);
 
     /**
      * Prepares the UsageStatsService for shutdown.
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index bd45c7e..00248cc 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -188,7 +188,7 @@
      * this widget. Can have the value {@link
      * AppWidgetProviderInfo#WIDGET_CATEGORY_HOME_SCREEN} or {@link
      * AppWidgetProviderInfo#WIDGET_CATEGORY_KEYGUARD} or {@link
-     * AppWidgetProviderInfo#WIDGET_CATEGORY_RECENTS}.
+     * AppWidgetProviderInfo#WIDGET_CATEGORY_SEARCHBOX}.
      */
     public static final String OPTION_APPWIDGET_HOST_CATEGORY = "appWidgetCategory";
 
diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java
index 02f70c8..b4d79b4 100644
--- a/core/java/android/appwidget/AppWidgetProviderInfo.java
+++ b/core/java/android/appwidget/AppWidgetProviderInfo.java
@@ -61,9 +61,9 @@
     public static final int WIDGET_CATEGORY_KEYGUARD = 2;
 
     /**
-     * Indicates that the widget can be displayed within recents.
+     * Indicates that the widget can be displayed within a space reserved for the search box.
      */
-    public static final int WIDGET_CATEGORY_RECENTS = 4;
+    public static final int WIDGET_CATEGORY_SEARCHBOX = 4;
 
     /**
      * Identity of this AppWidget component.  This component should be a {@link
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index b98e5ae..36997e5 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -375,6 +375,14 @@
             } // else ASSERT(mPort == channel)
             ret = 0;
         } catch (IOException e) {
+            if (mPfd != null) {
+                try {
+                    mPfd.close();
+                } catch (IOException e1) {
+                    Log.e(TAG, "bindListen, close mPfd: " + e1);
+                }
+                mPfd = null;
+            }
             Log.e(TAG, "bindListen, fail to get port number, exception: " + e);
             return -1;
         }
diff --git a/core/java/android/bluetooth/le/AdvertiseData.java b/core/java/android/bluetooth/le/AdvertiseData.java
index c7bfae9..ff0db9a 100644
--- a/core/java/android/bluetooth/le/AdvertiseData.java
+++ b/core/java/android/bluetooth/le/AdvertiseData.java
@@ -119,8 +119,8 @@
         }
         AdvertiseData other = (AdvertiseData) obj;
         return Objects.equals(mServiceUuids, other.mServiceUuids) &&
-                Utils.equals(mManufacturerSpecificData, other.mManufacturerSpecificData) &&
-                Utils.equals(mServiceData, other.mServiceData) &&
+                BluetoothLeUtils.equals(mManufacturerSpecificData, other.mManufacturerSpecificData) &&
+                BluetoothLeUtils.equals(mServiceData, other.mServiceData) &&
                         mIncludeDeviceName == other.mIncludeDeviceName &&
                         mIncludeTxPowerLevel == other.mIncludeTxPowerLevel;
     }
@@ -128,8 +128,8 @@
     @Override
     public String toString() {
         return "AdvertiseData [mServiceUuids=" + mServiceUuids + ", mManufacturerSpecificData="
-                + Utils.toString(mManufacturerSpecificData) + ", mServiceData="
-                + Utils.toString(mServiceData)
+                + BluetoothLeUtils.toString(mManufacturerSpecificData) + ", mServiceData="
+                + BluetoothLeUtils.toString(mServiceData)
                 + ", mIncludeTxPowerLevel=" + mIncludeTxPowerLevel + ", mIncludeDeviceName="
                 + mIncludeDeviceName + "]";
     }
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
index 3568f26..d468508 100644
--- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
+++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -107,7 +107,7 @@
             AdvertiseData advertiseData, AdvertiseData scanResponse,
             final AdvertiseCallback callback) {
         synchronized (mLeAdvertisers) {
-            checkAdapterState();
+            BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
             if (callback == null) {
                 throw new IllegalArgumentException("callback cannot be null");
             }
@@ -150,7 +150,7 @@
      */
     public void stopAdvertising(final AdvertiseCallback callback) {
         synchronized (mLeAdvertisers) {
-            checkAdapterState();
+            BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
             if (callback == null) {
                 throw new IllegalArgumentException("callback cannot be null");
             }
@@ -265,9 +265,18 @@
                 }
                 if (mClientIf > 0 && mIsAdvertising) {
                     mLeAdvertisers.put(mAdvertiseCallback, this);
-                } else {
+                } else if (mClientIf <= 0) {
+                    // Post internal error if registration failed.
                     postStartFailure(mAdvertiseCallback,
                             AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR);
+                } else {
+                    // Unregister application if it's already registered but advertise failed.
+                    try {
+                        mBluetoothGatt.unregisterClient(mClientIf);
+                        mClientIf = -1;
+                    } catch (RemoteException e) {
+                        Log.e(TAG, "remote exception when unregistering", e);
+                    }
                 }
             }
         }
@@ -342,13 +351,6 @@
         }
     }
 
-    // TODO: move this api to a common util class.
-    private void checkAdapterState() {
-        if (mBluetoothAdapter.getState() != mBluetoothAdapter.STATE_ON) {
-            throw new IllegalStateException("BT Adapter is not turned ON");
-        }
-    }
-
     private void postStartFailure(final AdvertiseCallback callback, final int error) {
         mHandler.post(new Runnable() {
             @Override
diff --git a/core/java/android/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java
index e1d4bbd2..a57c3ca 100644
--- a/core/java/android/bluetooth/le/BluetoothLeScanner.java
+++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java
@@ -80,11 +80,10 @@
      * @throws IllegalArgumentException If {@code callback} is null.
      */
     public void startScan(final ScanCallback callback) {
-        checkAdapterState();
         if (callback == null) {
             throw new IllegalArgumentException("callback is null");
         }
-        this.startScan(null, new ScanSettings.Builder().build(), callback);
+        startScan(null, new ScanSettings.Builder().build(), callback);
     }
 
     /**
@@ -104,7 +103,7 @@
 
     private void startScan(List<ScanFilter> filters, ScanSettings settings,
             final ScanCallback callback, List<List<ResultStorageDescriptor>> resultStorages) {
-        checkAdapterState();
+        BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
         if (settings == null || callback == null) {
             throw new IllegalArgumentException("settings or callback is null");
         }
@@ -142,7 +141,7 @@
      * @param callback
      */
     public void stopScan(ScanCallback callback) {
-        checkAdapterState();
+        BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
         synchronized (mLeScanClients) {
             BleScanCallbackWrapper wrapper = mLeScanClients.remove(callback);
             if (wrapper == null) {
@@ -162,7 +161,7 @@
      *            used to start scan.
      */
     public void flushPendingScanResults(ScanCallback callback) {
-        checkAdapterState();
+        BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
         if (callback == null) {
             throw new IllegalArgumentException("callback cannot be null!");
         }
@@ -373,13 +372,6 @@
         }
     }
 
-    // TODO: move this api to a common util class.
-    private void checkAdapterState() {
-        if (mBluetoothAdapter.getState() != mBluetoothAdapter.STATE_ON) {
-            throw new IllegalStateException("BT Adapter is not turned ON");
-        }
-    }
-
     private void postCallbackError(final ScanCallback callback, final int errorCode) {
         mHandler.post(new Runnable() {
             @Override
diff --git a/core/java/android/bluetooth/le/Utils.java b/core/java/android/bluetooth/le/BluetoothLeUtils.java
similarity index 87%
rename from core/java/android/bluetooth/le/Utils.java
rename to core/java/android/bluetooth/le/BluetoothLeUtils.java
index ccdae69..4916bd9 100644
--- a/core/java/android/bluetooth/le/Utils.java
+++ b/core/java/android/bluetooth/le/BluetoothLeUtils.java
@@ -16,6 +16,7 @@
 
 package android.bluetooth.le;
 
+import android.bluetooth.BluetoothAdapter;
 import android.util.SparseArray;
 
 import java.util.Arrays;
@@ -29,7 +30,7 @@
  *
  * @hide
  */
-public class Utils {
+public class BluetoothLeUtils {
 
     /**
      * Returns a string composed from a {@link SparseArray}.
@@ -123,4 +124,17 @@
         }
         return true;
     }
+
+    /**
+     * Ensure Bluetooth is turned on.
+     *
+     * @throws IllegalStateException If {@code adapter} is null or Bluetooth state is not
+     *             {@link BluetoothAdapter#STATE_ON}.
+     */
+    static void checkAdapterStateOn(BluetoothAdapter adapter) {
+        if (adapter == null || adapter.getState() != BluetoothAdapter.STATE_ON) {
+            throw new IllegalStateException("BT Adapter is not turned ON");
+        }
+    }
+
 }
diff --git a/core/java/android/bluetooth/le/ScanRecord.java b/core/java/android/bluetooth/le/ScanRecord.java
index 2f3d06f..f802e8d 100644
--- a/core/java/android/bluetooth/le/ScanRecord.java
+++ b/core/java/android/bluetooth/le/ScanRecord.java
@@ -268,8 +268,8 @@
     @Override
     public String toString() {
         return "ScanRecord [mAdvertiseFlags=" + mAdvertiseFlags + ", mServiceUuids=" + mServiceUuids
-                + ", mManufacturerSpecificData=" + Utils.toString(mManufacturerSpecificData)
-                + ", mServiceData=" + Utils.toString(mServiceData)
+                + ", mManufacturerSpecificData=" + BluetoothLeUtils.toString(mManufacturerSpecificData)
+                + ", mServiceData=" + BluetoothLeUtils.toString(mServiceData)
                 + ", mTxPowerLevel=" + mTxPowerLevel + ", mDeviceName=" + mDeviceName + "]";
     }
 
diff --git a/core/java/android/content/AbstractRestrictionsProvider.java b/core/java/android/content/AbstractRestrictionsProvider.java
deleted file mode 100644
index 262980e..0000000
--- a/core/java/android/content/AbstractRestrictionsProvider.java
+++ /dev/null
@@ -1,85 +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 android.content;
-
-import android.app.admin.DevicePolicyManager;
-import android.os.IBinder;
-import android.os.PersistableBundle;
-
-/**
- * @hide
- * Abstract implementation of a Restrictions Provider BroadcastReceiver. To implement a
- * Restrictions Provider, extend from this class and implement the abstract methods.
- * Export this receiver in the manifest. A profile owner device admin can then register this
- * component as a Restrictions Provider using
- * {@link DevicePolicyManager#setRestrictionsProvider(ComponentName, ComponentName)}.
- * <p>
- * The function of a Restrictions Provider is to transport permission requests from apps on this
- * device to an administrator (most likely on a remote device or computer) and deliver back
- * responses. The response should be sent back to the app via
- * {@link RestrictionsManager#notifyPermissionResponse(String, PersistableBundle)}.
- *
- * @see RestrictionsManager
- * TODO: STOPSHIP: Remove before L ships, after clients have switched over
- * to android.service.restrictions.RestrictionsReceiver. Bug: 17006805
- */
-public abstract class AbstractRestrictionsProvider extends BroadcastReceiver {
-
-    private static final String TAG = "AbstractRestrictionsProvider";
-
-    /**
-     * An asynchronous permission request made by an application for an operation that requires
-     * authorization by a local or remote administrator other than the user. The Restrictions
-     * Provider should transfer the request to the administrator and deliver back a response, when
-     * available. The calling application is aware that the response could take an indefinite
-     * amount of time.
-     * <p>
-     * If the request bundle contains the key {@link RestrictionsManager#REQUEST_KEY_NEW_REQUEST},
-     * then a new request must be sent. Otherwise the provider can look up any previous response
-     * to the same requestId and return the cached response.
-     *
-     * @param packageName the application requesting permission.
-     * @param requestType the type of request, which determines the content and presentation of
-     * the request data.
-     * @param request the request data bundle containing at a minimum a request id.
-     *
-     * @see RestrictionsManager#REQUEST_TYPE_APPROVAL
-     * @see RestrictionsManager#REQUEST_TYPE_LOCAL_APPROVAL
-     * @see RestrictionsManager#REQUEST_KEY_ID
-     */
-    public abstract void requestPermission(Context context,
-            String packageName, String requestType, String requestId, PersistableBundle request);
-
-    /**
-     * Intercept standard Restrictions Provider broadcasts.  Implementations
-     * should not override this method; it is better to implement the
-     * convenience callbacks for each action.
-     */
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        String action = intent.getAction();
-
-        if (RestrictionsManager.ACTION_REQUEST_PERMISSION.equals(action)) {
-            String packageName = intent.getStringExtra(RestrictionsManager.EXTRA_PACKAGE_NAME);
-            String requestType = intent.getStringExtra(RestrictionsManager.EXTRA_REQUEST_TYPE);
-            String requestId = intent.getStringExtra(RestrictionsManager.EXTRA_REQUEST_ID);
-            PersistableBundle request = (PersistableBundle)
-                    intent.getParcelableExtra(RestrictionsManager.EXTRA_REQUEST_BUNDLE);
-            requestPermission(context, packageName, requestType, requestId, request);
-        }
-    }
-}
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index fde8b2e..2853c58 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -639,12 +639,14 @@
      * @param authorities the semi-colon separated authorities of the ContentProvider.
      */
     protected final void setAuthorities(String authorities) {
-        if (authorities.indexOf(';') == -1) {
-            mAuthority = authorities;
-            mAuthorities = null;
-        } else {
-            mAuthority = null;
-            mAuthorities = authorities.split(";");
+        if (authorities != null) {
+            if (authorities.indexOf(';') == -1) {
+                mAuthority = authorities;
+                mAuthorities = null;
+            } else {
+                mAuthority = null;
+                mAuthorities = authorities.split(";");
+            }
         }
     }
 
@@ -653,9 +655,11 @@
         if (mAuthority != null) {
             return mAuthority.equals(authority);
         }
-        int length = mAuthorities.length;
-        for (int i = 0; i < length; i++) {
-            if (mAuthorities[i].equals(authority)) return true;
+        if (mAuthorities != null) {
+            int length = mAuthorities.length;
+            for (int i = 0; i < length; i++) {
+                if (mAuthorities[i].equals(authority)) return true;
+            }
         }
         return false;
     }
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index f979a0c..61dd747 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3062,6 +3062,14 @@
      * "content://foo".  It will not remove any prefix grants that exist at a
      * higher level.
      *
+     * <p>Prior to {@link android.os.Build.VERSION_CODES#L}, if you did not have
+     * regular permission access to a Uri, but had received access to it through
+     * a specific Uri permission grant, you could not revoke that grant with this
+     * function and a {@link SecurityException} would be thrown.  As of
+     * {@link android.os.Build.VERSION_CODES#L}, this function will not throw a security exception,
+     * but will remove whatever permission grants to the Uri had been given to the app
+     * (or none).</p>
+     *
      * @param uri The Uri you would like to revoke access to.
      * @param modeFlags The desired access modes.  Any combination of
      * {@link Intent#FLAG_GRANT_READ_URI_PERMISSION
diff --git a/core/java/android/content/IRestrictionsManager.aidl b/core/java/android/content/IRestrictionsManager.aidl
index 495ac2e..db9146f 100644
--- a/core/java/android/content/IRestrictionsManager.aidl
+++ b/core/java/android/content/IRestrictionsManager.aidl
@@ -30,5 +30,5 @@
     void requestPermission(in String packageName, in String requestType, in String requestId,
             in PersistableBundle requestData);
     void notifyPermissionResponse(in String packageName, in PersistableBundle response);
-    Intent getLocalApprovalIntent();
+    Intent createLocalApprovalIntent();
 }
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 61e105b..ff9f6ab 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1213,6 +1213,13 @@
             = "android.intent.extra.ASSIST_CONTEXT";
 
     /**
+     * An optional field on {@link #ACTION_ASSIST} suggesting that the user will likely use a
+     * keyboard as the primary input device for assistance.
+     */
+    public static final String EXTRA_ASSIST_INPUT_HINT_KEYBOARD =
+            "android.intent.extra.ASSIST_INPUT_HINT_KEYBOARD";
+
+    /**
      * Activity Action: List all available applications
      * <p>Input: Nothing.
      * <p>Output: nothing.
@@ -2216,104 +2223,14 @@
     /**
      * Broadcast Action: Wired Headset plugged in or unplugged.
      *
-     * You <em>cannot</em> receive this through components declared
-     * in manifests, only by explicitly registering for it with
-     * {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)
-     * Context.registerReceiver()}.
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>name</em> - Headset type, human readable string </li>
-     *   <li><em>microphone</em> - 1 if headset has a microphone, 0 otherwise </li>
-     * </ul>
-     * </ul>
+     * Same as {@link android.media.AudioManager#ACTION_HEADSET_PLUG}, to be consulted for value
+     *   and documentation.
+     * <p>If the minimum SDK version of your application is
+     * {@link android.os.Build.VERSION_CODES#L}, it is recommended to refer
+     * to the <code>AudioManager</code> constant in your receiver registration code instead.
      */
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_HEADSET_PLUG =
-            "android.intent.action.HEADSET_PLUG";
-
-    /**
-     * Broadcast Action: An analog audio speaker/headset plugged in or unplugged.
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>name</em> - Headset type, human readable string </li>
-     * </ul>
-     * </ul>
-     * @hide
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_ANALOG_AUDIO_DOCK_PLUG =
-            "android.intent.action.ANALOG_AUDIO_DOCK_PLUG";
-
-    /**
-     * Broadcast Action: A digital audio speaker/headset plugged in or unplugged.
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>name</em> - Headset type, human readable string </li>
-     * </ul>
-     * </ul>
-     * @hide
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_DIGITAL_AUDIO_DOCK_PLUG =
-            "android.intent.action.DIGITAL_AUDIO_DOCK_PLUG";
-
-    /**
-     * Broadcast Action: A sticky broadcast indicating an HMDI cable was plugged or unplugged
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>name</em> - HDMI cable, human readable string </li>
-     *   <li><em>maxChannelCount</em> - the maximum number of output channels supported by the
-     *       connected HDMI device, only available when <i>state</i> is 1.</li>
-     *   <li><em>encodings</em> - an array of formats supported by the connected HDMI device,
-     *       only available when <i>state</i> is 1. Encoding values are defined in
-     *       {@link android.media.AudioFormat} (for instance see
-     *       {@link android.media.AudioFormat#ENCODING_PCM_16BIT}). Use
-     *       {@link #getIntArrayExtra(String)} to retrieve the encoding values.</li>
-     * </ul>
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_HDMI_AUDIO_PLUG =
-            "android.intent.action.HDMI_AUDIO_PLUG";
-
-    /**
-     * Broadcast Action: A USB audio accessory was plugged in or unplugged.
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>card</em> - ALSA card number (integer) </li>
-     *   <li><em>device</em> - ALSA device number (integer) </li>
-     * </ul>
-     * </ul>
-     * @hide
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_USB_AUDIO_ACCESSORY_PLUG =
-            "android.intent.action.USB_AUDIO_ACCESSORY_PLUG";
-
-    /**
-     * Broadcast Action: A USB audio device was plugged in or unplugged.
-     *
-     * <p>The intent will have the following extra values:
-     * <ul>
-     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
-     *   <li><em>card</em> - ALSA card number (integer) </li>
-     *   <li><em>device</em> - ALSA device number (integer) </li>
-     * </ul>
-     * </ul>
-     * @hide
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_USB_AUDIO_DEVICE_PLUG =
-            "android.intent.action.USB_AUDIO_DEVICE_PLUG";
+    public static final String ACTION_HEADSET_PLUG = android.media.AudioManager.ACTION_HEADSET_PLUG;
 
     /**
      * <p>Broadcast Action: The user has switched on advanced settings in the settings app:</p>
@@ -2833,12 +2750,14 @@
     @SdkConstant(SdkConstantType.INTENT_CATEGORY)
     public static final String CATEGORY_BROWSABLE = "android.intent.category.BROWSABLE";
     /**
+     * @hide
      * Categories for activities that can participate in voice interaction.
      * An activity that supports this category must be prepared to run with
      * no UI shown at all (though in some case it may have a UI shown), and
      * rely on {@link android.app.VoiceInteractor} to interact with the user.
      */
     @SdkConstant(SdkConstantType.INTENT_CATEGORY)
+    @SystemApi
     public static final String CATEGORY_VOICE = "android.intent.category.VOICE";
     /**
      * Set if the activity should be considered as an alternative action to
@@ -3451,7 +3370,7 @@
      * profiles - {@link #ACTION_MANAGED_PROFILE_ADDED} and {@link #ACTION_MANAGED_PROFILE_REMOVED}.
      */
     public static final String EXTRA_USER =
-            "android.intent.extra.user";
+            "android.intent.extra.USER";
 
     /**
      * Extra used in the response from a BroadcastReceiver that handles
diff --git a/core/java/android/content/RestrictionsManager.java b/core/java/android/content/RestrictionsManager.java
index 849df55..21a6a0d 100644
--- a/core/java/android/content/RestrictionsManager.java
+++ b/core/java/android/content/RestrictionsManager.java
@@ -155,7 +155,7 @@
      * The intent must contain {@link #EXTRA_REQUEST_BUNDLE} as an extra and the bundle must
      * contain at least {@link #REQUEST_KEY_MESSAGE} for the activity to display.
      * <p>
-     * @see #getLocalApprovalIntent()
+     * @see #createLocalApprovalIntent()
      */
     public static final String ACTION_REQUEST_LOCAL_APPROVAL =
             "android.content.action.REQUEST_LOCAL_APPROVAL";
@@ -473,10 +473,10 @@
         }
     }
 
-    public Intent getLocalApprovalIntent() {
+    public Intent createLocalApprovalIntent() {
         try {
             if (mService != null) {
-                return mService.getLocalApprovalIntent();
+                return mService.createLocalApprovalIntent();
             }
         } catch (RemoteException re) {
             Log.w(TAG, "Couldn't reach service");
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index dbf49c5..8d3126d 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -255,16 +255,22 @@
      * Bit in {@link #flags}: If set, a task rooted at this activity will have its
      * baseIntent replaced by the activity immediately above this. Each activity may further
      * relinquish its identity to the activity above it using this flag. Set from the
-     * android.R.attr#relinquishTaskIdentity attribute.
+     * {@link android.R.attr#relinquishTaskIdentity} attribute.
      */
     public static final int FLAG_RELINQUISH_TASK_IDENTITY = 0x1000;
     /**
      * Bit in {@link #flags} indicating that tasks started with this activity are to be
      * removed from the recent list of tasks when the last activity in the task is finished.
-     * {@link android.R.attr#autoRemoveFromRecents}
+     * Corresponds to {@link android.R.attr#autoRemoveFromRecents}
      */
     public static final int FLAG_AUTO_REMOVE_FROM_RECENTS = 0x2000;
     /**
+     * Bit in {@link #flags} indicating that this activity can start is creation/resume
+     * while the previous activity is still pausing.  Corresponds to
+     * {@link android.R.attr#resumeWhilePausing}
+     */
+    public static final int FLAG_RESUME_WHILE_PAUSING = 0x4000;
+    /**
      * @hide Bit in {@link #flags}: If set, this component will only be seen
      * by the primary user.  Only works with broadcast receivers.  Set from the
      * android.R.attr#primaryUserOnly attribute.
diff --git a/core/java/android/content/pm/IPackageInstaller.aidl b/core/java/android/content/pm/IPackageInstaller.aidl
index c6c0ff6..6daefc8 100644
--- a/core/java/android/content/pm/IPackageInstaller.aidl
+++ b/core/java/android/content/pm/IPackageInstaller.aidl
@@ -22,14 +22,21 @@
 import android.content.pm.PackageInstaller;
 import android.content.IntentSender;
 
+import android.graphics.Bitmap;
+
 /** {@hide} */
 interface IPackageInstaller {
     int createSession(in PackageInstaller.SessionParams params, String installerPackageName, int userId);
+
+    void updateSessionAppIcon(int sessionId, in Bitmap appIcon);
+    void updateSessionAppLabel(int sessionId, String appLabel);
+
     void abandonSession(int sessionId);
 
     IPackageInstallerSession openSession(int sessionId);
 
     PackageInstaller.SessionInfo getSessionInfo(int sessionId);
+
     List<PackageInstaller.SessionInfo> getAllSessions(int userId);
     List<PackageInstaller.SessionInfo> getMySessions(String installerPackageName, int userId);
 
diff --git a/core/java/android/content/pm/IPackageInstallerCallback.aidl b/core/java/android/content/pm/IPackageInstallerCallback.aidl
index 39ae1a0..974eb1e 100644
--- a/core/java/android/content/pm/IPackageInstallerCallback.aidl
+++ b/core/java/android/content/pm/IPackageInstallerCallback.aidl
@@ -19,8 +19,8 @@
 /** {@hide} */
 oneway interface IPackageInstallerCallback {
     void onSessionCreated(int sessionId);
-    void onSessionOpened(int sessionId);
+    void onSessionBadgingChanged(int sessionId);
+    void onSessionActiveChanged(int sessionId, boolean active);
     void onSessionProgressChanged(int sessionId, float progress);
-    void onSessionClosed(int sessionId);
     void onSessionFinished(int sessionId, boolean success);
 }
diff --git a/core/java/android/content/pm/LauncherActivityInfo.java b/core/java/android/content/pm/LauncherActivityInfo.java
index 0cff08b..ee23fcd 100644
--- a/core/java/android/content/pm/LauncherActivityInfo.java
+++ b/core/java/android/content/pm/LauncherActivityInfo.java
@@ -18,16 +18,10 @@
 
 import android.content.ComponentName;
 import android.content.Context;
-import android.content.Intent;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Bitmap.Config;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
-import android.os.Bundle;
-import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.util.DisplayMetrics;
@@ -39,11 +33,9 @@
  * and badged icon for the activity.
  */
 public class LauncherActivityInfo {
-    private static final boolean DEBUG = false;
     private static final String TAG = "LauncherActivityInfo";
 
     private final PackageManager mPm;
-    private final UserManager mUm;
 
     private ActivityInfo mActivityInfo;
     private ComponentName mComponentName;
@@ -68,7 +60,6 @@
 
     LauncherActivityInfo(Context context) {
         mPm = context.getPackageManager();
-        mUm = UserManager.get(context);
     }
 
     /**
@@ -179,7 +170,7 @@
         }
 
         if (originalIcon instanceof BitmapDrawable) {
-            return mUm.getBadgedIconForUser(originalIcon, mUser);
+            return mPm.getUserBadgedIcon(originalIcon, mUser);
         } else {
             Log.e(TAG, "Unable to create badged icon for " + mActivityInfo);
         }
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index f9370b3..d49bc50 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -278,21 +278,21 @@
 
 
     /**
-     * Adds a callback for changes to packages in current and managed profiles.
+     * Registers a callback for changes to packages in current and managed profiles.
      *
-     * @param callback The callback to add.
+     * @param callback The callback to register.
      */
-    public void addCallback(Callback callback) {
-        addCallback(callback, null);
+    public void registerCallback(Callback callback) {
+        registerCallback(callback, null);
     }
 
     /**
-     * Adds a callback for changes to packages in current and managed profiles.
+     * Registers a callback for changes to packages in current and managed profiles.
      *
-     * @param callback The callback to add.
+     * @param callback The callback to register.
      * @param handler that should be used to post callbacks on, may be null.
      */
-    public void addCallback(Callback callback, Handler handler) {
+    public void registerCallback(Callback callback, Handler handler) {
         synchronized (this) {
             if (callback != null && !mCallbacks.contains(callback)) {
                 boolean addedFirstCallback = mCallbacks.size() == 0;
@@ -308,12 +308,12 @@
     }
 
     /**
-     * Removes a callback that was previously added.
+     * Unregisters a callback that was previously registered.
      *
-     * @param callback The callback to remove.
-     * @see #addCallback(Callback)
+     * @param callback The callback to unregister.
+     * @see #registerCallback(Callback)
      */
-    public void removeCallback(Callback callback) {
+    public void unregisterCallback(Callback callback) {
         synchronized (this) {
             removeCallbackLocked(callback);
             if (mCallbacks.size() == 0) {
@@ -500,44 +500,12 @@
         }
     }
 
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public static abstract class OnAppsChangedCallback extends Callback {
+    /** STOPSHIP remove when launcher 3 has been updated */
+    public void addCallback(Callback callback) {
+        registerCallback(callback);
     }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public void addOnAppsChangedCallback(OnAppsChangedCallback callback) {
-        addCallback(callback, null);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public void addOnAppsChangedCallback(OnAppsChangedCallback callback, Handler handler) {
-        addCallback(callback, handler);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public void removeOnAppsChangedCallback(OnAppsChangedCallback callback) {
-        removeCallback(callback);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public void startActivityForProfile(ComponentName component, UserHandle user, Rect sourceBounds,
-            Bundle opts) {
-        startMainActivity(component, user, sourceBounds, opts);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public void showAppDetailsForProfile(ComponentName component, UserHandle user,
-            Rect sourceBounds, Bundle opts) {
-        startAppDetailsActivity(component, user, sourceBounds, opts);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public boolean isPackageEnabledForProfile(String packageName, UserHandle user) {
-        return isPackageEnabled(packageName, user);
-    }
-
-    /** Remove after unbundled apps have migrated STOP SHIP */
-    public boolean isActivityEnabledForProfile(ComponentName component, UserHandle user) {
-        return isActivityEnabled(component, user);
+    /** STOPSHIP remove when launcher 3 has been updated */
+    public void removeCallback(Callback callback) {
+        unregisterCallback(callback);
     }
 }
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java
index 44e24b1..06d4c4a 100644
--- a/core/java/android/content/pm/PackageInstaller.java
+++ b/core/java/android/content/pm/PackageInstaller.java
@@ -285,6 +285,9 @@
      *
      * @throws IOException if parameters were unsatisfiable, such as lack of
      *             disk space or unavailable media.
+     * @throws SecurityException when installation services are unavailable,
+     *             such as when called from a restricted user.
+     * @throws IllegalArgumentException when {@link SessionParams} is invalid.
      * @return positive, non-zero unique ID that represents the created session.
      *         This ID remains consistent across device reboots until the
      *         session is finalized. IDs are not reused during a given boot.
@@ -303,15 +306,64 @@
     /**
      * Open an existing session to actively perform work. To succeed, the caller
      * must be the owner of the install session.
+     *
+     * @throws IOException if parameters were unsatisfiable, such as lack of
+     *             disk space or unavailable media.
+     * @throws SecurityException when the caller does not own the session, or
+     *             the session is invalid.
      */
-    public @NonNull Session openSession(int sessionId) {
+    public @NonNull Session openSession(int sessionId) throws IOException {
         try {
             return new Session(mInstaller.openSession(sessionId));
+        } catch (RuntimeException e) {
+            ExceptionUtils.maybeUnwrapIOException(e);
+            throw e;
         } catch (RemoteException e) {
             throw e.rethrowAsRuntimeException();
         }
     }
 
+    /**
+     * Update the icon representing the app being installed in a specific
+     * session. This should be roughly
+     * {@link ActivityManager#getLauncherLargeIconSize()} in both dimensions.
+     *
+     * @throws SecurityException when the caller does not own the session, or
+     *             the session is invalid.
+     */
+    public void updateSessionAppIcon(int sessionId, @Nullable Bitmap appIcon) {
+        try {
+            mInstaller.updateSessionAppIcon(sessionId, appIcon);
+        } catch (RemoteException e) {
+            throw e.rethrowAsRuntimeException();
+        }
+    }
+
+    /**
+     * Update the label representing the app being installed in a specific
+     * session.
+     *
+     * @throws SecurityException when the caller does not own the session, or
+     *             the session is invalid.
+     */
+    public void updateSessionAppLabel(int sessionId, @Nullable CharSequence appLabel) {
+        try {
+            final String val = (appLabel != null) ? appLabel.toString() : null;
+            mInstaller.updateSessionAppLabel(sessionId, val);
+        } catch (RemoteException e) {
+            throw e.rethrowAsRuntimeException();
+        }
+    }
+
+    /**
+     * Completely abandon the given session, destroying all staged data and
+     * rendering it invalid. Abandoned sessions will be reported to
+     * {@link SessionCallback} listeners as failures. This is equivalent to
+     * opening the session and calling {@link Session#abandon()}.
+     *
+     * @throws SecurityException when the caller does not own the session, or
+     *             the session is invalid.
+     */
     public void abandonSession(int sessionId) {
         try {
             mInstaller.abandonSession(sessionId);
@@ -321,8 +373,11 @@
     }
 
     /**
-     * Return details for a specific session. To succeed, the caller must either
-     * own this session, or be the current home app.
+     * Return details for a specific session. No special permissions are
+     * required to retrieve these details.
+     *
+     * @return details for the requested session, or {@code null} if the session
+     *         does not exist.
      */
     public @Nullable SessionInfo getSessionInfo(int sessionId) {
         try {
@@ -333,13 +388,12 @@
     }
 
     /**
-     * Return list of all active install sessions, regardless of the installer.
-     * To succeed, the caller must be the current home app.
+     * Return list of all known install sessions, regardless of the installer.
      */
     public @NonNull List<SessionInfo> getAllSessions() {
         final ApplicationInfo info = mContext.getApplicationInfo();
         if ("com.google.android.googlequicksearchbox".equals(info.packageName)
-                && info.versionCode <= 300400070) {
+                && info.versionCode <= 300400110) {
             Log.d(TAG, "Ignoring callback request from old prebuilt");
             return Collections.EMPTY_LIST;
         }
@@ -352,7 +406,7 @@
     }
 
     /**
-     * Return list of all install sessions owned by the calling app.
+     * Return list of all known install sessions owned by the calling app.
      */
     public @NonNull List<SessionInfo> getMySessions() {
         try {
@@ -406,27 +460,38 @@
         public abstract void onCreated(int sessionId);
 
         /**
-         * Session has been opened. A session is usually opened when the
-         * installer is actively writing data.
+         * Badging details for an existing session has changed. For example, the
+         * app icon or label has been updated.
          */
-        public abstract void onOpened(int sessionId);
+        public abstract void onBadgingChanged(int sessionId);
+
+        /**
+         * Active state for session has been changed.
+         * <p>
+         * A session is considered active whenever there is ongoing forward
+         * progress being made, such as the installer holding an open
+         * {@link Session} instance while streaming data into place, or the
+         * system optimizing code as the result of
+         * {@link Session#commit(IntentSender)}.
+         * <p>
+         * If the installer closes the {@link Session} without committing, the
+         * session is considered inactive until the installer opens the session
+         * again.
+         */
+        public abstract void onActiveChanged(int sessionId, boolean active);
 
         /**
          * Progress for given session has been updated.
          * <p>
          * Note that this progress may not directly correspond to the value
-         * reported by {@link PackageInstaller.Session#setProgress(float)}, as
-         * the system may carve out a portion of the overall progress to
-         * represent its own internal installation work.
+         * reported by
+         * {@link PackageInstaller.Session#setStagingProgress(float)}, as the
+         * system may carve out a portion of the overall progress to represent
+         * its own internal installation work.
          */
         public abstract void onProgressChanged(int sessionId, float progress);
 
         /**
-         * Session has been closed.
-         */
-        public abstract void onClosed(int sessionId);
-
-        /**
          * Session has completely finished, either with success or failure.
          */
         public abstract void onFinished(int sessionId, boolean success);
@@ -436,9 +501,9 @@
     private static class SessionCallbackDelegate extends IPackageInstallerCallback.Stub implements
             Handler.Callback {
         private static final int MSG_SESSION_CREATED = 1;
-        private static final int MSG_SESSION_OPENED = 2;
-        private static final int MSG_SESSION_PROGRESS_CHANGED = 3;
-        private static final int MSG_SESSION_CLOSED = 4;
+        private static final int MSG_SESSION_BADGING_CHANGED = 2;
+        private static final int MSG_SESSION_ACTIVE_CHANGED = 3;
+        private static final int MSG_SESSION_PROGRESS_CHANGED = 4;
         private static final int MSG_SESSION_FINISHED = 5;
 
         final SessionCallback mCallback;
@@ -451,21 +516,23 @@
 
         @Override
         public boolean handleMessage(Message msg) {
+            final int sessionId = msg.arg1;
             switch (msg.what) {
                 case MSG_SESSION_CREATED:
-                    mCallback.onCreated(msg.arg1);
+                    mCallback.onCreated(sessionId);
                     return true;
-                case MSG_SESSION_OPENED:
-                    mCallback.onOpened(msg.arg1);
+                case MSG_SESSION_BADGING_CHANGED:
+                    mCallback.onBadgingChanged(sessionId);
+                    return true;
+                case MSG_SESSION_ACTIVE_CHANGED:
+                    final boolean active = msg.arg2 != 0;
+                    mCallback.onActiveChanged(sessionId, active);
                     return true;
                 case MSG_SESSION_PROGRESS_CHANGED:
-                    mCallback.onProgressChanged(msg.arg1, (float) msg.obj);
-                    return true;
-                case MSG_SESSION_CLOSED:
-                    mCallback.onClosed(msg.arg1);
+                    mCallback.onProgressChanged(sessionId, (float) msg.obj);
                     return true;
                 case MSG_SESSION_FINISHED:
-                    mCallback.onFinished(msg.arg1, msg.arg2 != 0);
+                    mCallback.onFinished(sessionId, msg.arg2 != 0);
                     return true;
             }
             return false;
@@ -477,8 +544,14 @@
         }
 
         @Override
-        public void onSessionOpened(int sessionId) {
-            mHandler.obtainMessage(MSG_SESSION_OPENED, sessionId, 0).sendToTarget();
+        public void onSessionBadgingChanged(int sessionId) {
+            mHandler.obtainMessage(MSG_SESSION_BADGING_CHANGED, sessionId, 0).sendToTarget();
+        }
+
+        @Override
+        public void onSessionActiveChanged(int sessionId, boolean active) {
+            mHandler.obtainMessage(MSG_SESSION_ACTIVE_CHANGED, sessionId, active ? 1 : 0)
+                    .sendToTarget();
         }
 
         @Override
@@ -488,37 +561,44 @@
         }
 
         @Override
-        public void onSessionClosed(int sessionId) {
-            mHandler.obtainMessage(MSG_SESSION_CLOSED, sessionId, 0).sendToTarget();
-        }
-
-        @Override
         public void onSessionFinished(int sessionId, boolean success) {
             mHandler.obtainMessage(MSG_SESSION_FINISHED, sessionId, success ? 1 : 0)
                     .sendToTarget();
         }
     }
 
-    /**
-     * Register to watch for session lifecycle events. To succeed, the caller
-     * must be the current home app.
-     */
+    /** {@hide} */
+    @Deprecated
     public void addSessionCallback(@NonNull SessionCallback callback) {
-        addSessionCallback(callback, new Handler());
+        registerSessionCallback(callback);
     }
 
     /**
-     * Register to watch for session lifecycle events. To succeed, the caller
-     * must be the current home app.
+     * Register to watch for session lifecycle events. No special permissions
+     * are required to watch for these events.
+     */
+    public void registerSessionCallback(@NonNull SessionCallback callback) {
+        registerSessionCallback(callback, new Handler());
+    }
+
+    /** {@hide} */
+    @Deprecated
+    public void addSessionCallback(@NonNull SessionCallback callback, @NonNull Handler handler) {
+        registerSessionCallback(callback, handler);
+    }
+
+    /**
+     * Register to watch for session lifecycle events. No special permissions
+     * are required to watch for these events.
      *
      * @param handler to dispatch callback events through, otherwise uses
      *            calling thread.
      */
-    public void addSessionCallback(@NonNull SessionCallback callback, @NonNull Handler handler) {
+    public void registerSessionCallback(@NonNull SessionCallback callback, @NonNull Handler handler) {
         // TODO: remove this temporary guard once we have new prebuilts
         final ApplicationInfo info = mContext.getApplicationInfo();
         if ("com.google.android.googlequicksearchbox".equals(info.packageName)
-                && info.versionCode <= 300400070) {
+                && info.versionCode <= 300400110) {
             Log.d(TAG, "Ignoring callback request from old prebuilt");
             return;
         }
@@ -535,10 +615,16 @@
         }
     }
 
-    /**
-     * Unregister an existing callback.
-     */
+    /** {@hide} */
+    @Deprecated
     public void removeSessionCallback(@NonNull SessionCallback callback) {
+        unregisterSessionCallback(callback);
+    }
+
+    /**
+     * Unregister a previously registered callback.
+     */
+    public void unregisterSessionCallback(@NonNull SessionCallback callback) {
         synchronized (mDelegates) {
             for (Iterator<SessionCallbackDelegate> i = mDelegates.iterator(); i.hasNext();) {
                 final SessionCallbackDelegate delegate = i.next();
@@ -574,10 +660,22 @@
             mSession = session;
         }
 
-        /**
-         * Set current progress. Valid values are anywhere between 0 and 1.
-         */
+        /** {@hide} */
+        @Deprecated
         public void setProgress(float progress) {
+            setStagingProgress(progress);
+        }
+
+        /**
+         * Set current progress of staging this session. Valid values are
+         * anywhere between 0 and 1.
+         * <p>
+         * Note that this progress may not directly correspond to the value
+         * reported by {@link SessionCallback#onProgressChanged(int, float)}, as
+         * the system may carve out a portion of the overall progress to
+         * represent its own internal installation work.
+         */
+        public void setStagingProgress(float progress) {
             try {
                 mSession.setClientProgress(progress);
             } catch (RemoteException e) {
@@ -617,6 +715,12 @@
          *            start at the beginning of the file.
          * @param lengthBytes total size of the file being written, used to
          *            preallocate the underlying disk space, or -1 if unknown.
+         *            The system may clear various caches as needed to allocate
+         *            this space.
+         * @throws IOException if trouble opening the file for writing, such as
+         *             lack of disk space or unavailable media.
+         * @throws SecurityException if called after the session has been
+         *             committed or abandoned.
          */
         public @NonNull OutputStream openWrite(@NonNull String name, long offsetBytes,
                 long lengthBytes) throws IOException {
@@ -650,6 +754,9 @@
          * <p>
          * This returns all names which have been previously written through
          * {@link #openWrite(String, long, long)} as part of this session.
+         *
+         * @throws SecurityException if called after the session has been
+         *             committed or abandoned.
          */
         public @NonNull String[] getNames() throws IOException {
             try {
@@ -669,6 +776,9 @@
          * through {@link #openWrite(String, long, long)} as part of this
          * session. For example, this stream may be used to calculate a
          * {@link MessageDigest} of a written APK before committing.
+         *
+         * @throws SecurityException if called after the session has been
+         *             committed or abandoned.
          */
         public @NonNull InputStream openRead(@NonNull String name) throws IOException {
             try {
@@ -690,6 +800,9 @@
          * Once this method is called, no additional mutations may be performed
          * on the session. If the device reboots before the session has been
          * finalized, you may commit the session again.
+         *
+         * @throws SecurityException if streams opened through
+         *             {@link #openWrite(String, long, long)} are still open.
          */
         public void commit(@NonNull IntentSender statusReceiver) {
             try {
@@ -714,7 +827,9 @@
 
         /**
          * Completely abandon this session, destroying all staged data and
-         * rendering it invalid.
+         * rendering it invalid. Abandoned sessions will be reported to
+         * {@link SessionCallback} listeners as failures. This is equivalent to
+         * opening the session and calling {@link Session#abandon()}.
          */
         public void abandon() {
             try {
@@ -868,6 +983,18 @@
         }
 
         /** {@hide} */
+        public void setInstallFlagsInternal() {
+            installFlags |= PackageManager.INSTALL_INTERNAL;
+            installFlags &= ~PackageManager.INSTALL_EXTERNAL;
+        }
+
+        /** {@hide} */
+        public void setInstallFlagsExternal() {
+            installFlags |= PackageManager.INSTALL_EXTERNAL;
+            installFlags &= ~PackageManager.INSTALL_INTERNAL;
+        }
+
+        /** {@hide} */
         public void dump(IndentingPrintWriter pw) {
             pw.printPair("mode", mode);
             pw.printHexPair("installFlags", installFlags);
@@ -931,7 +1058,7 @@
         /** {@hide} */
         public boolean sealed;
         /** {@hide} */
-        public boolean open;
+        public boolean active;
 
         /** {@hide} */
         public int mode;
@@ -955,7 +1082,7 @@
             resolvedBaseCodePath = source.readString();
             progress = source.readFloat();
             sealed = source.readInt() != 0;
-            open = source.readInt() != 0;
+            active = source.readInt() != 0;
 
             mode = source.readInt();
             sizeBytes = source.readLong();
@@ -981,20 +1108,37 @@
         /**
          * Return current overall progress of this session, between 0 and 1.
          * <p>
-         * Note that this progress may not directly correspond to the value reported
-         * by {@link PackageInstaller.Session#setProgress(float)}, as the system may
-         * carve out a portion of the overall progress to represent its own internal
-         * installation work.
+         * Note that this progress may not directly correspond to the value
+         * reported by
+         * {@link PackageInstaller.Session#setStagingProgress(float)}, as the
+         * system may carve out a portion of the overall progress to represent
+         * its own internal installation work.
          */
         public float getProgress() {
             return progress;
         }
 
         /**
-         * Return if this session is currently open.
+         * Return if this session is currently active.
+         * <p>
+         * A session is considered active whenever there is ongoing forward
+         * progress being made, such as the installer holding an open
+         * {@link Session} instance while streaming data into place, or the
+         * system optimizing code as the result of
+         * {@link Session#commit(IntentSender)}.
+         * <p>
+         * If the installer closes the {@link Session} without committing, the
+         * session is considered inactive until the installer opens the session
+         * again.
          */
+        public boolean isActive() {
+            return active;
+        }
+
+        /** {@hide} */
+        @Deprecated
         public boolean isOpen() {
-            return open;
+            return isActive();
         }
 
         /**
@@ -1050,7 +1194,7 @@
             dest.writeString(resolvedBaseCodePath);
             dest.writeFloat(progress);
             dest.writeInt(sealed ? 1 : 0);
-            dest.writeInt(open ? 1 : 0);
+            dest.writeInt(active ? 1 : 0);
 
             dest.writeInt(mode);
             dest.writeLong(sizeBytes);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 1b15ff5..5ce968b 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -31,6 +31,7 @@
 import android.content.pm.PackageParser.PackageParserException;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.Bundle;
@@ -200,12 +201,6 @@
     public static final int MATCH_DEFAULT_ONLY   = 0x00010000;
 
     /**
-     * Resolution and querying flag: do not resolve intents cross-profile.
-     * @hide
-     */
-    public static final int NO_CROSS_PROFILE = 0x00020000;
-
-    /**
      * Flag for {@link addCrossProfileIntentFilter}: if this flag is set:
      * when resolving an intent that matches the {@link CrossProfileIntentFilter}, the current
      * profile will be skipped.
@@ -975,6 +970,14 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device includes at least one form of audio
+     * output, such as speakers, audio jack or streaming over bluetooth
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device is capable of communicating with
      * other devices via Bluetooth.
      */
@@ -1522,6 +1525,22 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
+     * The device supports verified boot.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_VERIFIED_BOOT = "android.software.verified_boot";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
+     * The device supports secure removal of users. When a user is deleted the data associated
+     * with that user is securely deleted and no longer available.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_SECURELY_REMOVES_USERS
+            = "android.software.securely_removes_users";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
      * The device has a full implementation of the android.webkit.* APIs. Devices
      * lacking this feature will not have a functioning WebView implementation.
      */
@@ -1545,6 +1564,15 @@
     public static final String FEATURE_HDMI_CEC = "android.hardware.hdmi.cec";
 
     /**
+     * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
+     * The device has all of the inputs necessary to be considered a compatible game controller, or
+     * includes a compatible game controller in the box.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_GAMEPAD = "android.hardware.gamepad";
+
+
+    /**
      * Action to external storage service to clean out removed apps.
      * @hide
      */
@@ -2422,7 +2450,6 @@
      * @see #MATCH_DEFAULT_ONLY
      * @see #GET_INTENT_FILTERS
      * @see #GET_RESOLVED_FILTER
-     * @see #NO_CROSS_PROFILE
      * @hide
      */
     public abstract List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent,
@@ -2882,6 +2909,79 @@
             throws NameNotFoundException;
 
     /**
+     * If the target user is a managed profile of the calling user or the caller
+     * is itself a managed profile, then this returns a badged copy of the given
+     * icon to be able to distinguish it from the original icon. For badging an
+     * arbitrary drawable use {@link #getUserBadgedDrawableForDensity(
+     * android.graphics.drawable.Drawable, UserHandle, android.graphics.Rect, int)}.
+     * <p>
+     * If the original drawable is a BitmapDrawable and the backing bitmap is
+     * mutable as per {@link android.graphics.Bitmap#isMutable()}, the badging
+     * is performed in place and the original drawable is returned.
+     * </p>
+     *
+     * @param icon The icon to badge.
+     * @param user The target user.
+     * @return A drawable that combines the original icon and a badge as
+     *         determined by the system.
+     */
+    public abstract Drawable getUserBadgedIcon(Drawable icon, UserHandle user);
+
+    /**
+     * If the target user is a managed profile of the calling user or the caller
+     * is itself a managed profile, then this returns a badged copy of the given
+     * drawable allowing the user to distinguish it from the original drawable.
+     * The caller can specify the location in the bounds of the drawable to be
+     * badged where the badge should be applied as well as the density of the
+     * badge to be used.
+     * <p>
+     * If the original drawable is a BitmapDrawable and the backing bitmap is
+     * mutable as per {@link android.graphics.Bitmap#isMutable()}, the bading
+     * is performed in place and the original drawable is returned.
+     * </p>
+     *
+     * @param drawable The drawable to badge.
+     * @param user The target user.
+     * @param badgeLocation Where in the bounds of the badged drawable to place
+     *         the badge. If not provided, the badge is applied on top of the entire
+     *         drawable being badged.
+     * @param badgeDensity The optional desired density for the badge as per
+     *         {@link android.util.DisplayMetrics#densityDpi}. If not provided,
+     *         the density of the display is used.
+     * @return A drawable that combines the original drawable and a badge as
+     *         determined by the system.
+     */
+    public abstract Drawable getUserBadgedDrawableForDensity(Drawable drawable,
+            UserHandle user, Rect badgeLocation, int badgeDensity);
+
+    /**
+     * If the target user is a managed profile of the calling user or the caller
+     * is itself a managed profile, then this returns a drawable to use as a small
+     * icon to include in a view to distinguish it from the original icon.
+     *
+     * @param user The target user.
+     * @param density The optional desired density for the badge as per
+     *         {@link android.util.DisplayMetrics#densityDpi}. If not provided
+     *         the density of the current display is used.
+     * @return the drawable or null if no drawable is required.
+     * @hide
+     */
+    public abstract Drawable getUserBadgeForDensity(UserHandle user, int density);
+
+    /**
+     * If the target user is a managed profile of the calling user or the caller
+     * is itself a managed profile, then this returns a copy of the label with
+     * badging for accessibility services like talkback. E.g. passing in "Email"
+     * and it might return "Work Email" for Email in the work profile.
+     *
+     * @param label The label to change.
+     * @param user The target user.
+     * @return A label that combines the original label and a badge as
+     *         determined by the system.
+     */
+    public abstract CharSequence getUserBadgedLabel(CharSequence label, UserHandle user);
+
+    /**
      * Retrieve text from a package.  This is a low-level API used by
      * the various package manager info structures (such as
      * {@link ComponentInfo} to implement retrieval of their associated
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 6d40dcf..ddb0a6d 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1099,9 +1099,12 @@
                     }
                 }
             }
-        } catch (GeneralSecurityException | IOException | RuntimeException e) {
+        } catch (GeneralSecurityException e) {
             throw new PackageParserException(INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING,
                     "Failed to collect certificates from " + apkPath, e);
+        } catch (IOException | RuntimeException e) {
+            throw new PackageParserException(INSTALL_PARSE_FAILED_NO_CERTIFICATES,
+                    "Failed to collect certificates from " + apkPath, e);
         } finally {
             closeQuietly(jarFile);
         }
@@ -3110,6 +3113,12 @@
                     false)) {
                 a.info.flags |= ActivityInfo.FLAG_RELINQUISH_TASK_IDENTITY;
             }
+
+            if (sa.getBoolean(
+                    com.android.internal.R.styleable.AndroidManifestActivity_resumeWhilePausing,
+                    false)) {
+                a.info.flags |= ActivityInfo.FLAG_RESUME_WHILE_PAUSING;
+            }
         } else {
             a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
             a.info.configChanges = 0;
diff --git a/core/java/android/content/pm/UserInfo.java b/core/java/android/content/pm/UserInfo.java
index c0383a3..c03be32 100644
--- a/core/java/android/content/pm/UserInfo.java
+++ b/core/java/android/content/pm/UserInfo.java
@@ -89,6 +89,7 @@
 
     /** User is only partially created. */
     public boolean partial;
+    public boolean guestToRemove;
 
     public UserInfo(int id, String name, int flags) {
         this(id, name, null, flags);
@@ -147,6 +148,7 @@
         lastLoggedInTime = orig.lastLoggedInTime;
         partial = orig.partial;
         profileGroupId = orig.profileGroupId;
+        guestToRemove = orig.guestToRemove;
     }
 
     public UserHandle getUserHandle() {
@@ -172,6 +174,7 @@
         dest.writeLong(lastLoggedInTime);
         dest.writeInt(partial ? 1 : 0);
         dest.writeInt(profileGroupId);
+        dest.writeInt(guestToRemove ? 1 : 0);
     }
 
     public static final Parcelable.Creator<UserInfo> CREATOR
@@ -194,5 +197,6 @@
         lastLoggedInTime = source.readLong();
         partial = source.readInt() != 0;
         profileGroupId = source.readInt();
+        guestToRemove = source.readInt() != 0;
     }
 }
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index 2684e6c..e578822 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -773,6 +773,7 @@
     private native final String[] getArrayStringResource(int arrayRes);
     private native final int[] getArrayStringInfo(int arrayRes);
     /*package*/ native final int[] getArrayIntResource(int arrayRes);
+    /*package*/ native final int[] getStyleAttributes(int themeRes);
 
     private native final void init(boolean isSystem);
     private native final void destroy();
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index e63fd07..27bbb24 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -16,6 +16,12 @@
 
 package android.content.res;
 
+import com.android.internal.util.XmlUtils;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
 import android.content.pm.ActivityInfo;
 import android.os.Build;
 import android.os.Parcel;
@@ -23,7 +29,7 @@
 import android.text.TextUtils;
 import android.view.View;
 
-import java.text.Format;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Locale;
 
@@ -1353,8 +1359,6 @@
      * Returns a string representation of the configuration that can be parsed
      * by build tools (like AAPT).
      *
-     *
-     *
      * @hide
      */
     public static String resourceQualifierString(Configuration config) {
@@ -1568,4 +1572,229 @@
         parts.add("v" + Build.VERSION.RESOURCES_SDK_INT);
         return TextUtils.join("-", parts);
     }
+
+    /**
+     * Generate a delta Configuration between <code>base</code> and <code>change</code>. The
+     * resulting delta can be used with {@link #updateFrom(Configuration)}.
+     * <p />
+     * Caveat: If the any of the Configuration's members becomes undefined, then
+     * {@link #updateFrom(Configuration)} will treat it as a no-op and not update that member.
+     *
+     * This is fine for device configurations as no member is ever undefined.
+     * {@hide}
+     */
+    public static Configuration generateDelta(Configuration base, Configuration change) {
+        final Configuration delta = new Configuration();
+        if (base.fontScale != change.fontScale) {
+            delta.fontScale = change.fontScale;
+        }
+
+        if (base.mcc != change.mcc) {
+            delta.mcc = change.mcc;
+        }
+
+        if (base.mnc != change.mnc) {
+            delta.mnc = change.mnc;
+        }
+
+        if ((base.locale == null && change.locale != null) ||
+                (base.locale != null && !base.locale.equals(change.locale)))  {
+            delta.locale = change.locale;
+        }
+
+        if (base.touchscreen != change.touchscreen) {
+            delta.touchscreen = change.touchscreen;
+        }
+
+        if (base.keyboard != change.keyboard) {
+            delta.keyboard = change.keyboard;
+        }
+
+        if (base.keyboardHidden != change.keyboardHidden) {
+            delta.keyboardHidden = change.keyboardHidden;
+        }
+
+        if (base.navigation != change.navigation) {
+            delta.navigation = change.navigation;
+        }
+
+        if (base.navigationHidden != change.navigationHidden) {
+            delta.navigationHidden = change.navigationHidden;
+        }
+
+        if (base.orientation != change.orientation) {
+            delta.orientation = change.orientation;
+        }
+
+        if ((base.screenLayout & SCREENLAYOUT_SIZE_MASK) !=
+                (change.screenLayout & SCREENLAYOUT_SIZE_MASK)) {
+            delta.screenLayout |= change.screenLayout & SCREENLAYOUT_SIZE_MASK;
+        }
+
+        if ((base.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK) !=
+                (change.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK)) {
+            delta.screenLayout |= change.screenLayout & SCREENLAYOUT_LAYOUTDIR_MASK;
+        }
+
+        if ((base.screenLayout & SCREENLAYOUT_LONG_MASK) !=
+                (change.screenLayout & SCREENLAYOUT_LONG_MASK)) {
+            delta.screenLayout |= change.screenLayout & SCREENLAYOUT_LONG_MASK;
+        }
+
+        if ((base.uiMode & UI_MODE_TYPE_MASK) != (change.uiMode & UI_MODE_TYPE_MASK)) {
+            delta.uiMode |= change.uiMode & UI_MODE_TYPE_MASK;
+        }
+
+        if ((base.uiMode & UI_MODE_NIGHT_MASK) != (change.uiMode & UI_MODE_NIGHT_MASK)) {
+            delta.uiMode |= change.uiMode & UI_MODE_NIGHT_MASK;
+        }
+
+        if (base.screenWidthDp != change.screenWidthDp) {
+            delta.screenWidthDp = change.screenWidthDp;
+        }
+
+        if (base.screenHeightDp != change.screenHeightDp) {
+            delta.screenHeightDp = change.screenHeightDp;
+        }
+
+        if (base.smallestScreenWidthDp != change.smallestScreenWidthDp) {
+            delta.smallestScreenWidthDp = change.smallestScreenWidthDp;
+        }
+
+        if (base.densityDpi != change.densityDpi) {
+            delta.densityDpi = change.densityDpi;
+        }
+        return delta;
+    }
+
+    private static final String XML_ATTR_FONT_SCALE = "fs";
+    private static final String XML_ATTR_MCC = "mcc";
+    private static final String XML_ATTR_MNC = "mnc";
+    private static final String XML_ATTR_LOCALE = "locale";
+    private static final String XML_ATTR_TOUCHSCREEN = "touch";
+    private static final String XML_ATTR_KEYBOARD = "key";
+    private static final String XML_ATTR_KEYBOARD_HIDDEN = "keyHid";
+    private static final String XML_ATTR_HARD_KEYBOARD_HIDDEN = "hardKeyHid";
+    private static final String XML_ATTR_NAVIGATION = "nav";
+    private static final String XML_ATTR_NAVIGATION_HIDDEN = "navHid";
+    private static final String XML_ATTR_ORIENTATION = "ori";
+    private static final String XML_ATTR_SCREEN_LAYOUT = "scrLay";
+    private static final String XML_ATTR_UI_MODE = "ui";
+    private static final String XML_ATTR_SCREEN_WIDTH = "width";
+    private static final String XML_ATTR_SCREEN_HEIGHT = "height";
+    private static final String XML_ATTR_SMALLEST_WIDTH = "sw";
+    private static final String XML_ATTR_DENSITY = "density";
+
+    /**
+     * Reads the attributes corresponding to Configuration member fields from the Xml parser.
+     * The parser is expected to be on a tag which has Configuration attributes.
+     *
+     * @param parser The Xml parser from which to read attributes.
+     * @param configOut The Configuration to populate from the Xml attributes.
+     * {@hide}
+     */
+    public static void readXmlAttrs(XmlPullParser parser, Configuration configOut)
+            throws XmlPullParserException, IOException {
+        configOut.fontScale = Float.intBitsToFloat(
+                XmlUtils.readIntAttribute(parser, XML_ATTR_FONT_SCALE, 0));
+        configOut.mcc = XmlUtils.readIntAttribute(parser, XML_ATTR_MCC, 0);
+        configOut.mnc = XmlUtils.readIntAttribute(parser, XML_ATTR_MNC, 0);
+
+        final String localeStr = XmlUtils.readStringAttribute(parser, XML_ATTR_LOCALE);
+        if (localeStr != null) {
+            configOut.locale = Locale.forLanguageTag(localeStr);
+        }
+
+        configOut.touchscreen = XmlUtils.readIntAttribute(parser, XML_ATTR_TOUCHSCREEN,
+                TOUCHSCREEN_UNDEFINED);
+        configOut.keyboard = XmlUtils.readIntAttribute(parser, XML_ATTR_KEYBOARD,
+                KEYBOARD_UNDEFINED);
+        configOut.keyboardHidden = XmlUtils.readIntAttribute(parser, XML_ATTR_KEYBOARD_HIDDEN,
+                KEYBOARDHIDDEN_UNDEFINED);
+        configOut.hardKeyboardHidden =
+                XmlUtils.readIntAttribute(parser, XML_ATTR_HARD_KEYBOARD_HIDDEN,
+                        HARDKEYBOARDHIDDEN_UNDEFINED);
+        configOut.navigation = XmlUtils.readIntAttribute(parser, XML_ATTR_NAVIGATION,
+                NAVIGATION_UNDEFINED);
+        configOut.navigationHidden = XmlUtils.readIntAttribute(parser, XML_ATTR_NAVIGATION_HIDDEN,
+                NAVIGATIONHIDDEN_UNDEFINED);
+        configOut.orientation = XmlUtils.readIntAttribute(parser, XML_ATTR_ORIENTATION,
+                ORIENTATION_UNDEFINED);
+        configOut.screenLayout = XmlUtils.readIntAttribute(parser, XML_ATTR_SCREEN_LAYOUT,
+                SCREENLAYOUT_UNDEFINED);
+        configOut.uiMode = XmlUtils.readIntAttribute(parser, XML_ATTR_UI_MODE, 0);
+        configOut.screenWidthDp = XmlUtils.readIntAttribute(parser, XML_ATTR_SCREEN_WIDTH,
+                SCREEN_WIDTH_DP_UNDEFINED);
+        configOut.screenHeightDp = XmlUtils.readIntAttribute(parser, XML_ATTR_SCREEN_HEIGHT,
+                SCREEN_HEIGHT_DP_UNDEFINED);
+        configOut.smallestScreenWidthDp =
+                XmlUtils.readIntAttribute(parser, XML_ATTR_SMALLEST_WIDTH,
+                        SMALLEST_SCREEN_WIDTH_DP_UNDEFINED);
+        configOut.densityDpi = XmlUtils.readIntAttribute(parser, XML_ATTR_DENSITY,
+                DENSITY_DPI_UNDEFINED);
+    }
+
+
+    /**
+     * Writes the Configuration's member fields as attributes into the XmlSerializer.
+     * The serializer is expected to have already started a tag so that attributes can be
+     * immediately written.
+     *
+     * @param xml The serializer to which to write the attributes.
+     * @param config The Configuration whose member fields to write.
+     * {@hide}
+     */
+    public static void writeXmlAttrs(XmlSerializer xml, Configuration config) throws IOException {
+        XmlUtils.writeIntAttribute(xml, XML_ATTR_FONT_SCALE,
+                Float.floatToIntBits(config.fontScale));
+        if (config.mcc != 0) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_MCC, config.mcc);
+        }
+        if (config.mnc != 0) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_MNC, config.mnc);
+        }
+        if (config.locale != null) {
+            XmlUtils.writeStringAttribute(xml, XML_ATTR_LOCALE, config.locale.toLanguageTag());
+        }
+        if (config.touchscreen != TOUCHSCREEN_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_TOUCHSCREEN, config.touchscreen);
+        }
+        if (config.keyboard != KEYBOARD_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_KEYBOARD, config.keyboard);
+        }
+        if (config.keyboardHidden != KEYBOARDHIDDEN_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_KEYBOARD_HIDDEN, config.keyboardHidden);
+        }
+        if (config.hardKeyboardHidden != HARDKEYBOARDHIDDEN_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_HARD_KEYBOARD_HIDDEN,
+                    config.hardKeyboardHidden);
+        }
+        if (config.navigation != NAVIGATION_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_NAVIGATION, config.navigation);
+        }
+        if (config.navigationHidden != NAVIGATIONHIDDEN_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_NAVIGATION_HIDDEN, config.navigationHidden);
+        }
+        if (config.orientation != ORIENTATION_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_ORIENTATION, config.orientation);
+        }
+        if (config.screenLayout != SCREENLAYOUT_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_SCREEN_LAYOUT, config.screenLayout);
+        }
+        if (config.uiMode != 0) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_UI_MODE, config.uiMode);
+        }
+        if (config.screenWidthDp != SCREEN_WIDTH_DP_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_SCREEN_WIDTH, config.screenWidthDp);
+        }
+        if (config.screenHeightDp != SCREEN_HEIGHT_DP_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_SCREEN_HEIGHT, config.screenHeightDp);
+        }
+        if (config.smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_SMALLEST_WIDTH, config.smallestScreenWidthDp);
+        }
+        if (config.densityDpi != DENSITY_DPI_UNDEFINED) {
+            XmlUtils.writeIntAttribute(xml, XML_ATTR_DENSITY, config.densityDpi);
+        }
+    }
 }
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index 31813c10..cabe228 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -1572,6 +1572,16 @@
         }
 
         /**
+         * Gets all of the attribute ids associated with this {@link Theme}. For debugging only.
+         *
+         * @return The int array containing attribute ids associated with this {@link Theme}.
+         * @hide
+         */
+        public int[] getAllAttributes() {
+            return mAssets.getStyleAttributes(getAppliedStyleResId());
+        }
+
+        /**
          * Returns the resources to which this theme belongs.
          *
          * @return Resources to which this theme belongs.
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index b52a0c5..f514e42 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -737,12 +737,11 @@
     }
 
     /**
-     * This value is defined only for continuous mode sensors. It is the delay between two
-     * sensor events corresponding to the lowest frequency that this sensor supports. When
-     * lower frequencies are requested through registerListener() the events will be generated
-     * at this frequency instead. It can be used to estimate when the batch FIFO may be full.
-     * Older devices may set this value to zero. Ignore this value in case it is negative
-     * or zero.
+     * This value is defined only for continuous and on-change sensors. It is the delay between two
+     * sensor events corresponding to the lowest frequency that this sensor supports. When lower
+     * frequencies are requested through registerListener() the events will be generated at this
+     * frequency instead. It can be used to estimate when the batch FIFO may be full. Older devices
+     * may set this value to zero. Ignore this value in case it is negative or zero.
      *
      * @return The max delay for this sensor in microseconds.
      */
diff --git a/core/java/android/hardware/camera2/CameraAccessException.java b/core/java/android/hardware/camera2/CameraAccessException.java
index ca71e81..91ef6ca 100644
--- a/core/java/android/hardware/camera2/CameraAccessException.java
+++ b/core/java/android/hardware/camera2/CameraAccessException.java
@@ -61,7 +61,7 @@
      *
      * <p>The camera has failed to open or has failed at a later time
      * as a result of some non-user interaction. Refer to
-     * {@link CameraDevice.StateListener#onError} for the exact
+     * {@link CameraDevice.StateCallback#onError} for the exact
      * nature of the error.</p>
      *
      * <p>No further calls to the camera will succeed. Clean up
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java
index fc2141f..ce83028 100644
--- a/core/java/android/hardware/camera2/CameraCaptureSession.java
+++ b/core/java/android/hardware/camera2/CameraCaptureSession.java
@@ -32,18 +32,18 @@
  * sending images to the desired targets. Therefore the setup is done asynchronously, and
  * {@link CameraDevice#createCaptureSession createCaptureSession} will send the ready-to-use
  * CameraCaptureSession to the provided listener's
- * {@link CameraCaptureSession.StateListener#onConfigured onConfigured} callback. If configuration
+ * {@link CameraCaptureSession.StateCallback#onConfigured onConfigured} callback. If configuration
  * cannot be completed, then the
- * {@link CameraCaptureSession.StateListener#onConfigureFailed onConfigureFailed} is called, and the
+ * {@link CameraCaptureSession.StateCallback#onConfigureFailed onConfigureFailed} is called, and the
  * session will not become active.</p>
  *<!--
  * <p>Any capture requests (repeating or non-repeating) submitted before the session is ready will
  * be queued up and will begin capture once the session becomes ready. In case the session cannot be
- * configured and {@link StateListener#onConfigureFailed onConfigureFailed} is called, all queued
+ * configured and {@link StateCallback#onConfigureFailed onConfigureFailed} is called, all queued
  * capture requests are discarded.</p>
  *-->
  * <p>If a new session is created by the camera device, then the previous session is closed, and its
- * associated {@link StateListener#onClosed onClosed} callback will be invoked.  All
+ * associated {@link StateCallback#onClosed onClosed} callback will be invoked.  All
  * of the session methods will throw an IllegalStateException if called once the session is
  * closed.</p>
  *
@@ -86,7 +86,7 @@
      * looper}.
      *
      * @return int A unique capture sequence ID used by
-     *             {@link CaptureListener#onCaptureSequenceCompleted}.
+     *             {@link CaptureCallback#onCaptureSequenceCompleted}.
      *
      * @throws CameraAccessException if the camera device is no longer connected or has
      *                               encountered a fatal error
@@ -103,7 +103,7 @@
      * @see #setRepeatingBurst
      * @see #abortCaptures
      */
-    public abstract int capture(CaptureRequest request, CaptureListener listener, Handler handler)
+    public abstract int capture(CaptureRequest request, CaptureCallback listener, Handler handler)
             throws CameraAccessException;
 
     /**
@@ -131,7 +131,7 @@
      * looper}.
      *
      * @return int A unique capture sequence ID used by
-     *             {@link CaptureListener#onCaptureSequenceCompleted}.
+     *             {@link CaptureCallback#onCaptureSequenceCompleted}.
      *
      * @throws CameraAccessException if the camera device is no longer connected or has
      *                               encountered a fatal error
@@ -147,7 +147,7 @@
      * @see #setRepeatingBurst
      * @see #abortCaptures
      */
-    public abstract int captureBurst(List<CaptureRequest> requests, CaptureListener listener,
+    public abstract int captureBurst(List<CaptureRequest> requests, CaptureCallback listener,
             Handler handler) throws CameraAccessException;
 
     /**
@@ -185,7 +185,7 @@
      * looper}.
      *
      * @return int A unique capture sequence ID used by
-     *             {@link CaptureListener#onCaptureSequenceCompleted}.
+     *             {@link CaptureCallback#onCaptureSequenceCompleted}.
      *
      * @throws CameraAccessException if the camera device is no longer connected or has
      *                               encountered a fatal error
@@ -203,7 +203,7 @@
      * @see #stopRepeating
      * @see #abortCaptures
      */
-    public abstract int setRepeatingRequest(CaptureRequest request, CaptureListener listener,
+    public abstract int setRepeatingRequest(CaptureRequest request, CaptureCallback listener,
             Handler handler) throws CameraAccessException;
 
     /**
@@ -245,7 +245,7 @@
      * looper}.
      *
      * @return int A unique capture sequence ID used by
-     *             {@link CaptureListener#onCaptureSequenceCompleted}.
+     *             {@link CaptureCallback#onCaptureSequenceCompleted}.
      *
      * @throws CameraAccessException if the camera device is no longer connected or has
      *                               encountered a fatal error
@@ -263,7 +263,7 @@
      * @see #stopRepeating
      * @see #abortCaptures
      */
-    public abstract int setRepeatingBurst(List<CaptureRequest> requests, CaptureListener listener,
+    public abstract int setRepeatingBurst(List<CaptureRequest> requests, CaptureCallback listener,
             Handler handler) throws CameraAccessException;
 
     /**
@@ -274,7 +274,7 @@
      *
      * <p>Any currently in-flight captures will still complete, as will any burst that is
      * mid-capture. To ensure that the device has finished processing all of its capture requests
-     * and is in ready state, wait for the {@link StateListener#onReady} callback after
+     * and is in ready state, wait for the {@link StateCallback#onReady} callback after
      * calling this method.</p>
      *
      * @throws CameraAccessException if the camera device is no longer connected or has
@@ -285,7 +285,7 @@
      *
      * @see #setRepeatingRequest
      * @see #setRepeatingBurst
-     * @see StateListener#onIdle
+     * @see StateCallback#onIdle
      */
     public abstract void stopRepeating() throws CameraAccessException;
 
@@ -293,15 +293,15 @@
      * Discard all captures currently pending and in-progress as fast as possible.
      *
      * <p>The camera device will discard all of its current work as fast as possible. Some in-flight
-     * captures may complete successfully and call {@link CaptureListener#onCaptureCompleted}, while
-     * others will trigger their {@link CaptureListener#onCaptureFailed} callbacks. If a repeating
+     * captures may complete successfully and call {@link CaptureCallback#onCaptureCompleted}, while
+     * others will trigger their {@link CaptureCallback#onCaptureFailed} callbacks. If a repeating
      * request or a repeating burst is set, it will be cleared.</p>
      *
      * <p>This method is the fastest way to switch the camera device to a new session with
      * {@link CameraDevice#createCaptureSession}, at the cost of discarding in-progress work. It
      * must be called before the new session is created. Once all pending requests are either
-     * completed or thrown away, the {@link StateListener#onReady} callback will be called,
-     * if the session has not been closed. Otherwise, the {@link StateListener#onClosed}
+     * completed or thrown away, the {@link StateCallback#onReady} callback will be called,
+     * if the session has not been closed. Otherwise, the {@link StateCallback#onClosed}
      * callback will be fired when a new session is created by the camera device.</p>
      *
      * <p>Cancelling will introduce at least a brief pause in the stream of data from the camera
@@ -332,7 +332,7 @@
      *
      * <p>Note that creating a new capture session with {@link CameraDevice#createCaptureSession}
      * will close any existing capture session automatically, and call the older session listener's
-     * {@link StateListener#onClosed} callback. Using {@link CameraDevice#createCaptureSession}
+     * {@link StateCallback#onClosed} callback. Using {@link CameraDevice#createCaptureSession}
      * directly without closing is the recommended approach for quickly switching to a new session,
      * since unchanged target outputs can be reused more efficiently.</p>
      *
@@ -340,7 +340,7 @@
      * repeating requests or bursts are stopped (as if {@link #stopRepeating()} was called).
      * However, any in-progress capture requests submitted to the session will be completed as
      * normal; once all captures have completed and the session has been torn down,
-     * {@link StateListener#onClosed} will be called.</p>
+     * {@link StateCallback#onClosed} will be called.</p>
      *
      * <p>Closing a session is idempotent; closing more than once has no effect.</p>
      */
@@ -348,10 +348,10 @@
     public abstract void close();
 
     /**
-     * A listener for tracking the state of a camera capture session.
+     * A callback object for receiving updates about the state of a camera capture session.
      *
      */
-    public static abstract class StateListener {
+    public static abstract class StateCallback {
 
         /**
          * This method is called when the camera device has finished configuring itself, and the
@@ -439,10 +439,17 @@
     }
 
     /**
-     * <p>A listener for tracking the progress of a {@link CaptureRequest}
-     * submitted to the camera device.</p>
+     * Temporary for migrating to Callback naming
+     * @hide
+     */
+    public static abstract class StateListener extends StateCallback {
+    }
+
+    /**
+     * <p>A callback object for tracking the progress of a {@link CaptureRequest} submitted to the
+     * camera device.</p>
      *
-     * <p>This listener is called when a request triggers a capture to start,
+     * <p>This callback is invoked when a request triggers a capture to start,
      * and when the capture is complete. In case on an error capturing an image,
      * the error method is triggered instead of the completion method.</p>
      *
@@ -451,7 +458,7 @@
      * @see #setRepeatingRequest
      * @see #setRepeatingBurst
      */
-    public static abstract class CaptureListener {
+    public static abstract class CaptureCallback {
 
         /**
          * This constant is used to indicate that no images were captured for
@@ -476,7 +483,9 @@
          * and in the buffers sent to each output Surface. These buffer
          * timestamps are accessible through, for example,
          * {@link android.media.Image#getTimestamp() Image.getTimestamp()} or
-         * {@link android.graphics.SurfaceTexture#getTimestamp()}.</p>
+         * {@link android.graphics.SurfaceTexture#getTimestamp()}.
+         * The frame number included is equal to the frame number that will be included in
+         * {@link CaptureResult#getFrameNumber}.</p>
          *
          * <p>For the simplest way to play a shutter sound camera shutter or a
          * video recording start/stop sound, see the
@@ -487,10 +496,21 @@
          * @param session the session returned by {@link CameraDevice#createCaptureSession}
          * @param request the request for the capture that just begun
          * @param timestamp the timestamp at start of capture, in nanoseconds.
+         * @param frameNumber the frame number for this capture
          *
          * @see android.media.MediaActionSound
          */
         public void onCaptureStarted(CameraCaptureSession session,
+                CaptureRequest request, long timestamp, long frameNumber) {
+            // Temporary trampoline for API change transition
+            onCaptureStarted(session, request, timestamp);
+        }
+
+        /**
+         * Temporary for API change transition
+         * @hide
+         */
+        public void onCaptureStarted(CameraCaptureSession session,
                 CaptureRequest request, long timestamp) {
             // default empty implementation
         }
@@ -625,7 +645,7 @@
         }
 
         /**
-         * This method is called independently of the others in CaptureListener,
+         * This method is called independently of the others in CaptureCallback,
          * when a capture sequence finishes and all {@link CaptureResult}
          * or {@link CaptureFailure} for it have been returned via this listener.
          *
@@ -655,7 +675,7 @@
         }
 
         /**
-         * This method is called independently of the others in CaptureListener,
+         * This method is called independently of the others in CaptureCallback,
          * when a capture sequence aborts before any {@link CaptureResult}
          * or {@link CaptureFailure} for it have been returned via this listener.
          *
@@ -684,4 +704,11 @@
         }
     }
 
+    /**
+     * Temporary for migrating to Callback naming
+     * @hide
+     */
+    public static abstract class CaptureListener extends CaptureCallback {
+    }
+
 }
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 6a9d565..0bb742c 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -199,8 +199,8 @@
      * <p>It can take several hundred milliseconds for the session's configuration to complete,
      * since camera hardware may need to be powered on or reconfigured. Once the configuration is
      * complete and the session is ready to actually capture data, the provided
-     * {@link CameraCaptureSession.StateListener}'s
-     * {@link CameraCaptureSession.StateListener#onConfigured} callback will be called.</p>
+     * {@link CameraCaptureSession.StateCallback}'s
+     * {@link CameraCaptureSession.StateCallback#onConfigured} callback will be called.</p>
      *
      * <p>If a prior CameraCaptureSession already exists when a new one is created, the previous
      * session is closed. Any in-progress capture requests made on the prior session will be
@@ -216,14 +216,136 @@
      * <p>Configuring a session with an empty or null list will close the current session, if
      * any. This can be used to release the current session's target surfaces for another use.</p>
      *
+     * <p>While any of the sizes from {@link StreamConfigurationMap#getOutputSizes} can be used when
+     * a single output stream is configured, a given camera device may not be able to support all
+     * combination of sizes, formats, and targets when multiple outputs are configured at once.  The
+     * tables below list the maximum guaranteed resolutions for combinations of streams and targets,
+     * given the capabilities of the camera device.</p>
+     *
+     * <p>If an application tries to create a session using a set of targets that exceed the limits
+     * described in the below tables, one of three possibilities may occur. First, the session may
+     * be successfully created and work normally. Second, the session may be successfully created,
+     * but the camera device won't meet the frame rate guarantees as described in
+     * {@link StreamConfigurationMap#getOutputMinFrameDuration}. Or third, if the output set
+     * cannot be used at all, session creation will fail entirely, with
+     * {@link CameraCaptureSession.StateListener#onConfigureFailed} being invoked.</p>
+     *
+     * <p>For the type column, {@code PRIV} refers to any target whose available sizes are found
+     * using {@link StreamConfigurationMap#getOutputSizes(Class)} with no direct application-visible
+     * format, {@code YUV} refers to a target Surface using the
+     * {@link android.graphics.ImageFormat#YUV_420_888} format, {@code JPEG} refers to the
+     * {@link android.graphics.ImageFormat#JPEG} format, and {@code RAW} refers to the
+     * {@link android.graphics.ImageFormat#RAW_SENSOR} format.</p>
+     *
+     * <p>For the maximum size column, {@code PREVIEW} refers to the best size match to the
+     * device's screen resolution, or to 1080p ({@code 1920x1080}), whichever is
+     * smaller. {@code RECORD} refers to the camera device's maximum supported recording resolution,
+     * as determined by {@link android.media.CamcorderProfile}. And {@code MAXIMUM} refers to the
+     * camera device's maximum output resolution for that format or target from
+     * {@link StreamConfigurationMap#getOutputSizes}.</p>
+     *
+     * <p>To use these tables, determine the number and the formats/targets of outputs needed, and
+     * find the row(s) of the table with those targets. The sizes indicate the maximum set of sizes
+     * that can be used; it is guaranteed that for those targets, the listed sizes and anything
+     * smaller from the list given by {@link StreamConfigurationMap#getOutputSizes} can be
+     * successfully used to create a session.  For example, if a row indicates that a 8 megapixel
+     * (MP) YUV_420_888 output can be used together with a 2 MP {@code PRIV} output, then a session
+     * can be created with targets {@code [8 MP YUV, 2 MP PRIV]} or targets {@code [2 MP YUV, 2 MP
+     * PRIV]}; but a session with targets {@code [8 MP YUV, 4 MP PRIV]}, targets {@code [4 MP YUV, 4
+     * MP PRIV]}, or targets {@code [8 MP PRIV, 2 MP YUV]} would not be guaranteed to work, unless
+     * some other row of the table lists such a combination.</p>
+     *
+     * <style scoped>
+     *  #rb { border-right-width: thick; }
+     * </style>
+     * <p>Legacy devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
+     * {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}) support at
+     * least the following stream combinations:
+     *
+     * <table>
+     * <tr><th colspan="7">LEGACY-level guaranteed configurations</th></tr>
+     * <tr> <th colspan="2" id="rb">Target 1</th> <th colspan="2" id="rb">Target 2</th>  <th colspan="2" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr>
+     * <tr> <th>Type</th><th id="rb">Max size</th> <th>Type</th><th id="rb">Max size</th> <th>Type</th><th id="rb">Max size</th></tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td colspan="2" id="rb"></td> <td>Simple preview, GPU video processing, or no-preview video recording.</td> </tr>
+     * <tr> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td colspan="2" id="rb"></td> <td>No-viewfinder still image capture.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td colspan="2" id="rb"></td> <td>In-application video/image processing.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>Standard still imaging.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>In-app processing plus still capture.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td colspan="2" id="rb"></td> <td>Standard recording.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td colspan="2" id="rb"></td> <td>Preview plus in-app processing.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td>Still capture plus in-app processing.</td> </tr>
+     * </table><br>
+     * </p>
+     *
+     * <p>Limited-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
+     * {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}) devices
+     * support at least the following stream combinations in addition to those for
+     * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY} devices:
+     *
+     * <table>
+     * <tr><th colspan="7">LIMITED-level additional guaranteed configurations</th></tr>
+     * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr>
+     * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code RECORD }</td> <td colspan="2" id="rb"></td> <td>High-resolution video recording with preview.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code RECORD }</td> <td colspan="2" id="rb"></td> <td>High-resolution in-app video processing with preview.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code RECORD }</td> <td colspan="2" id="rb"></td> <td>Two-input in-app video processing.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code RECORD }</td> <td>{@code JPEG}</td><td id="rb">{@code RECORD }</td> <td>High-resolution recording with video snapshot.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code RECORD }</td> <td>{@code JPEG}</td><td id="rb">{@code RECORD }</td> <td>High-resolution in-app processing with video snapshot.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td>Two-input in-app processing with still capture.</td> </tr>
+     * </table><br>
+     * </p>
+     *
+     * <p>FULL-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
+     * {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) devices
+     * support at least the following stream combinations in addition to those for
+     * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices:
+     *
+     * <table>
+     * <tr><th colspan="7">FULL-capability additional guaranteed configurations</th></tr>
+     * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr>
+     * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>Maximum-resolution GPU processing with preview.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>Maximum-resolution in-app processing with preview.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>Maximum-resolution two-input in-app processsing.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td>Video recording with maximum-size video snapshot</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code 640x480}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td>Standard video recording plus maximum-resolution in-app processing.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code 640x480}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code MAXIMUM}</td> <td>Preview plus two-input maximum-resolution in-app processing.</td> </tr>
+     * </table><br>
+     * </p>
+     *
+     * <p>RAW-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES} includes
+     * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}) devices additionally support
+     * at least the following stream combinations on both
+     * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL} and
+     * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices:
+     *
+     * <table>
+     * <tr><th colspan="7">RAW-capability additional guaranteed configurations</th></tr>
+     * <tr><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr>
+     * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th> </tr>
+     * <tr> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td colspan="2" id="rb"></td> <td>No-preview DNG capture.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>Standard DNG capture.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td colspan="2" id="rb"></td> <td>In-app processing plus DNG capture.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td>Video recording with DNG capture.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td>Preview with in-app processing and DNG capture.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td>Two-input in-app processing plus DNG capture.</td> </tr>
+     * <tr> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td>Still capture with simultaneous JPEG and DNG.</td> </tr>
+     * <tr> <td>{@code YUV }</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code RAW }</td><td id="rb">{@code MAXIMUM}</td> <td>In-app processing with simultaneous JPEG and DNG.</td> </tr>
+     * </table><br>
+     * </p>
+     *
+     * <p>Since the capabilities of camera devices vary greatly, a given camera device may support
+     * target combinations with sizes outside of these guarantees, but this can only be tested for
+     * by attempting to create a session with such targets.</p>
+     *
      * @param outputs The new set of Surfaces that should be made available as
      *                targets for captured image data.
-     * @param listener The listener to notify about the status of the new capture session.
-     * @param handler The handler on which the listener should be invoked, or {@code null} to use
+     * @param callback The callback to notify about the status of the new capture session.
+     * @param handler The handler on which the callback should be invoked, or {@code null} to use
      *                the current thread's {@link android.os.Looper looper}.
      *
      * @throws IllegalArgumentException if the set of output Surfaces do not meet the requirements,
-     *                                  the listener is null, or the handler is null but the current
+     *                                  the callback is null, or the handler is null but the current
      *                                  thread has no looper.
      * @throws CameraAccessException if the camera device is no longer connected or has
      *                               encountered a fatal error
@@ -235,7 +357,7 @@
      * @see StreamConfigurationMap#getOutputSizes(Class)
      */
     public abstract void createCaptureSession(List<Surface> outputs,
-            CameraCaptureSession.StateListener listener, Handler handler)
+            CameraCaptureSession.StateCallback callback, Handler handler)
             throws CameraAccessException;
 
     /**
@@ -271,10 +393,10 @@
      *
      * <p>Immediately after this call, all calls to the camera device or active session interface
      * will throw a {@link IllegalStateException}, except for calls to close(). Once the device has
-     * fully shut down, the {@link StateListener#onClosed} callback will be called, and the camera
+     * fully shut down, the {@link StateCallback#onClosed} callback will be called, and the camera
      * is free to be re-opened.</p>
      *
-     * <p>Immediately after this call, besides the final {@link StateListener#onClosed} calls, no
+     * <p>Immediately after this call, besides the final {@link StateCallback#onClosed} calls, no
      * further callbacks from the device or the active session will occur, and any remaining
      * submitted capture requests will be discarded, as if
      * {@link CameraCaptureSession#abortCaptures} had been called, except that no success or failure
@@ -285,24 +407,24 @@
     public abstract void close();
 
     /**
-     * A listener for notifications about the state of a camera
-     * device.
+     * A callback objects for receiving updates about the state of a camera device.
      *
-     * <p>A listener must be provided to the {@link CameraManager#openCamera}
-     * method to open a camera device.</p>
+     * <p>A callback instance must be provided to the {@link CameraManager#openCamera} method to
+     * open a camera device.</p>
      *
-     * <p>These events include notifications about the device completing startup (
+     * <p>These state updates include notifications about the device completing startup (
      * allowing for {@link #createCaptureSession} to be called), about device
      * disconnection or closure, and about unexpected device errors.</p>
      *
      * <p>Events about the progress of specific {@link CaptureRequest CaptureRequests} are provided
-     * through a {@link CameraCaptureSession.CaptureListener} given to the
+     * through a {@link CameraCaptureSession.CaptureCallback} given to the
      * {@link CameraCaptureSession#capture}, {@link CameraCaptureSession#captureBurst},
-     * {@link CameraCaptureSession#setRepeatingRequest}, or {@link CameraCaptureSession#setRepeatingBurst} methods.
+     * {@link CameraCaptureSession#setRepeatingRequest}, or
+     * {@link CameraCaptureSession#setRepeatingBurst} methods.
      *
      * @see CameraManager#openCamera
      */
-    public static abstract class StateListener {
+    public static abstract class StateCallback {
        /**
          * An error code that can be reported by {@link #onError}
          * indicating that the camera device is in use already.
@@ -408,7 +530,7 @@
          * of a removable camera device; or the camera being needed for a
          * higher-priority use case.</p>
          *
-         * <p>There may still be capture listener callbacks that are called
+         * <p>There may still be capture callbacks that are invoked
          * after this method is called, or new image buffers that are delivered
          * to active outputs.</p>
          *
@@ -417,7 +539,7 @@
          *
          * <p>You should clean up the camera with {@link CameraDevice#close} after
          * this happens, as it is not recoverable until opening the camera again
-         * after it becomes {@link CameraManager.AvailabilityListener#onCameraAvailable available}.
+         * after it becomes {@link CameraManager.AvailabilityCallback#onCameraAvailable available}.
          * </p>
          *
          * @param camera the device that has been disconnected
@@ -436,7 +558,7 @@
          * {@link CameraAccessException#CAMERA_ERROR CAMERA_ERROR} reason.
          * </p>
          *
-         * <p>There may still be capture completion or camera stream listeners
+         * <p>There may still be capture completion or camera stream callbacks
          * that will be called after this error is received.</p>
          *
          * <p>You should clean up the camera with {@link CameraDevice#close} after
@@ -444,7 +566,7 @@
          *
          * @param camera The device reporting the error
          * @param error The error code, one of the
-         *     {@code StateListener.ERROR_*} values.
+         *     {@code StateCallback.ERROR_*} values.
          *
          * @see #ERROR_CAMERA_DEVICE
          * @see #ERROR_CAMERA_SERVICE
@@ -455,6 +577,13 @@
     }
 
     /**
+     * Temporary for migrating to Callback naming
+     * @hide
+     */
+    public static abstract class StateListener extends StateCallback {
+    }
+
+    /**
      * To be inherited by android.hardware.camera2.* code only.
      * @hide
      */
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index a4a1559..9a9e4c2 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -69,8 +69,8 @@
 
     private ArrayList<String> mDeviceIdList;
 
-    private final ArrayMap<AvailabilityListener, Handler> mListenerMap =
-            new ArrayMap<AvailabilityListener, Handler>();
+    private final ArrayMap<AvailabilityCallback, Handler> mCallbackMap =
+            new ArrayMap<AvailabilityCallback, Handler>();
 
     private final Context mContext;
     private final Object mLock = new Object();
@@ -108,19 +108,19 @@
     }
 
     /**
-     * Register a listener to be notified about camera device availability.
+     * Register a callback to be notified about camera device availability.
      *
-     * <p>Registering the same listener again will replace the handler with the
+     * <p>Registering the same callback again will replace the handler with the
      * new one provided.</p>
      *
-     * <p>The first time a listener is registered, it is immediately called
+     * <p>The first time a callback is registered, it is immediately called
      * with the availability status of all currently known camera devices.</p>
      *
-     * @param listener The new listener to send camera availability notices to
-     * @param handler The handler on which the listener should be invoked, or
+     * @param callback the new callback to send camera availability notices to
+     * @param handler The handler on which the callback should be invoked, or
      * {@code null} to use the current thread's {@link android.os.Looper looper}.
      */
-    public void addAvailabilityListener(AvailabilityListener listener, Handler handler) {
+    public void registerAvailabilityCallback(AvailabilityCallback callback, Handler handler) {
         if (handler == null) {
             Looper looper = Looper.myLooper();
             if (looper == null) {
@@ -131,25 +131,25 @@
         }
 
         synchronized (mLock) {
-            Handler oldHandler = mListenerMap.put(listener, handler);
-            // For new listeners, provide initial availability information
+            Handler oldHandler = mCallbackMap.put(callback, handler);
+            // For new callbacks, provide initial availability information
             if (oldHandler == null) {
-                mServiceListener.updateListenerLocked(listener, handler);
+                mServiceListener.updateCallbackLocked(callback, handler);
             }
         }
     }
 
     /**
-     * Remove a previously-added listener; the listener will no longer receive
-     * connection and disconnection callbacks.
+     * Remove a previously-added callback; the callback will no longer receive connection and
+     * disconnection callbacks.
      *
-     * <p>Removing a listener that isn't registered has no effect.</p>
+     * <p>Removing a callback that isn't registered has no effect.</p>
      *
-     * @param listener The listener to remove from the notification list
+     * @param callback The callback to remove from the notification list
      */
-    public void removeAvailabilityListener(AvailabilityListener listener) {
+    public void unregisterAvailabilityCallback(AvailabilityCallback callback) {
         synchronized (mLock) {
-            mListenerMap.remove(listener);
+            mCallbackMap.remove(callback);
         }
     }
 
@@ -228,8 +228,8 @@
      * Helper for openning a connection to a camera with the given ID.
      *
      * @param cameraId The unique identifier of the camera device to open
-     * @param listener The listener for the camera. Must not be null.
-     * @param handler  The handler to call the listener on. Must not be null.
+     * @param callback The callback for the camera. Must not be null.
+     * @param handler  The handler to invoke the callback on. Must not be null.
      *
      * @throws CameraAccessException if the camera is disabled by device policy,
      * or too many camera devices are already open, or the cameraId does not match
@@ -237,14 +237,14 @@
      *
      * @throws SecurityException if the application does not have permission to
      * access the camera
-     * @throws IllegalArgumentException if listener or handler is null.
+     * @throws IllegalArgumentException if callback or handler is null.
      * @return A handle to the newly-created camera device.
      *
      * @see #getCameraIdList
      * @see android.app.admin.DevicePolicyManager#setCameraDisabled
      */
     private CameraDevice openCameraDeviceUserAsync(String cameraId,
-            CameraDevice.StateListener listener, Handler handler)
+            CameraDevice.StateCallback callback, Handler handler)
             throws CameraAccessException {
         CameraCharacteristics characteristics = getCameraCharacteristics(cameraId);
         CameraDevice device = null;
@@ -257,7 +257,7 @@
                 android.hardware.camera2.impl.CameraDeviceImpl deviceImpl =
                         new android.hardware.camera2.impl.CameraDeviceImpl(
                                 cameraId,
-                                listener,
+                                callback,
                                 handler,
                                 characteristics);
 
@@ -313,7 +313,7 @@
                     throw ce.asChecked();
                 }
 
-                // TODO: factor out listener to be non-nested, then move setter to constructor
+                // TODO: factor out callback to be non-nested, then move setter to constructor
                 // For now, calling setRemoteDevice will fire initial
                 // onOpened/onUnconfigured callbacks.
                 deviceImpl.setRemoteDevice(cameraUser);
@@ -337,7 +337,7 @@
      * is disconnected between the calls to {@link #getCameraIdList} and
      * {@link #openCamera}.</p>
      *
-     * <p>Once the camera is successfully opened, {@link CameraDevice.StateListener#onOpened} will
+     * <p>Once the camera is successfully opened, {@link CameraDevice.StateCallback#onOpened} will
      * be invoked with the newly opened {@link CameraDevice}. The camera device can then be set up
      * for operation by calling {@link CameraDevice#createCaptureSession} and
      * {@link CameraDevice#createCaptureRequest}</p>
@@ -345,31 +345,31 @@
      * <!--
      * <p>Since the camera device will be opened asynchronously, any asynchronous operations done
      * on the returned CameraDevice instance will be queued up until the device startup has
-     * completed and the listener's {@link CameraDevice.StateListener#onOpened onOpened} method is
+     * completed and the callback's {@link CameraDevice.StateCallback#onOpened onOpened} method is
      * called. The pending operations are then processed in order.</p>
      * -->
      * <p>If the camera becomes disconnected during initialization
      * after this function call returns,
-     * {@link CameraDevice.StateListener#onDisconnected} with a
+     * {@link CameraDevice.StateCallback#onDisconnected} with a
      * {@link CameraDevice} in the disconnected state (and
-     * {@link CameraDevice.StateListener#onOpened} will be skipped).</p>
+     * {@link CameraDevice.StateCallback#onOpened} will be skipped).</p>
      *
-     * <p>If opening the camera device fails, then the device listener's
-     * {@link CameraDevice.StateListener#onError onError} method will be called, and subsequent
+     * <p>If opening the camera device fails, then the device callback's
+     * {@link CameraDevice.StateCallback#onError onError} method will be called, and subsequent
      * calls on the camera device will throw a {@link CameraAccessException}.</p>
      *
      * @param cameraId
      *             The unique identifier of the camera device to open
-     * @param listener
-     *             The listener which is invoked once the camera is opened
+     * @param callback
+     *             The callback which is invoked once the camera is opened
      * @param handler
-     *             The handler on which the listener should be invoked, or
+     *             The handler on which the callback should be invoked, or
      *             {@code null} to use the current thread's {@link android.os.Looper looper}.
      *
      * @throws CameraAccessException if the camera is disabled by device policy,
      * or the camera has become or was disconnected.
      *
-     * @throws IllegalArgumentException if cameraId or the listener was null,
+     * @throws IllegalArgumentException if cameraId or the callback was null,
      * or the cameraId does not match any currently or previously available
      * camera device.
      *
@@ -379,14 +379,14 @@
      * @see #getCameraIdList
      * @see android.app.admin.DevicePolicyManager#setCameraDisabled
      */
-    public void openCamera(String cameraId, final CameraDevice.StateListener listener,
+    public void openCamera(String cameraId, final CameraDevice.StateCallback callback,
             Handler handler)
             throws CameraAccessException {
 
         if (cameraId == null) {
             throw new IllegalArgumentException("cameraId was null");
-        } else if (listener == null) {
-            throw new IllegalArgumentException("listener was null");
+        } else if (callback == null) {
+            throw new IllegalArgumentException("callback was null");
         } else if (handler == null) {
             if (Looper.myLooper() != null) {
                 handler = new Handler();
@@ -396,11 +396,11 @@
             }
         }
 
-        openCameraDeviceUserAsync(cameraId, listener, handler);
+        openCameraDeviceUserAsync(cameraId, callback, handler);
     }
 
     /**
-     * A listener for camera devices becoming available or
+     * A callback for camera devices becoming available or
      * unavailable to open.
      *
      * <p>Cameras become available when they are no longer in use, or when a new
@@ -408,13 +408,13 @@
      * application or service starts using a camera, or when a removable camera
      * is disconnected.</p>
      *
-     * <p>Extend this listener and pass an instance of the subclass to
-     * {@link CameraManager#addAvailabilityListener} to be notified of such availability
+     * <p>Extend this callback and pass an instance of the subclass to
+     * {@link CameraManager#registerAvailabilityCallback} to be notified of such availability
      * changes.</p>
      *
-     * @see addAvailabilityListener
+     * @see registerAvailabilityCallback
      */
-    public static abstract class AvailabilityListener {
+    public static abstract class AvailabilityCallback {
 
         /**
          * A new camera has become available to use.
@@ -432,7 +432,7 @@
          *
          * <p>If an application had an active CameraDevice instance for the
          * now-disconnected camera, that application will receive a
-         * {@link CameraDevice.StateListener#onDisconnected disconnection error}.</p>
+         * {@link CameraDevice.StateCallback#onDisconnected disconnection error}.</p>
          *
          * <p>The default implementation of this method does nothing.</p>
          *
@@ -444,6 +444,13 @@
     }
 
     /**
+     * Temporary for migrating to Callback naming
+     * @hide
+     */
+    public static abstract class AvailabilityListener extends AvailabilityCallback {
+    }
+
+    /**
      * Return or create the list of currently connected camera devices.
      *
      * <p>In case of errors connecting to the camera service, will return an empty list.</p>
@@ -707,14 +714,14 @@
             }
         }
 
-        private void postSingleUpdate(final AvailabilityListener listener, final Handler handler,
+        private void postSingleUpdate(final AvailabilityCallback callback, final Handler handler,
                 final String id, final int status) {
             if (isAvailable(status)) {
                 handler.post(
                     new Runnable() {
                         @Override
                         public void run() {
-                            listener.onCameraAvailable(id);
+                            callback.onCameraAvailable(id);
                         }
                     });
             } else {
@@ -722,7 +729,7 @@
                     new Runnable() {
                         @Override
                         public void run() {
-                            listener.onCameraUnavailable(id);
+                            callback.onCameraUnavailable(id);
                         }
                     });
             }
@@ -732,11 +739,11 @@
          * Send the state of all known cameras to the provided listener, to initialize
          * the listener's knowledge of camera state.
          */
-        public void updateListenerLocked(AvailabilityListener listener, Handler handler) {
+        public void updateCallbackLocked(AvailabilityCallback callback, Handler handler) {
             for (int i = 0; i < mDeviceStatus.size(); i++) {
                 String id = mDeviceStatus.keyAt(i);
                 Integer status = mDeviceStatus.valueAt(i);
-                postSingleUpdate(listener, handler, id, status);
+                postSingleUpdate(callback, handler, id, status);
             }
         }
 
@@ -795,12 +802,12 @@
                 return;
             }
 
-            final int listenerCount = mListenerMap.size();
-            for (int i = 0; i < listenerCount; i++) {
-                Handler handler = mListenerMap.valueAt(i);
-                final AvailabilityListener listener = mListenerMap.keyAt(i);
+            final int callbackCount = mCallbackMap.size();
+            for (int i = 0; i < callbackCount; i++) {
+                Handler handler = mCallbackMap.valueAt(i);
+                final AvailabilityCallback callback = mCallbackMap.keyAt(i);
 
-                postSingleUpdate(listener, handler, id, status);
+                postSingleUpdate(callback, handler, id, status);
             }
         } // onStatusChangedLocked
 
diff --git a/core/java/android/hardware/camera2/CaptureFailure.java b/core/java/android/hardware/camera2/CaptureFailure.java
index b6d3b08..c168ff1 100644
--- a/core/java/android/hardware/camera2/CaptureFailure.java
+++ b/core/java/android/hardware/camera2/CaptureFailure.java
@@ -65,12 +65,12 @@
      * Get the request associated with this failed capture.
      *
      * <p>Whenever a request is unsuccessfully captured, with
-     * {@link CameraCaptureSession.CaptureListener#onCaptureFailed},
+     * {@link CameraCaptureSession.CaptureCallback#onCaptureFailed},
      * the {@code failed capture}'s {@code getRequest()} will return that {@code request}.
      * </p>
      *
      * <p>In particular,
-     * <code><pre>cameraDevice.capture(someRequest, new CaptureListener() {
+     * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() {
      *     {@literal @}Override
      *     void onCaptureFailed(CaptureRequest myRequest, CaptureFailure myFailure) {
      *         assert(myFailure.getRequest.equals(myRequest) == true);
@@ -135,7 +135,7 @@
      *
      * @return int The ID for the sequence of requests that this capture failure is the result of
      *
-     * @see CameraDevice.CaptureListener#onCaptureSequenceCompleted
+     * @see CameraDevice.CaptureCallback#onCaptureSequenceCompleted
      */
     public int getSequenceId() {
         return mSequenceId;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index bcdcd62..93eb3de 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -245,7 +245,7 @@
      * <p>This tag is not used for anything by the camera device, but can be
      * used by an application to easily identify a CaptureRequest when it is
      * returned by
-     * {@link CameraCaptureSession.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted}
+     * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted}
      * </p>
      *
      * @return the last tag Object set on this request, or {@code null} if
@@ -435,7 +435,7 @@
          * <p>This tag is not used for anything by the camera device, but can be
          * used by an application to easily identify a CaptureRequest when it is
          * returned by
-         * {@link CameraCaptureSession.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted}
+         * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted}
          *
          * @param tag an arbitrary Object to store with this request
          * @see CaptureRequest#getTag
@@ -731,6 +731,8 @@
     /**
      * <p>List of areas to use for
      * metering.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -746,7 +748,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
@@ -820,6 +824,8 @@
     /**
      * <p>List of areas to use for focus
      * estimation.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -835,7 +841,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
@@ -921,6 +929,8 @@
     /**
      * <p>List of areas to use for illuminant
      * estimation.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -936,7 +946,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index f9c4df4..01276a2 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -268,13 +268,13 @@
      * Get the request associated with this result.
      *
      * <p>Whenever a request has been fully or partially captured, with
-     * {@link CameraCaptureSession.CaptureListener#onCaptureCompleted} or
-     * {@link CameraCaptureSession.CaptureListener#onCaptureProgressed}, the {@code result}'s
+     * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted} or
+     * {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed}, the {@code result}'s
      * {@code getRequest()} will return that {@code request}.
      * </p>
      *
      * <p>For example,
-     * <code><pre>cameraDevice.capture(someRequest, new CaptureListener() {
+     * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() {
      *     {@literal @}Override
      *     void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) {
      *         assert(myResult.getRequest.equals(myRequest) == true);
@@ -314,8 +314,8 @@
      *
      * @return int The ID for the sequence of requests that this capture result is a part of
      *
-     * @see CameraDevice.CaptureListener#onCaptureSequenceCompleted
-     * @see CameraDevice.CaptureListener#onCaptureSequenceAborted
+     * @see CameraDevice.CaptureCallback#onCaptureSequenceCompleted
+     * @see CameraDevice.CaptureCallback#onCaptureSequenceAborted
      */
     public int getSequenceId() {
         return mSequenceId;
@@ -582,6 +582,8 @@
     /**
      * <p>List of areas to use for
      * metering.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -597,7 +599,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
@@ -870,6 +874,8 @@
     /**
      * <p>List of areas to use for focus
      * estimation.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -885,7 +891,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
@@ -1369,6 +1377,8 @@
     /**
      * <p>List of areas to use for illuminant
      * estimation.</p>
+     * <p>Optional. Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
+     * Otherwise will always be present.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
      * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
@@ -1384,7 +1394,9 @@
      * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
      * the camera device will ignore the sections outside the region and output the
      * used sections in the result metadata.</p>
+     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
      *
+     * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
      * @see CaptureRequest#SCALER_CROP_REGION
      * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
      */
diff --git a/core/java/android/hardware/camera2/TotalCaptureResult.java b/core/java/android/hardware/camera2/TotalCaptureResult.java
index 0895fe3..6f7dd78 100644
--- a/core/java/android/hardware/camera2/TotalCaptureResult.java
+++ b/core/java/android/hardware/camera2/TotalCaptureResult.java
@@ -45,7 +45,7 @@
  *
  * <p>{@link TotalCaptureResult} objects are immutable.</p>
  *
- * @see CameraDevice.CaptureListener#onCaptureCompleted
+ * @see CameraDevice.CaptureCallback#onCaptureCompleted
  */
 public final class TotalCaptureResult extends CaptureResult {
 
@@ -88,7 +88,7 @@
      *
      * <p>The list size will be inclusive between {@code 0} and
      * {@link CameraCharacteristics#REQUEST_PARTIAL_RESULT_COUNT}, with elements in ascending order
-     * of when {@link CameraCaptureSession.CaptureListener#onCaptureProgressed} was invoked.</p>
+     * of when {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed} was invoked.</p>
      *
      * @return unmodifiable list of partial results
      */
diff --git a/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java b/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
index 02c3d87..c66a3a4 100644
--- a/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
+++ b/core/java/android/hardware/camera2/dispatch/MethodNameInvoker.java
@@ -48,7 +48,8 @@
     /**
      * Invoke a method by its name.
      *
-     * <p>If more than one method exists in {@code targetClass}, the first method will be used.</p>
+     * <p>If more than one method exists in {@code targetClass}, the first method with the right
+     * number of arguments will be used, and later calls will all use that method.</p>
      *
      * @param methodName
      *          The name of the method, which will be matched 1:1 to the destination method
@@ -68,8 +69,9 @@
         Method targetMethod = mMethods.get(methodName);
         if (targetMethod == null) {
             for (Method method : mTargetClass.getMethods()) {
-                // TODO future: match by # of params and types of params if possible
-                if (method.getName().equals(methodName)) {
+                // TODO future: match types of params if possible
+                if (method.getName().equals(methodName) &&
+                        (params.length == method.getParameterTypes().length) ) {
                     targetMethod = method;
                     mMethods.put(methodName, targetMethod);
                     break;
diff --git a/core/java/android/hardware/camera2/impl/ListenerProxies.java b/core/java/android/hardware/camera2/impl/CallbackProxies.java
similarity index 83%
rename from core/java/android/hardware/camera2/impl/ListenerProxies.java
rename to core/java/android/hardware/camera2/impl/CallbackProxies.java
index f44f9ad..f0217ac 100644
--- a/core/java/android/hardware/camera2/impl/ListenerProxies.java
+++ b/core/java/android/hardware/camera2/impl/CallbackProxies.java
@@ -27,22 +27,22 @@
 import static com.android.internal.util.Preconditions.*;
 
 /**
- * Proxy out invocations to the camera2 API listeners into a {@link Dispatchable}.
+ * Proxy out invocations to the camera2 API callbacks into a {@link Dispatchable}.
  *
  * <p>Since abstract classes do not support Java's dynamic {@code Proxy}, we have to
  * to use our own proxy mechanism.</p>
  */
-public class ListenerProxies {
+public class CallbackProxies {
 
     // TODO: replace with codegen
 
-    public static class DeviceStateListenerProxy extends CameraDeviceImpl.StateListenerKK {
-        private final MethodNameInvoker<CameraDeviceImpl.StateListenerKK> mProxy;
+    public static class DeviceStateCallbackProxy extends CameraDeviceImpl.StateCallbackKK {
+        private final MethodNameInvoker<CameraDeviceImpl.StateCallbackKK> mProxy;
 
-        public DeviceStateListenerProxy(
-                Dispatchable<CameraDeviceImpl.StateListenerKK> dispatchTarget) {
+        public DeviceStateCallbackProxy(
+                Dispatchable<CameraDeviceImpl.StateCallbackKK> dispatchTarget) {
             dispatchTarget = checkNotNull(dispatchTarget, "dispatchTarget must not be null");
-            mProxy = new MethodNameInvoker<>(dispatchTarget, CameraDeviceImpl.StateListenerKK.class);
+            mProxy = new MethodNameInvoker<>(dispatchTarget, CameraDeviceImpl.StateCallbackKK.class);
         }
 
         @Override
@@ -87,19 +87,19 @@
     }
 
     @SuppressWarnings("deprecation")
-    public static class DeviceCaptureListenerProxy extends CameraDeviceImpl.CaptureListener {
-        private final MethodNameInvoker<CameraDeviceImpl.CaptureListener> mProxy;
+    public static class DeviceCaptureCallbackProxy extends CameraDeviceImpl.CaptureCallback {
+        private final MethodNameInvoker<CameraDeviceImpl.CaptureCallback> mProxy;
 
-        public DeviceCaptureListenerProxy(
-                Dispatchable<CameraDeviceImpl.CaptureListener> dispatchTarget) {
+        public DeviceCaptureCallbackProxy(
+                Dispatchable<CameraDeviceImpl.CaptureCallback> dispatchTarget) {
             dispatchTarget = checkNotNull(dispatchTarget, "dispatchTarget must not be null");
-            mProxy = new MethodNameInvoker<>(dispatchTarget, CameraDeviceImpl.CaptureListener.class);
+            mProxy = new MethodNameInvoker<>(dispatchTarget, CameraDeviceImpl.CaptureCallback.class);
         }
 
         @Override
         public void onCaptureStarted(CameraDevice camera,
-                CaptureRequest request, long timestamp) {
-            mProxy.invoke("onCaptureStarted", camera, request, timestamp);
+                CaptureRequest request, long timestamp, long frameNumber) {
+            mProxy.invoke("onCaptureStarted", camera, request, timestamp, frameNumber);
         }
 
         @Override
@@ -139,15 +139,15 @@
         }
     }
 
-    public static class SessionStateListenerProxy
-            extends CameraCaptureSession.StateListener {
-        private final MethodNameInvoker<CameraCaptureSession.StateListener> mProxy;
+    public static class SessionStateCallbackProxy
+            extends CameraCaptureSession.StateCallback {
+        private final MethodNameInvoker<CameraCaptureSession.StateCallback> mProxy;
 
-        public SessionStateListenerProxy(
-                Dispatchable<CameraCaptureSession.StateListener> dispatchTarget) {
+        public SessionStateCallbackProxy(
+                Dispatchable<CameraCaptureSession.StateCallback> dispatchTarget) {
             dispatchTarget = checkNotNull(dispatchTarget, "dispatchTarget must not be null");
             mProxy = new MethodNameInvoker<>(dispatchTarget,
-                    CameraCaptureSession.StateListener.class);
+                    CameraCaptureSession.StateCallback.class);
         }
 
         @Override
@@ -177,7 +177,7 @@
         }
     }
 
-    private ListenerProxies() {
+    private CallbackProxies() {
         throw new AssertionError();
     }
 }
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index 9ca1fba..0057f61 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -45,11 +45,11 @@
     /** User-specified set of surfaces used as the configuration outputs */
     private final List<Surface> mOutputs;
     /**
-     * User-specified state listener, used for outgoing events; calls to this object will be
+     * User-specified state callback, used for outgoing events; calls to this object will be
      * automatically {@link Handler#post(Runnable) posted} to {@code mStateHandler}.
      */
-    private final CameraCaptureSession.StateListener mStateListener;
-    /** User-specified state handler used for outgoing state listener events */
+    private final CameraCaptureSession.StateCallback mStateCallback;
+    /** User-specified state handler used for outgoing state callback events */
     private final Handler mStateHandler;
 
     /** Internal camera device; used to translate calls into existing deprecated API */
@@ -84,28 +84,28 @@
      * (e.g. no pending captures, no repeating requests, no flush).</p>
      */
     CameraCaptureSessionImpl(List<Surface> outputs,
-            CameraCaptureSession.StateListener listener, Handler stateHandler,
+            CameraCaptureSession.StateCallback callback, Handler stateHandler,
             android.hardware.camera2.impl.CameraDeviceImpl deviceImpl,
             Handler deviceStateHandler, boolean configureSuccess) {
         if (outputs == null || outputs.isEmpty()) {
             throw new IllegalArgumentException("outputs must be a non-null, non-empty list");
-        } else if (listener == null) {
-            throw new IllegalArgumentException("listener must not be null");
+        } else if (callback == null) {
+            throw new IllegalArgumentException("callback must not be null");
         }
 
         // TODO: extra verification of outputs
         mOutputs = outputs;
         mStateHandler = checkHandler(stateHandler);
-        mStateListener = createUserStateListenerProxy(mStateHandler, listener);
+        mStateCallback = createUserStateCallbackProxy(mStateHandler, callback);
 
         mDeviceHandler = checkNotNull(deviceStateHandler, "deviceStateHandler must not be null");
         mDeviceImpl = checkNotNull(deviceImpl, "deviceImpl must not be null");
 
         /*
-         * Use the same handler as the device's StateListener for all the internal coming events
+         * Use the same handler as the device's StateCallback for all the internal coming events
          *
-         * This ensures total ordering between CameraDevice.StateListener and
-         * CameraDeviceImpl.CaptureListener events.
+         * This ensures total ordering between CameraDevice.StateCallback and
+         * CameraDeviceImpl.CaptureCallback events.
          */
         mSequenceDrainer = new TaskDrainer<>(mDeviceHandler, new SequenceDrainListener(),
                 /*name*/"seq");
@@ -119,11 +119,11 @@
         // CameraDevice should call configureOutputs and have it finish before constructing us
 
         if (configureSuccess) {
-            mStateListener.onConfigured(this);
+            mStateCallback.onConfigured(this);
             if (VERBOSE) Log.v(TAG, "ctor - Created session successfully");
             mConfigureSuccess = true;
         } else {
-            mStateListener.onConfigureFailed(this);
+            mStateCallback.onConfigureFailed(this);
             mClosed = true; // do not fire any other callbacks, do not allow any other work
             Log.e(TAG, "Failed to create capture session; configuration failed");
             mConfigureSuccess = false;
@@ -136,28 +136,27 @@
     }
 
     @Override
-    public synchronized int capture(CaptureRequest request, CaptureListener listener,
+    public synchronized int capture(CaptureRequest request, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (request == null) {
             throw new IllegalArgumentException("request must not be null");
         }
 
         checkNotClosed();
-        checkLegalToCapture();
 
-        handler = checkHandler(handler, listener);
+        handler = checkHandler(handler, callback);
 
         if (VERBOSE) {
-            Log.v(TAG, "capture - request " + request + ", listener " + listener + " handler" +
+            Log.v(TAG, "capture - request " + request + ", callback " + callback + " handler" +
                     " " + handler);
         }
 
         return addPendingSequence(mDeviceImpl.capture(request,
-                createCaptureListenerProxy(handler, listener), mDeviceHandler));
+                createCaptureCallbackProxy(handler, callback), mDeviceHandler));
     }
 
     @Override
-    public synchronized int captureBurst(List<CaptureRequest> requests, CaptureListener listener,
+    public synchronized int captureBurst(List<CaptureRequest> requests, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (requests == null) {
             throw new IllegalArgumentException("requests must not be null");
@@ -166,44 +165,42 @@
         }
 
         checkNotClosed();
-        checkLegalToCapture();
 
-        handler = checkHandler(handler, listener);
+        handler = checkHandler(handler, callback);
 
         if (VERBOSE) {
             CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]);
-            Log.v(TAG, "captureBurst - requests " + Arrays.toString(requestArray) + ", listener " +
-                    listener + " handler" + "" + handler);
+            Log.v(TAG, "captureBurst - requests " + Arrays.toString(requestArray) + ", callback " +
+                    callback + " handler" + "" + handler);
         }
 
         return addPendingSequence(mDeviceImpl.captureBurst(requests,
-                createCaptureListenerProxy(handler, listener), mDeviceHandler));
+                createCaptureCallbackProxy(handler, callback), mDeviceHandler));
     }
 
     @Override
-    public synchronized int setRepeatingRequest(CaptureRequest request, CaptureListener listener,
+    public synchronized int setRepeatingRequest(CaptureRequest request, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (request == null) {
             throw new IllegalArgumentException("request must not be null");
         }
 
         checkNotClosed();
-        checkLegalToCapture();
 
-        handler = checkHandler(handler, listener);
+        handler = checkHandler(handler, callback);
 
         if (VERBOSE) {
-            Log.v(TAG, "setRepeatingRequest - request " + request + ", listener " + listener +
+            Log.v(TAG, "setRepeatingRequest - request " + request + ", callback " + callback +
                     " handler" + " " + handler);
         }
 
         return addPendingSequence(mDeviceImpl.setRepeatingRequest(request,
-                createCaptureListenerProxy(handler, listener), mDeviceHandler));
+                createCaptureCallbackProxy(handler, callback), mDeviceHandler));
     }
 
     @Override
     public synchronized int setRepeatingBurst(List<CaptureRequest> requests,
-            CaptureListener listener, Handler handler) throws CameraAccessException {
+            CaptureCallback callback, Handler handler) throws CameraAccessException {
         if (requests == null) {
             throw new IllegalArgumentException("requests must not be null");
         } else if (requests.isEmpty()) {
@@ -211,18 +208,17 @@
         }
 
         checkNotClosed();
-        checkLegalToCapture();
 
-        handler = checkHandler(handler, listener);
+        handler = checkHandler(handler, callback);
 
         if (VERBOSE) {
             CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]);
             Log.v(TAG, "setRepeatingBurst - requests " + Arrays.toString(requestArray) +
-                    ", listener " + listener + " handler" + "" + handler);
+                    ", callback " + callback + " handler" + "" + handler);
         }
 
         return addPendingSequence(mDeviceImpl.setRepeatingBurst(requests,
-                createCaptureListenerProxy(handler, listener), mDeviceHandler));
+                createCaptureCallbackProxy(handler, callback), mDeviceHandler));
     }
 
     @Override
@@ -331,8 +327,8 @@
             // or just suppress the ISE only and rely onClosed.
             // Also skip any of the draining work if this is already closed.
 
-            // Short-circuit; queue listener immediately and return
-            mStateListener.onClosed(this);
+            // Short-circuit; queue callback immediately and return
+            mStateCallback.onClosed(this);
             return;
         } catch (CameraAccessException e) {
             // OK: close does not throw checked exceptions.
@@ -360,30 +356,30 @@
     }
 
     /**
-     * Post calls into a CameraCaptureSession.StateListener to the user-specified {@code handler}.
+     * Post calls into a CameraCaptureSession.StateCallback to the user-specified {@code handler}.
      */
-    private StateListener createUserStateListenerProxy(Handler handler, StateListener listener) {
-        InvokeDispatcher<StateListener> userListenerSink = new InvokeDispatcher<>(listener);
-        HandlerDispatcher<StateListener> handlerPassthrough =
-                new HandlerDispatcher<>(userListenerSink, handler);
+    private StateCallback createUserStateCallbackProxy(Handler handler, StateCallback callback) {
+        InvokeDispatcher<StateCallback> userCallbackSink = new InvokeDispatcher<>(callback);
+        HandlerDispatcher<StateCallback> handlerPassthrough =
+                new HandlerDispatcher<>(userCallbackSink, handler);
 
-        return new ListenerProxies.SessionStateListenerProxy(handlerPassthrough);
+        return new CallbackProxies.SessionStateCallbackProxy(handlerPassthrough);
     }
 
     /**
      * Forward callbacks from
-     * CameraDeviceImpl.CaptureListener to the CameraCaptureSession.CaptureListener.
+     * CameraDeviceImpl.CaptureCallback to the CameraCaptureSession.CaptureCallback.
      *
      * <p>In particular, all calls are automatically split to go both to our own
-     * internal listener, and to the user-specified listener (by transparently posting
+     * internal callback, and to the user-specified callback (by transparently posting
      * to the user-specified handler).</p>
      *
      * <p>When a capture sequence finishes, update the pending checked sequences set.</p>
      */
     @SuppressWarnings("deprecation")
-    private CameraDeviceImpl.CaptureListener createCaptureListenerProxy(
-            Handler handler, CaptureListener listener) {
-        CameraDeviceImpl.CaptureListener localListener = new CameraDeviceImpl.CaptureListener() {
+    private CameraDeviceImpl.CaptureCallback createCaptureCallbackProxy(
+            Handler handler, CaptureCallback callback) {
+        CameraDeviceImpl.CaptureCallback localCallback = new CameraDeviceImpl.CaptureCallback() {
             @Override
             public void onCaptureSequenceCompleted(CameraDevice camera,
                     int sequenceId, long frameNumber) {
@@ -398,43 +394,43 @@
         };
 
         /*
-         * Split the calls from the device listener into local listener and the following chain:
+         * Split the calls from the device callback into local callback and the following chain:
          * - replace the first CameraDevice arg with a CameraCaptureSession
-         * - duck type from device listener to session listener
+         * - duck type from device callback to session callback
          * - then forward the call to a handler
-         * - then finally invoke the destination method on the session listener object
+         * - then finally invoke the destination method on the session callback object
          */
-        if (listener == null) {
-            // OK: API allows the user to not specify a listener, and the handler may
+        if (callback == null) {
+            // OK: API allows the user to not specify a callback, and the handler may
             // also be null in that case. Collapse whole dispatch chain to only call the local
-            // listener
-            return localListener;
+            // callback
+            return localCallback;
         }
 
-        InvokeDispatcher<CameraDeviceImpl.CaptureListener> localSink =
-                new InvokeDispatcher<>(localListener);
+        InvokeDispatcher<CameraDeviceImpl.CaptureCallback> localSink =
+                new InvokeDispatcher<>(localCallback);
 
-        InvokeDispatcher<CaptureListener> userListenerSink =
-                new InvokeDispatcher<>(listener);
-        HandlerDispatcher<CaptureListener> handlerPassthrough =
-                new HandlerDispatcher<>(userListenerSink, handler);
-        DuckTypingDispatcher<CameraDeviceImpl.CaptureListener, CaptureListener> duckToSession
-                = new DuckTypingDispatcher<>(handlerPassthrough, CaptureListener.class);
-        ArgumentReplacingDispatcher<CameraDeviceImpl.CaptureListener, CameraCaptureSessionImpl>
+        InvokeDispatcher<CaptureCallback> userCallbackSink =
+                new InvokeDispatcher<>(callback);
+        HandlerDispatcher<CaptureCallback> handlerPassthrough =
+                new HandlerDispatcher<>(userCallbackSink, handler);
+        DuckTypingDispatcher<CameraDeviceImpl.CaptureCallback, CaptureCallback> duckToSession
+                = new DuckTypingDispatcher<>(handlerPassthrough, CaptureCallback.class);
+        ArgumentReplacingDispatcher<CameraDeviceImpl.CaptureCallback, CameraCaptureSessionImpl>
                 replaceDeviceWithSession = new ArgumentReplacingDispatcher<>(duckToSession,
                         /*argumentIndex*/0, this);
 
-        BroadcastDispatcher<CameraDeviceImpl.CaptureListener> broadcaster =
-                new BroadcastDispatcher<CameraDeviceImpl.CaptureListener>(
+        BroadcastDispatcher<CameraDeviceImpl.CaptureCallback> broadcaster =
+                new BroadcastDispatcher<CameraDeviceImpl.CaptureCallback>(
                     replaceDeviceWithSession,
                     localSink);
 
-        return new ListenerProxies.DeviceCaptureListenerProxy(broadcaster);
+        return new CallbackProxies.DeviceCaptureCallbackProxy(broadcaster);
     }
 
     /**
      *
-     * Create an internal state listener, to be invoked on the mDeviceHandler
+     * Create an internal state callback, to be invoked on the mDeviceHandler
      *
      * <p>It has a few behaviors:
      * <ul>
@@ -443,10 +439,10 @@
      * </ul>
      * </p>
      * */
-    CameraDeviceImpl.StateListenerKK getDeviceStateListener() {
+    CameraDeviceImpl.StateCallbackKK getDeviceStateCallback() {
         final CameraCaptureSession session = this;
 
-        return new CameraDeviceImpl.StateListenerKK() {
+        return new CameraDeviceImpl.StateCallbackKK() {
             private boolean mBusy = false;
             private boolean mActive = false;
 
@@ -471,7 +467,7 @@
                 mIdleDrainer.taskStarted();
                 mActive = true;
 
-                mStateListener.onActive(session);
+                mStateCallback.onActive(session);
             }
 
             @Override
@@ -507,7 +503,7 @@
                 mBusy = false;
                 mActive = false;
 
-                mStateListener.onReady(session);
+                mStateCallback.onReady(session);
             }
 
             @Override
@@ -542,13 +538,6 @@
         }
     }
 
-    private void checkLegalToCapture() {
-        if (mAborting) {
-            throw new IllegalStateException(
-                    "Session is aborting captures; new captures are not permitted");
-        }
-    }
-
     private void checkNotClosed() {
         if (mClosed) {
             throw new IllegalStateException(
@@ -629,7 +618,7 @@
 
                 // Fast path: A new capture session has replaced this one; don't unconfigure.
                 if (mSkipUnconfigure) {
-                    mStateListener.onClosed(CameraCaptureSessionImpl.this);
+                    mStateCallback.onClosed(CameraCaptureSessionImpl.this);
                     return;
                 }
 
@@ -655,7 +644,7 @@
         public void onDrained() {
             synchronized (CameraCaptureSessionImpl.this) {
                 // The device has finished unconfiguring. It's now fully closed.
-                mStateListener.onClosed(CameraCaptureSessionImpl.this);
+                mStateCallback.onClosed(CameraCaptureSessionImpl.this);
             }
         }
     }
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index f5666bf..f011d60 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -64,17 +64,17 @@
     private final Object mInterfaceLock = new Object();
     private final CameraDeviceCallbacks mCallbacks = new CameraDeviceCallbacks();
 
-    private final StateListener mDeviceListener;
-    private volatile StateListenerKK mSessionStateListener;
+    private final StateCallback mDeviceCallback;
+    private volatile StateCallbackKK mSessionStateCallback;
     private final Handler mDeviceHandler;
 
     private volatile boolean mClosing = false;
     private boolean mInError = false;
     private boolean mIdle = true;
 
-    /** map request IDs to listener/request data */
-    private final SparseArray<CaptureListenerHolder> mCaptureListenerMap =
-            new SparseArray<CaptureListenerHolder>();
+    /** map request IDs to callback/request data */
+    private final SparseArray<CaptureCallbackHolder> mCaptureCallbackMap =
+            new SparseArray<CaptureCallbackHolder>();
 
     private int mRepeatingRequestId = REQUEST_ID_NONE;
     private final ArrayList<Integer> mRepeatingRequestIdDeletedList = new ArrayList<Integer>();
@@ -106,30 +106,30 @@
     private final Runnable mCallOnOpened = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onOpened(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onOpened(CameraDeviceImpl.this);
             }
-            mDeviceListener.onOpened(CameraDeviceImpl.this);
+            mDeviceCallback.onOpened(CameraDeviceImpl.this);
         }
     };
 
     private final Runnable mCallOnUnconfigured = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onUnconfigured(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onUnconfigured(CameraDeviceImpl.this);
             }
         }
     };
@@ -137,14 +137,14 @@
     private final Runnable mCallOnActive = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onActive(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onActive(CameraDeviceImpl.this);
             }
         }
     };
@@ -152,14 +152,14 @@
     private final Runnable mCallOnBusy = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onBusy(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onBusy(CameraDeviceImpl.this);
             }
         }
     };
@@ -172,14 +172,14 @@
             if (mClosedOnce) {
                 throw new AssertionError("Don't post #onClosed more than once");
             }
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onClosed(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onClosed(CameraDeviceImpl.this);
             }
-            mDeviceListener.onClosed(CameraDeviceImpl.this);
+            mDeviceCallback.onClosed(CameraDeviceImpl.this);
             mClosedOnce = true;
         }
     };
@@ -187,14 +187,14 @@
     private final Runnable mCallOnIdle = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onIdle(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onIdle(CameraDeviceImpl.this);
             }
         }
     };
@@ -202,26 +202,26 @@
     private final Runnable mCallOnDisconnected = new Runnable() {
         @Override
         public void run() {
-            StateListenerKK sessionListener = null;
+            StateCallbackKK sessionCallback = null;
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                sessionListener = mSessionStateListener;
+                sessionCallback = mSessionStateCallback;
             }
-            if (sessionListener != null) {
-                sessionListener.onDisconnected(CameraDeviceImpl.this);
+            if (sessionCallback != null) {
+                sessionCallback.onDisconnected(CameraDeviceImpl.this);
             }
-            mDeviceListener.onDisconnected(CameraDeviceImpl.this);
+            mDeviceCallback.onDisconnected(CameraDeviceImpl.this);
         }
     };
 
-    public CameraDeviceImpl(String cameraId, StateListener listener, Handler handler,
+    public CameraDeviceImpl(String cameraId, StateCallback callback, Handler handler,
                         CameraCharacteristics characteristics) {
-        if (cameraId == null || listener == null || handler == null || characteristics == null) {
+        if (cameraId == null || callback == null || handler == null || characteristics == null) {
             throw new IllegalArgumentException("Null argument given");
         }
         mCameraId = cameraId;
-        mDeviceListener = listener;
+        mDeviceCallback = callback;
         mDeviceHandler = handler;
         mCharacteristics = characteristics;
 
@@ -263,28 +263,28 @@
     /**
      * Call to indicate failed connection to a remote camera device.
      *
-     * <p>This places the camera device in the error state and informs the listener.
+     * <p>This places the camera device in the error state and informs the callback.
      * Use in place of setRemoteDevice() when startup fails.</p>
      */
     public void setRemoteFailure(final CameraRuntimeException failure) {
-        int failureCode = StateListener.ERROR_CAMERA_DEVICE;
+        int failureCode = StateCallback.ERROR_CAMERA_DEVICE;
         boolean failureIsError = true;
 
         switch (failure.getReason()) {
             case CameraAccessException.CAMERA_IN_USE:
-                failureCode = StateListener.ERROR_CAMERA_IN_USE;
+                failureCode = StateCallback.ERROR_CAMERA_IN_USE;
                 break;
             case CameraAccessException.MAX_CAMERAS_IN_USE:
-                failureCode = StateListener.ERROR_MAX_CAMERAS_IN_USE;
+                failureCode = StateCallback.ERROR_MAX_CAMERAS_IN_USE;
                 break;
             case CameraAccessException.CAMERA_DISABLED:
-                failureCode = StateListener.ERROR_CAMERA_DISABLED;
+                failureCode = StateCallback.ERROR_CAMERA_DISABLED;
                 break;
             case CameraAccessException.CAMERA_DISCONNECTED:
                 failureIsError = false;
                 break;
             case CameraAccessException.CAMERA_ERROR:
-                failureCode = StateListener.ERROR_CAMERA_DEVICE;
+                failureCode = StateCallback.ERROR_CAMERA_DEVICE;
                 break;
             default:
                 Log.wtf(TAG, "Unknown failure in opening camera device: " + failure.getReason());
@@ -298,9 +298,9 @@
                 @Override
                 public void run() {
                     if (isError) {
-                        mDeviceListener.onError(CameraDeviceImpl.this, code);
+                        mDeviceCallback.onError(CameraDeviceImpl.this, code);
                     } else {
-                        mDeviceListener.onDisconnected(CameraDeviceImpl.this);
+                        mDeviceCallback.onDisconnected(CameraDeviceImpl.this);
                     }
                 }
             });
@@ -415,7 +415,7 @@
 
     @Override
     public void createCaptureSession(List<Surface> outputs,
-            CameraCaptureSession.StateListener listener, Handler handler)
+            CameraCaptureSession.StateCallback callback, Handler handler)
             throws CameraAccessException {
         synchronized(mInterfaceLock) {
             if (DEBUG) {
@@ -445,7 +445,7 @@
 
             // Fire onConfigured if configureOutputs succeeded, fire onConfigureFailed otherwise.
             CameraCaptureSessionImpl newSession =
-                    new CameraCaptureSessionImpl(outputs, listener, handler, this, mDeviceHandler,
+                    new CameraCaptureSessionImpl(outputs, callback, handler, this, mDeviceHandler,
                             configureSuccess);
 
             // TODO: wait until current session closes, then create the new session
@@ -455,16 +455,16 @@
                 throw pendingException;
             }
 
-            mSessionStateListener = mCurrentSession.getDeviceStateListener();
+            mSessionStateCallback = mCurrentSession.getDeviceStateCallback();
         }
     }
 
     /**
      * For use by backwards-compatibility code only.
      */
-    public void setSessionListener(StateListenerKK sessionListener) {
+    public void setSessionListener(StateCallbackKK sessionCallback) {
         synchronized(mInterfaceLock) {
-            mSessionStateListener = sessionListener;
+            mSessionStateCallback = sessionCallback;
         }
     }
 
@@ -492,22 +492,22 @@
         }
     }
 
-    public int capture(CaptureRequest request, CaptureListener listener, Handler handler)
+    public int capture(CaptureRequest request, CaptureCallback callback, Handler handler)
             throws CameraAccessException {
         if (DEBUG) {
             Log.d(TAG, "calling capture");
         }
         List<CaptureRequest> requestList = new ArrayList<CaptureRequest>();
         requestList.add(request);
-        return submitCaptureRequest(requestList, listener, handler, /*streaming*/false);
+        return submitCaptureRequest(requestList, callback, handler, /*streaming*/false);
     }
 
-    public int captureBurst(List<CaptureRequest> requests, CaptureListener listener,
+    public int captureBurst(List<CaptureRequest> requests, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (requests == null || requests.isEmpty()) {
             throw new IllegalArgumentException("At least one request must be given");
         }
-        return submitCaptureRequest(requests, listener, handler, /*streaming*/false);
+        return submitCaptureRequest(requests, callback, handler, /*streaming*/false);
     }
 
     /**
@@ -527,12 +527,12 @@
             final int requestId, final long lastFrameNumber) {
         // lastFrameNumber being equal to NO_FRAMES_CAPTURED means that the request
         // was never sent to HAL. Should trigger onCaptureSequenceAborted immediately.
-        if (lastFrameNumber == CaptureListener.NO_FRAMES_CAPTURED) {
-            final CaptureListenerHolder holder;
-            int index = mCaptureListenerMap.indexOfKey(requestId);
-            holder = (index >= 0) ? mCaptureListenerMap.valueAt(index) : null;
+        if (lastFrameNumber == CaptureCallback.NO_FRAMES_CAPTURED) {
+            final CaptureCallbackHolder holder;
+            int index = mCaptureCallbackMap.indexOfKey(requestId);
+            holder = (index >= 0) ? mCaptureCallbackMap.valueAt(index) : null;
             if (holder != null) {
-                mCaptureListenerMap.removeAt(index);
+                mCaptureCallbackMap.removeAt(index);
                 if (DEBUG) {
                     Log.v(TAG, String.format(
                             "remove holder for requestId %d, "
@@ -560,7 +560,7 @@
                                     || lastFrameNumber > Integer.MAX_VALUE) {
                                 throw new AssertionError(lastFrameNumber + " cannot be cast to int");
                             }
-                            holder.getListener().onCaptureSequenceAborted(
+                            holder.getCallback().onCaptureSequenceAborted(
                                     CameraDeviceImpl.this,
                                     requestId);
                         }
@@ -569,7 +569,7 @@
                 holder.getHandler().post(resultDispatch);
             } else {
                 Log.w(TAG, String.format(
-                        "did not register listener to request %d",
+                        "did not register callback to request %d",
                         requestId));
             }
         } else {
@@ -579,12 +579,12 @@
         }
     }
 
-    private int submitCaptureRequest(List<CaptureRequest> requestList, CaptureListener listener,
+    private int submitCaptureRequest(List<CaptureRequest> requestList, CaptureCallback callback,
             Handler handler, boolean repeating) throws CameraAccessException {
 
         // Need a valid handler, or current thread needs to have a looper, if
-        // listener is valid
-        handler = checkHandler(handler, listener);
+        // callback is valid
+        handler = checkHandler(handler, callback);
 
         // Make sure that there all requests have at least 1 surface; all surfaces are non-null
         for (CaptureRequest request : requestList) {
@@ -622,8 +622,8 @@
                 return -1;
             }
 
-            if (listener != null) {
-                mCaptureListenerMap.put(requestId, new CaptureListenerHolder(listener,
+            if (callback != null) {
+                mCaptureCallbackMap.put(requestId, new CaptureCallbackHolder(callback,
                         requestList, handler, repeating));
             } else {
                 if (DEBUG) {
@@ -652,19 +652,19 @@
         }
     }
 
-    public int setRepeatingRequest(CaptureRequest request, CaptureListener listener,
+    public int setRepeatingRequest(CaptureRequest request, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         List<CaptureRequest> requestList = new ArrayList<CaptureRequest>();
         requestList.add(request);
-        return submitCaptureRequest(requestList, listener, handler, /*streaming*/true);
+        return submitCaptureRequest(requestList, callback, handler, /*streaming*/true);
     }
 
-    public int setRepeatingBurst(List<CaptureRequest> requests, CaptureListener listener,
+    public int setRepeatingBurst(List<CaptureRequest> requests, CaptureCallback callback,
             Handler handler) throws CameraAccessException {
         if (requests == null || requests.isEmpty()) {
             throw new IllegalArgumentException("At least one request must be given");
         }
-        return submitCaptureRequest(requests, listener, handler, /*streaming*/true);
+        return submitCaptureRequest(requests, callback, handler, /*streaming*/true);
     }
 
     public void stopRepeating() throws CameraAccessException {
@@ -677,7 +677,7 @@
                 mRepeatingRequestId = REQUEST_ID_NONE;
 
                 // Queue for deletion after in-flight requests finish
-                if (mCaptureListenerMap.get(requestId) != null) {
+                if (mCaptureCallbackMap.get(requestId) != null) {
                     mRepeatingRequestIdDeletedList.add(requestId);
                 }
 
@@ -782,11 +782,11 @@
     }
 
     /**
-     * <p>A listener for tracking the progress of a {@link CaptureRequest}
+     * <p>A callback for tracking the progress of a {@link CaptureRequest}
      * submitted to the camera device.</p>
      *
      */
-    public static abstract class CaptureListener {
+    public static abstract class CaptureCallback {
 
         /**
          * This constant is used to indicate that no images were captured for
@@ -803,7 +803,7 @@
          * @see android.media.MediaActionSound
          */
         public void onCaptureStarted(CameraDevice camera,
-                CaptureRequest request, long timestamp) {
+                CaptureRequest request, long timestamp, long frameNumber) {
             // default empty implementation
         }
 
@@ -848,9 +848,9 @@
         }
 
         /**
-         * This method is called independently of the others in CaptureListener,
+         * This method is called independently of the others in CaptureCallback,
          * when a capture sequence finishes and all {@link CaptureResult}
-         * or {@link CaptureFailure} for it have been returned via this listener.
+         * or {@link CaptureFailure} for it have been returned via this callback.
          */
         public void onCaptureSequenceCompleted(CameraDevice camera,
                 int sequenceId, long frameNumber) {
@@ -858,9 +858,9 @@
         }
 
         /**
-         * This method is called independently of the others in CaptureListener,
+         * This method is called independently of the others in CaptureCallback,
          * when a capture sequence aborts before any {@link CaptureResult}
-         * or {@link CaptureFailure} for it have been returned via this listener.
+         * or {@link CaptureFailure} for it have been returned via this callback.
          */
         public void onCaptureSequenceAborted(CameraDevice camera,
                 int sequenceId) {
@@ -869,10 +869,10 @@
     }
 
     /**
-     * A listener for notifications about the state of a camera device, adding in the callbacks that
+     * A callback for notifications about the state of a camera device, adding in the callbacks that
      * were part of the earlier KK API design, but now only used internally.
      */
-    public static abstract class StateListenerKK extends StateListener {
+    public static abstract class StateCallbackKK extends StateCallback {
         /**
          * The method called when a camera device has no outputs configured.
          *
@@ -908,31 +908,31 @@
         }
     }
 
-    static class CaptureListenerHolder {
+    static class CaptureCallbackHolder {
 
         private final boolean mRepeating;
-        private final CaptureListener mListener;
+        private final CaptureCallback mCallback;
         private final List<CaptureRequest> mRequestList;
         private final Handler mHandler;
 
-        CaptureListenerHolder(CaptureListener listener, List<CaptureRequest> requestList,
+        CaptureCallbackHolder(CaptureCallback callback, List<CaptureRequest> requestList,
                 Handler handler, boolean repeating) {
-            if (listener == null || handler == null) {
+            if (callback == null || handler == null) {
                 throw new UnsupportedOperationException(
-                    "Must have a valid handler and a valid listener");
+                    "Must have a valid handler and a valid callback");
             }
             mRepeating = repeating;
             mHandler = handler;
             mRequestList = new ArrayList<CaptureRequest>(requestList);
-            mListener = listener;
+            mCallback = callback;
         }
 
         public boolean isRepeating() {
             return mRepeating;
         }
 
-        public CaptureListener getListener() {
-            return mListener;
+        public CaptureCallback getCallback() {
+            return mCallback;
         }
 
         public CaptureRequest getRequest(int subsequenceId) {
@@ -1071,20 +1071,20 @@
             final SimpleEntry<Long, Integer> frameNumberRequestPair = iter.next();
             if (frameNumberRequestPair.getKey() <= completedFrameNumber) {
 
-                // remove request from mCaptureListenerMap
+                // remove request from mCaptureCallbackMap
                 final int requestId = frameNumberRequestPair.getValue();
-                final CaptureListenerHolder holder;
+                final CaptureCallbackHolder holder;
                 synchronized(mInterfaceLock) {
                     if (mRemoteDevice == null) {
                         Log.w(TAG, "Camera closed while checking sequences");
                         return;
                     }
 
-                    int index = mCaptureListenerMap.indexOfKey(requestId);
-                    holder = (index >= 0) ? mCaptureListenerMap.valueAt(index)
+                    int index = mCaptureCallbackMap.indexOfKey(requestId);
+                    holder = (index >= 0) ? mCaptureCallbackMap.valueAt(index)
                             : null;
                     if (holder != null) {
-                        mCaptureListenerMap.removeAt(index);
+                        mCaptureCallbackMap.removeAt(index);
                         if (DEBUG) {
                             Log.v(TAG, String.format(
                                     "remove holder for requestId %d, "
@@ -1114,7 +1114,7 @@
                                     throw new AssertionError(lastFrameNumber
                                             + " cannot be cast to int");
                                 }
-                                holder.getListener().onCaptureSequenceCompleted(
+                                holder.getCallback().onCaptureSequenceCompleted(
                                     CameraDeviceImpl.this,
                                     requestId,
                                     lastFrameNumber);
@@ -1146,13 +1146,13 @@
 
         /**
          * Camera has encountered a device-level error
-         * Matches CameraDevice.StateListener#ERROR_CAMERA_DEVICE
+         * Matches CameraDevice.StateCallback#ERROR_CAMERA_DEVICE
          */
         static final int ERROR_CAMERA_DEVICE = 1;
 
         /**
          * Camera has encountered a service-level error
-         * Matches CameraDevice.StateListener#ERROR_CAMERA_SERVICE
+         * Matches CameraDevice.StateCallback#ERROR_CAMERA_SERVICE
          */
         static final int ERROR_CAMERA_SERVICE = 2;
 
@@ -1204,7 +1204,7 @@
                             @Override
                             public void run() {
                                 if (!CameraDeviceImpl.this.isClosed()) {
-                                    mDeviceListener.onError(CameraDeviceImpl.this, errorCode);
+                                    mDeviceCallback.onError(CameraDeviceImpl.this, errorCode);
                                 }
                             }
                         };
@@ -1237,16 +1237,18 @@
         @Override
         public void onCaptureStarted(final CaptureResultExtras resultExtras, final long timestamp) {
             int requestId = resultExtras.getRequestId();
+            final long frameNumber = resultExtras.getFrameNumber();
+
             if (DEBUG) {
-                Log.d(TAG, "Capture started for id " + requestId);
+                Log.d(TAG, "Capture started for id " + requestId + " frame number " + frameNumber);
             }
-            final CaptureListenerHolder holder;
+            final CaptureCallbackHolder holder;
 
             synchronized(mInterfaceLock) {
                 if (mRemoteDevice == null) return; // Camera already closed
 
-                // Get the listener for this frame ID, if there is one
-                holder = CameraDeviceImpl.this.mCaptureListenerMap.get(requestId);
+                // Get the callback for this frame ID, if there is one
+                holder = CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId);
 
                 if (holder == null) {
                     return;
@@ -1260,10 +1262,10 @@
                         @Override
                         public void run() {
                             if (!CameraDeviceImpl.this.isClosed()) {
-                                holder.getListener().onCaptureStarted(
+                                holder.getCallback().onCaptureStarted(
                                     CameraDeviceImpl.this,
                                     holder.getRequest(resultExtras.getSubsequenceId()),
-                                    timestamp);
+                                    timestamp, frameNumber);
                             }
                         }
                     });
@@ -1290,13 +1292,13 @@
                 result.set(CameraCharacteristics.LENS_INFO_SHADING_MAP_SIZE,
                         getCharacteristics().get(CameraCharacteristics.LENS_INFO_SHADING_MAP_SIZE));
 
-                final CaptureListenerHolder holder =
-                        CameraDeviceImpl.this.mCaptureListenerMap.get(requestId);
+                final CaptureCallbackHolder holder =
+                        CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId);
 
                 boolean isPartialResult =
                         (resultExtras.getPartialResultCount() < mTotalPartialCount);
 
-                // Check if we have a listener for this
+                // Check if we have a callback for this
                 if (holder == null) {
                     if (DEBUG) {
                         Log.d(TAG,
@@ -1336,7 +1338,7 @@
                         @Override
                         public void run() {
                             if (!CameraDeviceImpl.this.isClosed()){
-                                holder.getListener().onCaptureProgressed(
+                                holder.getCallback().onCaptureProgressed(
                                     CameraDeviceImpl.this,
                                     request,
                                     resultAsCapture);
@@ -1357,7 +1359,7 @@
                         @Override
                         public void run() {
                             if (!CameraDeviceImpl.this.isClosed()){
-                                holder.getListener().onCaptureCompleted(
+                                holder.getCallback().onCaptureCompleted(
                                     CameraDeviceImpl.this,
                                     request,
                                     resultAsCapture);
@@ -1388,8 +1390,8 @@
             final int requestId = resultExtras.getRequestId();
             final int subsequenceId = resultExtras.getSubsequenceId();
             final long frameNumber = resultExtras.getFrameNumber();
-            final CaptureListenerHolder holder =
-                    CameraDeviceImpl.this.mCaptureListenerMap.get(requestId);
+            final CaptureCallbackHolder holder =
+                    CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId);
 
             final CaptureRequest request = holder.getRequest(subsequenceId);
 
@@ -1420,7 +1422,7 @@
                 @Override
                 public void run() {
                     if (!CameraDeviceImpl.this.isClosed()){
-                        holder.getListener().onCaptureFailed(
+                        holder.getCallback().onCaptureFailed(
                             CameraDeviceImpl.this,
                             request,
                             failure);
@@ -1460,12 +1462,12 @@
     }
 
     /**
-     * Default handler management, conditional on there being a listener.
+     * Default handler management, conditional on there being a callback.
      *
-     * <p>If the listener isn't null, check the handler, otherwise pass it through.</p>
+     * <p>If the callback isn't null, check the handler, otherwise pass it through.</p>
      */
-    static <T> Handler checkHandler(Handler handler, T listener) {
-        if (listener != null) {
+    static <T> Handler checkHandler(Handler handler, T callback) {
+        if (callback != null) {
             return checkHandler(handler);
         }
         return handler;
diff --git a/core/java/android/hardware/camera2/legacy/GLThreadManager.java b/core/java/android/hardware/camera2/legacy/GLThreadManager.java
index 06521cf..2c584ef 100644
--- a/core/java/android/hardware/camera2/legacy/GLThreadManager.java
+++ b/core/java/android/hardware/camera2/legacy/GLThreadManager.java
@@ -121,9 +121,10 @@
      * Create a new GL thread and renderer.
      *
      * @param cameraId the camera id for this thread.
+     * @param facing direction the camera is facing.
      */
-    public GLThreadManager(int cameraId) {
-        mTextureRenderer = new SurfaceTextureRenderer();
+    public GLThreadManager(int cameraId, int facing) {
+        mTextureRenderer = new SurfaceTextureRenderer(facing);
         TAG = String.format("CameraDeviceGLThread-%d", cameraId);
         mGLHandlerThread = new RequestHandlerThread(TAG, mGLHandlerCb);
     }
diff --git a/core/java/android/hardware/camera2/legacy/LegacyFocusStateMapper.java b/core/java/android/hardware/camera2/legacy/LegacyFocusStateMapper.java
index d0a3a3f..d5ec71a 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyFocusStateMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyFocusStateMapper.java
@@ -114,21 +114,24 @@
                 currentAfRun = mAfRun;
             }
 
-            mCamera.setAutoFocusMoveCallback(new Camera.AutoFocusMoveCallback() {
+            Camera.AutoFocusMoveCallback afMoveCallback = new Camera.AutoFocusMoveCallback() {
                 @Override
                 public void onAutoFocusMoving(boolean start, Camera camera) {
                     synchronized (mLock) {
                         int latestAfRun = mAfRun;
 
                         if (VERBOSE) {
-                            Log.v(TAG, "onAutoFocusMoving - start " + start + " latest AF run " +
-                                    latestAfRun + ", last AF run " + currentAfRun);
+                            Log.v(TAG,
+                                    "onAutoFocusMoving - start " + start + " latest AF run " +
+                                            latestAfRun + ", last AF run " + currentAfRun
+                            );
                         }
 
                         if (currentAfRun != latestAfRun) {
                             Log.d(TAG,
                                     "onAutoFocusMoving - ignoring move callbacks from old af run"
-                                            + currentAfRun);
+                                            + currentAfRun
+                            );
                             return;
                         }
 
@@ -151,9 +154,19 @@
                         mAfState = newAfState;
                     }
                 }
-            });
+            };
+
+            // Only set move callback if we can call autofocus.
+            switch (afMode) {
+                case Parameters.FOCUS_MODE_AUTO:
+                case Parameters.FOCUS_MODE_MACRO:
+                case Parameters.FOCUS_MODE_CONTINUOUS_PICTURE:
+                case Parameters.FOCUS_MODE_CONTINUOUS_VIDEO:
+                    mCamera.setAutoFocusMoveCallback(afMoveCallback);
+            }
         }
 
+
         // AF Locking
         switch (afTrigger) {
             case CONTROL_AF_TRIGGER_START:
@@ -167,6 +180,7 @@
                     case Parameters.FOCUS_MODE_CONTINUOUS_PICTURE:
                     case Parameters.FOCUS_MODE_CONTINUOUS_VIDEO:
                         afStateAfterStart = CONTROL_AF_STATE_PASSIVE_SCAN;
+                        break;
                     default:
                         // EDOF, INFINITY
                         afStateAfterStart = CONTROL_AF_STATE_INACTIVE;
@@ -183,6 +197,11 @@
                             "new AF run is " + currentAfRun);
                 }
 
+                // Avoid calling autofocus unless we are in a state that supports calling this.
+                if (afStateAfterStart == CONTROL_AF_STATE_INACTIVE) {
+                    break;
+                }
+
                 mCamera.autoFocus(new Camera.AutoFocusCallback() {
                     @Override
                     public void onAutoFocus(boolean success, Camera camera) {
diff --git a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
index a8d1018..3c0e0e4 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyMetadataMapper.java
@@ -675,15 +675,13 @@
          * request.availableRequestKeys
          */
         {
-            CaptureRequest.Key<?> availableKeys[] = new CaptureRequest.Key<?>[] {
+            CaptureRequest.Key<?> defaultAvailableKeys[] = new CaptureRequest.Key<?>[] {
                     CaptureRequest.CONTROL_AE_ANTIBANDING_MODE,
                     CaptureRequest.CONTROL_AE_EXPOSURE_COMPENSATION,
                     CaptureRequest.CONTROL_AE_LOCK,
                     CaptureRequest.CONTROL_AE_MODE,
-                    CaptureRequest.CONTROL_AE_REGIONS,
                     CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE,
                     CaptureRequest.CONTROL_AF_MODE,
-                    CaptureRequest.CONTROL_AF_REGIONS,
                     CaptureRequest.CONTROL_AF_TRIGGER,
                     CaptureRequest.CONTROL_AWB_LOCK,
                     CaptureRequest.CONTROL_AWB_MODE,
@@ -704,21 +702,32 @@
                     CaptureRequest.SCALER_CROP_REGION,
                     CaptureRequest.STATISTICS_FACE_DETECT_MODE,
             };
-            m.set(REQUEST_AVAILABLE_REQUEST_KEYS, getTagsForKeys(availableKeys));
+            ArrayList<CaptureRequest.Key<?>> availableKeys =
+                    new ArrayList<CaptureRequest.Key<?>>(Arrays.asList(defaultAvailableKeys));
+
+            if (p.getMaxNumMeteringAreas() > 0) {
+                availableKeys.add(CaptureRequest.CONTROL_AE_REGIONS);
+            }
+            if (p.getMaxNumFocusAreas() > 0) {
+                availableKeys.add(CaptureRequest.CONTROL_AF_REGIONS);
+            }
+
+            CaptureRequest.Key<?> availableRequestKeys[] =
+                    new CaptureRequest.Key<?>[availableKeys.size()];
+            availableKeys.toArray(availableRequestKeys);
+            m.set(REQUEST_AVAILABLE_REQUEST_KEYS, getTagsForKeys(availableRequestKeys));
         }
 
         /*
          * request.availableResultKeys
          */
         {
-            CaptureResult.Key<?> availableKeys[] = new CaptureResult.Key<?>[] {
+            CaptureResult.Key<?> defaultAvailableKeys[] = new CaptureResult.Key<?>[] {
                     CaptureResult.CONTROL_AE_ANTIBANDING_MODE                      ,
                     CaptureResult.CONTROL_AE_EXPOSURE_COMPENSATION                 ,
                     CaptureResult.CONTROL_AE_LOCK                                  ,
                     CaptureResult.CONTROL_AE_MODE                                  ,
-                    CaptureResult.CONTROL_AE_REGIONS                               ,
                     CaptureResult.CONTROL_AF_MODE                                  ,
-                    CaptureResult.CONTROL_AF_REGIONS                               ,
                     CaptureResult.CONTROL_AF_STATE                                 ,
                     CaptureResult.CONTROL_AWB_MODE                                 ,
                     CaptureResult.CONTROL_AWB_LOCK                                 ,
@@ -737,7 +746,20 @@
                     CaptureResult.STATISTICS_FACE_DETECT_MODE                      ,
 //                    CaptureResult.STATISTICS_FACES                                 ,
             };
-            m.set(REQUEST_AVAILABLE_RESULT_KEYS, getTagsForKeys(availableKeys));
+            List<CaptureResult.Key<?>> availableKeys =
+                    new ArrayList<CaptureResult.Key<?>>(Arrays.asList(defaultAvailableKeys));
+
+            if (p.getMaxNumMeteringAreas() > 0) {
+                availableKeys.add(CaptureResult.CONTROL_AE_REGIONS);
+            }
+            if (p.getMaxNumFocusAreas() > 0) {
+                availableKeys.add(CaptureResult.CONTROL_AF_REGIONS);
+            }
+
+            CaptureResult.Key<?> availableResultKeys[] =
+                    new CaptureResult.Key<?>[availableKeys.size()];
+            availableKeys.toArray(availableResultKeys);
+            m.set(REQUEST_AVAILABLE_RESULT_KEYS, getTagsForKeys(availableResultKeys));
         }
 
         /*
diff --git a/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java b/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
index 4c4ad0d..42ee4fa 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java
@@ -122,7 +122,10 @@
                         activeArray, zoomData, aeRegions, maxNumMeteringAreas,
                         /*regionName*/"AE");
 
-                params.setMeteringAreas(meteringAreaList);
+                // WAR: for b/17252693, some devices can't handle params.setFocusAreas(null).
+                if (maxNumMeteringAreas > 0) {
+                    params.setMeteringAreas(meteringAreaList);
+                }
             }
 
             // afRegions
@@ -133,7 +136,10 @@
                         activeArray, zoomData, afRegions, maxNumFocusAreas,
                         /*regionName*/"AF");
 
-                params.setFocusAreas(focusAreaList);
+                // WAR: for b/17252693, some devices can't handle params.setFocusAreas(null).
+                if (maxNumFocusAreas > 0) {
+                    params.setFocusAreas(focusAreaList);
+                }
             }
         }
 
diff --git a/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java b/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
index 090a822..ddaa6ee 100644
--- a/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
+++ b/core/java/android/hardware/camera2/legacy/LegacyResultMapper.java
@@ -322,7 +322,7 @@
         }
 
         // control.aeRegions
-        {
+        if (p.getMaxNumMeteringAreas() > 0) {
             if (VERBOSE) {
                 String meteringAreas = p.get("metering-areas");
                 Log.v(TAG, "mapAe - parameter dump; metering-areas: " + meteringAreas);
@@ -342,7 +342,7 @@
         m.set(CaptureResult.CONTROL_AF_MODE, convertLegacyAfMode(p.getFocusMode()));
 
         // control.afRegions
-        {
+        if (p.getMaxNumFocusAreas() > 0) {
             if (VERBOSE) {
                 String focusAreas = p.get("focus-areas");
                 Log.v(TAG, "mapAe - parameter dump; focus-areas: " + focusAreas);
diff --git a/core/java/android/hardware/camera2/legacy/RequestThreadManager.java b/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
index eb8debb..e6da670 100644
--- a/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
+++ b/core/java/android/hardware/camera2/legacy/RequestThreadManager.java
@@ -374,6 +374,9 @@
             }
 
             mIntermediateBufferSize = bestPreviewDimen;
+            mParams.setPreviewSize(mIntermediateBufferSize.getWidth(),
+                    mIntermediateBufferSize.getHeight());
+
             if (DEBUG) {
                 Log.d(TAG, "Intermediate buffer selected with dimens: " +
                         bestPreviewDimen.toString());
@@ -399,7 +402,7 @@
 
         // TODO: Detect and optimize single-output paths here to skip stream teeing.
         if (mGLThreadManager == null) {
-            mGLThreadManager = new GLThreadManager(mCameraId);
+            mGLThreadManager = new GLThreadManager(mCameraId, facing);
             mGLThreadManager.start();
         }
         mGLThreadManager.waitUntilStarted();
diff --git a/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java b/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java
index b1b0f9b..a35883c 100644
--- a/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java
+++ b/core/java/android/hardware/camera2/legacy/SurfaceTextureRenderer.java
@@ -18,6 +18,7 @@
 import android.graphics.ImageFormat;
 import android.graphics.RectF;
 import android.graphics.SurfaceTexture;
+import android.hardware.camera2.CameraCharacteristics;
 import android.os.Environment;
 import android.opengl.EGL14;
 import android.opengl.EGLConfig;
@@ -80,7 +81,18 @@
     private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES;
     private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0;
     private static final int TRIANGLE_VERTICES_DATA_UV_OFFSET = 3;
-    private final float[] mTriangleVerticesData = {
+
+    // Sampling is mirrored across the vertical axis to undo horizontal flip from the front camera
+    private static final float[] sFrontCameraTriangleVertices = {
+            // X, Y, Z, U, V
+            -1.0f, -1.0f, 0, 1.f, 0.f,
+            1.0f, -1.0f, 0, 0.f, 0.f,
+            -1.0f,  1.0f, 0, 1.f, 1.f,
+            1.0f,  1.0f, 0, 0.f, 1.f,
+    };
+
+    // Sampling is 1:1 for a straight copy for the back camera
+    private static final float[] sBackCameraTriangleVertices = {
             // X, Y, Z, U, V
             -1.0f, -1.0f, 0, 0.f, 0.f,
             1.0f, -1.0f, 0, 1.f, 0.f,
@@ -135,10 +147,16 @@
     private PerfMeasurement mPerfMeasurer = null;
     private static final String LEGACY_PERF_PROPERTY = "persist.camera.legacy_perf";
 
-    public SurfaceTextureRenderer() {
-        mTriangleVertices = ByteBuffer.allocateDirect(mTriangleVerticesData.length *
-                FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
-        mTriangleVertices.put(mTriangleVerticesData).position(0);
+    public SurfaceTextureRenderer(int facing) {
+        if (facing == CameraCharacteristics.LENS_FACING_BACK) {
+            mTriangleVertices = ByteBuffer.allocateDirect(sBackCameraTriangleVertices.length *
+                    FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
+            mTriangleVertices.put(sBackCameraTriangleVertices).position(0);
+        } else {
+            mTriangleVertices = ByteBuffer.allocateDirect(sFrontCameraTriangleVertices.length *
+                    FLOAT_SIZE_BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
+            mTriangleVertices.put(sFrontCameraTriangleVertices).position(0);
+        }
         Matrix.setIdentityM(mSTMatrix, 0);
     }
 
diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
index c0b7967..5d226e3 100644
--- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
+++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
@@ -142,7 +142,7 @@
      * or in {@link PixelFormat} (and there is no possibility of collision).</p>
      *
      * <p>Formats listed in this array are guaranteed to return true if queried with
-     * {@link #isOutputSupportedFor(int).</p>
+     * {@link #isOutputSupportedFor(int)}.</p>
      *
      * @return an array of integer format
      *
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 51b7229..b077e06 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -472,7 +472,7 @@
     /**
      * Creates a virtual display.
      *
-     * @see #createVirtualDisplay(String, int, int, int, Surface, int, VirtualDisplay.Callbacks)
+     * @see #createVirtualDisplay(String, int, int, int, Surface, int, VirtualDisplay.Callback)
      */
     public VirtualDisplay createVirtualDisplay(@NonNull String name,
             int width, int height, int densityDpi, @Nullable Surface surface, int flags) {
@@ -513,7 +513,7 @@
      * {@link #VIRTUAL_DISPLAY_FLAG_PUBLIC}, {@link #VIRTUAL_DISPLAY_FLAG_PRESENTATION},
      * {@link #VIRTUAL_DISPLAY_FLAG_SECURE}, {@link #VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY},
      * or {@link #VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR}.
-     * @param callbacks Callbacks to call when the state of the {@link VirtualDisplay} changes
+     * @param callback Callback to call when the state of the {@link VirtualDisplay} changes
      * @param handler The handler on which the listener should be invoked, or null
      * if the listener should be invoked on the calling thread's looper.
      * @return The newly created virtual display, or null if the application could
@@ -524,17 +524,17 @@
      */
     public VirtualDisplay createVirtualDisplay(@NonNull String name,
             int width, int height, int densityDpi, @Nullable Surface surface, int flags,
-            @Nullable VirtualDisplay.Callbacks callbacks, @Nullable Handler handler) {
+            @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
         return createVirtualDisplay(null,
-                name, width, height, densityDpi, surface, flags, callbacks, handler);
+                name, width, height, densityDpi, surface, flags, callback, handler);
     }
 
     /** @hide */
     public VirtualDisplay createVirtualDisplay(@Nullable MediaProjection projection,
             @NonNull String name, int width, int height, int densityDpi, @Nullable Surface surface,
-            int flags, @Nullable VirtualDisplay.Callbacks callbacks, @Nullable Handler handler) {
+            int flags, @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
         return mGlobal.createVirtualDisplay(mContext, projection,
-                name, width, height, densityDpi, surface, flags, callbacks, handler);
+                name, width, height, densityDpi, surface, flags, callback, handler);
     }
 
     /**
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index 8b44f3b..0051ef5 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -372,7 +372,7 @@
 
     public VirtualDisplay createVirtualDisplay(Context context, MediaProjection projection,
             String name, int width, int height, int densityDpi, Surface surface, int flags,
-            VirtualDisplay.Callbacks callbacks, Handler handler) {
+            VirtualDisplay.Callback callback, Handler handler) {
         if (TextUtils.isEmpty(name)) {
             throw new IllegalArgumentException("name must be non-null and non-empty");
         }
@@ -381,7 +381,7 @@
                     + "greater than 0");
         }
 
-        VirtualDisplayCallbacks callbackWrapper = new VirtualDisplayCallbacks(callbacks, handler);
+        VirtualDisplayCallback callbackWrapper = new VirtualDisplayCallback(callback, handler);
         IMediaProjection projectionToken = projection != null ? projection.getProjection() : null;
         int displayId;
         try {
@@ -408,7 +408,7 @@
         return new VirtualDisplay(this, display, callbackWrapper, surface);
     }
 
-    public void setVirtualDisplaySurface(IVirtualDisplayCallbacks token, Surface surface) {
+    public void setVirtualDisplaySurface(IVirtualDisplayCallback token, Surface surface) {
         try {
             mDm.setVirtualDisplaySurface(token, surface);
         } catch (RemoteException ex) {
@@ -416,7 +416,7 @@
         }
     }
 
-    public void resizeVirtualDisplay(IVirtualDisplayCallbacks token,
+    public void resizeVirtualDisplay(IVirtualDisplayCallback token,
             int width, int height, int densityDpi) {
         try {
             mDm.resizeVirtualDisplay(token, width, height, densityDpi);
@@ -425,7 +425,7 @@
         }
     }
 
-    public void releaseVirtualDisplay(IVirtualDisplayCallbacks token) {
+    public void releaseVirtualDisplay(IVirtualDisplayCallback token) {
         try {
             mDm.releaseVirtualDisplay(token);
         } catch (RemoteException ex) {
@@ -476,61 +476,61 @@
         }
     }
 
-    private final static class VirtualDisplayCallbacks extends IVirtualDisplayCallbacks.Stub {
-        private VirtualDisplayCallbacksDelegate mDelegate;
+    private final static class VirtualDisplayCallback extends IVirtualDisplayCallback.Stub {
+        private VirtualDisplayCallbackDelegate mDelegate;
 
-        public VirtualDisplayCallbacks(VirtualDisplay.Callbacks callbacks, Handler handler) {
-            if (callbacks != null) {
-                mDelegate = new VirtualDisplayCallbacksDelegate(callbacks, handler);
+        public VirtualDisplayCallback(VirtualDisplay.Callback callback, Handler handler) {
+            if (callback != null) {
+                mDelegate = new VirtualDisplayCallbackDelegate(callback, handler);
             }
         }
 
         @Override // Binder call
-        public void onDisplayPaused() {
+        public void onPaused() {
             if (mDelegate != null) {
-                mDelegate.sendEmptyMessage(VirtualDisplayCallbacksDelegate.MSG_DISPLAY_PAUSED);
+                mDelegate.sendEmptyMessage(VirtualDisplayCallbackDelegate.MSG_DISPLAY_PAUSED);
             }
         }
 
         @Override // Binder call
-        public void onDisplayResumed() {
+        public void onResumed() {
             if (mDelegate != null) {
-                mDelegate.sendEmptyMessage(VirtualDisplayCallbacksDelegate.MSG_DISPLAY_RESUMED);
+                mDelegate.sendEmptyMessage(VirtualDisplayCallbackDelegate.MSG_DISPLAY_RESUMED);
             }
         }
 
         @Override // Binder call
-        public void onDisplayStopped() {
+        public void onStopped() {
             if (mDelegate != null) {
-                mDelegate.sendEmptyMessage(VirtualDisplayCallbacksDelegate.MSG_DISPLAY_STOPPED);
+                mDelegate.sendEmptyMessage(VirtualDisplayCallbackDelegate.MSG_DISPLAY_STOPPED);
             }
         }
     }
 
-    private final static class VirtualDisplayCallbacksDelegate extends Handler {
+    private final static class VirtualDisplayCallbackDelegate extends Handler {
         public static final int MSG_DISPLAY_PAUSED = 0;
         public static final int MSG_DISPLAY_RESUMED = 1;
         public static final int MSG_DISPLAY_STOPPED = 2;
 
-        private final VirtualDisplay.Callbacks mCallbacks;
+        private final VirtualDisplay.Callback mCallback;
 
-        public VirtualDisplayCallbacksDelegate(VirtualDisplay.Callbacks callbacks,
+        public VirtualDisplayCallbackDelegate(VirtualDisplay.Callback callback,
                 Handler handler) {
             super(handler != null ? handler.getLooper() : Looper.myLooper(), null, true /*async*/);
-            mCallbacks = callbacks;
+            mCallback = callback;
         }
 
         @Override
         public void handleMessage(Message msg) {
             switch (msg.what) {
                 case MSG_DISPLAY_PAUSED:
-                    mCallbacks.onDisplayPaused();
+                    mCallback.onPaused();
                     break;
                 case MSG_DISPLAY_RESUMED:
-                    mCallbacks.onDisplayResumed();
+                    mCallback.onResumed();
                     break;
                 case MSG_DISPLAY_STOPPED:
-                    mCallbacks.onDisplayStopped();
+                    mCallback.onStopped();
                     break;
             }
         }
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index cfaa5a0..4486dd4 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -17,7 +17,7 @@
 package android.hardware.display;
 
 import android.hardware.display.IDisplayManagerCallback;
-import android.hardware.display.IVirtualDisplayCallbacks;
+import android.hardware.display.IVirtualDisplayCallback;
 import android.hardware.display.WifiDisplay;
 import android.hardware.display.WifiDisplayStatus;
 import android.media.projection.IMediaProjection;
@@ -61,17 +61,17 @@
 
     // Requires CAPTURE_VIDEO_OUTPUT, CAPTURE_SECURE_VIDEO_OUTPUT, or an appropriate
     // MediaProjection token for certain combinations of flags.
-    int createVirtualDisplay(in IVirtualDisplayCallbacks callbacks,
+    int createVirtualDisplay(in IVirtualDisplayCallback callback,
             in IMediaProjection projectionToken, String packageName, String name,
             int width, int height, int densityDpi, in Surface surface, int flags);
 
     // No permissions required, but must be same Uid as the creator.
-    void resizeVirtualDisplay(in IVirtualDisplayCallbacks token,
+    void resizeVirtualDisplay(in IVirtualDisplayCallback token,
             int width, int height, int densityDpi);
 
     // No permissions required but must be same Uid as the creator.
-    void setVirtualDisplaySurface(in IVirtualDisplayCallbacks token, in Surface surface);
+    void setVirtualDisplaySurface(in IVirtualDisplayCallback token, in Surface surface);
 
     // No permissions required but must be same Uid as the creator.
-    void releaseVirtualDisplay(in IVirtualDisplayCallbacks token);
+    void releaseVirtualDisplay(in IVirtualDisplayCallback token);
 }
diff --git a/core/java/android/hardware/display/IVirtualDisplayCallbacks.aidl b/core/java/android/hardware/display/IVirtualDisplayCallback.aidl
similarity index 90%
rename from core/java/android/hardware/display/IVirtualDisplayCallbacks.aidl
rename to core/java/android/hardware/display/IVirtualDisplayCallback.aidl
index a1cdc01..c3490d1 100644
--- a/core/java/android/hardware/display/IVirtualDisplayCallbacks.aidl
+++ b/core/java/android/hardware/display/IVirtualDisplayCallback.aidl
@@ -16,20 +16,20 @@
 package android.hardware.display;
 
 /** @hide */
-oneway interface IVirtualDisplayCallbacks {
+oneway interface IVirtualDisplayCallback {
     /**
      * Called when the virtual display video projection has been
      * paused by the system or when the surface has been detached
      * by the application by calling setSurface(null).
      * The surface will not receive any more buffers while paused.
      */
-    void onDisplayPaused();
+    void onPaused();
 
     /**
      * Called when the virtual display video projection has been
      * resumed after having been paused.
      */
-    void onDisplayResumed();
+    void onResumed();
 
     /**
      * Called when the virtual display video projection has been
@@ -37,5 +37,5 @@
      * and it will never be resumed.  It is still the responsibility
      * of the application to release() the virtual display.
      */
-    void onDisplayStopped();
+    void onStopped();
 }
diff --git a/core/java/android/hardware/display/VirtualDisplay.java b/core/java/android/hardware/display/VirtualDisplay.java
index 1dd6978..4ddf10f 100644
--- a/core/java/android/hardware/display/VirtualDisplay.java
+++ b/core/java/android/hardware/display/VirtualDisplay.java
@@ -35,11 +35,11 @@
 public final class VirtualDisplay {
     private final DisplayManagerGlobal mGlobal;
     private final Display mDisplay;
-    private IVirtualDisplayCallbacks mToken;
+    private IVirtualDisplayCallback mToken;
     private Surface mSurface;
 
     VirtualDisplay(DisplayManagerGlobal global, Display display,
-            IVirtualDisplayCallbacks token, Surface surface) {
+            IVirtualDisplayCallback token, Surface surface) {
         mGlobal = global;
         mDisplay = display;
         mToken = token;
@@ -114,20 +114,20 @@
     /**
      * Interface for receiving information about a {@link VirtualDisplay}'s state changes.
      */
-    public static abstract class Callbacks {
+    public static abstract class Callback {
         /**
          * Called when the virtual display video projection has been
          * paused by the system or when the surface has been detached
          * by the application by calling setSurface(null).
          * The surface will not receive any more buffers while paused.
          */
-         public void onDisplayPaused() { }
+         public void onPaused() { }
 
         /**
          * Called when the virtual display video projection has been
          * resumed after having been paused.
          */
-         public void onDisplayResumed() { }
+         public void onResumed() { }
 
         /**
          * Called when the virtual display video projection has been
@@ -135,6 +135,6 @@
          * and it will never be resumed.  It is still the responsibility
          * of the application to release() the virtual display.
          */
-        public void onDisplayStopped() { }
+        public void onStopped() { }
     }
 }
diff --git a/core/java/android/hardware/hdmi/HdmiControlManager.java b/core/java/android/hardware/hdmi/HdmiControlManager.java
index 4b5ced9..30f3576 100644
--- a/core/java/android/hardware/hdmi/HdmiControlManager.java
+++ b/core/java/android/hardware/hdmi/HdmiControlManager.java
@@ -55,10 +55,29 @@
     public static final int OSD_MESSAGE_ARC_CONNECTED_INVALID_PORT = 1;
 
     /**
+     * Message used by TV to receive volume status from Audio Receiver. It should check volume value
+     * that is retrieved from extra value with the key {@link #EXTRA_MESSAGE_EXTRAM_PARAM1}. If the
+     * value is in range of [0,100], it is current volume of Audio Receiver. And there is another
+     * value, {@link #AVR_VOLUME_MUTED}, which is used to inform volume mute.
+     */
+    public static final int OSD_MESSAGE_AVR_VOLUME_CHANGED = 2;
+
+    /**
      * Used as an extra field in the intent {@link #ACTION_OSD_MESSAGE}. Contains the ID of
      * the message to display on screen.
      */
     public static final String EXTRA_MESSAGE_ID = "android.hardware.hdmi.extra.MESSAGE_ID";
+    /**
+     * Used as an extra field in the intent {@link #ACTION_OSD_MESSAGE}. Contains the extra value
+     * of the message.
+     */
+    public static final String EXTRA_MESSAGE_EXTRAM_PARAM1 =
+            "android.hardware.hdmi.extra.MESSAGE_EXTRA_PARAM1";
+
+    /**
+     * Volume value for mute state.
+     */
+    public static final int AVR_VOLUME_MUTED = 101;
 
     public static final int POWER_STATUS_UNKNOWN = -1;
     public static final int POWER_STATUS_ON = 0;
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index 7a49eb5..7390e2b 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -480,7 +480,7 @@
             int capturePreambleMs = in.readInt();
             boolean triggerInData = in.readByte() == 1;
             AudioFormat captureFormat = null;
-            if (triggerInData) {
+            if (in.readByte() == 1) {
                 int sampleRate = in.readInt();
                 int encoding = in.readInt();
                 int channelMask = in.readInt();
@@ -508,7 +508,8 @@
             dest.writeInt(captureSession);
             dest.writeInt(captureDelayMs);
             dest.writeInt(capturePreambleMs);
-            if (triggerInData && (captureFormat != null)) {
+            dest.writeByte((byte) (triggerInData ? 1 : 0));
+            if (captureFormat != null) {
                 dest.writeByte((byte)1);
                 dest.writeInt(captureFormat.getSampleRate());
                 dest.writeInt(captureFormat.getEncoding());
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 4bfef41..70b402d 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -685,6 +685,23 @@
     }
 
     /**
+     * Returns the {@link Network} object currently serving a given type, or
+     * null if the given type is not connected.
+     *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
+     *
+     * @hide
+     */
+    public Network getNetworkForType(int networkType) {
+        try {
+            return mService.getNetworkForType(networkType);
+        } catch (RemoteException e) {
+            return null;
+        }
+    }
+
+    /**
      * Returns an array of all {@link Network} currently tracked by the
      * framework.
      *
@@ -1281,7 +1298,7 @@
     }
 
     /**
-     * Callback for use with {@link ConnectivityManager#registerDefaultNetworkActiveListener}
+     * Callback for use with {@link ConnectivityManager#addDefaultNetworkActiveListener}
      * to find out when the system default network has gone in to a high power state.
      */
     public interface OnNetworkActiveListener {
@@ -1323,7 +1340,7 @@
      *
      * @param l The listener to be told when the network is active.
      */
-    public void registerDefaultNetworkActiveListener(final OnNetworkActiveListener l) {
+    public void addDefaultNetworkActiveListener(final OnNetworkActiveListener l) {
         INetworkActivityListener rl = new INetworkActivityListener.Stub() {
             @Override
             public void onNetworkActive() throws RemoteException {
@@ -1340,11 +1357,11 @@
 
     /**
      * Remove network active listener previously registered with
-     * {@link #registerDefaultNetworkActiveListener}.
+     * {@link #addDefaultNetworkActiveListener}.
      *
      * @param l Previously registered listener.
      */
-    public void unregisterDefaultNetworkActiveListener(OnNetworkActiveListener l) {
+    public void removeDefaultNetworkActiveListener(OnNetworkActiveListener l) {
         INetworkActivityListener rl = mNetworkActivityListeners.get(l);
         if (rl == null) {
             throw new IllegalArgumentException("Listener not registered: " + l);
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index b2fc3be..974c4cd 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -48,6 +48,7 @@
     NetworkInfo getNetworkInfo(int networkType);
     NetworkInfo getNetworkInfoForNetwork(in Network network);
     NetworkInfo[] getAllNetworkInfo();
+    Network getNetworkForType(int networkType);
     Network[] getAllNetworks();
 
     NetworkInfo getProvisioningOrActiveNetworkInfo();
diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java
index f9a25f9..c387055 100644
--- a/core/java/android/net/LinkAddress.java
+++ b/core/java/android/net/LinkAddress.java
@@ -274,7 +274,6 @@
 
     /**
      * Implement the Parcelable interface.
-     * @hide
      */
     public int describeContents() {
         return 0;
@@ -282,7 +281,6 @@
 
     /**
      * Implement the Parcelable interface.
-     * @hide
      */
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeByteArray(address.getAddress());
@@ -293,7 +291,6 @@
 
     /**
      * Implement the Parcelable interface.
-     * @hide
      */
     public static final Creator<LinkAddress> CREATOR =
         new Creator<LinkAddress>() {
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index d2a4728..e686be7 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -35,6 +35,7 @@
 import java.util.concurrent.atomic.AtomicReference;
 import javax.net.SocketFactory;
 
+import com.android.okhttp.ConnectionPool;
 import com.android.okhttp.HostResolver;
 import com.android.okhttp.OkHttpClient;
 
@@ -60,6 +61,17 @@
     private volatile OkHttpClient mOkHttpClient = null;
     private Object mLock = new Object();
 
+    // Default connection pool values. These are evaluated at startup, just
+    // like the OkHttp code. Also like the OkHttp code, we will throw parse
+    // exceptions at class loading time if the properties are set but are not
+    // valid integers.
+    private static final boolean httpKeepAlive =
+            Boolean.parseBoolean(System.getProperty("http.keepAlive", "true"));
+    private static final int httpMaxConnections =
+            httpKeepAlive ? Integer.parseInt(System.getProperty("http.maxConnections", "5")) : 0;
+    private static final long httpKeepAliveDurationMs =
+            Long.parseLong(System.getProperty("http.keepAliveDuration", "300000"));  // 5 minutes.
+
     /**
      * @hide
      */
@@ -183,6 +195,20 @@
         return mNetworkBoundSocketFactory;
     }
 
+    // TODO: This creates an OkHttpClient with its own connection pool for
+    // every Network object, instead of one for every NetId. This is
+    // suboptimal, because an app could potentially have more than one
+    // Network object for the same NetId, causing increased memory footprint
+    // and performance penalties due to lack of connection reuse (connection
+    // setup time, congestion window growth time, etc.).
+    //
+    // Instead, investigate only having one OkHttpClient for every NetId,
+    // perhaps by using a static HashMap of NetIds to OkHttpClient objects. The
+    // tricky part is deciding when to remove an OkHttpClient; a WeakHashMap
+    // shouldn't be used because whether a Network is referenced doesn't
+    // correlate with whether a new Network will be instantiated in the near
+    // future with the same NetID. A good solution would involve purging empty
+    // (or when all connections are timed out) ConnectionPools.
     private void maybeInitHttpClient() {
         if (mOkHttpClient == null) {
             synchronized (mLock) {
@@ -193,9 +219,12 @@
                             return Network.this.getAllByName(host);
                         }
                     };
+                    ConnectionPool pool = new ConnectionPool(httpMaxConnections,
+                                                             httpKeepAliveDurationMs);
                     mOkHttpClient = new OkHttpClient()
                             .setSocketFactory(getSocketFactory())
-                            .setHostResolver(hostResolver);
+                            .setHostResolver(hostResolver)
+                            .setConnectionPool(pool);
                 }
             }
         }
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 8df9916..80e5b91 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -223,6 +223,9 @@
      * Called by the bearer code when it has a new score for this network.
      */
     public void sendNetworkScore(int score) {
+        if (score < 0) {
+            throw new IllegalArgumentException("Score must be >= 0");
+        }
         queueOrSendMessage(EVENT_NETWORK_SCORE_CHANGED, new Integer(score));
     }
 
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index d279412..7664c95 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -128,14 +128,6 @@
     private boolean mIsAvailable;
 
     /**
-     * @param type network type
-     * @deprecated
-     * @hide because this constructor was only meant for internal use (and
-     * has now been superseded by the package-private constructor below).
-     */
-    public NetworkInfo(int type) {}
-
-    /**
      * @hide
      */
     public NetworkInfo(int type, int subtype, String typeName, String subtypeName) {
diff --git a/core/java/android/net/NetworkRequest.java b/core/java/android/net/NetworkRequest.java
index 83bdfaa..5a09b46 100644
--- a/core/java/android/net/NetworkRequest.java
+++ b/core/java/android/net/NetworkRequest.java
@@ -52,6 +52,9 @@
      * @hide
      */
     public NetworkRequest(NetworkCapabilities nc, int legacyType, int rId) {
+        if (nc == null) {
+            throw new NullPointerException();
+        }
         requestId = rId;
         networkCapabilities = nc;
         this.legacyType = legacyType;
diff --git a/core/java/android/net/ProxyInfo.java b/core/java/android/net/ProxyInfo.java
index 7ea6bae..1534e2c 100644
--- a/core/java/android/net/ProxyInfo.java
+++ b/core/java/android/net/ProxyInfo.java
@@ -334,10 +334,6 @@
         dest.writeStringArray(mParsedExclusionList);
     }
 
-    /**
-     * Implement the Parcelable interface.
-     * @hide
-     */
     public static final Creator<ProxyInfo> CREATOR =
         new Creator<ProxyInfo>() {
             public ProxyInfo createFromParcel(Parcel in) {
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index fe9f79b..461469c 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -1667,7 +1667,7 @@
      */
     public abstract long[] getChargeStepDurationsArray();
 
-    public abstract Map<String, ? extends LongCounter> getWakeupReasonStats();
+    public abstract Map<String, ? extends Timer> getWakeupReasonStats();
 
     public abstract Map<String, ? extends Timer> getKernelWakelockStats();
 
@@ -2045,11 +2045,15 @@
                             sb.toString());
                 }
             }
-            Map<String, ? extends LongCounter> wakeupReasons = getWakeupReasonStats();
+            Map<String, ? extends Timer> wakeupReasons = getWakeupReasonStats();
             if (wakeupReasons.size() > 0) {
-                for (Map.Entry<String, ? extends LongCounter> ent : wakeupReasons.entrySet()) {
+                for (Map.Entry<String, ? extends Timer> ent : wakeupReasons.entrySet()) {
+                    // Not doing the regular wake lock formatting to remain compatible
+                    // with the old checkin format.
+                    long totalTimeMicros = ent.getValue().getTotalTimeLocked(rawRealtime, which);
+                    int count = ent.getValue().getCountLocked(which);
                     dumpLine(pw, 0 /* uid */, category, WAKEUP_REASON_DATA,
-                            "\"" + ent.getKey() + "\"", ent.getValue().getCountLocked(which));
+                            "\"" + ent.getKey() + "\"", (totalTimeMicros + 500) / 1000, count);
                 }
             }
         }
@@ -2921,14 +2925,14 @@
                 pw.println();
             }
 
-            Map<String, ? extends LongCounter> wakeupReasons = getWakeupReasonStats();
+            Map<String, ? extends Timer> wakeupReasons = getWakeupReasonStats();
             if (wakeupReasons.size() > 0) {
                 pw.print(prefix); pw.println("  All wakeup reasons:");
                 final ArrayList<TimerEntry> reasons = new ArrayList<TimerEntry>();
-                for (Map.Entry<String, ? extends LongCounter> ent : wakeupReasons.entrySet()) {
-                    BatteryStats.LongCounter counter = ent.getValue();
-                    reasons.add(new TimerEntry(ent.getKey(), 0, null,
-                            ent.getValue().getCountLocked(which)));
+                for (Map.Entry<String, ? extends Timer> ent : wakeupReasons.entrySet()) {
+                    Timer timer = ent.getValue();
+                    reasons.add(new TimerEntry(ent.getKey(), 0, timer,
+                            timer.getCountLocked(which)));
                 }
                 Collections.sort(reasons, timerComparator);
                 for (int i=0; i<reasons.size(); i++) {
@@ -2938,9 +2942,8 @@
                     sb.append(prefix);
                     sb.append("  Wakeup reason ");
                     sb.append(timer.mName);
-                    sb.append(": ");
-                    formatTimeMs(sb, timer.mTime);
-                    sb.append("realtime");
+                    printWakeLock(sb, timer.mTimer, rawRealtime, null, which, ": ");
+                    sb.append(" realtime");
                     pw.println(sb.toString());
                 }
                 pw.println();
@@ -3138,7 +3141,7 @@
             }
 
             Map<String, ? extends Timer> jobs = u.getJobStats();
-            if (syncs.size() > 0) {
+            if (jobs.size() > 0) {
                 for (Map.Entry<String, ? extends Timer> ent : jobs.entrySet()) {
                     Timer timer = ent.getValue();
                     // Convert from microseconds to milliseconds with rounding
@@ -3952,7 +3955,7 @@
         prepareForDumpLocked();
 
         dumpLine(pw, 0 /* uid */, "i" /* category */, VERSION_DATA,
-                "10", getParcelVersion(), getStartPlatformVersion(), getEndPlatformVersion());
+                "11", getParcelVersion(), getStartPlatformVersion(), getEndPlatformVersion());
 
         long now = getHistoryBaseTime() + SystemClock.elapsedRealtime();
 
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index b0e0b49..1e0dc53 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -541,7 +541,7 @@
          * Intent.</li>
          * </ul>
          */
-        public static final int L = CUR_DEVELOPMENT;
+        public static final int L = 21;
     }
     
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index 3252d19..a9aa570 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -17,6 +17,8 @@
 package android.os;
 
 import android.util.ArrayMap;
+import android.util.Size;
+import android.util.SizeF;
 import android.util.SparseArray;
 
 import java.io.Serializable;
@@ -335,6 +337,30 @@
     }
 
     /**
+     * Inserts a Size value into the mapping of this Bundle, replacing
+     * any existing value for the given key.  Either key or value may be null.
+     *
+     * @param key a String, or null
+     * @param value a Size object, or null
+     */
+    public void putSize(String key, Size value) {
+        unparcel();
+        mMap.put(key, value);
+    }
+
+    /**
+     * Inserts a SizeF value into the mapping of this Bundle, replacing
+     * any existing value for the given key.  Either key or value may be null.
+     *
+     * @param key a String, or null
+     * @param value a SizeF object, or null
+     */
+    public void putSizeF(String key, SizeF value) {
+        unparcel();
+        mMap.put(key, value);
+    }
+
+    /**
      * Inserts an array of Parcelable values into the mapping of this Bundle,
      * replacing any existing value for the given key.  Either key or value may
      * be null.
@@ -712,6 +738,44 @@
      * value is explicitly associated with the key.
      *
      * @param key a String, or null
+     * @return a Size value, or null
+     */
+    public Size getSize(String key) {
+        unparcel();
+        final Object o = mMap.get(key);
+        try {
+            return (Size) o;
+        } catch (ClassCastException e) {
+            typeWarning(key, o, "Size", e);
+            return null;
+        }
+    }
+
+    /**
+     * Returns the value associated with the given key, or null if
+     * no mapping of the desired type exists for the given key or a null
+     * value is explicitly associated with the key.
+     *
+     * @param key a String, or null
+     * @return a Size value, or null
+     */
+    public SizeF getSizeF(String key) {
+        unparcel();
+        final Object o = mMap.get(key);
+        try {
+            return (SizeF) o;
+        } catch (ClassCastException e) {
+            typeWarning(key, o, "SizeF", e);
+            return null;
+        }
+    }
+
+    /**
+     * Returns the value associated with the given key, or null if
+     * no mapping of the desired type exists for the given key or a null
+     * value is explicitly associated with the key.
+     *
+     * @param key a String, or null
      * @return a Bundle value, or null
      */
     public Bundle getBundle(String key) {
diff --git a/core/java/android/os/FileBridge.java b/core/java/android/os/FileBridge.java
index 022a106..0acf24b 100644
--- a/core/java/android/os/FileBridge.java
+++ b/core/java/android/os/FileBridge.java
@@ -75,6 +75,13 @@
         return mClosed;
     }
 
+    public void forceClose() {
+        IoUtils.closeQuietly(mTarget);
+        IoUtils.closeQuietly(mServer);
+        IoUtils.closeQuietly(mClient);
+        mClosed = true;
+    }
+
     public void setTargetFile(FileDescriptor target) {
         mTarget = target;
     }
@@ -89,7 +96,6 @@
         try {
             while (IoBridge.read(mServer, temp, 0, MSG_LENGTH) == MSG_LENGTH) {
                 final int cmd = Memory.peekInt(temp, 0, ByteOrder.BIG_ENDIAN);
-
                 if (cmd == CMD_WRITE) {
                     // Shuttle data into local file
                     int len = Memory.peekInt(temp, 4, ByteOrder.BIG_ENDIAN);
@@ -118,15 +124,10 @@
                 }
             }
 
-        } catch (ErrnoException e) {
-            Log.wtf(TAG, "Failed during bridge", e);
-        } catch (IOException e) {
+        } catch (ErrnoException | IOException e) {
             Log.wtf(TAG, "Failed during bridge", e);
         } finally {
-            IoUtils.closeQuietly(mTarget);
-            IoUtils.closeQuietly(mServer);
-            IoUtils.closeQuietly(mClient);
-            mClosed = true;
+            forceClose();
         }
     }
 
@@ -151,6 +152,7 @@
                 writeCommandAndBlock(CMD_CLOSE, "close()");
             } finally {
                 IoBridge.closeAndSignalBlockedThreads(mClient);
+                IoUtils.closeQuietly(mClientPfd);
             }
         }
 
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 6d4a302..b3e28ea 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -19,6 +19,7 @@
 
 import android.net.InterfaceConfiguration;
 import android.net.INetworkManagementEventObserver;
+import android.net.Network;
 import android.net.NetworkStats;
 import android.net.RouteInfo;
 import android.net.UidRange;
@@ -164,10 +165,10 @@
     /**
      * Sets the list of DNS forwarders (in order of priority)
      */
-    void setDnsForwarders(in String[] dns);
+    void setDnsForwarders(in Network network, in String[] dns);
 
     /**
-     * Returns the list of DNS fowarders (in order of priority)
+     * Returns the list of DNS forwarders (in order of priority)
      */
     String[] getDnsForwarders();
 
diff --git a/core/java/android/os/IUserManager.aidl b/core/java/android/os/IUserManager.aidl
index 713fcd8..3286627 100644
--- a/core/java/android/os/IUserManager.aidl
+++ b/core/java/android/os/IUserManager.aidl
@@ -52,4 +52,5 @@
     void removeRestrictions();
     void setDefaultGuestRestrictions(in Bundle restrictions);
     Bundle getDefaultGuestRestrictions();
+    boolean markGuestForDeletion(int userHandle);
 }
diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java
index 1a5811c..b6b70cc 100644
--- a/core/java/android/os/Message.java
+++ b/core/java/android/os/Message.java
@@ -113,6 +113,8 @@
 
     private static final int MAX_POOL_SIZE = 50;
 
+    private static boolean gCheckRecycle = true;
+
     /**
      * Return a new Message instance from the global pool. Allows us to
      * avoid allocating new objects in many cases.
@@ -256,6 +258,13 @@
         return m;
     }
 
+    /** @hide */
+    public static void updateCheckRecycle(int targetSdkVersion) {
+        if (targetSdkVersion < Build.VERSION_CODES.L) {
+            gCheckRecycle = false;
+        }
+    }
+
     /**
      * Return a Message instance to the global pool.
      * <p>
@@ -266,8 +275,11 @@
      */
     public void recycle() {
         if (isInUse()) {
-            throw new IllegalStateException("This message cannot be recycled because it "
-                    + "is still in use.");
+            if (gCheckRecycle) {
+                throw new IllegalStateException("This message cannot be recycled because it "
+                        + "is still in use.");
+            }
+            return;
         }
         recycleUnchecked();
     }
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 645d510..d1ad0ad 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -19,6 +19,8 @@
 import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.Log;
+import android.util.Size;
+import android.util.SizeF;
 import android.util.SparseArray;
 import android.util.SparseBooleanArray;
 
@@ -224,6 +226,8 @@
     private static final int VAL_BOOLEANARRAY = 23;
     private static final int VAL_CHARSEQUENCEARRAY = 24;
     private static final int VAL_PERSISTABLEBUNDLE = 25;
+    private static final int VAL_SIZE = 26;
+    private static final int VAL_SIZEF = 27;
 
     // The initial int32 in a Binder call's reply Parcel header:
     private static final int EX_SECURITY = -1;
@@ -672,6 +676,24 @@
     }
 
     /**
+     * Flatten a Size into the parcel at the current dataPosition(),
+     * growing dataCapacity() if needed.
+     */
+    public final void writeSize(Size val) {
+        writeInt(val.getWidth());
+        writeInt(val.getHeight());
+    }
+
+    /**
+     * Flatten a SizeF into the parcel at the current dataPosition(),
+     * growing dataCapacity() if needed.
+     */
+    public final void writeSizeF(SizeF val) {
+        writeFloat(val.getWidth());
+        writeFloat(val.getHeight());
+    }
+
+    /**
      * Flatten a List into the parcel at the current dataPosition(), growing
      * dataCapacity() if needed.  The List values are written using
      * {@link #writeValue} and must follow the specification there.
@@ -1293,6 +1315,12 @@
         } else if (v instanceof PersistableBundle) {
             writeInt(VAL_PERSISTABLEBUNDLE);
             writePersistableBundle((PersistableBundle) v);
+        } else if (v instanceof Size) {
+            writeInt(VAL_SIZE);
+            writeSize((Size) v);
+        } else if (v instanceof SizeF) {
+            writeInt(VAL_SIZEF);
+            writeSizeF((SizeF) v);
         } else {
             Class<?> clazz = v.getClass();
             if (clazz.isArray() && clazz.getComponentType() == Object.class) {
@@ -1699,6 +1727,24 @@
     }
 
     /**
+     * Read a Size from the parcel at the current dataPosition().
+     */
+    public final Size readSize() {
+        final int width = readInt();
+        final int height = readInt();
+        return new Size(width, height);
+    }
+
+    /**
+     * Read a SizeF from the parcel at the current dataPosition().
+     */
+    public final SizeF readSizeF() {
+        final float width = readFloat();
+        final float height = readFloat();
+        return new SizeF(width, height);
+    }
+
+    /**
      * Read and return a byte[] object from the parcel.
      */
     public final byte[] createByteArray() {
@@ -2160,6 +2206,12 @@
         case VAL_PERSISTABLEBUNDLE:
             return readPersistableBundle(loader);
 
+        case VAL_SIZE:
+            return readSize();
+
+        case VAL_SIZEF:
+            return readSizeF();
+
         default:
             int off = dataPosition() - 4;
             throw new RuntimeException(
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index c3ac012..b2ebc31 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -468,6 +468,7 @@
      * @param targetSdkVersion The target SDK version for the app.
      * @param seInfo null-ok SELinux information for the new process.
      * @param abi non-null the ABI this app should be started with.
+     * @param instructionSet null-ok the instruction set to use.
      * @param zygoteArgs Additional arguments to supply to the zygote process.
      * 
      * @return An object that describes the result of the attempt to start the process.
@@ -482,11 +483,12 @@
                                   int targetSdkVersion,
                                   String seInfo,
                                   String abi,
+                                  String instructionSet,
                                   String[] zygoteArgs) {
         try {
             return startViaZygote(processClass, niceName, uid, gid, gids,
                     debugFlags, mountExternal, targetSdkVersion, seInfo,
-                    abi, zygoteArgs);
+                    abi, instructionSet, zygoteArgs);
         } catch (ZygoteStartFailedEx ex) {
             Log.e(LOG_TAG,
                     "Starting VM process through Zygote failed");
@@ -589,6 +591,7 @@
      * @param targetSdkVersion The target SDK version for the app.
      * @param seInfo null-ok SELinux information for the new process.
      * @param abi the ABI the process should use.
+     * @param instructionSet null-ok the instruction set to use.
      * @param extraArgs Additional arguments to supply to the zygote process.
      * @return An object that describes the result of the attempt to start the process.
      * @throws ZygoteStartFailedEx if process start failed for any reason
@@ -601,6 +604,7 @@
                                   int targetSdkVersion,
                                   String seInfo,
                                   String abi,
+                                  String instructionSet,
                                   String[] extraArgs)
                                   throws ZygoteStartFailedEx {
         synchronized(Process.class) {
@@ -660,6 +664,10 @@
                 argsForZygote.add("--seinfo=" + seInfo);
             }
 
+            if (instructionSet != null) {
+                argsForZygote.add("--instruction-set=" + instructionSet);
+            }
+
             argsForZygote.add(processClass);
 
             if (extraArgs != null) {
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java
index 5ce9d5c..0ff5f6a 100644
--- a/core/java/android/os/UserHandle.java
+++ b/core/java/android/os/UserHandle.java
@@ -234,6 +234,7 @@
      * @return user id of the current process
      * @hide
      */
+    @SystemApi
     public static final int myUserId() {
         return getUserId(Process.myUid());
     }
@@ -253,7 +254,11 @@
         mHandle = h;
     }
 
-    /** @hide */
+    /**
+     * Returns the userId stored in this UserHandle.
+     * @hide
+     */
+    @SystemApi
     public int getIdentifier() {
         return mHandle;
     }
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index e215669..33fda4a 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -15,16 +15,14 @@
  */
 package android.os;
 
+import android.annotation.SystemApi;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
 import android.content.Context;
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.graphics.Canvas;
-import android.graphics.Bitmap.Config;
 import android.graphics.Rect;
-import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.provider.Settings;
 import android.util.Log;
@@ -45,190 +43,208 @@
     private final Context mContext;
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from adding and removing
-     * accounts.
+     * Specifies if a user is disallowed from adding and removing accounts.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from changing Wi-Fi
+     * Specifies if a user is disallowed from changing Wi-Fi
      * access points. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_WIFI = "no_config_wifi";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from installing applications.
+     * Specifies if a user is disallowed from installing applications.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_INSTALL_APPS = "no_install_apps";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from uninstalling applications.
+     * Specifies if a user is disallowed from uninstalling applications.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from toggling location sharing.
+     * Specifies if a user is disallowed from toggling location sharing.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_SHARE_LOCATION = "no_share_location";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from enabling the
+     * Specifies if a user is disallowed from enabling the
      * "Unknown Sources" setting, that allows installation of apps from unknown sources.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring bluetooth.
+     * Specifies if a user is disallowed from configuring bluetooth.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from transferring files over
+     * Specifies if a user is disallowed from transferring files over
      * USB. This can only be set by device owners. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring user
+     * Specifies if a user is disallowed from configuring user
      * credentials. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from removing itself and other
+     * Specifies if a user is disallowed from removing itself and other
      * users. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_REMOVE_USER = "no_remove_user";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from enabling or
+     * Specifies if a user is disallowed from enabling or
      * accessing debugging features. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_DEBUGGING_FEATURES = "no_debugging_features";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring VPN.
+     * Specifies if a user is disallowed from configuring VPN.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_VPN = "no_config_vpn";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring Tethering
+     * Specifies if a user is disallowed from configuring Tethering
      * & portable hotspots. This can only be set by device owners. The default value is
      * <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from factory resetting
+     * Specifies if a user is disallowed from factory resetting
      * from Settings. This can only be set by device owners. The default value is
      * <code>false</code>.
-     * <p>
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_FACTORY_RESET = "no_factory_reset";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from adding new users and
+     * Specifies if a user is disallowed from adding new users and
      * profiles. This can only be set by device owners. The default value is <code>false</code>.
-     * <p>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_ADD_USER = "no_add_user";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from disabling application
+     * Specifies if a user is disallowed from disabling application
      * verification. The default value is <code>false</code>.
-     * <p>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String ENSURE_VERIFY_APPS = "ensure_verify_apps";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring cell
+     * Specifies if a user is disallowed from configuring cell
      * broadcasts. This can only be set by device owners. The default value is <code>false</code>.
-     * <p>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from configuring mobile
+     * Specifies if a user is disallowed from configuring mobile
      * networks. This can only be set by device owners. The default value is <code>false</code>.
-     * <p>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from modifying
+     * Specifies if a user is disallowed from modifying
      * applications in Settings or launchers. The following actions will not be allowed when this
      * restriction is enabled:
      * <li>uninstalling apps</li>
@@ -239,69 +255,75 @@
      * <li>clearing app defaults</li>
      * <p>
      * The default value is <code>false</code>.
-     * <p>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_APPS_CONTROL = "no_control_apps";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from mounting
+     * Specifies if a user is disallowed from mounting
      * physical external media. This can only be set by device owners. The default value is
      * <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from adjusting microphone
+     * Specifies if a user is disallowed from adjusting microphone
      * volume. If set, the microphone will be muted. This can only be set by device owners.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_UNMUTE_MICROPHONE = "no_unmute_microphone";
 
     /**
-     * Key for user restrictions. Specifies if a user is disallowed from adjusting the master
+     * Specifies if a user is disallowed from adjusting the master
      * volume. If set, the master volume will be muted. This can only be set by device owners.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";
 
     /**
-     * Key for user restrictions. Specifies that the user is not allowed to make outgoing
+     * Specifies that the user is not allowed to make outgoing
      * phone calls. Emergency calls are still permitted.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls";
 
     /**
-     * Key for user restrictions. Specifies that the user is not allowed to send or receive
+     * Specifies that the user is not allowed to send or receive
      * SMS messages. This can only be set by device owners. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_SMS = "no_sms";
 
     /**
-     * Key for user restrictions. Specifies that windows besides app windows should not be
+     * Specifies that windows besides app windows should not be
      * created. This will block the creation of the following types of windows.
      * <li>{@link LayoutParams#TYPE_TOAST}</li>
      * <li>{@link LayoutParams#TYPE_PHONE}</li>
@@ -311,25 +333,38 @@
      * <li>{@link LayoutParams#TYPE_SYSTEM_OVERLAY}</li>
      *
      * <p>This can only be set by device owners. The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CREATE_WINDOWS = "no_create_windows";
 
     /**
-     * Key for user restrictions. Specifies if what is copied in the clipboard of this profile can
+     * Specifies if what is copied in the clipboard of this profile can
      * be pasted in related profiles. Does not restrict if the clipboard of related profiles can be
      * pasted in this profile.
      * The default value is <code>false</code>.
-     * <p/>
-     * Type: Boolean
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
      * @see #setUserRestrictions(Bundle)
      * @see #getUserRestrictions()
      */
     public static final String DISALLOW_CROSS_PROFILE_COPY_PASTE = "no_cross_profile_copy_paste";
 
+    /**
+     * Specifies if the user is not allowed to use NFC to beam out data from apps.
+     * The default value is <code>false</code>.
+     *
+     * <p/>Key for user restrictions.
+     * <p/>Type: Boolean
+     * @see #setUserRestrictions(Bundle)
+     * @see #getUserRestrictions()
+     */
+    public static final String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam";
+
     /** @hide */
     public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3;
     /** @hide */
@@ -424,6 +459,19 @@
     }
 
     /**
+     * Checks if the calling app is running in a managed profile.
+     * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
+     *
+     * @return whether the caller is in a managed profile.
+     * @hide
+     */
+    @SystemApi
+    public boolean isManagedProfile() {
+        UserInfo user = getUserInfo(UserHandle.myUserId());
+        return user != null ? user.isManagedProfile() : false;
+    }
+
+    /**
      * Return whether the given user is actively running.  This means that
      * the user is in the "started" state, not "stopped" -- it is currently
      * allowed to run code through scheduled alarms, receiving broadcasts,
@@ -646,6 +694,7 @@
             try {
                 Bundle guestRestrictions = mService.getDefaultGuestRestrictions();
                 guestRestrictions.putBoolean(DISALLOW_SMS, true);
+                guestRestrictions.putBoolean(DISALLOW_INSTALL_UNKNOWN_SOURCES, true);
                 mService.setUserRestrictions(guestRestrictions, guest.id);
             } catch (RemoteException re) {
                 Log.w(TAG, "Could not update guest restrictions");
@@ -676,6 +725,22 @@
     }
 
     /**
+     * @hide
+     * Marks the guest user for deletion to allow a new guest to be created before deleting
+     * the current user who is a guest.
+     * @param userHandle
+     * @return
+     */
+    public boolean markGuestForDeletion(int userHandle) {
+        try {
+            return mService.markGuestForDeletion(userHandle);
+        } catch (RemoteException re) {
+            Log.w(TAG, "Could not mark guest for deletion", re);
+            return false;
+        }
+    }
+
+    /**
      * Sets the user as enabled, if such an user exists.
      * Requires {@link android.Manifest.permission#MANAGE_USERS} permission.
      * Note that the default is true, it's only that managed profiles might not be enabled.
@@ -807,46 +872,10 @@
      * @param user The target user.
      * @return A drawable that combines the original icon and a badge as
      *         determined by the system.
+     * @removed
      */
     public Drawable getBadgedIconForUser(Drawable icon, UserHandle user) {
-        final int badgeResId = getBadgeResIdForUser(user.getIdentifier());
-        if (badgeResId == 0) {
-            return icon;
-        }
-        Drawable badgeIcon = mContext.getPackageManager()
-                .getDrawable("system", badgeResId, null);
-        return getBadgedDrawable(icon, badgeIcon, null, true);
-    }
-
-    /**
-     * If the target user is a managed profile of the calling user or the caller
-     * is itself a managed profile, then this returns a badged copy of the given
-     * icon to be able to distinguish it from the original icon.
-     * <p>
-     * If the original drawable is not a BitmapDrawable, then the original
-     * drawable is returned.
-     * </p>
-     *
-     * @param icon The icon to badge.
-     * @param user The target user.
-     * @return A drawable that combines the original icon and a badge as
-     *         determined by the system.
-     *
-     * @deprecation Use {@link #getBadgedIconForUser(
-     *     android.graphics.drawable.Drawable, UserHandle)}
-     *
-     * @hide
-     */
-    @Deprecated
-    public Drawable getBadgedDrawableForUser(Drawable icon, UserHandle user) {
-        int badgeResId = getBadgeResIdForUser(user.getIdentifier());
-        if (badgeResId == 0) {
-            return icon;
-        } else {
-            Drawable badgeIcon = mContext.getPackageManager()
-                    .getDrawable("system", badgeResId, null);
-            return getBadgedDrawable(icon, badgeIcon, null, false);
-        }
+        return mContext.getPackageManager().getUserBadgedIcon(icon, user);
     }
 
     /**
@@ -872,14 +901,12 @@
      *         the density of the display is used.
      * @return A drawable that combines the original drawable and a badge as
      *         determined by the system.
+     * @removed
      */
     public Drawable getBadgedDrawableForUser(Drawable badgedDrawable, UserHandle user,
             Rect badgeLocation, int badgeDensity) {
-        Drawable badgeDrawable = getBadgeForUser(user, badgeDensity);
-        if (badgeDrawable == null) {
-            return badgedDrawable;
-        }
-        return getBadgedDrawable(badgedDrawable, badgeDrawable, badgeLocation, true);
+        return mContext.getPackageManager().getUserBadgedDrawableForDensity(badgedDrawable, user,
+                badgeLocation, badgeDensity);
     }
 
     /**
@@ -892,114 +919,10 @@
      * @param user The target user.
      * @return A label that combines the original label and a badge as
      *         determined by the system.
+     * @removed
      */
     public CharSequence getBadgedLabelForUser(CharSequence label, UserHandle user) {
-        UserInfo userInfo = getUserIfProfile(user.getIdentifier());
-        if (userInfo != null && userInfo.isManagedProfile()) {
-            return Resources.getSystem().getString(
-                    R.string.managed_profile_label_badge, label);
-        }
-        return label;
-    }
-
-    /**
-     * If the target user is a managed profile of the calling user or the caller
-     * is itself a managed profile, then this returns a drawable to use as a small
-     * icon to include in a view to distinguish it from the original icon.
-     *
-     * @param user The target user.
-     * @param density The optional desired density for the badge as per
-     *         {@link android.util.DisplayMetrics#densityDpi}. If not provided
-     *         the density of the current display is used.
-     * @return the drawable or null if no drawable is required.
-     * @hide
-     */
-    public Drawable getBadgeForUser(UserHandle user, int density) {
-        UserInfo userInfo = getUserIfProfile(user.getIdentifier());
-        if (userInfo != null && userInfo.isManagedProfile()) {
-            if (density <= 0) {
-                density = mContext.getResources().getDisplayMetrics().densityDpi;
-            }
-            return Resources.getSystem().getDrawableForDensity(
-                    com.android.internal.R.drawable.ic_corp_badge, density);
-        }
-        return null;
-    }
-
-    private int getBadgeResIdForUser(int userHandle) {
-        // Return the framework-provided badge.
-        UserInfo userInfo = getUserIfProfile(userHandle);
-        if (userInfo != null && userInfo.isManagedProfile()) {
-            return com.android.internal.R.drawable.ic_corp_icon_badge;
-        }
-        return 0;
-    }
-
-    /**
-     * @return UserInfo for userHandle if it exists and is a profile of the current
-     *         user or null.
-     */
-    private UserInfo getUserIfProfile(int userHandle) {
-        List<UserInfo> userProfiles = getProfiles(getUserHandle());
-        for (UserInfo user : userProfiles) {
-            if (user.id == userHandle) {
-                return user;
-            }
-        }
-        return null;
-    }
-
-    private Drawable getBadgedDrawable(Drawable badgedDrawable, Drawable badgeDrawable,
-            Rect badgeLocation, boolean tryBadgeInPlace) {
-        final int badgedWidth = badgedDrawable.getIntrinsicWidth();
-        final int badgedHeight = badgedDrawable.getIntrinsicHeight();
-        final boolean canBadgeInPlace = tryBadgeInPlace
-                && (badgedDrawable instanceof BitmapDrawable)
-                && ((BitmapDrawable) badgedDrawable).getBitmap().isMutable();
-
-        final Bitmap bitmap;
-        if (canBadgeInPlace) {
-            bitmap = ((BitmapDrawable) badgedDrawable).getBitmap();
-        } else {
-            bitmap = Bitmap.createBitmap(badgedWidth, badgedHeight, Config.ARGB_8888);
-        }
-        Canvas canvas = new Canvas(bitmap);
-
-        if (!canBadgeInPlace) {
-            badgedDrawable.setBounds(0, 0, badgedWidth, badgedHeight);
-            badgedDrawable.draw(canvas);
-        }
-
-        if (badgeLocation != null) {
-            if (badgeLocation.left < 0 || badgeLocation.top < 0
-                    || badgeLocation.width() > badgedWidth || badgeLocation.height() > badgedHeight) {
-                throw new IllegalArgumentException("Badge location " + badgeLocation
-                        + " not in badged drawable bounds "
-                        + new Rect(0, 0, badgedWidth, badgedHeight));
-            }
-            badgeDrawable.setBounds(0, 0, badgeLocation.width(), badgeLocation.height());
-
-            canvas.save();
-            canvas.translate(badgeLocation.left, badgeLocation.top);
-            badgeDrawable.draw(canvas);
-            canvas.restore();
-        } else {
-            badgeDrawable.setBounds(0, 0, badgedWidth, badgedHeight);
-            badgeDrawable.draw(canvas);
-        }
-
-        if (!canBadgeInPlace) {
-            BitmapDrawable mergedDrawable = new BitmapDrawable(mContext.getResources(), bitmap);
-
-            if (badgedDrawable instanceof BitmapDrawable) {
-                BitmapDrawable bitmapDrawable = (BitmapDrawable) badgedDrawable;
-                mergedDrawable.setTargetDensity(bitmapDrawable.getBitmap().getDensity());
-            }
-
-            return mergedDrawable;
-        }
-
-        return badgedDrawable;
+        return mContext.getPackageManager().getUserBadgedLabel(label, user);
     }
 
     /**
diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java
index d1fadd6..cf407f4 100644
--- a/core/java/android/os/storage/IMountService.java
+++ b/core/java/android/os/storage/IMountService.java
@@ -1518,10 +1518,14 @@
     static final int ENCRYPTION_STATE_NONE = 1;
     /** The volume has been encrypted succesfully. */
     static final int ENCRYPTION_STATE_OK = 0;
-    /** The volume is in a bad state. */
+    /** The volume is in a bad state.*/
     static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;
-    /** The volume is in a bad state - partially encrypted. Data is likely irrecoverable. */
+    /** Encryption is incomplete */
     static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;
+    /** Encryption is incomplete and irrecoverable */
+    static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;
+    /** Underlying data is corrupt */
+    static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;
 
     /**
      * Determines the encryption state of the volume.
diff --git a/core/java/android/preference/CheckBoxPreference.java b/core/java/android/preference/CheckBoxPreference.java
index 1ce98b8..fee3f0f1 100644
--- a/core/java/android/preference/CheckBoxPreference.java
+++ b/core/java/android/preference/CheckBoxPreference.java
@@ -66,7 +66,6 @@
         View checkboxView = view.findViewById(com.android.internal.R.id.checkbox);
         if (checkboxView != null && checkboxView instanceof Checkable) {
             ((Checkable) checkboxView).setChecked(mChecked);
-            sendAccessibilityEvent(checkboxView);
         }
 
         syncSummaryView(view);
diff --git a/core/java/android/preference/SwitchPreference.java b/core/java/android/preference/SwitchPreference.java
index 46be928..53b5aad 100644
--- a/core/java/android/preference/SwitchPreference.java
+++ b/core/java/android/preference/SwitchPreference.java
@@ -130,8 +130,6 @@
 
             ((Checkable) checkableView).setChecked(mChecked);
 
-            sendAccessibilityEvent(checkableView);
-
             if (checkableView instanceof Switch) {
                 final Switch switchView = (Switch) checkableView;
                 switchView.setTextOn(mSwitchOn);
diff --git a/core/java/android/preference/TwoStatePreference.java b/core/java/android/preference/TwoStatePreference.java
index 6f8be1f..3823b27 100644
--- a/core/java/android/preference/TwoStatePreference.java
+++ b/core/java/android/preference/TwoStatePreference.java
@@ -24,8 +24,6 @@
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.view.View;
-import android.view.accessibility.AccessibilityEvent;
-import android.view.accessibility.AccessibilityManager;
 import android.widget.TextView;
 
 /**
@@ -39,7 +37,6 @@
     private CharSequence mSummaryOff;
     boolean mChecked;
     private boolean mCheckedSet;
-    private boolean mSendClickAccessibilityEvent;
     private boolean mDisableDependentsState;
 
     public TwoStatePreference(
@@ -63,15 +60,10 @@
     protected void onClick() {
         super.onClick();
 
-        boolean newValue = !isChecked();
-
-        mSendClickAccessibilityEvent = true;
-
-        if (!callChangeListener(newValue)) {
-            return;
+        final boolean newValue = !isChecked();
+        if (callChangeListener(newValue)) {
+            setChecked(newValue);
         }
-
-        setChecked(newValue);
     }
 
     /**
@@ -196,21 +188,6 @@
                 : (Boolean) defaultValue);
     }
 
-    void sendAccessibilityEvent(View view) {
-        // Since the view is still not attached we create, populate,
-        // and send the event directly since we do not know when it
-        // will be attached and posting commands is not as clean.
-        AccessibilityManager accessibilityManager = AccessibilityManager.getInstance(getContext());
-        if (mSendClickAccessibilityEvent && accessibilityManager.isEnabled()) {
-            AccessibilityEvent event = AccessibilityEvent.obtain();
-            event.setEventType(AccessibilityEvent.TYPE_VIEW_CLICKED);
-            view.onInitializeAccessibilityEvent(event);
-            view.dispatchPopulateAccessibilityEvent(event);
-            accessibilityManager.sendAccessibilityEvent(event);
-        }
-        mSendClickAccessibilityEvent = false;
-    }
-
     /**
      * Sync a summary view contained within view's subhierarchy with the correct summary text.
      * @param view View where a summary should be located
diff --git a/core/java/android/print/PrintManager.java b/core/java/android/print/PrintManager.java
index 9361286..bf8ac65 100644
--- a/core/java/android/print/PrintManager.java
+++ b/core/java/android/print/PrintManager.java
@@ -535,7 +535,7 @@
                 destroyed = isDestroyedLocked();
             }
 
-            if (destroyed) {
+            if (destroyed && observer != null) {
                 try {
                     observer.onDestroy();
                 } catch (RemoteException re) {
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 0202f91..a5e86d8 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -116,8 +116,8 @@
          * </pre>
          * </p>
          */
-        public static final String EXTRA_CALL_TYPE_FILTER
-                = "android.provider.extra.call_type_filter";
+        public static final String EXTRA_CALL_TYPE_FILTER =
+                "android.provider.extra.CALL_TYPE_FILTER";
 
         /**
          * Content uri used to access call log entries, including voicemail records. You must have
@@ -167,8 +167,6 @@
          */
         public static final String FEATURES = "features";
 
-        /** Call had no associated features (e.g. voice-only). */
-        public static final int FEATURES_NONE = 0x0;
         /** Call had video. */
         public static final int FEATURES_VIDEO = 0x1;
 
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index 27473e3..18a9eb1 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -1125,7 +1125,7 @@
          * import android.provider.ContactsContract.Contacts;
          *
          * Uri uri = Contacts.CONTENT_URI.buildUpon()
-         *          .appendQueryParameter(Contacts.ADDRESS_BOOK_INDEX_EXTRAS, "true")
+         *          .appendQueryParameter(Contacts.EXTRA_ADDRESS_BOOK_INDEX, "true")
          *          .build();
          * Cursor cursor = getContentResolver().query(uri,
          *          new String[] {Contacts.DISPLAY_NAME},
@@ -1140,21 +1140,24 @@
          * </pre>
          * </p>
          */
-        public static final String ADDRESS_BOOK_INDEX_EXTRAS = "address_book_index_extras";
+        public static final String EXTRA_ADDRESS_BOOK_INDEX =
+                "android.provider.extra.ADDRESS_BOOK_INDEX";
 
         /**
          * The array of address book index titles, which are returned in the
          * same order as the data in the cursor.
          * <p>TYPE: String[]</p>
          */
-        public static final String EXTRA_ADDRESS_BOOK_INDEX_TITLES = "address_book_index_titles";
+        public static final String EXTRA_ADDRESS_BOOK_INDEX_TITLES =
+                "android.provider.extra.ADDRESS_BOOK_INDEX_TITLES";
 
         /**
          * The array of group counts for the corresponding group.  Contains the same number
          * of elements as the EXTRA_ADDRESS_BOOK_INDEX_TITLES array.
          * <p>TYPE: int[]</p>
          */
-        public static final String EXTRA_ADDRESS_BOOK_INDEX_COUNTS = "address_book_index_counts";
+        public static final String EXTRA_ADDRESS_BOOK_INDEX_COUNTS =
+                "android.provider.extra.ADDRESS_BOOK_INDEX_COUNTS";
     }
 
     /**
@@ -8111,7 +8114,7 @@
          * for the provided {@link Contacts} entry.
          */
         public static final String ACTION_QUICK_CONTACT =
-                "com.android.contacts.action.QUICK_CONTACT";
+                "android.provider.action.QUICK_CONTACT";
 
         /**
          * Extra used to specify pivot dialog location in screen coordinates.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 33e0468..01fda47 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -18,6 +18,7 @@
 
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SystemApi;
 import android.app.SearchManager;
 import android.app.WallpaperManager;
 import android.content.ComponentName;
@@ -131,6 +132,7 @@
             "android.settings.AIRPLANE_MODE_SETTINGS";
 
     /**
+     * @hide
      * Activity Action: Modify Airplane mode settings using the users voice.
      * <p>
      * In some cases, a matching Activity may not exist, so ensure you safeguard against this.
@@ -152,6 +154,7 @@
      * Output: Nothing.
      */
     @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+    @SystemApi
     public static final String ACTION_VOICE_CONTROL_AIRPLANE_MODE =
             "android.settings.VOICE_CONTROL_AIRPLANE_MODE";
 
@@ -975,11 +978,13 @@
     public static final String EXTRA_INPUT_METHOD_ID = "input_method_id";
 
     /**
+     * @hide
      * Activity Extra: Enable or disable Airplane Mode.
      * <p>
      * This can be passed as an extra field to the {@link #ACTION_VOICE_CONTROL_AIRPLANE_MODE}
      * intent as a boolean.
      */
+    @SystemApi
     public static final String EXTRA_AIRPLANE_MODE_ENABLED = "airplane_mode_enabled";
 
     private static final String JID_RESOURCE_PREFIX = "android";
@@ -2561,7 +2566,6 @@
          * Call Preference String.
          * "SIP_ALWAYS" : Always use SIP with network access
          * "SIP_ADDRESS_ONLY" : Only if destination is a SIP address
-         * "SIP_ASK_ME_EACH_TIME" : Always ask me each time
          * @hide
          */
         public static final String SIP_CALL_OPTIONS = "sip_call_options";
@@ -2579,9 +2583,13 @@
         public static final String SIP_ADDRESS_ONLY = "SIP_ADDRESS_ONLY";
 
         /**
-         * One of the sip call options: Always ask me each time.
+         * @deprecated Use SIP_ALWAYS or SIP_ADDRESS_ONLY instead.  Formerly used to indicate that
+         * the user should be prompted each time a call is made whether it should be placed using
+         * SIP.  The {@link com.android.providers.settings.DatabaseHelper} replaces this with
+         * SIP_ADDRESS_ONLY.
          * @hide
          */
+        @Deprecated
         public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
 
         /**
@@ -3731,6 +3739,13 @@
                 "show_note_about_notification_hiding";
 
         /**
+         * Set to 1 by the system after trust agents have been initialized.
+         * @hide
+         */
+        public static final String TRUST_AGENTS_INITIALIZED =
+                "trust_agents_initialized";
+
+        /**
          * The Logging ID (a unique 64-bit value) as a hex string.
          * Used as a pseudonymous identifier for logging.
          * @deprecated This identifier is poorly initialized and has
diff --git a/core/java/android/service/notification/Condition.java b/core/java/android/service/notification/Condition.java
index aa724f0..3a91d1a 100644
--- a/core/java/android/service/notification/Condition.java
+++ b/core/java/android/service/notification/Condition.java
@@ -16,6 +16,7 @@
 
 package android.service.notification;
 
+import android.annotation.SystemApi;
 import android.content.Context;
 import android.net.Uri;
 import android.os.Parcel;
@@ -28,6 +29,7 @@
  *
  * @hide
  */
+@SystemApi
 public class Condition implements Parcelable {
 
     public static final String SCHEME = "condition";
diff --git a/core/java/android/service/notification/ConditionProviderService.java b/core/java/android/service/notification/ConditionProviderService.java
index 326412f..03ee726 100644
--- a/core/java/android/service/notification/ConditionProviderService.java
+++ b/core/java/android/service/notification/ConditionProviderService.java
@@ -17,6 +17,7 @@
 package android.service.notification;
 
 import android.annotation.SdkConstant;
+import android.annotation.SystemApi;
 import android.app.INotificationManager;
 import android.app.Service;
 import android.content.Context;
@@ -44,6 +45,7 @@
  *
  * @hide
  */
+@SystemApi
 public abstract class ConditionProviderService extends Service {
     private final String TAG = ConditionProviderService.class.getSimpleName()
             + "[" + getClass().getSimpleName() + "]";
diff --git a/core/java/android/service/notification/INotificationListener.aidl b/core/java/android/service/notification/INotificationListener.aidl
index 8ca9b6c..e6bf6ba 100644
--- a/core/java/android/service/notification/INotificationListener.aidl
+++ b/core/java/android/service/notification/INotificationListener.aidl
@@ -16,6 +16,7 @@
 
 package android.service.notification;
 
+import android.service.notification.IStatusBarNotificationHolder;
 import android.service.notification.StatusBarNotification;
 import android.service.notification.NotificationRankingUpdate;
 
@@ -23,9 +24,9 @@
 oneway interface INotificationListener
 {
     void onListenerConnected(in NotificationRankingUpdate update);
-    void onNotificationPosted(in StatusBarNotification notification,
+    void onNotificationPosted(in IStatusBarNotificationHolder notificationHolder,
             in NotificationRankingUpdate update);
-    void onNotificationRemoved(in StatusBarNotification notification,
+    void onNotificationRemoved(in IStatusBarNotificationHolder notificationHolder,
             in NotificationRankingUpdate update);
     void onNotificationRankingUpdate(in NotificationRankingUpdate update);
     void onListenerHintsChanged(int hints);
diff --git a/wifi/java/android/net/wifi/WifiAdapter.aidl b/core/java/android/service/notification/IStatusBarNotificationHolder.aidl
similarity index 67%
rename from wifi/java/android/net/wifi/WifiAdapter.aidl
rename to core/java/android/service/notification/IStatusBarNotificationHolder.aidl
index 0bb5dd7..c25cdb2 100644
--- a/wifi/java/android/net/wifi/WifiAdapter.aidl
+++ b/core/java/android/service/notification/IStatusBarNotificationHolder.aidl
@@ -14,6 +14,12 @@
  * limitations under the License.
  */
 
-package android.net.wifi;
+package android.service.notification;
 
-parcelable WifiAdapter;
+import android.service.notification.StatusBarNotification;
+
+/** @hide */
+interface IStatusBarNotificationHolder {
+    /** Fetch the held StatusBarNotification. This method should only be called once per Holder */
+    StatusBarNotification get();
+}
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index cb0bcf2..b22fd9c 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ParceledListSlice;
+import android.os.Bundle;
 import android.os.IBinder;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -101,6 +102,7 @@
      *     <li>{@link Notification#EXTRA_LARGE_ICON extras[EXTRA_LARGE_ICON]}</li>
      *     <li>{@link Notification#EXTRA_LARGE_ICON_BIG extras[EXTRA_LARGE_ICON_BIG]}</li>
      *     <li>{@link Notification#EXTRA_PICTURE extras[EXTRA_PICTURE]}</li>
+     *     <li>{@link Notification#EXTRA_BIG_TEXT extras[EXTRA_BIG_TEXT]}</li>
      * </ol>
      *
      * @hide
@@ -601,8 +603,15 @@
 
     private class INotificationListenerWrapper extends INotificationListener.Stub {
         @Override
-        public void onNotificationPosted(StatusBarNotification sbn,
+        public void onNotificationPosted(IStatusBarNotificationHolder sbnHolder,
                 NotificationRankingUpdate update) {
+            StatusBarNotification sbn;
+            try {
+                sbn = sbnHolder.get();
+            } catch (RemoteException e) {
+                Log.w(TAG, "onNotificationPosted: Error receiving StatusBarNotification", e);
+                return;
+            }
             Notification.Builder.rebuild(getContext(), sbn.getNotification());
 
             // protect subclass from concurrent modifications of (@link mNotificationKeys}.
@@ -616,8 +625,15 @@
             }
         }
         @Override
-        public void onNotificationRemoved(StatusBarNotification sbn,
+        public void onNotificationRemoved(IStatusBarNotificationHolder sbnHolder,
                 NotificationRankingUpdate update) {
+            StatusBarNotification sbn;
+            try {
+                sbn = sbnHolder.get();
+            } catch (RemoteException e) {
+                Log.w(TAG, "onNotificationRemoved: Error receiving StatusBarNotification", e);
+                return;
+            }
             // protect subclass from concurrent modifications of (@link mNotificationKeys}.
             synchronized (mWrapper) {
                 applyUpdate(update);
@@ -692,10 +708,15 @@
      * current {@link RankingMap}.
      */
     public static class Ranking {
+        /** Value signifying that the user has not expressed a per-app visibility override value.
+         * @hide */
+        public static final int VISIBILITY_NO_OVERRIDE = -1000;
+
         private String mKey;
         private int mRank = -1;
         private boolean mIsAmbient;
         private boolean mMatchesInterruptionFilter;
+        private int mVisibilityOverride;
 
         public Ranking() {}
 
@@ -725,15 +746,17 @@
         }
 
         /**
-         * Returns whether the notification meets the user's interruption
-         * filter.
-         *
-         * @removed
+         * Returns the user specificed visibility for the package that posted
+         * this notification, or
+         * {@link NotificationListenerService.Ranking#VISIBILITY_NO_OVERRIDE} if
+         * no such preference has been expressed.
+         * @hide
          */
-        public boolean meetsInterruptionFilter() {
-            return mMatchesInterruptionFilter;
+        public int getVisibilityOverride() {
+            return mVisibilityOverride;
         }
 
+
         /**
          * Returns whether the notification matches the user's interruption
          * filter.
@@ -743,11 +766,12 @@
         }
 
         private void populate(String key, int rank, boolean isAmbient,
-                boolean matchesInterruptionFilter) {
+                boolean matchesInterruptionFilter, int visibilityOverride) {
             mKey = key;
             mRank = rank;
             mIsAmbient = isAmbient;
             mMatchesInterruptionFilter = matchesInterruptionFilter;
+            mVisibilityOverride = visibilityOverride;
         }
     }
 
@@ -763,6 +787,7 @@
         private final NotificationRankingUpdate mRankingUpdate;
         private ArrayMap<String,Integer> mRanks;
         private ArraySet<Object> mIntercepted;
+        private ArrayMap<String, Integer> mVisibilityOverrides;
 
         private RankingMap(NotificationRankingUpdate rankingUpdate) {
             mRankingUpdate = rankingUpdate;
@@ -787,7 +812,8 @@
          */
         public boolean getRanking(String key, Ranking outRanking) {
             int rank = getRank(key);
-            outRanking.populate(key, rank, isAmbient(key), !isIntercepted(key));
+            outRanking.populate(key, rank, isAmbient(key), !isIntercepted(key),
+                    getVisibilityOverride(key));
             return rank >= 0;
         }
 
@@ -819,6 +845,19 @@
             return mIntercepted.contains(key);
         }
 
+        private int getVisibilityOverride(String key) {
+            synchronized (this) {
+                if (mVisibilityOverrides == null) {
+                    buildVisibilityOverridesLocked();
+                }
+            }
+            Integer overide = mVisibilityOverrides.get(key);
+            if (overide == null) {
+                return Ranking.VISIBILITY_NO_OVERRIDE;
+            }
+            return overide.intValue();
+        }
+
         // Locked by 'this'
         private void buildRanksLocked() {
             String[] orderedKeys = mRankingUpdate.getOrderedKeys();
@@ -836,6 +875,15 @@
             Collections.addAll(mIntercepted, dndInterceptedKeys);
         }
 
+        // Locked by 'this'
+        private void buildVisibilityOverridesLocked() {
+            Bundle visibilityBundle = mRankingUpdate.getVisibilityOverrides();
+            mVisibilityOverrides = new ArrayMap<>(visibilityBundle.size());
+            for (String key: visibilityBundle.keySet()) {
+               mVisibilityOverrides.put(key, visibilityBundle.getInt(key));
+            }
+        }
+
         // ----------- Parcelable
 
         @Override
diff --git a/core/java/android/service/notification/NotificationRankingUpdate.java b/core/java/android/service/notification/NotificationRankingUpdate.java
index 26af38b..6fba900 100644
--- a/core/java/android/service/notification/NotificationRankingUpdate.java
+++ b/core/java/android/service/notification/NotificationRankingUpdate.java
@@ -15,6 +15,7 @@
  */
 package android.service.notification;
 
+import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -26,18 +27,21 @@
     private final String[] mKeys;
     private final String[] mInterceptedKeys;
     private final int mFirstAmbientIndex;
+    private final Bundle mVisibilityOverrides;
 
     public NotificationRankingUpdate(String[] keys, String[] interceptedKeys,
-                                     int firstAmbientIndex) {
+            Bundle visibilityOverrides, int firstAmbientIndex) {
         mKeys = keys;
         mFirstAmbientIndex = firstAmbientIndex;
         mInterceptedKeys = interceptedKeys;
+        mVisibilityOverrides = visibilityOverrides;
     }
 
     public NotificationRankingUpdate(Parcel in) {
         mKeys = in.readStringArray();
         mFirstAmbientIndex = in.readInt();
         mInterceptedKeys = in.readStringArray();
+        mVisibilityOverrides = in.readBundle();
     }
 
     @Override
@@ -50,6 +54,7 @@
         out.writeStringArray(mKeys);
         out.writeInt(mFirstAmbientIndex);
         out.writeStringArray(mInterceptedKeys);
+        out.writeBundle(mVisibilityOverrides);
     }
 
     public static final Parcelable.Creator<NotificationRankingUpdate> CREATOR
@@ -74,4 +79,8 @@
     public String[] getInterceptedKeys() {
         return mInterceptedKeys;
     }
+
+    public Bundle getVisibilityOverrides() {
+        return mVisibilityOverrides;
+    }
 }
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index 872f911..9cbedab 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -17,6 +17,7 @@
 package android.service.notification;
 
 import android.content.ComponentName;
+import android.content.res.Resources;
 import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -55,6 +56,11 @@
     public static final int[] WEEKNIGHT_DAYS = { Calendar.SUNDAY, Calendar.MONDAY, Calendar.TUESDAY,
             Calendar.WEDNESDAY, Calendar.THURSDAY };
 
+    public static final int[] MINUTE_BUCKETS = new int[] { 15, 30, 45, 60, 120, 180, 240, 480 };
+    private static final int SECONDS_MS = 1000;
+    private static final int MINUTES_MS = 60 * SECONDS_MS;
+    private static final int ZERO_VALUE_MS = 20 * SECONDS_MS;
+
     private static final int XML_VERSION = 1;
     private static final String ZEN_TAG = "zen";
     private static final String ZEN_ATT_VERSION = "version";
@@ -445,6 +451,23 @@
         return downtime;
     }
 
+    public static Condition toTimeCondition(int minutesFromNow) {
+        final long now = System.currentTimeMillis();
+        final long millis = minutesFromNow == 0 ? ZERO_VALUE_MS : minutesFromNow * MINUTES_MS;
+        return toTimeCondition(now + millis, minutesFromNow);
+    }
+
+    public static Condition toTimeCondition(long time, int minutes) {
+        final int num = minutes < 60 ? minutes : Math.round(minutes / 60f);
+        final int resId = minutes < 60
+                ? com.android.internal.R.plurals.zen_mode_duration_minutes
+                : com.android.internal.R.plurals.zen_mode_duration_hours;
+        final String caption = Resources.getSystem().getQuantityString(resId, num, num);
+        final Uri id = toCountdownConditionId(time);
+        return new Condition(id, caption, "", "", 0, Condition.STATE_TRUE,
+                Condition.FLAG_RELEVANT_NOW);
+    }
+
     // For built-in conditions
     private static final String SYSTEM_AUTHORITY = "android";
 
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index 519bc28..8aa2689 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -450,7 +450,7 @@
      * This intent must be invoked using {@link Activity#startActivityForResult(Intent, int)}.
      * Starting re-enrollment is only valid if the keyphrase is un-enrolled,
      * i.e. {@link #STATE_KEYPHRASE_UNENROLLED},
-     * otherwise {@link #createIntentToReEnroll()} should be preferred.
+     * otherwise {@link #createReEnrollIntent()} should be preferred.
      *
      * @return An {@link Intent} to start enrollment for the given keyphrase.
      * @throws UnsupportedOperationException if managing they keyphrase isn't supported.
@@ -460,8 +460,8 @@
      *         This may happen if another detector has been instantiated or the
      *         {@link VoiceInteractionService} hosting this detector has been shut down.
      */
-    public Intent createIntentToEnroll() {
-        if (DBG) Slog.d(TAG, "createIntentToEnroll");
+    public Intent createEnrollIntent() {
+        if (DBG) Slog.d(TAG, "createEnrollIntent");
         synchronized (mLock) {
             return getManageIntentLocked(MANAGE_ACTION_ENROLL);
         }
@@ -481,8 +481,8 @@
      *         This may happen if another detector has been instantiated or the
      *         {@link VoiceInteractionService} hosting this detector has been shut down.
      */
-    public Intent createIntentToUnEnroll() {
-        if (DBG) Slog.d(TAG, "createIntentToUnEnroll");
+    public Intent createUnEnrollIntent() {
+        if (DBG) Slog.d(TAG, "createUnEnrollIntent");
         synchronized (mLock) {
             return getManageIntentLocked(MANAGE_ACTION_UN_ENROLL);
         }
@@ -502,8 +502,8 @@
      *         This may happen if another detector has been instantiated or the
      *         {@link VoiceInteractionService} hosting this detector has been shut down.
      */
-    public Intent createIntentToReEnroll() {
-        if (DBG) Slog.d(TAG, "createIntentToReEnroll");
+    public Intent createReEnrollIntent() {
+        if (DBG) Slog.d(TAG, "createReEnrollIntent");
         synchronized (mLock) {
             return getManageIntentLocked(MANAGE_ACTION_RE_ENROLL);
         }
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index 65e6988..0cde4f2 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -40,16 +40,15 @@
 
 /**
  * Top-level service of the current global voice interactor, which is providing
- * support for hotwording, the back-end of a {@link android.app.VoiceInteractor}, etc.
+ * support for hotwording etc.
  * The current VoiceInteractionService that has been selected by the user is kept
  * always running by the system, to allow it to do things like listen for hotwords
- * in the background to instigate voice interactions.
+ * in the background.
  *
  * <p>Because this service is always running, it should be kept as lightweight as
  * possible.  Heavy-weight operations (including showing UI) should be implemented
- * in the associated {@link android.service.voice.VoiceInteractionSessionService} when
- * an actual voice interaction is taking place, and that service should run in a
- * separate process from this one.
+ * in the associated {@link android.service.voice.VoiceInteractionSessionService}
+ * that only runs while the operation is active.
  */
 public class VoiceInteractionService extends Service {
     /**
diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java
index 19d14bf..749f813 100644
--- a/core/java/android/service/voice/VoiceInteractionSession.java
+++ b/core/java/android/service/voice/VoiceInteractionSession.java
@@ -16,6 +16,7 @@
 
 package android.service.voice;
 
+import android.annotation.SystemApi;
 import android.app.Dialog;
 import android.app.Instrumentation;
 import android.content.Context;
@@ -53,15 +54,7 @@
 import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
 
 /**
- * An active voice interaction session, providing a facility for the implementation
- * to interact with the user in the voice interaction layer.  This interface is no shown
- * by default, but you can request that it be shown with {@link #showWindow()}, which
- * will result in a later call to {@link #onCreateContentView()} in which the UI can be
- * built
- *
- * <p>A voice interaction session can be self-contained, ultimately calling {@link #finish}
- * when done.  It can also initiate voice interactions with applications by calling
- * {@link #startVoiceActivity}</p>.
+ * An active interaction session, started by a {@link VoiceInteractionService}.
  */
 public abstract class VoiceInteractionSession implements KeyEvent.Callback {
     static final String TAG = "VoiceInteractionSession";
@@ -175,6 +168,10 @@
         }
     };
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public static class Request {
         final IVoiceInteractorRequest mInterface = new IVoiceInteractorRequest.Stub() {
             @Override
@@ -258,6 +255,10 @@
         }
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public static class Caller {
         final String packageName;
         final int uid;
@@ -353,8 +354,10 @@
     final MyCallbacks mCallbacks = new MyCallbacks();
 
     /**
+     * @hide
      * Information about where interesting parts of the input method UI appear.
      */
+    @SystemApi
     public static final class Insets {
         /**
          * This is the part of the UI that is the main content.  It is
@@ -474,6 +477,10 @@
         mContentFrame = (FrameLayout)mRootView.findViewById(android.R.id.content);
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public void showWindow() {
         if (DEBUG) Log.v(TAG, "Showing window: mWindowAdded=" + mWindowAdded
                 + " mWindowVisible=" + mWindowVisible);
@@ -502,6 +509,10 @@
         }
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public void hideWindow() {
         if (mWindowVisible) {
             mWindow.hide();
@@ -510,11 +521,13 @@
     }
 
     /**
+     * @hide
      * You can call this to customize the theme used by your IME's window.
      * This must be set before {@link #onCreate}, so you
      * will typically call it in your constructor with the resource ID
      * of your custom theme.
      */
+    @SystemApi
     public void setTheme(int theme) {
         if (mWindow != null) {
             throw new IllegalStateException("Must be called before onCreate()");
@@ -523,6 +536,7 @@
     }
 
     /**
+     * @hide
      * Ask that a new activity be started for voice interaction.  This will create a
      * new dedicated task in the activity manager for this voice interaction session;
      * this means that {@link Intent#FLAG_ACTIVITY_NEW_TASK Intent.FLAG_ACTIVITY_NEW_TASK}
@@ -543,6 +557,7 @@
      * always have {@link Intent#CATEGORY_VOICE Intent.CATEGORY_VOICE} added to it, since
      * this is part of a voice interaction.
      */
+    @SystemApi
     public void startVoiceActivity(Intent intent) {
         if (mToken == null) {
             throw new IllegalStateException("Can't call before onCreate()");
@@ -558,15 +573,19 @@
     }
 
     /**
+     * @hide
      * Convenience for inflating views.
      */
+    @SystemApi
     public LayoutInflater getLayoutInflater() {
         return mInflater;
     }
 
     /**
+     * @hide
      * Retrieve the window being used to show the session's UI.
      */
+    @SystemApi
     public Dialog getWindow() {
         return mWindow;
     }
@@ -612,8 +631,10 @@
     }
 
     /**
+     * @hide
      * Hook in which to create the session's UI.
      */
+    @SystemApi
     public View onCreateContentView() {
         return null;
     }
@@ -626,22 +647,42 @@
 
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         return false;
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public boolean onKeyLongPress(int keyCode, KeyEvent event) {
         return false;
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public boolean onKeyUp(int keyCode, KeyEvent event) {
         return false;
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) {
         return false;
     }
 
+    /**
+     * @hide
+     */
+    @SystemApi
     public void onBackPressed() {
         finish();
     }
@@ -656,12 +697,14 @@
     }
 
     /**
+     * @hide
      * Compute the interesting insets into your UI.  The default implementation
      * uses the entire window frame as the insets.  The default touchable
      * insets are {@link Insets#TOUCHABLE_INSETS_FRAME}.
      *
      * @param outInsets Fill in with the current UI insets.
      */
+    @SystemApi
     public void onComputeInsets(Insets outInsets) {
         int[] loc = mTmpLocation;
         View decor = getWindow().getWindow().getDecorView();
@@ -675,6 +718,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Called when a task initiated by {@link #startVoiceActivity(android.content.Intent)}
      * has actually started.
      *
@@ -686,6 +731,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Called when the last activity of a task initiated by
      * {@link #startVoiceActivity(android.content.Intent)} has finished.  The default
      * implementation calls {@link #finish()} on the assumption that this represents
@@ -701,6 +748,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Request to query for what extended commands the session supports.
      *
      * @param caller Who is making the request.
@@ -715,6 +764,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Request to confirm with the user before proceeding with an unrecoverable operation,
      * corresponding to a {@link android.app.VoiceInteractor.ConfirmationRequest
      * VoiceInteractor.ConfirmationRequest}.
@@ -730,6 +781,8 @@
             Bundle extras);
 
     /**
+     * @hide
+     * @SystemApi
      * Request to complete the voice interaction session because the voice activity successfully
      * completed its interaction using voice.  Corresponds to
      * {@link android.app.VoiceInteractor.CompleteVoiceRequest
@@ -751,6 +804,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Request to abort the voice interaction session because the voice activity can not
      * complete its interaction using voice.  Corresponds to
      * {@link android.app.VoiceInteractor.AbortVoiceRequest
@@ -769,6 +824,8 @@
     }
 
     /**
+     * @hide
+     * @SystemApi
      * Process an arbitrary extended command from the caller,
      * corresponding to a {@link android.app.VoiceInteractor.CommandRequest
      * VoiceInteractor.CommandRequest}.
@@ -783,6 +840,8 @@
     public abstract void onCommand(Caller caller, Request request, String command, Bundle extras);
 
     /**
+     * @hide
+     * @SystemApi
      * Called when the {@link android.app.VoiceInteractor} has asked to cancel a {@link Request}
      * that was previously delivered to {@link #onConfirm} or {@link #onCommand}.
      *
diff --git a/core/java/android/service/wallpaper/IWallpaperEngine.aidl b/core/java/android/service/wallpaper/IWallpaperEngine.aidl
index faccde2..de527e9 100644
--- a/core/java/android/service/wallpaper/IWallpaperEngine.aidl
+++ b/core/java/android/service/wallpaper/IWallpaperEngine.aidl
@@ -16,6 +16,7 @@
 
 package android.service.wallpaper;
 
+import android.graphics.Rect;
 import android.view.MotionEvent;
 import android.os.Bundle;
 
@@ -24,6 +25,7 @@
  */
 oneway interface IWallpaperEngine {
     void setDesiredSize(int width, int height);
+    void setDisplayPadding(in Rect padding);
     void setVisibility(boolean visible);
     void dispatchPointer(in MotionEvent event);
     void dispatchWallpaperCommand(String action, int x, int y,
diff --git a/core/java/android/service/wallpaper/IWallpaperService.aidl b/core/java/android/service/wallpaper/IWallpaperService.aidl
index bc7a1d7..5fd0157 100644
--- a/core/java/android/service/wallpaper/IWallpaperService.aidl
+++ b/core/java/android/service/wallpaper/IWallpaperService.aidl
@@ -16,6 +16,7 @@
 
 package android.service.wallpaper;
 
+import android.graphics.Rect;
 import android.service.wallpaper.IWallpaperConnection;
 
 /**
@@ -24,5 +25,5 @@
 oneway interface IWallpaperService {
     void attach(IWallpaperConnection connection,
     		IBinder windowToken, int windowType, boolean isPreview,
-    		int reqWidth, int reqHeight);
+    		int reqWidth, int reqHeight, in Rect padding);
 }
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index f3c26c8..26e9a30 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -16,6 +16,14 @@
 
 package android.service.wallpaper;
 
+import android.content.res.TypedArray;
+import android.os.Build;
+import android.os.SystemProperties;
+import android.util.DisplayMetrics;
+import android.util.TypedValue;
+import android.view.ViewRootImpl;
+import android.view.WindowInsets;
+import com.android.internal.R;
 import com.android.internal.os.HandlerCaller;
 import com.android.internal.view.BaseIWindow;
 import com.android.internal.view.BaseSurfaceHolder;
@@ -56,6 +64,8 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 
+import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN;
+
 /**
  * A wallpaper service is responsible for showing a live wallpaper behind
  * applications that would like to sit on top of it.  This service object
@@ -90,7 +100,8 @@
     private static final int DO_ATTACH = 10;
     private static final int DO_DETACH = 20;
     private static final int DO_SET_DESIRED_SIZE = 30;
-    
+    private static final int DO_SET_DISPLAY_PADDING = 40;
+
     private static final int MSG_UPDATE_SURFACE = 10000;
     private static final int MSG_VISIBILITY_CHANGED = 10010;
     private static final int MSG_WALLPAPER_OFFSETS = 10020;
@@ -150,13 +161,23 @@
                 WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS;
         int mCurWindowFlags = mWindowFlags;
         int mCurWindowPrivateFlags = mWindowPrivateFlags;
+        TypedValue mOutsetBottom;
         final Rect mVisibleInsets = new Rect();
         final Rect mWinFrame = new Rect();
         final Rect mOverscanInsets = new Rect();
         final Rect mContentInsets = new Rect();
         final Rect mStableInsets = new Rect();
+        final Rect mDispatchedOverscanInsets = new Rect();
+        final Rect mDispatchedContentInsets = new Rect();
+        final Rect mDispatchedStableInsets = new Rect();
+        final Rect mFinalSystemInsets = new Rect();
+        final Rect mFinalStableInsets = new Rect();
         final Configuration mConfiguration = new Configuration();
-        
+
+        private boolean mIsEmulator;
+        private boolean mIsCircularEmulator;
+        private boolean mWindowIsRound;
+
         final WindowManager.LayoutParams mLayout
                 = new WindowManager.LayoutParams();
         IWindowSession mSession;
@@ -406,7 +427,7 @@
          */
         public void onCreate(SurfaceHolder surfaceHolder) {
         }
-        
+
         /**
          * Called right before the engine is going away.  After this the
          * surface will be destroyed and this Engine object is no longer
@@ -414,7 +435,7 @@
          */
         public void onDestroy() {
         }
-        
+
         /**
          * Called to inform you of the wallpaper becoming visible or
          * hidden.  <em>It is very important that a wallpaper only use
@@ -422,7 +443,17 @@
          */
         public void onVisibilityChanged(boolean visible) {
         }
-        
+
+        /**
+         * Called with the current insets that are in effect for the wallpaper.
+         * This gives you the part of the overall wallpaper surface that will
+         * generally be visible to the user (ignoring position offsets applied to it).
+         *
+         * @param insets Insets to apply.
+         */
+        public void onApplyWindowInsets(WindowInsets insets) {
+        }
+
         /**
          * Called as the user performs touch-screen interaction with the
          * window that is currently showing this wallpaper.  Note that the
@@ -432,7 +463,7 @@
          */
         public void onTouchEvent(MotionEvent event) {
         }
-        
+
         /**
          * Called to inform you of the wallpaper's offsets changing
          * within its contain, corresponding to the container's
@@ -443,7 +474,7 @@
                 float xOffsetStep, float yOffsetStep,
                 int xPixelOffset, int yPixelOffset) {
         }
-        
+
         /**
          * Process a command that was sent to the wallpaper with
          * {@link WallpaperManager#sendWallpaperCommand}.
@@ -465,14 +496,14 @@
                 Bundle extras, boolean resultRequested) {
             return null;
         }
-        
+
         /**
          * Called when an application has changed the desired virtual size of
          * the wallpaper.
          */
         public void onDesiredSizeChanged(int desiredWidth, int desiredHeight) {
         }
-        
+
         /**
          * Convenience for {@link SurfaceHolder.Callback#surfaceChanged
          * SurfaceHolder.Callback.surfaceChanged()}.
@@ -561,16 +592,20 @@
             if (mDestroyed) {
                 Log.w(TAG, "Ignoring updateSurface: destroyed");
             }
-            
+
+            boolean fixedSize = false;
             int myWidth = mSurfaceHolder.getRequestedWidth();
             if (myWidth <= 0) myWidth = ViewGroup.LayoutParams.MATCH_PARENT;
+            else fixedSize = true;
             int myHeight = mSurfaceHolder.getRequestedHeight();
             if (myHeight <= 0) myHeight = ViewGroup.LayoutParams.MATCH_PARENT;
-            
+            else fixedSize = true;
+
             final boolean creating = !mCreated;
             final boolean surfaceCreating = !mSurfaceCreated;
             final boolean formatChanged = mFormat != mSurfaceHolder.getRequestedFormat();
             boolean sizeChanged = mWidth != myWidth || mHeight != myHeight;
+            boolean insetsChanged = !mCreated;
             final boolean typeChanged = mType != mSurfaceHolder.getRequestedType();
             final boolean flagsChanged = mCurWindowFlags != mWindowFlags ||
                     mCurWindowPrivateFlags != mWindowPrivateFlags;
@@ -607,6 +642,32 @@
                     mLayout.token = mWindowToken;
 
                     if (!mCreated) {
+                        // Retrieve watch round and outset info
+                        final WindowManager windowService = (WindowManager)getSystemService(
+                                Context.WINDOW_SERVICE);
+                        TypedArray windowStyle = obtainStyledAttributes(
+                                com.android.internal.R.styleable.Window);
+                        final Display display = windowService.getDefaultDisplay();
+                        final boolean shouldUseBottomOutset =
+                                display.getDisplayId() == Display.DEFAULT_DISPLAY;
+                        if (shouldUseBottomOutset && windowStyle.hasValue(
+                                R.styleable.Window_windowOutsetBottom)) {
+                            if (mOutsetBottom == null) mOutsetBottom = new TypedValue();
+                            windowStyle.getValue(R.styleable.Window_windowOutsetBottom,
+                                    mOutsetBottom);
+                        } else {
+                            mOutsetBottom = null;
+                        }
+                        mWindowIsRound = getResources().getBoolean(
+                                com.android.internal.R.bool.config_windowIsRound);
+                        windowStyle.recycle();
+
+                        // detect emulator
+                        mIsEmulator = Build.HARDWARE.contains("goldfish");
+                        mIsCircularEmulator = SystemProperties.getBoolean(
+                                ViewRootImpl.PROPERTY_EMULATOR_CIRCULAR, false);
+
+                        // Add window
                         mLayout.type = mIWallpaperEngine.mWindowType;
                         mLayout.gravity = Gravity.START|Gravity.TOP;
                         mLayout.setTitle(WallpaperService.this.getClass().getName());
@@ -627,6 +688,11 @@
                     mSurfaceHolder.mSurfaceLock.lock();
                     mDrawingAllowed = true;
 
+                    if (!fixedSize) {
+                        mLayout.surfaceInsets.set(mIWallpaperEngine.mDisplayPadding);
+                    } else {
+                        mLayout.surfaceInsets.set(0, 0, 0, 0);
+                    }
                     final int relayoutResult = mSession.relayout(
                         mWindow, mWindow.mSeq, mLayout, mWidth, mHeight,
                             View.VISIBLE, 0, mWinFrame, mOverscanInsets, mContentInsets,
@@ -636,16 +702,39 @@
                             + ", frame=" + mWinFrame);
                     
                     int w = mWinFrame.width();
+                    int h = mWinFrame.height();
+
+                    if (!fixedSize) {
+                        final Rect padding = mIWallpaperEngine.mDisplayPadding;
+                        w += padding.left + padding.right;
+                        h += padding.top + padding.bottom;
+                        mOverscanInsets.left += padding.left;
+                        mOverscanInsets.top += padding.top;
+                        mOverscanInsets.right += padding.right;
+                        mOverscanInsets.bottom += padding.bottom;
+                        mContentInsets.left += padding.left;
+                        mContentInsets.top += padding.top;
+                        mContentInsets.right += padding.right;
+                        mContentInsets.bottom += padding.bottom;
+                        mStableInsets.left += padding.left;
+                        mStableInsets.top += padding.top;
+                        mStableInsets.right += padding.right;
+                        mStableInsets.bottom += padding.bottom;
+                    }
+
                     if (mCurWidth != w) {
                         sizeChanged = true;
                         mCurWidth = w;
                     }
-                    int h = mWinFrame.height();
                     if (mCurHeight != h) {
                         sizeChanged = true;
                         mCurHeight = h;
                     }
 
+                    insetsChanged |= !mDispatchedOverscanInsets.equals(mOverscanInsets);
+                    insetsChanged |= !mDispatchedContentInsets.equals(mContentInsets);
+                    insetsChanged |= !mDispatchedStableInsets.equals(mStableInsets);
+
                     mSurfaceHolder.setSurfaceFrameSize(w, h);
                     mSurfaceHolder.mSurfaceLock.unlock();
 
@@ -702,6 +791,25 @@
                             }
                         }
 
+                        if (insetsChanged) {
+                            mDispatchedOverscanInsets.set(mOverscanInsets);
+                            mDispatchedContentInsets.set(mContentInsets);
+                            mDispatchedStableInsets.set(mStableInsets);
+                            final boolean isRound = (mIsEmulator && mIsCircularEmulator)
+                                    || mWindowIsRound;
+                            mFinalSystemInsets.set(mDispatchedOverscanInsets);
+                            mFinalStableInsets.set(mDispatchedStableInsets);
+                            if (mOutsetBottom != null) {
+                                final DisplayMetrics metrics = getResources().getDisplayMetrics();
+                                mFinalSystemInsets.bottom =
+                                        ( (int) mOutsetBottom.getDimension(metrics) )
+                                        + mIWallpaperEngine.mDisplayPadding.bottom;
+                            }
+                            WindowInsets insets = new WindowInsets(mFinalSystemInsets,
+                                    null, mFinalStableInsets, isRound);
+                            onApplyWindowInsets(insets);
+                        }
+
                         if (redrawNeeded) {
                             onSurfaceRedrawNeeded(mSurfaceHolder);
                             SurfaceHolder.Callback callbacks[] = mSurfaceHolder.getCallbacks();
@@ -781,7 +889,7 @@
             mReportedVisible = false;
             updateSurface(false, false, false);
         }
-        
+
         void doDesiredSizeChanged(int desiredWidth, int desiredHeight) {
             if (!mDestroyed) {
                 if (DEBUG) Log.v(TAG, "onDesiredSizeChanged("
@@ -792,14 +900,24 @@
                 doOffsetsChanged(true);
             }
         }
-        
+
+        void doDisplayPaddingChanged(Rect padding) {
+            if (!mDestroyed) {
+                if (DEBUG) Log.v(TAG, "onDisplayPaddingChanged(" + padding + "): " + this);
+                if (!mIWallpaperEngine.mDisplayPadding.equals(padding)) {
+                    mIWallpaperEngine.mDisplayPadding.set(padding);
+                    updateSurface(true, false, false);
+                }
+            }
+        }
+
         void doVisibilityChanged(boolean visible) {
             if (!mDestroyed) {
                 mVisible = visible;
                 reportVisibility();
             }
         }
-        
+
         void reportVisibility() {
             if (!mDestroyed) {
                 boolean visible = mVisible && mScreenOn;
@@ -956,12 +1074,13 @@
         boolean mShownReported;
         int mReqWidth;
         int mReqHeight;
-        
+        final Rect mDisplayPadding = new Rect();
+
         Engine mEngine;
-        
+
         IWallpaperEngineWrapper(WallpaperService context,
                 IWallpaperConnection conn, IBinder windowToken,
-                int windowType, boolean isPreview, int reqWidth, int reqHeight) {
+                int windowType, boolean isPreview, int reqWidth, int reqHeight, Rect padding) {
             mCaller = new HandlerCaller(context, context.getMainLooper(), this, true);
             mConnection = conn;
             mWindowToken = windowToken;
@@ -969,16 +1088,22 @@
             mIsPreview = isPreview;
             mReqWidth = reqWidth;
             mReqHeight = reqHeight;
+            mDisplayPadding.set(padding);
             
             Message msg = mCaller.obtainMessage(DO_ATTACH);
             mCaller.sendMessage(msg);
         }
-        
+
         public void setDesiredSize(int width, int height) {
             Message msg = mCaller.obtainMessageII(DO_SET_DESIRED_SIZE, width, height);
             mCaller.sendMessage(msg);
         }
-        
+
+        public void setDisplayPadding(Rect padding) {
+            Message msg = mCaller.obtainMessageO(DO_SET_DISPLAY_PADDING, padding);
+            mCaller.sendMessage(msg);
+        }
+
         public void setVisibility(boolean visible) {
             Message msg = mCaller.obtainMessageI(MSG_VISIBILITY_CHANGED,
                     visible ? 1 : 0);
@@ -1041,6 +1166,9 @@
                     mEngine.doDesiredSizeChanged(message.arg1, message.arg2);
                     return;
                 }
+                case DO_SET_DISPLAY_PADDING: {
+                    mEngine.doDisplayPaddingChanged((Rect) message.obj);
+                }
                 case MSG_UPDATE_SURFACE:
                     mEngine.updateSurface(true, false, false);
                     break;
@@ -1102,9 +1230,9 @@
 
         @Override
         public void attach(IWallpaperConnection conn, IBinder windowToken,
-                int windowType, boolean isPreview, int reqWidth, int reqHeight) {
+                int windowType, boolean isPreview, int reqWidth, int reqHeight, Rect padding) {
             new IWallpaperEngineWrapper(mTarget, conn, windowToken,
-                    windowType, isPreview, reqWidth, reqHeight);
+                    windowType, isPreview, reqWidth, reqHeight, padding);
         }
     }
 
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 7245975..a4b6e92 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -578,7 +578,7 @@
          *
          * @deprecated Starting from API level 20, to select network synthesis, call
          * ({@link TextToSpeech#getVoices()}, find a suitable network voice
-         * ({@link Voice#getRequiresNetworkConnection()}) and pass it
+         * ({@link Voice#isNetworkConnectionRequired()}) and pass it
          * to {@link TextToSpeech#setVoice(Voice)}).
          */
         @Deprecated
@@ -596,7 +596,7 @@
 
          * @deprecated Starting from API level 20, to select embedded synthesis, call
          * ({@link TextToSpeech#getVoices()}, find a suitable embedded voice
-         * ({@link Voice#getRequiresNetworkConnection()}) and pass it
+         * ({@link Voice#isNetworkConnectionRequired()}) and pass it
          * to {@link TextToSpeech#setVoice(Voice)}).
          */
         @Deprecated
@@ -957,20 +957,18 @@
      *
      * @param text
      *            The string of text. Example: <code>"south_south_east"</code>
-     * @param filename
-     *            The full path to the sound file (for example:
-     *            "/sdcard/mysounds/hello.wav")
+     * @param file
+     *            File object pointing to the sound file.
      *
      * @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
      */
-    public int addSpeech(CharSequence text, String filename) {
+    public int addSpeech(CharSequence text, File file) {
         synchronized (mStartLock) {
-            mUtterances.put(text, Uri.parse(filename));
+            mUtterances.put(text, Uri.fromFile(file));
             return SUCCESS;
         }
     }
 
-
     /**
      * Adds a mapping between a string of text and a sound resource in a
      * package. Use this to add custom earcons.
@@ -1017,7 +1015,11 @@
      *            "/sdcard/mysounds/tick.wav")
      *
      * @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
+     *
+     * @deprecated As of API level 20, replaced by
+     *         {@link #addEarcon(String, File)}.
      */
+    @Deprecated
     public int addEarcon(String earcon, String filename) {
         synchronized(mStartLock) {
             mEarcons.put(earcon, Uri.parse(filename));
@@ -1025,6 +1027,27 @@
         }
     }
 
+    /**
+     * Adds a mapping between a string of text and a sound file.
+     * Use this to add custom earcons.
+     *
+     * @see #playEarcon(String, int, HashMap)
+     *
+     * @param earcon
+     *            The name of the earcon.
+     *            Example: <code>"[tick]"</code>
+     * @param file
+     *            File object pointing to the sound file.
+     *
+     * @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
+     */
+    public int addEarcon(String earcon, File file) {
+        synchronized(mStartLock) {
+            mEarcons.put(earcon, Uri.fromFile(file));
+            return SUCCESS;
+        }
+    }
+
     private Uri makeResourceUri(String packageName, int resourceId) {
         return new Uri.Builder()
                 .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
@@ -1061,7 +1084,7 @@
      */
     public int speak(final CharSequence text,
                      final int queueMode,
-                     final HashMap<String, String> params,
+                     final Bundle params,
                      final String utteranceId) {
         return runAction(new Action<Integer>() {
             @Override
@@ -1103,11 +1126,11 @@
      *
      * @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> the speak operation.
      * @deprecated As of API level 20, replaced by
-     *         {@link #speak(CharSequence, int, HashMap, String)}.
+     *         {@link #speak(CharSequence, int, Bundle, String)}.
      */
     @Deprecated
     public int speak(final String text, final int queueMode, final HashMap<String, String> params) {
-        return speak(text, queueMode, params,
+        return speak(text, queueMode, convertParamsHashMaptoBundle(params),
                      params == null ? null : params.get(Engine.KEY_PARAM_UTTERANCE_ID));
     }
 
@@ -1135,7 +1158,7 @@
      * @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> the playEarcon operation.
      */
     public int playEarcon(final String earcon, final int queueMode,
-            final HashMap<String, String> params, final String utteranceId) {
+            final Bundle params, final String utteranceId) {
         return runAction(new Action<Integer>() {
             @Override
             public Integer run(ITextToSpeechService service) throws RemoteException {
@@ -1173,12 +1196,12 @@
      *
      * @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> the playEarcon operation.
      * @deprecated As of API level 20, replaced by
-     *         {@link #playEarcon(String, int, HashMap, String)}.
+     *         {@link #playEarcon(String, int, Bundle, String)}.
      */
     @Deprecated
     public int playEarcon(final String earcon, final int queueMode,
             final HashMap<String, String> params) {
-        return playEarcon(earcon, queueMode, params,
+        return playEarcon(earcon, queueMode, convertParamsHashMaptoBundle(params),
                           params == null ? null : params.get(Engine.KEY_PARAM_UTTERANCE_ID));
     }
 
@@ -1757,22 +1780,20 @@
      *            must be prefixed by the name of the engine they are intended for. For example
      *            the keys "com.svox.pico_foo" and "com.svox.pico:bar" will be passed to the
      *            engine named "com.svox.pico" if it is being used.
-     * @param filename Absolute file filename to write the generated audio data to.It should be
-     *            something like "/sdcard/myappsounds/mysound.wav".
+     * @param file File to write the generated audio data to.
      * @param utteranceId An unique identifier for this request.
      * @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> the synthesizeToFile operation.
      */
-    public int synthesizeToFile(final CharSequence text, final HashMap<String, String> params,
-            final String filename, final String utteranceId) {
+    public int synthesizeToFile(final CharSequence text, final Bundle params,
+            final File file, final String utteranceId) {
         return runAction(new Action<Integer>() {
             @Override
             public Integer run(ITextToSpeechService service) throws RemoteException {
                 ParcelFileDescriptor fileDescriptor;
                 int returnValue;
                 try {
-                    File file = new File(filename);
                     if(file.exists() && !file.canWrite()) {
-                        Log.e(TAG, "Can't write to " + filename);
+                        Log.e(TAG, "Can't write to " + file);
                         return ERROR;
                     }
                     fileDescriptor = ParcelFileDescriptor.open(file,
@@ -1784,10 +1805,10 @@
                     fileDescriptor.close();
                     return returnValue;
                 } catch (FileNotFoundException e) {
-                    Log.e(TAG, "Opening file " + filename + " failed", e);
+                    Log.e(TAG, "Opening file " + file + " failed", e);
                     return ERROR;
                 } catch (IOException e) {
-                    Log.e(TAG, "Closing file " + filename + " failed", e);
+                    Log.e(TAG, "Closing file " + file + " failed", e);
                     return ERROR;
                 }
             }
@@ -1817,16 +1838,18 @@
      *
      * @return {@link #ERROR} or {@link #SUCCESS} of <b>queuing</b> the synthesizeToFile operation.
      * @deprecated As of API level 20, replaced by
-     *         {@link #synthesizeToFile(CharSequence, HashMap, String, String)}.
+     *         {@link #synthesizeToFile(CharSequence, Bundle, File, String)}.
      */
+    @Deprecated
     public int synthesizeToFile(final String text, final HashMap<String, String> params,
             final String filename) {
-        return synthesizeToFile(text, params, filename, params.get(Engine.KEY_PARAM_UTTERANCE_ID));
+        return synthesizeToFile(text, convertParamsHashMaptoBundle(params),
+                new File(filename), params.get(Engine.KEY_PARAM_UTTERANCE_ID));
     }
 
-    private Bundle getParams(HashMap<String, String> params) {
+    private Bundle convertParamsHashMaptoBundle(HashMap<String, String> params) {
         if (params != null && !params.isEmpty()) {
-            Bundle bundle = new Bundle(mParams);
+            Bundle bundle = new Bundle();
             copyIntParam(bundle, params, Engine.KEY_PARAM_STREAM);
             copyIntParam(bundle, params, Engine.KEY_PARAM_SESSION_ID);
             copyStringParam(bundle, params, Engine.KEY_PARAM_UTTERANCE_ID);
@@ -1852,11 +1875,85 @@
             }
 
             return bundle;
+        }
+        return null;
+    }
+
+    private Bundle getParams(Bundle params) {
+        if (params != null && !params.isEmpty()) {
+            Bundle bundle = new Bundle(mParams);
+            bundle.putAll(params);
+
+            verifyIntegerBundleParam(bundle, Engine.KEY_PARAM_STREAM);
+            verifyIntegerBundleParam(bundle, Engine.KEY_PARAM_SESSION_ID);
+            verifyStringBundleParam(bundle, Engine.KEY_PARAM_UTTERANCE_ID);
+            verifyFloatBundleParam(bundle, Engine.KEY_PARAM_VOLUME);
+            verifyFloatBundleParam(bundle, Engine.KEY_PARAM_PAN);
+
+            // Copy feature strings defined by the framework.
+            verifyBooleanBundleParam(bundle, Engine.KEY_FEATURE_NETWORK_SYNTHESIS);
+            verifyBooleanBundleParam(bundle, Engine.KEY_FEATURE_EMBEDDED_SYNTHESIS);
+            verifyIntegerBundleParam(bundle, Engine.KEY_FEATURE_NETWORK_TIMEOUT_MS);
+            verifyIntegerBundleParam(bundle, Engine.KEY_FEATURE_NETWORK_RETRIES_COUNT);
+
+            return bundle;
         } else {
             return mParams;
         }
     }
 
+    private static boolean verifyIntegerBundleParam(Bundle bundle, String key) {
+        if (bundle.containsKey(key)) {
+            if (!(bundle.get(key) instanceof Integer ||
+                    bundle.get(key) instanceof Long)) {
+                bundle.remove(key);
+                Log.w(TAG, "Synthesis request paramter " + key + " containst value "
+                        + " with invalid type. Should be an Integer or a Long");
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private static boolean verifyStringBundleParam(Bundle bundle, String key) {
+        if (bundle.containsKey(key)) {
+            if (!(bundle.get(key) instanceof String)) {
+                bundle.remove(key);
+                Log.w(TAG, "Synthesis request paramter " + key + " containst value "
+                        + " with invalid type. Should be a String");
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private static boolean verifyBooleanBundleParam(Bundle bundle, String key) {
+        if (bundle.containsKey(key)) {
+            if (!(bundle.get(key) instanceof Boolean ||
+                    bundle.get(key) instanceof String)) {
+                bundle.remove(key);
+                Log.w(TAG, "Synthesis request paramter " + key + " containst value "
+                        + " with invalid type. Should be a Boolean or String");
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    private static boolean verifyFloatBundleParam(Bundle bundle, String key) {
+        if (bundle.containsKey(key)) {
+            if (!(bundle.get(key) instanceof Float ||
+                    bundle.get(key) instanceof Double)) {
+                bundle.remove(key);
+                Log.w(TAG, "Synthesis request paramter " + key + " containst value "
+                        + " with invalid type. Should be a Float or a Double");
+                return false;
+            }
+        }
+        return true;
+    }
+
     private void copyStringParam(Bundle bundle, HashMap<String, String> params, String key) {
         String value = params.get(key);
         if (value != null) {
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index 4fea109..d00a433 100644
--- a/core/java/android/speech/tts/TextToSpeechService.java
+++ b/core/java/android/speech/tts/TextToSpeechService.java
@@ -84,7 +84,7 @@
  * the following methods:
  * <ul>
  * <li>{@link #onGetVoices()}</li>
- * <li>{@link #isValidVoiceName(String)}</li>
+ * <li>{@link #onIsValidVoiceName(String)}</li>
  * <li>{@link #onLoadVoice(String)}</li>
  * <li>{@link #onGetDefaultVoiceNameFor(String, String, String)}</li>
  * </ul>
@@ -278,7 +278,7 @@
      *
      * @return A list of voices supported.
      */
-    protected List<Voice> onGetVoices() {
+    public List<Voice> onGetVoices() {
         // Enumerate all locales and check if they are available
         ArrayList<Voice> voices = new ArrayList<Voice>();
         for (Locale locale : Locale.getAvailableLocales()) {
@@ -335,7 +335,7 @@
         }
         Locale properLocale = TtsEngines.normalizeTTSLocale(iso3Locale);
         String voiceName = properLocale.toLanguageTag();
-        if (isValidVoiceName(voiceName) == TextToSpeech.SUCCESS) {
+        if (onIsValidVoiceName(voiceName) == TextToSpeech.SUCCESS) {
             return voiceName;
         } else {
             return null;
@@ -357,7 +357,7 @@
      * @param voiceName Name of the voice.
      * @return {@link TextToSpeech#ERROR} or {@link TextToSpeech#SUCCESS}.
      */
-    protected int onLoadVoice(String voiceName) {
+    public int onLoadVoice(String voiceName) {
         Locale locale = Locale.forLanguageTag(voiceName);
         if (locale == null) {
             return TextToSpeech.ERROR;
@@ -388,7 +388,7 @@
      * @param voiceName Name of the voice.
      * @return {@link TextToSpeech#ERROR} or {@link TextToSpeech#SUCCESS}.
      */
-    protected int isValidVoiceName(String voiceName) {
+    public int onIsValidVoiceName(String voiceName) {
         Locale locale = Locale.forLanguageTag(voiceName);
         if (locale == null) {
             return TextToSpeech.ERROR;
@@ -1275,7 +1275,7 @@
             if (!checkNonNull(voiceName)) {
                 return TextToSpeech.ERROR;
             }
-            int retVal = isValidVoiceName(voiceName);
+            int retVal = onIsValidVoiceName(voiceName);
 
             if (retVal == TextToSpeech.SUCCESS) {
                 SpeechItem item = new LoadVoiceItem(caller, Binder.getCallingUid(),
diff --git a/core/java/android/speech/tts/Voice.java b/core/java/android/speech/tts/Voice.java
index a97141c..a1fa51d 100644
--- a/core/java/android/speech/tts/Voice.java
+++ b/core/java/android/speech/tts/Voice.java
@@ -162,7 +162,7 @@
     /**
      * @return Does the Voice require a network connection to work.
      */
-    public boolean getRequiresNetworkConnection() {
+    public boolean isNetworkConnectionRequired() {
         return mRequiresNetworkConnection;
     }
 
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 7dce348..2b53c48 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -727,10 +727,9 @@
         int[] runs = dirs.mDirections;
         int lineStart = getLineStart(line);
         for (int i = 0; i < runs.length; i += 2) {
-            int start = lineStart + (runs[i] & RUN_LENGTH_MASK);
-            // No need to test the end as an offset after the last run should return the value
-            // corresponding of the last run
-            if (offset >= start) {
+            int start = lineStart + runs[i];
+            int limit = start + (runs[i+1] & RUN_LENGTH_MASK);
+            if (offset >= start && offset < limit) {
                 int level = (runs[i+1] >>> RUN_LEVEL_SHIFT) & RUN_LEVEL_MASK;
                 return ((level & 1) != 0);
             }
diff --git a/core/java/android/text/Selection.java b/core/java/android/text/Selection.java
index 679e2cc..3222dbf 100644
--- a/core/java/android/text/Selection.java
+++ b/core/java/android/text/Selection.java
@@ -116,7 +116,8 @@
 
     /**
      * Move the cursor to the buffer offset physically above the current
-     * offset, or return false if the cursor is already on the top line.
+     * offset, to the beginning if it is on the top line but not at the
+     * start, or return false if the cursor is already on the top line.
      */
     public static boolean moveUp(Spannable text, Layout layout) {
         int start = getSelectionStart(text);
@@ -149,6 +150,9 @@
 
                 setSelection(text, move);
                 return true;
+            } else if (end != 0) {
+                setSelection(text, 0);
+                return true;
             }
         }
 
@@ -157,7 +161,9 @@
 
     /**
      * Move the cursor to the buffer offset physically below the current
-     * offset, or return false if the cursor is already on the bottom line.
+     * offset, to the end of the buffer if it is on the bottom line but
+     * not at the end, or return false if the cursor is already at the
+     * end of the buffer.
      */
     public static boolean moveDown(Spannable text, Layout layout) {
         int start = getSelectionStart(text);
@@ -190,6 +196,9 @@
 
                 setSelection(text, move);
                 return true;
+            } else if (end != text.length()) {
+                setSelection(text, text.length());
+                return true;
             }
         }
 
diff --git a/core/java/android/transition/ArcMotion.java b/core/java/android/transition/ArcMotion.java
index a27063d..f95fb49 100644
--- a/core/java/android/transition/ArcMotion.java
+++ b/core/java/android/transition/ArcMotion.java
@@ -41,9 +41,9 @@
  * {@code
  * &lt;changeBounds>
  *   &lt;arcMotion android:minimumHorizontalAngle="15"
- *     android:minimumVerticalAngle="0" android:maximumAngle="90"/>
- * &lt;/changeBounds>
- * }
+ *              android:minimumVerticalAngle="0"
+ *              android:maximumAngle="90"/>
+ * &lt;/changeBounds>}
  * </pre>
  */
 public class ArcMotion extends PathMotion {
diff --git a/core/java/android/transition/ChangeTransform.java b/core/java/android/transition/ChangeTransform.java
index d579f54..1b8d57c 100644
--- a/core/java/android/transition/ChangeTransform.java
+++ b/core/java/android/transition/ChangeTransform.java
@@ -45,6 +45,10 @@
     private static final String PROPNAME_TRANSFORMS = "android:changeTransform:transforms";
     private static final String PROPNAME_PARENT = "android:changeTransform:parent";
     private static final String PROPNAME_PARENT_MATRIX = "android:changeTransform:parentMatrix";
+    private static final String PROPNAME_INTERMEDIATE_PARENT_MATRIX =
+            "android:changeTransform:intermediateParentMatrix";
+    private static final String PROPNAME_INTERMEDIATE_MATRIX =
+            "android:changeTransform:intermediateMatrix";
 
     private static final String[] sTransitionProperties = {
             PROPNAME_MATRIX,
@@ -95,6 +99,7 @@
      * @return <code>true</code> when a changed parent should execute the transition
      * inside the scene root's overlay or <code>false</code> if a parent change only
      * affects the transform of the transitioning view.
+     * @attr ref android.R.styleable#ChangeTransform_reparentWithOverlay
      */
     public boolean getReparentWithOverlay() {
         return mUseOverlay;
@@ -116,6 +121,7 @@
      * @return <code>true</code> when a changed parent should execute the transition
      * inside the scene root's overlay or <code>false</code> if a parent change only
      * affects the transform of the transitioning view.
+     * @attr ref android.R.styleable#ChangeTransform_reparentWithOverlay
      */
     public void setReparentWithOverlay(boolean reparentWithOverlay) {
         mUseOverlay = reparentWithOverlay;
@@ -128,6 +134,7 @@
      * view will be tracked. Default is true.
      *
      * @return whether parent changes will be tracked by the ChangeTransform.
+     * @attr ref android.R.styleable#ChangeTransform_reparent
      */
     public boolean getReparent() {
         return mReparent;
@@ -141,6 +148,7 @@
      *
      * @param reparent Set to true to track parent changes or false to only track changes
      *                 of the transitioning view without considering the parent change.
+     * @attr ref android.R.styleable#ChangeTransform_reparent
      */
     public void setReparent(boolean reparent) {
         mReparent = reparent;
@@ -172,6 +180,10 @@
             parent.transformMatrixToGlobal(parentMatrix);
             parentMatrix.preTranslate(-parent.getScrollX(), -parent.getScrollY());
             transitionValues.values.put(PROPNAME_PARENT_MATRIX, parentMatrix);
+            transitionValues.values.put(PROPNAME_INTERMEDIATE_MATRIX,
+                    view.getTag(R.id.transitionTransform));
+            transitionValues.values.put(PROPNAME_INTERMEDIATE_PARENT_MATRIX,
+                    view.getTag(R.id.parentMatrix));
         }
         return;
     }
@@ -199,12 +211,13 @@
         ViewGroup endParent = (ViewGroup) endValues.values.get(PROPNAME_PARENT);
         boolean handleParentChange = mReparent && !parentsMatch(startParent, endParent);
 
-        Matrix startMatrix = (Matrix) startValues.view.getTag(R.id.transitionTransform);
+        Matrix startMatrix = (Matrix) startValues.values.get(PROPNAME_INTERMEDIATE_MATRIX);
         if (startMatrix != null) {
             startValues.values.put(PROPNAME_MATRIX, startMatrix);
         }
 
-        Matrix startParentMatrix = (Matrix) startValues.view.getTag(R.id.parentMatrix);
+        Matrix startParentMatrix = (Matrix)
+                startValues.values.get(PROPNAME_INTERMEDIATE_PARENT_MATRIX);
         if (startParentMatrix != null) {
             startValues.values.put(PROPNAME_PARENT_MATRIX, startParentMatrix);
         }
@@ -250,9 +263,11 @@
         ObjectAnimator animator = ObjectAnimator.ofObject(view, ANIMATION_MATRIX_PROPERTY,
                 new TransitionUtils.MatrixEvaluator(), startMatrix, endMatrix);
 
+        final Matrix finalEndMatrix = endMatrix;
+
         AnimatorListenerAdapter listener = new AnimatorListenerAdapter() {
             private boolean mIsCanceled;
-            private Matrix mTempMatrix;
+            private Matrix mTempMatrix = new Matrix();
 
             @Override
             public void onAnimationCancel(Animator animation) {
@@ -262,8 +277,7 @@
             @Override
             public void onAnimationEnd(Animator animation) {
                 if (!mIsCanceled) {
-                    view.setTagInternal(R.id.transitionTransform, null);
-                    view.setTagInternal(R.id.parentMatrix, null);
+                    setCurrentMatrix(finalEndMatrix);
                 }
                 ANIMATION_MATRIX_PROPERTY.set(view, null);
                 transforms.restore(view);
@@ -273,19 +287,19 @@
             public void onAnimationPause(Animator animation) {
                 ValueAnimator animator = (ValueAnimator) animation;
                 Matrix currentMatrix = (Matrix) animator.getAnimatedValue();
-                if (mTempMatrix == null) {
-                    mTempMatrix = new Matrix(currentMatrix);
-                } else {
-                    mTempMatrix.set(currentMatrix);
-                }
-                view.setTagInternal(R.id.transitionTransform, mTempMatrix);
-                transforms.restore(view);
+                setCurrentMatrix(currentMatrix);
             }
 
             @Override
             public void onAnimationResume(Animator animation) {
                 setIdentityTransforms(view);
             }
+
+            private void setCurrentMatrix(Matrix currentMatrix) {
+                mTempMatrix.set(currentMatrix);
+                view.setTagInternal(R.id.transitionTransform, mTempMatrix);
+                transforms.restore(view);
+            }
         };
 
         animator.addListener(listener);
@@ -423,6 +437,8 @@
         public void onTransitionEnd(Transition transition) {
             transition.removeListener(this);
             GhostView.removeGhost(mView);
+            mView.setTagInternal(R.id.transitionTransform, null);
+            mView.setTagInternal(R.id.parentMatrix, null);
         }
 
         @Override
diff --git a/core/java/android/transition/PatternMotion.java b/core/java/android/transition/PatternPathMotion.java
similarity index 68%
rename from core/java/android/transition/PatternMotion.java
rename to core/java/android/transition/PatternPathMotion.java
index e4045b4..a609df6 100644
--- a/core/java/android/transition/PatternMotion.java
+++ b/core/java/android/transition/PatternPathMotion.java
@@ -34,36 +34,35 @@
  * <pre>
  * {@code
  * &lt;changeBounds>
- *     &lt;patternMotion android:pathData="M0 0 L0 100 L100 100"/>
- * &lt;/changeBounds>
- * }
+ *     &lt;patternPathMotion android:patternPathData="M0 0 L0 100 L100 100"/>
+ * &lt;/changeBounds>}
  * </pre>
  */
-public class PatternMotion extends PathMotion {
+public class PatternPathMotion extends PathMotion {
 
-    private Path mOriginalPattern;
+    private Path mOriginalPatternPath;
 
-    private final Path mPattern = new Path();
+    private final Path mPatternPath = new Path();
 
     private final Matrix mTempMatrix = new Matrix();
 
     /**
-     * Constructs a PatternMotion with a straight-line pattern.
+     * Constructs a PatternPathMotion with a straight-line pattern.
      */
-    public PatternMotion() {
-        mPattern.lineTo(1, 0);
-        mOriginalPattern = mPattern;
+    public PatternPathMotion() {
+        mPatternPath.lineTo(1, 0);
+        mOriginalPatternPath = mPatternPath;
     }
 
-    public PatternMotion(Context context, AttributeSet attrs) {
-        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PatternMotion);
+    public PatternPathMotion(Context context, AttributeSet attrs) {
+        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PatternPathMotion);
         try {
-            String pathData = a.getString(R.styleable.PatternMotion_pathData);
+            String pathData = a.getString(R.styleable.PatternPathMotion_patternPathData);
             if (pathData == null) {
-                throw new RuntimeException("pathData must be supplied for patternMotion");
+                throw new RuntimeException("pathData must be supplied for patternPathMotion");
             }
             Path pattern = PathParser.createPathFromPathData(pathData);
-            setPattern(pattern);
+            setPatternPath(pattern);
         } finally {
             a.recycle();
         }
@@ -71,14 +70,15 @@
     }
 
     /**
-     * Creates a PatternMotion with the Path defining a pattern of motion between two coordinates.
-     * The pattern will be translated, rotated, and scaled to fit between the start and end points.
-     * The pattern must not be empty and must have the end point differ from the start point.
+     * Creates a PatternPathMotion with the Path defining a pattern of motion between two
+     * coordinates. The pattern will be translated, rotated, and scaled to fit between the start
+     * and end points. The pattern must not be empty and must have the end point differ from the
+     * start point.
      *
-     * @param pattern A Path to be used as a pattern for two-dimensional motion.
+     * @param patternPath A Path to be used as a pattern for two-dimensional motion.
      */
-    public PatternMotion(Path pattern) {
-        setPattern(pattern);
+    public PatternPathMotion(Path patternPath) {
+        setPatternPath(patternPath);
     }
 
     /**
@@ -87,10 +87,10 @@
      * The pattern must not be empty and must have the end point differ from the start point.
      *
      * @return the Path defining a pattern of motion between two coordinates.
-     * @attr ref android.R.styleable#PatternMotion_pathData
+     * @attr ref android.R.styleable#PatternPathMotion_patternPathData
      */
-    public Path getPattern() {
-        return mOriginalPattern;
+    public Path getPatternPath() {
+        return mOriginalPatternPath;
     }
 
     /**
@@ -98,11 +98,11 @@
      * The pattern will be translated, rotated, and scaled to fit between the start and end points.
      * The pattern must not be empty and must have the end point differ from the start point.
      *
-     * @param pattern A Path to be used as a pattern for two-dimensional motion.
-     * @attr ref android.R.styleable#PatternMotion_pathData
+     * @param patternPath A Path to be used as a pattern for two-dimensional motion.
+     * @attr ref android.R.styleable#PatternPathMotion_patternPathData
      */
-    public void setPattern(Path pattern) {
-        PathMeasure pathMeasure = new PathMeasure(pattern, false);
+    public void setPatternPath(Path patternPath) {
+        PathMeasure pathMeasure = new PathMeasure(patternPath, false);
         float length = pathMeasure.getLength();
         float[] pos = new float[2];
         pathMeasure.getPosTan(length, pos, null);
@@ -124,8 +124,8 @@
         mTempMatrix.postScale(scale, scale);
         double angle = Math.atan2(dy, dx);
         mTempMatrix.postRotate((float) Math.toDegrees(-angle));
-        pattern.transform(mTempMatrix, mPattern);
-        mOriginalPattern = pattern;
+        patternPath.transform(mTempMatrix, mPatternPath);
+        mOriginalPatternPath = patternPath;
     }
 
     @Override
@@ -139,7 +139,7 @@
         mTempMatrix.postRotate((float) Math.toDegrees(angle));
         mTempMatrix.postTranslate(startX, startY);
         Path path = new Path();
-        mPattern.transform(mTempMatrix, path);
+        mPatternPath.transform(mTempMatrix, path);
         return path;
     }
 
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index bd52e71..40bb6ec 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -1417,9 +1417,9 @@
                     }
                     capturePropagationValues(values);
                     if (start) {
-                        addViewValues(mStartValues, view, values);
+                        addViewValues(mStartValues, view, values, true);
                     } else {
-                        addViewValues(mEndValues, view, values);
+                        addViewValues(mEndValues, view, values, true);
                     }
                 }
             }
@@ -1460,7 +1460,7 @@
     }
 
     static void addViewValues(TransitionValuesMaps transitionValuesMaps,
-            View view, TransitionValues transitionValues) {
+            View view, TransitionValues transitionValues, boolean setTransientState) {
         transitionValuesMaps.viewValues.put(view, transitionValues);
         int id = view.getId();
         if (id >= 0) {
@@ -1489,11 +1489,15 @@
                     // Duplicate item IDs: cannot match by item ID.
                     View alreadyMatched = transitionValuesMaps.itemIdValues.get(itemId);
                     if (alreadyMatched != null) {
-                        alreadyMatched.setHasTransientState(false);
+                        if (setTransientState) {
+                            alreadyMatched.setHasTransientState(false);
+                        }
                         transitionValuesMaps.itemIdValues.put(itemId, null);
                     }
                 } else {
-                    view.setHasTransientState(true);
+                    if (setTransientState) {
+                        view.setHasTransientState(true);
+                    }
                     transitionValuesMaps.itemIdValues.put(itemId, view);
                 }
             }
@@ -1560,9 +1564,9 @@
             }
             capturePropagationValues(values);
             if (start) {
-                addViewValues(mStartValues, view, values);
+                addViewValues(mStartValues, view, values, true);
             } else {
-                addViewValues(mEndValues, view, values);
+                addViewValues(mEndValues, view, values, true);
             }
         }
         if (view instanceof ViewGroup) {
@@ -1989,8 +1993,33 @@
      *     by extending PathMotion and implementing
      *     {@link android.transition.PathMotion#getPath(float, float, float, float)}.
      * </p>
+     * <p>
+     *     When describing in XML, use a nested XML tag for the path motion. It can be one of
+     *     the built-in tags <code>arcMotion</code> or <code>patternPathMotion</code> or it can
+     *     be a custom PathMotion using <code>pathMotion</code> with the <code>class</code>
+     *     attributed with the fully-described class name. For example:</p>
+     * <pre>
+     * {@code
+     * &lt;changeBounds>
+     *     &lt;pathMotion class="my.app.transition.MyPathMotion"/>
+     * &lt;/changeBounds>
+     * }
+     * </pre>
+     * <p>or</p>
+     * <pre>
+     * {@code
+     * &lt;changeBounds>
+     *   &lt;arcMotion android:minimumHorizontalAngle="15"
+     *     android:minimumVerticalAngle="0" android:maximumAngle="90"/>
+     * &lt;/changeBounds>
+     * }
+     * </pre>
+     *
      * @param pathMotion Algorithm object to use for determining how to interpolate in two
      *                   dimensions. If null, a straight-path algorithm will be used.
+     * @see android.transition.ArcMotion
+     * @see PatternPathMotion
+     * @see android.transition.PathMotion
      */
     public void setPathMotion(PathMotion pathMotion) {
         if (pathMotion == null) {
@@ -2004,7 +2033,31 @@
      * Returns the algorithm object used to interpolate along two dimensions. This is typically
      * used to determine the View motion between two points.
      *
+     * <p>
+     *     When describing in XML, use a nested XML tag for the path motion. It can be one of
+     *     the built-in tags <code>arcMotion</code> or <code>patternPathMotion</code> or it can
+     *     be a custom PathMotion using <code>pathMotion</code> with the <code>class</code>
+     *     attributed with the fully-described class name. For example:</p>
+     * <pre>
+     * {@code
+     * &lt;changeBounds>
+     *     &lt;pathMotion class="my.app.transition.MyPathMotion"/>
+     * &lt;/changeBounds>}
+     * </pre>
+     * <p>or</p>
+     * <pre>
+     * {@code
+     * &lt;changeBounds>
+     *   &lt;arcMotion android:minimumHorizontalAngle="15"
+     *              android:minimumVerticalAngle="0"
+     *              android:maximumAngle="90"/>
+     * &lt;/changeBounds>}
+     * </pre>
+     *
      * @return The algorithm object used to interpolate along two dimensions.
+     * @see android.transition.ArcMotion
+     * @see PatternPathMotion
+     * @see android.transition.PathMotion
      */
     public PathMotion getPathMotion() {
         return mPathMotion;
diff --git a/core/java/android/transition/TransitionInflater.java b/core/java/android/transition/TransitionInflater.java
index 760ffe1..9009d6a 100644
--- a/core/java/android/transition/TransitionInflater.java
+++ b/core/java/android/transition/TransitionInflater.java
@@ -171,8 +171,8 @@
                 parent.setPathMotion(new ArcMotion(mContext, attrs));
             } else if ("pathMotion".equals(name)) {
                 parent.setPathMotion((PathMotion)createCustom(attrs, PathMotion.class, "pathMotion"));
-            } else if ("patternMotion".equals(name)) {
-                parent.setPathMotion(new PatternMotion(mContext, attrs));
+            } else if ("patternPathMotion".equals(name)) {
+                parent.setPathMotion(new PatternPathMotion(mContext, attrs));
             } else {
                 throw new RuntimeException("Unknown scene name: " + parser.getName());
             }
diff --git a/core/java/android/transition/TransitionManager.java b/core/java/android/transition/TransitionManager.java
index ce3cc2f..7bd6287 100644
--- a/core/java/android/transition/TransitionManager.java
+++ b/core/java/android/transition/TransitionManager.java
@@ -182,11 +182,15 @@
 
         final ViewGroup sceneRoot = scene.getSceneRoot();
 
-        Transition transitionClone = transition.clone();
-        transitionClone.setSceneRoot(sceneRoot);
+        Transition transitionClone = null;
+        if (transition != null) {
+            transitionClone = transition.clone();
+            transitionClone.setSceneRoot(sceneRoot);
+        }
 
         Scene oldScene = Scene.getCurrentScene(sceneRoot);
-        if (oldScene != null && oldScene.isCreatedFromLayoutResource()) {
+        if (oldScene != null && transitionClone != null &&
+                oldScene.isCreatedFromLayoutResource()) {
             transitionClone.setCanRemoveViews(true);
         }
 
diff --git a/core/java/android/transition/TransitionSet.java b/core/java/android/transition/TransitionSet.java
index f6499ae..56db674 100644
--- a/core/java/android/transition/TransitionSet.java
+++ b/core/java/android/transition/TransitionSet.java
@@ -408,7 +408,7 @@
         for (int i = 0; i < numValues; i++) {
             View view = values.viewValues.keyAt(i);
             if (isValidTarget(view)) {
-                addViewValues(included, view, values.viewValues.valueAt(i));
+                addViewValues(included, view, values.viewValues.valueAt(i), false);
             }
         }
         return included;
diff --git a/core/java/android/transition/TransitionUtils.java b/core/java/android/transition/TransitionUtils.java
index b0c9e9a..a84ecd1 100644
--- a/core/java/android/transition/TransitionUtils.java
+++ b/core/java/android/transition/TransitionUtils.java
@@ -40,6 +40,33 @@
         }
     }
 
+    public static Transition mergeTransitions(Transition... transitions) {
+        int count = 0;
+        int nonNullIndex = -1;
+        for (int i = 0; i < transitions.length; i++) {
+            if (transitions[i] != null) {
+                count++;
+                nonNullIndex = i;
+            }
+        }
+
+        if (count == 0) {
+            return null;
+        }
+
+        if (count == 1) {
+            return transitions[nonNullIndex];
+        }
+
+        TransitionSet transitionSet = new TransitionSet();
+        for (int i = 0; i < transitions.length; i++) {
+            if (transitions[i] != null) {
+                transitionSet.addTransition(transitions[i]);
+            }
+        }
+        return transitionSet;
+    }
+
     public static class MatrixEvaluator implements TypeEvaluator<Matrix> {
 
         float[] mTempStartValues = new float[9];
diff --git a/core/java/android/transition/Visibility.java b/core/java/android/transition/Visibility.java
index 0b02552..d648ca6 100644
--- a/core/java/android/transition/Visibility.java
+++ b/core/java/android/transition/Visibility.java
@@ -358,12 +358,16 @@
                     overlayView = startView;
                 } else if (startView.getParent() instanceof View) {
                     View startParent = (View) startView.getParent();
-                    if (!isValidTarget(startParent)) {
-                        if (startView.isAttachedToWindow()) {
-                            overlayView = copyViewImage(startView);
-                        } else {
-                            overlayView = startView;
-                        }
+                    VisibilityInfo parentVisibilityInfo = null;
+                    TransitionValues endParentValues = getMatchedTransitionValues(startParent,
+                            true);
+                    if (endParentValues != null) {
+                        TransitionValues startParentValues = getTransitionValues(startParent, true);
+                        parentVisibilityInfo =
+                                getVisibilityChangeInfo(startParentValues, endParentValues);
+                    }
+                    if (parentVisibilityInfo == null || !parentVisibilityInfo.visibilityChange) {
+                        overlayView = copyViewImage(startView);
                     } else if (startParent.getParent() == null) {
                         int id = startParent.getId();
                         if (id != View.NO_ID && sceneRoot.findViewById(id) != null
diff --git a/core/java/android/util/Size.java b/core/java/android/util/Size.java
index 6424344..62df564 100644
--- a/core/java/android/util/Size.java
+++ b/core/java/android/util/Size.java
@@ -18,13 +18,10 @@
 
 import static com.android.internal.util.Preconditions.checkNotNull;
 
-import android.os.Parcel;
-import android.os.Parcelable;
-
 /**
  * Immutable class for describing width and height dimensions in pixels.
  */
-public final class Size implements Parcelable {
+public final class Size {
     /**
      * Create a new immutable Size instance.
      *
@@ -36,11 +33,6 @@
         mHeight = height;
     }
 
-    private Size(Parcel in) {
-        mWidth = in.readInt();
-        mHeight = in.readInt();
-    }
-
     /**
      * Get the width of the size (in pixels).
      * @return width
@@ -155,29 +147,6 @@
         return mHeight ^ ((mWidth << (Integer.SIZE / 2)) | (mWidth >>> (Integer.SIZE / 2)));
     }
 
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeInt(mWidth);
-        out.writeInt(mHeight);
-    }
-
-    public static final Parcelable.Creator<Size> CREATOR = new Parcelable.Creator<Size>() {
-        @Override
-        public Size createFromParcel(Parcel in) {
-            return new Size(in);
-        }
-
-        @Override
-        public Size[] newArray(int size) {
-            return new Size[size];
-        }
-    };
-
     private final int mWidth;
     private final int mHeight;
 }
diff --git a/core/java/android/util/SizeF.java b/core/java/android/util/SizeF.java
index 88bb4393..2edc4a7f 100644
--- a/core/java/android/util/SizeF.java
+++ b/core/java/android/util/SizeF.java
@@ -16,11 +16,9 @@
 
 package android.util;
 
+import static com.android.internal.util.Preconditions.checkNotNull;
 import static com.android.internal.util.Preconditions.checkArgumentFinite;
 
-import android.os.Parcel;
-import android.os.Parcelable;
-
 /**
  * Immutable class for describing width and height dimensions in some arbitrary
  * unit.
@@ -28,7 +26,7 @@
  * Width and height are finite values stored as a floating point representation.
  * </p>
  */
-public final class SizeF implements Parcelable {
+public final class SizeF {
     /**
      * Create a new immutable SizeF instance.
      *
@@ -46,11 +44,6 @@
         mHeight = checkArgumentFinite(height, "height");
     }
 
-    private SizeF(Parcel in) {
-        mWidth = in.readFloat();
-        mHeight = in.readFloat();
-    }
-
     /**
      * Get the width of the size (as an arbitrary unit).
      * @return width
@@ -103,6 +96,61 @@
         return mWidth + "x" + mHeight;
     }
 
+    private static NumberFormatException invalidSizeF(String s) {
+        throw new NumberFormatException("Invalid SizeF: \"" + s + "\"");
+    }
+
+    /**
+     * Parses the specified string as a size value.
+     * <p>
+     * The ASCII characters {@code \}{@code u002a} ('*') and
+     * {@code \}{@code u0078} ('x') are recognized as separators between
+     * the width and height.</p>
+     * <p>
+     * For any {@code SizeF s}: {@code SizeF.parseSizeF(s.toString()).equals(s)}.
+     * However, the method also handles sizes expressed in the
+     * following forms:</p>
+     * <p>
+     * "<i>width</i>{@code x}<i>height</i>" or
+     * "<i>width</i>{@code *}<i>height</i>" {@code => new SizeF(width, height)},
+     * where <i>width</i> and <i>height</i> are string floats potentially
+     * containing a sign, such as "-10.3", "+7" or "5.2", but not containing
+     * an {@code 'x'} (such as a float in hexadecimal string format).</p>
+     *
+     * <pre>{@code
+     * SizeF.parseSizeF("3.2*+6").equals(new SizeF(3.2f, 6.0f)) == true
+     * SizeF.parseSizeF("-3x-6").equals(new SizeF(-3.0f, -6.0f)) == true
+     * SizeF.parseSizeF("4 by 3") => throws NumberFormatException
+     * }</pre>
+     *
+     * @param string the string representation of a size value.
+     * @return the size value represented by {@code string}.
+     *
+     * @throws NumberFormatException if {@code string} cannot be parsed
+     * as a size value.
+     * @throws NullPointerException if {@code string} was {@code null}
+     */
+    public static SizeF parseSizeF(String string)
+            throws NumberFormatException {
+        checkNotNull(string, "string must not be null");
+
+        int sep_ix = string.indexOf('*');
+        if (sep_ix < 0) {
+            sep_ix = string.indexOf('x');
+        }
+        if (sep_ix < 0) {
+            throw invalidSizeF(string);
+        }
+        try {
+            return new SizeF(Float.parseFloat(string.substring(0, sep_ix)),
+                    Float.parseFloat(string.substring(sep_ix + 1)));
+        } catch (NumberFormatException e) {
+            throw invalidSizeF(string);
+        } catch (IllegalArgumentException e) {
+            throw invalidSizeF(string);
+        }
+    }
+
     /**
      * {@inheritDoc}
      */
@@ -111,29 +159,6 @@
         return Float.floatToIntBits(mWidth) ^ Float.floatToIntBits(mHeight);
     }
 
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeFloat(mWidth);
-        out.writeFloat(mHeight);
-    }
-
-    public static final Parcelable.Creator<SizeF> CREATOR = new Parcelable.Creator<SizeF>() {
-        @Override
-        public SizeF createFromParcel(Parcel in) {
-            return new SizeF(in);
-        }
-
-        @Override
-        public SizeF[] newArray(int size) {
-            return new SizeF[size];
-        }
-    };
-
     private final float mWidth;
     private final float mHeight;
 }
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index 477c994..a283b91 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -18,7 +18,7 @@
 
 import android.graphics.Point;
 import android.graphics.Rect;
-import android.os.Build;
+import android.graphics.Region;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
@@ -96,11 +96,11 @@
     }
 
     public void findAccessibilityNodeInfoByAccessibilityIdClientThread(
-            long accessibilityNodeId, int interactionId,
+            long accessibilityNodeId, Region interactiveRegion, int interactionId,
             IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
             long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
-        message.what = PrivateHandler.MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID;
+        message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID;
         message.arg1 = flags;
 
         SomeArgs args = SomeArgs.obtain();
@@ -109,6 +109,7 @@
         args.argi3 = interactionId;
         args.arg1 = callback;
         args.arg2 = spec;
+        args.arg3 = interactiveRegion;
         message.obj = args;
 
         // If the interrogation is performed by the same thread as the main UI
@@ -133,6 +134,7 @@
         final IAccessibilityInteractionConnectionCallback callback =
             (IAccessibilityInteractionConnectionCallback) args.arg1;
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
+        final Region interactiveRegion = (Region) args.arg3;
 
         args.recycle();
 
@@ -159,6 +161,7 @@
                 if (spec != null) {
                     spec.recycle();
                 }
+                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
                 callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
                 infos.clear();
             } catch (RemoteException re) {
@@ -168,10 +171,11 @@
     }
 
     public void findAccessibilityNodeInfosByViewIdClientThread(long accessibilityNodeId,
-            String viewId, int interactionId, IAccessibilityInteractionConnectionCallback callback,
-            int flags, int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
+            String viewId, Region interactiveRegion, int interactionId,
+            IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+            long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
-        message.what = PrivateHandler.MSG_FIND_ACCESSIBLITY_NODE_INFOS_BY_VIEW_ID;
+        message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID;
         message.arg1 = flags;
         message.arg2 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
 
@@ -180,6 +184,7 @@
         args.arg1 = callback;
         args.arg2 = spec;
         args.arg3 = viewId;
+        args.arg4 = interactiveRegion;
 
         message.obj = args;
 
@@ -205,6 +210,7 @@
             (IAccessibilityInteractionConnectionCallback) args.arg1;
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
         final String viewId = (String) args.arg3;
+        final Region interactiveRegion = (Region) args.arg4;
 
         args.recycle();
 
@@ -241,6 +247,7 @@
                 if (spec != null) {
                     spec.recycle();
                 }
+                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
                 callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
             } catch (RemoteException re) {
                 /* ignore - the other side will time out */
@@ -249,10 +256,11 @@
     }
 
     public void findAccessibilityNodeInfosByTextClientThread(long accessibilityNodeId,
-            String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
-            int flags, int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
+            String text, Region interactiveRegion, int interactionId,
+            IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
+            long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
-        message.what = PrivateHandler.MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT;
+        message.what = PrivateHandler.MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT;
         message.arg1 = flags;
 
         SomeArgs args = SomeArgs.obtain();
@@ -262,6 +270,7 @@
         args.argi1 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
         args.argi2 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
         args.argi3 = interactionId;
+        args.arg4 = interactiveRegion;
         message.obj = args;
 
         // If the interrogation is performed by the same thread as the main UI
@@ -287,6 +296,7 @@
         final int accessibilityViewId = args.argi1;
         final int virtualDescendantId = args.argi2;
         final int interactionId = args.argi3;
+        final Region interactiveRegion = (Region) args.arg4;
         args.recycle();
 
         List<AccessibilityNodeInfo> infos = null;
@@ -347,6 +357,7 @@
                 if (spec != null) {
                     spec.recycle();
                 }
+                adjustIsVisibleToUserIfNeeded(infos, interactiveRegion);
                 callback.setFindAccessibilityNodeInfosResult(infos, interactionId);
             } catch (RemoteException re) {
                 /* ignore - the other side will time out */
@@ -354,7 +365,8 @@
         }
     }
 
-    public void findFocusClientThread(long accessibilityNodeId, int focusType, int interactionId,
+    public void findFocusClientThread(long accessibilityNodeId, int focusType,
+            Region interactiveRegion, int interactionId,
             IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
             long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
@@ -368,6 +380,7 @@
         args.argi3 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
         args.arg1 = callback;
         args.arg2 = spec;
+        args.arg3 = interactiveRegion;
 
         message.obj = args;
 
@@ -394,6 +407,7 @@
         final IAccessibilityInteractionConnectionCallback callback =
             (IAccessibilityInteractionConnectionCallback) args.arg1;
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
+        final Region interactiveRegion = (Region) args.arg3;
         args.recycle();
 
         AccessibilityNodeInfo focused = null;
@@ -457,6 +471,7 @@
                 if (spec != null) {
                     spec.recycle();
                 }
+                adjustIsVisibleToUserIfNeeded(focused, interactiveRegion);
                 callback.setFindAccessibilityNodeInfoResult(focused, interactionId);
             } catch (RemoteException re) {
                 /* ignore - the other side will time out */
@@ -464,7 +479,8 @@
         }
     }
 
-    public void focusSearchClientThread(long accessibilityNodeId, int direction, int interactionId,
+    public void focusSearchClientThread(long accessibilityNodeId, int direction,
+            Region interactiveRegion, int interactionId,
             IAccessibilityInteractionConnectionCallback callback, int flags, int interogatingPid,
             long interrogatingTid, MagnificationSpec spec) {
         Message message = mHandler.obtainMessage();
@@ -477,6 +493,7 @@
         args.argi3 = interactionId;
         args.arg1 = callback;
         args.arg2 = spec;
+        args.arg3 = interactiveRegion;
 
         message.obj = args;
 
@@ -502,6 +519,7 @@
         final IAccessibilityInteractionConnectionCallback callback =
             (IAccessibilityInteractionConnectionCallback) args.arg1;
         final MagnificationSpec spec = (MagnificationSpec) args.arg2;
+        final Region interactiveRegion = (Region) args.arg3;
 
         args.recycle();
 
@@ -530,6 +548,7 @@
                 if (spec != null) {
                     spec.recycle();
                 }
+                adjustIsVisibleToUserIfNeeded(next, interactiveRegion);
                 callback.setFindAccessibilityNodeInfoResult(next, interactionId);
             } catch (RemoteException re) {
                 /* ignore - the other side will time out */
@@ -617,6 +636,95 @@
         }
     }
 
+    public void computeClickPointInScreenClientThread(long accessibilityNodeId,
+            Region interactiveRegion, int interactionId,
+            IAccessibilityInteractionConnectionCallback callback, int interrogatingPid,
+            long interrogatingTid, MagnificationSpec spec) {
+        Message message = mHandler.obtainMessage();
+        message.what = PrivateHandler.MSG_COMPUTE_CLICK_POINT_IN_SCREEN;
+
+        SomeArgs args = SomeArgs.obtain();
+        args.argi1 = AccessibilityNodeInfo.getAccessibilityViewId(accessibilityNodeId);
+        args.argi2 = AccessibilityNodeInfo.getVirtualDescendantId(accessibilityNodeId);
+        args.argi3 = interactionId;
+        args.arg1 = callback;
+        args.arg2 = spec;
+        args.arg3 = interactiveRegion;
+
+        message.obj = args;
+
+        // If the interrogation is performed by the same thread as the main UI
+        // thread in this process, set the message as a static reference so
+        // after this call completes the same thread but in the interrogating
+        // client can handle the message to generate the result.
+        if (interrogatingPid == mMyProcessId && interrogatingTid == mMyLooperThreadId) {
+            AccessibilityInteractionClient.getInstanceForThread(
+                    interrogatingTid).setSameThreadMessage(message);
+        } else {
+            mHandler.sendMessage(message);
+        }
+    }
+
+    private void computeClickPointInScreenUiThread(Message message) {
+        SomeArgs args = (SomeArgs) message.obj;
+        final int accessibilityViewId = args.argi1;
+        final int virtualDescendantId = args.argi2;
+        final int interactionId = args.argi3;
+        final IAccessibilityInteractionConnectionCallback callback =
+                (IAccessibilityInteractionConnectionCallback) args.arg1;
+        final MagnificationSpec spec = (MagnificationSpec) args.arg2;
+        final Region interactiveRegion = (Region) args.arg3;
+        args.recycle();
+
+        boolean succeeded = false;
+        Point point = mTempPoint;
+        try {
+            if (mViewRootImpl.mView == null || mViewRootImpl.mAttachInfo == null) {
+                return;
+            }
+            View target = null;
+            if (accessibilityViewId != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+                target = findViewByAccessibilityId(accessibilityViewId);
+            } else {
+                target = mViewRootImpl.mView;
+            }
+            if (target != null && isShown(target)) {
+                AccessibilityNodeProvider provider = target.getAccessibilityNodeProvider();
+                if (provider != null) {
+                    // For virtual views just use the center of the bounds in screen.
+                    AccessibilityNodeInfo node = null;
+                    if (virtualDescendantId != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+                        node = provider.createAccessibilityNodeInfo(virtualDescendantId);
+                    } else {
+                        node = provider.createAccessibilityNodeInfo(
+                                AccessibilityNodeProvider.HOST_VIEW_ID);
+                    }
+                    if (node != null) {
+                        succeeded = true;
+                        Rect boundsInScreen = mTempRect;
+                        node.getBoundsInScreen(boundsInScreen);
+                        point.set(boundsInScreen.centerX(), boundsInScreen.centerY());
+                    }
+                } else if (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+                    // For a real view, ask the view to compute the click point.
+                    succeeded = target.computeClickPointInScreenForAccessibility(
+                            interactiveRegion, point);
+                }
+            }
+        } finally {
+            try {
+                Point result = null;
+                if (succeeded) {
+                    applyAppScaleAndMagnificationSpecIfNeeded(point, spec);
+                    result = point;
+                }
+                callback.setComputeClickPointInScreenActionResult(result, interactionId);
+            } catch (RemoteException re) {
+                /* ignore - the other side will time out */
+            }
+        }
+    }
+
     private View findViewByAccessibilityId(int accessibilityId) {
         View root = mViewRootImpl.mView;
         if (root == null) {
@@ -644,6 +752,50 @@
         }
     }
 
+    private void adjustIsVisibleToUserIfNeeded(List<AccessibilityNodeInfo> infos,
+            Region interactiveRegion) {
+        if (interactiveRegion == null || infos == null) {
+            return;
+        }
+        final int infoCount = infos.size();
+        for (int i = 0; i < infoCount; i++) {
+            AccessibilityNodeInfo info = infos.get(i);
+            adjustIsVisibleToUserIfNeeded(info, interactiveRegion);
+        }
+    }
+
+    private void adjustIsVisibleToUserIfNeeded(AccessibilityNodeInfo info,
+            Region interactiveRegion) {
+        if (interactiveRegion == null || info == null) {
+            return;
+        }
+        Rect boundsInScreen = mTempRect;
+        info.getBoundsInScreen(boundsInScreen);
+        if (interactiveRegion.quickReject(boundsInScreen)) {
+            info.setVisibleToUser(false);
+        }
+    }
+
+    private void applyAppScaleAndMagnificationSpecIfNeeded(Point point,
+            MagnificationSpec spec) {
+        final float applicationScale = mViewRootImpl.mAttachInfo.mApplicationScale;
+        if (!shouldApplyAppScaleAndMagnificationSpec(applicationScale, spec)) {
+            return;
+        }
+
+        if (applicationScale != 1.0f) {
+            point.x *= applicationScale;
+            point.y *= applicationScale;
+        }
+
+        if (spec != null) {
+            point.x *= spec.scale;
+            point.y *= spec.scale;
+            point.x += (int) spec.offsetX;
+            point.y += (int) spec.offsetY;
+        }
+    }
+
     private void applyAppScaleAndMagnificationSpecIfNeeded(AccessibilityNodeInfo info,
             MagnificationSpec spec) {
         if (info == null) {
@@ -1036,11 +1188,12 @@
 
     private class PrivateHandler extends Handler {
         private final static int MSG_PERFORM_ACCESSIBILITY_ACTION = 1;
-        private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID = 2;
-        private final static int MSG_FIND_ACCESSIBLITY_NODE_INFOS_BY_VIEW_ID = 3;
-        private final static int MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT = 4;
+        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID = 2;
+        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID = 3;
+        private final static int MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT = 4;
         private final static int MSG_FIND_FOCUS = 5;
         private final static int MSG_FOCUS_SEARCH = 6;
+        private final static int MSG_COMPUTE_CLICK_POINT_IN_SCREEN = 7;
 
         public PrivateHandler(Looper looper) {
             super(looper);
@@ -1052,16 +1205,18 @@
             switch (type) {
                 case MSG_PERFORM_ACCESSIBILITY_ACTION:
                     return "MSG_PERFORM_ACCESSIBILITY_ACTION";
-                case MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID:
-                    return "MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID";
-                case MSG_FIND_ACCESSIBLITY_NODE_INFOS_BY_VIEW_ID:
-                    return "MSG_FIND_ACCESSIBLITY_NODE_INFOS_BY_VIEW_ID";
-                case MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT:
-                    return "MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT";
+                case MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID:
+                    return "MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID";
+                case MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID:
+                    return "MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID";
+                case MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT:
+                    return "MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT";
                 case MSG_FIND_FOCUS:
                     return "MSG_FIND_FOCUS";
                 case MSG_FOCUS_SEARCH:
                     return "MSG_FOCUS_SEARCH";
+                case MSG_COMPUTE_CLICK_POINT_IN_SCREEN:
+                    return "MSG_COMPUTE_CLICK_POINT_IN_SCREEN";
                 default:
                     throw new IllegalArgumentException("Unknown message type: " + type);
             }
@@ -1071,16 +1226,16 @@
         public void handleMessage(Message message) {
             final int type = message.what;
             switch (type) {
-                case MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_ACCESSIBILITY_ID: {
+                case MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_ACCESSIBILITY_ID: {
                     findAccessibilityNodeInfoByAccessibilityIdUiThread(message);
                 } break;
                 case MSG_PERFORM_ACCESSIBILITY_ACTION: {
                     perfromAccessibilityActionUiThread(message);
                 } break;
-                case MSG_FIND_ACCESSIBLITY_NODE_INFOS_BY_VIEW_ID: {
+                case MSG_FIND_ACCESSIBILITY_NODE_INFOS_BY_VIEW_ID: {
                     findAccessibilityNodeInfosByViewIdUiThread(message);
                 } break;
-                case MSG_FIND_ACCESSIBLITY_NODE_INFO_BY_TEXT: {
+                case MSG_FIND_ACCESSIBILITY_NODE_INFO_BY_TEXT: {
                     findAccessibilityNodeInfosByTextUiThread(message);
                 } break;
                 case MSG_FIND_FOCUS: {
@@ -1089,6 +1244,9 @@
                 case MSG_FOCUS_SEARCH: {
                     focusSearchUiThread(message);
                 } break;
+                case MSG_COMPUTE_CLICK_POINT_IN_SCREEN: {
+                    computeClickPointInScreenUiThread(message);
+                } break;
                 default:
                     throw new IllegalArgumentException("Unknown message type: " + type);
             }
diff --git a/core/java/android/view/FrameStats.java b/core/java/android/view/FrameStats.java
index 541b336..b3ac1db 100644
--- a/core/java/android/view/FrameStats.java
+++ b/core/java/android/view/FrameStats.java
@@ -28,7 +28,10 @@
      */
     public static final long UNDEFINED_TIME_NANO = -1;
 
+    /** @hide */
     protected long mRefreshPeriodNano;
+
+    /** @hide */
     protected long[] mFramesPresentedTimeNano;
 
     /**
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index ceea9f8..076f1e2 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -800,28 +800,6 @@
     }
 
     @Override
-    public void drawPicture(Picture picture, Rect dst) {
-        save();
-        translate(dst.left, dst.top);
-        if (picture.getWidth() > 0 && picture.getHeight() > 0) {
-            scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight());
-        }
-        drawPicture(picture);
-        restore();
-    }
-
-    @Override
-    public void drawPicture(Picture picture, RectF dst) {
-        save();
-        translate(dst.left, dst.top);
-        if (picture.getWidth() > 0 && picture.getHeight() > 0) {
-            scale(dst.width() / picture.getWidth(), dst.height() / picture.getHeight());
-        }
-        drawPicture(picture);
-        restore();
-    }
-
-    @Override
     public void drawPoint(float x, float y, Paint paint) {
         float[] point = getPointStorage();
         point[0] = x;
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 5d6d998..6aa86c7 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -94,7 +94,8 @@
     void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY,
             IRemoteCallback startedCallback, boolean scaleUp);
     void overridePendingAppTransitionAspectScaledThumb(in Bitmap srcThumb, int startX,
-            int startY, IRemoteCallback startedCallback, boolean scaleUp);
+            int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
+            boolean scaleUp);
     void executeAppTransition();
     void setAppStartingWindow(IBinder token, String pkg, int theme,
             in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index 0f3f182..037ed28 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -177,6 +177,11 @@
 
     void wallpaperOffsetsComplete(IBinder window);
 
+    /**
+     * Apply a raw offset to the wallpaper service when shown behind this window.
+     */
+    void setWallpaperDisplayOffset(IBinder windowToken, int x, int y);
+
     Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
             int z, in Bundle extras, boolean sync);
 
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 964b054..0701b53 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -660,8 +660,96 @@
     /** Key code constant: Voice Assist key.
      * Launches the global voice assist activity. Not delivered to applications. */
     public static final int KEYCODE_VOICE_ASSIST = 231;
+    /** Key code constant: Radio key.
+     * Toggles TV service / Radio service. */
+    public static final int KEYCODE_TV_RADIO_SERVICE = 232;
+    /** Key code constant: Teletext key.
+     * Displays Teletext service. */
+    public static final int KEYCODE_TV_TELETEXT = 233;
+    /** Key code constant: 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. */
+    public static final int KEYCODE_TV_NUMBER_ENTRY = 234;
+    /** Key code constant: Analog Terrestrial key.
+     * Switches to analog terrestrial broadcast service. */
+    public static final int KEYCODE_TV_TERRESTRIAL_ANALOG = 235;
+    /** Key code constant: Digital Terrestrial key.
+     * Switches to digital terrestrial broadcast service. */
+    public static final int KEYCODE_TV_TERRESTRIAL_DIGITAL = 236;
+    /** Key code constant: Satellite key.
+     * Switches to digital satellite broadcast service. */
+    public static final int KEYCODE_TV_SATELLITE = 237;
+    /** Key code constant: BS key.
+     * Switches to BS digital satellite broadcasting service available in Japan. */
+    public static final int KEYCODE_TV_SATELLITE_BS = 238;
+    /** Key code constant: CS key.
+     * Switches to CS digital satellite broadcasting service available in Japan. */
+    public static final int KEYCODE_TV_SATELLITE_CS = 239;
+    /** Key code constant: BS/CS key.
+     * Toggles between BS and CS digital satellite services. */
+    public static final int KEYCODE_TV_SATELLITE_SERVICE = 240;
+    /** Key code constant: Toggle Network key.
+     * Toggles selecting broacast services. */
+    public static final int KEYCODE_TV_NETWORK = 241;
+    /** Key code constant: Antenna/Cable key.
+     * Toggles broadcast input source between antenna and cable. */
+    public static final int KEYCODE_TV_ANTENNA_CABLE = 242;
+    /** Key code constant: HDMI #1 key.
+     * Switches to HDMI input #1. */
+    public static final int KEYCODE_TV_INPUT_HDMI_1 = 243;
+    /** Key code constant: HDMI #2 key.
+     * Switches to HDMI input #2. */
+    public static final int KEYCODE_TV_INPUT_HDMI_2 = 244;
+    /** Key code constant: HDMI #3 key.
+     * Switches to HDMI input #3. */
+    public static final int KEYCODE_TV_INPUT_HDMI_3 = 245;
+    /** Key code constant: HDMI #4 key.
+     * Switches to HDMI input #4. */
+    public static final int KEYCODE_TV_INPUT_HDMI_4 = 246;
+    /** Key code constant: Composite #1 key.
+     * Switches to composite video input #1. */
+    public static final int KEYCODE_TV_INPUT_COMPOSITE_1 = 247;
+    /** Key code constant: Composite #2 key.
+     * Switches to composite video input #2. */
+    public static final int KEYCODE_TV_INPUT_COMPOSITE_2 = 248;
+    /** Key code constant: Component #1 key.
+     * Switches to component video input #1. */
+    public static final int KEYCODE_TV_INPUT_COMPONENT_1 = 249;
+    /** Key code constant: Component #2 key.
+     * Switches to component video input #2. */
+    public static final int KEYCODE_TV_INPUT_COMPONENT_2 = 250;
+    /** Key code constant: VGA #1 key.
+     * Switches to VGA (analog RGB) input #1. */
+    public static final int KEYCODE_TV_INPUT_VGA_1 = 251;
+    /** Key code constant: Audio description key.
+     * Toggles audio description off / on. */
+    public static final int KEYCODE_TV_AUDIO_DESCRIPTION = 252;
+    /** Key code constant: Audio description mixing volume up key.
+     * Louden audio description volume as compared with normal audio volume. */
+    public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253;
+    /** Key code constant: Audio description mixing volume down key.
+     * Lessen audio description volume as compared with normal audio volume. */
+    public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254;
+    /** Key code constant: Zoom mode key.
+     * Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.) */
+    public static final int KEYCODE_TV_ZOOM_MODE = 255;
+    /** Key code constant: Contents menu key.
+     * Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
+     * Code */
+    public static final int KEYCODE_TV_CONTENTS_MENU = 256;
+    /** Key code constant: Media context menu key.
+     * Goes to the context menu of media contents. Corresponds to Media Context-sensitive
+     * Menu (0x11) of CEC User Control Code. */
+    public static final int KEYCODE_TV_MEDIA_CONTEXT_MENU = 257;
+    /** Key code constant: Timer programming key.
+     * Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
+     * CEC User Control Code. */
+    public static final int KEYCODE_TV_TIMER_PROGRAMMING = 258;
+    /** Key code constant: Help key. */
+    public static final int KEYCODE_HELP = 259;
 
-    private static final int LAST_KEYCODE = KEYCODE_VOICE_ASSIST;
+    private static final int LAST_KEYCODE = KEYCODE_HELP;
 
     // NOTE: If you add a new keycode here you must also add it to:
     //  isSystem()
diff --git a/core/java/android/view/PointerIcon.java b/core/java/android/view/PointerIcon.java
index 063a08d..7dcad68 100644
--- a/core/java/android/view/PointerIcon.java
+++ b/core/java/android/view/PointerIcon.java
@@ -149,9 +149,9 @@
      * Creates a custom pointer from the given bitmap and hotspot information.
      *
      * @param bitmap The bitmap for the icon.
-     * @param hotspotX The X offset of the pointer icon hotspot in the bitmap.
+     * @param hotSpotX The X offset of the pointer icon hotspot in the bitmap.
      *        Must be within the [0, bitmap.getWidth()) range.
-     * @param hotspotY The Y offset of the pointer icon hotspot in the bitmap.
+     * @param hotSpotY The Y offset of the pointer icon hotspot in the bitmap.
      *        Must be within the [0, bitmap.getHeight()) range.
      * @return A pointer icon for this bitmap.
      *
@@ -374,18 +374,18 @@
     }
 
     private void loadResource(Context context, Resources resources, int resourceId) {
-        XmlResourceParser parser = resources.getXml(resourceId);
+        final XmlResourceParser parser = resources.getXml(resourceId);
         final int bitmapRes;
         final float hotSpotX;
         final float hotSpotY;
         try {
             XmlUtils.beginDocument(parser, "pointer-icon");
 
-            TypedArray a = resources.obtainAttributes(
+            final TypedArray a = resources.obtainAttributes(
                     parser, com.android.internal.R.styleable.PointerIcon);
             bitmapRes = a.getResourceId(com.android.internal.R.styleable.PointerIcon_bitmap, 0);
-            hotSpotX = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotX, 0);
-            hotSpotY = a.getFloat(com.android.internal.R.styleable.PointerIcon_hotSpotY, 0);
+            hotSpotX = a.getDimension(com.android.internal.R.styleable.PointerIcon_hotSpotX, 0);
+            hotSpotY = a.getDimension(com.android.internal.R.styleable.PointerIcon_hotSpotY, 0);
             a.recycle();
         } catch (Exception ex) {
             throw new IllegalArgumentException("Exception parsing pointer icon resource.", ex);
diff --git a/core/java/android/view/RenderNode.java b/core/java/android/view/RenderNode.java
index 9dc9766..47f72a8 100644
--- a/core/java/android/view/RenderNode.java
+++ b/core/java/android/view/RenderNode.java
@@ -367,6 +367,10 @@
         throw new IllegalArgumentException("Unrecognized outline?");
     }
 
+    public boolean hasShadow() {
+        return nHasShadow(mNativeRenderNode);
+    }
+
     /**
      * Enables or disables clipping to the outline.
      *
@@ -861,6 +865,7 @@
             float alpha);
     private static native boolean nSetOutlineEmpty(long renderNode);
     private static native boolean nSetOutlineNone(long renderNode);
+    private static native boolean nHasShadow(long renderNode);
     private static native boolean nSetClipToOutline(long renderNode, boolean clipToOutline);
     private static native boolean nSetRevealClip(long renderNode,
             boolean shouldClip, float x, float y, float radius);
diff --git a/core/java/android/view/RenderNodeAnimator.java b/core/java/android/view/RenderNodeAnimator.java
index fa4a13a..debf45d 100644
--- a/core/java/android/view/RenderNodeAnimator.java
+++ b/core/java/android/view/RenderNodeAnimator.java
@@ -453,6 +453,12 @@
         throw new IllegalStateException("Cannot clone this animator");
     }
 
+    @Override
+    public void setAllowRunningAsynchronously(boolean mayRunAsync) {
+        checkMutable();
+        nSetAllowRunningAsync(mNativePtr.get(), mayRunAsync);
+    }
+
     private static native long nCreateAnimator(int property, float finalValue);
     private static native long nCreateCanvasPropertyFloatAnimator(
             long canvasProperty, float finalValue);
@@ -466,6 +472,7 @@
     private static native long nGetDuration(long nativePtr);
     private static native void nSetStartDelay(long nativePtr, long startDelay);
     private static native void nSetInterpolator(long animPtr, long interpolatorPtr);
+    private static native void nSetAllowRunningAsync(long animPtr, boolean mayRunAsync);
 
     private static native void nStart(long animPtr, RenderNodeAnimator finishListener);
     private static native void nEnd(long animPtr);
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 1e28e33..4074529 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -39,7 +39,7 @@
 
     private static native Bitmap nativeScreenshot(IBinder displayToken,
             Rect sourceCrop, int width, int height, int minLayer, int maxLayer,
-            boolean allLayers, boolean useIdentityTransform);
+            boolean allLayers, boolean useIdentityTransform, int rotation);
     private static native void nativeScreenshot(IBinder displayToken, Surface consumer,
             Rect sourceCrop, int width, int height, int minLayer, int maxLayer,
             boolean allLayers, boolean useIdentityTransform);
@@ -688,17 +688,23 @@
      * @param useIdentityTransform Replace whatever transformation (rotation,
      * scaling, translation) the surface layers are currently using with the
      * identity transformation while taking the screenshot.
+     * @param rotation Apply a custom clockwise rotation to the screenshot, i.e.
+     * Surface.ROTATION_0,90,180,270. Surfaceflinger will always take
+     * screenshots in its native portrait orientation by default, so this is
+     * useful for returning screenshots that are independent of device
+     * orientation.
      * @return Returns a Bitmap containing the screen contents, or null
      * if an error occurs. Make sure to call Bitmap.recycle() as soon as
      * possible, once its content is not needed anymore.
      */
     public static Bitmap screenshot(Rect sourceCrop, int width, int height,
-            int minLayer, int maxLayer, boolean useIdentityTransform) {
+            int minLayer, int maxLayer, boolean useIdentityTransform,
+            int rotation) {
         // TODO: should take the display as a parameter
         IBinder displayToken = SurfaceControl.getBuiltInDisplay(
                 SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN);
         return nativeScreenshot(displayToken, sourceCrop, width, height,
-                minLayer, maxLayer, false, useIdentityTransform);
+                minLayer, maxLayer, false, useIdentityTransform, rotation);
     }
 
     /**
@@ -717,7 +723,8 @@
         // TODO: should take the display as a parameter
         IBinder displayToken = SurfaceControl.getBuiltInDisplay(
                 SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN);
-        return nativeScreenshot(displayToken, new Rect(), width, height, 0, 0, true, false);
+        return nativeScreenshot(displayToken, new Rect(), width, height, 0, 0, true,
+                false, Surface.ROTATION_0);
     }
 
     private static void screenshot(IBinder display, Surface consumer, Rect sourceCrop,
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index ca08ecc..5d2822d 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -126,7 +126,7 @@
     void destroy() {
         mInitialized = false;
         updateEnabledState(null);
-        nDestroyCanvasAndSurface(mNativeProxy);
+        nDestroy(mNativeProxy);
     }
 
     private void updateEnabledState(Surface surface) {
@@ -488,7 +488,7 @@
     private static native void nSetOpaque(long nativeProxy, boolean opaque);
     private static native int nSyncAndDrawFrame(long nativeProxy,
             long frameTimeNanos, long recordDuration, float density);
-    private static native void nDestroyCanvasAndSurface(long nativeProxy);
+    private static native void nDestroy(long nativeProxy);
     private static native void nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode);
 
     private static native void nInvokeFunctor(long functor, boolean waitForCompletion);
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index fce6f0b..82c5425 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -35,6 +35,8 @@
 import android.graphics.Matrix;
 import android.graphics.Outline;
 import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PathMeasure;
 import android.graphics.PixelFormat;
 import android.graphics.Point;
 import android.graphics.PorterDuff;
@@ -444,16 +446,19 @@
  * <a name="Drawing"></a>
  * <h3>Drawing</h3>
  * <p>
- * Drawing is handled by walking the tree and rendering each view that
- * intersects the invalid region. Because the tree is traversed in-order,
- * this means that parents will draw before (i.e., behind) their children, with
- * siblings drawn in the order they appear in the tree.
- * If you set a background drawable for a View, then the View will draw it for you
- * before calling back to its <code>onDraw()</code> method.
+ * Drawing is handled by walking the tree and recording the drawing commands of
+ * any View that needs to update. After this, the drawing commands of the
+ * entire tree are issued to screen, clipped to the newly damaged area.
  * </p>
  *
  * <p>
- * Note that the framework will not draw views that are not in the invalid region.
+ * The tree is largely recorded and drawn in order, with parents drawn before
+ * (i.e., behind) their children, with siblings drawn in the order they appear
+ * in the tree. If you set a background drawable for a View, then the View will
+ * draw it before calling back to its <code>onDraw()</code> method. The child
+ * drawing order can be overridden with
+ * {@link ViewGroup#setChildrenDrawingOrderEnabled(boolean) custom child drawing order}
+ * in a ViewGroup, and with {@link #setZ(float)} custom Z values} set on Views.
  * </p>
  *
  * <p>
@@ -4908,36 +4913,11 @@
             }
 
             onFocusChanged(true, direction, previouslyFocusedRect);
-            manageFocusHotspot(true, oldFocus);
             refreshDrawableState();
         }
     }
 
     /**
-     * Forwards focus information to the background drawable, if necessary. When
-     * the view is gaining focus, <code>v</code> is the previous focus holder.
-     * When the view is losing focus, <code>v</code> is the next focus holder.
-     *
-     * @param focused whether this view is focused
-     * @param v previous or the next focus holder, or null if none
-     */
-    private void manageFocusHotspot(boolean focused, View v) {
-        final Rect r = new Rect();
-        if (v != null && mAttachInfo != null) {
-            v.getHotspotBounds(r);
-            final int[] location = mAttachInfo.mTmpLocation;
-            getLocationOnScreen(location);
-            r.offset(-location[0], -location[1]);
-        } else {
-            r.set(0, 0, mRight - mLeft, mBottom - mTop);
-        }
-
-        final float x = r.exactCenterX();
-        final float y = r.exactCenterY();
-        drawableHotspotChanged(x, y);
-    }
-
-    /**
      * Populates <code>outRect</code> with the hotspot bounds. By default,
      * the hotspot bounds are identical to the screen bounds.
      *
@@ -5060,8 +5040,6 @@
             }
 
             onFocusChanged(false, 0, null);
-
-            manageFocusHotspot(false, focused);
             refreshDrawableState();
 
             if (propagate && (!refocus || !rootViewRequestFocus())) {
@@ -5755,6 +5733,136 @@
     }
 
     /**
+     * Computes a point on which a sequence of a down/up event can be sent to
+     * trigger clicking this view. This method is for the exclusive use by the
+     * accessibility layer to determine where to send a click event in explore
+     * by touch mode.
+     *
+     * @param interactiveRegion The interactive portion of this window.
+     * @param outPoint The point to populate.
+     * @return True of such a point exists.
+     */
+    boolean computeClickPointInScreenForAccessibility(Region interactiveRegion,
+            Point outPoint) {
+        // Since the interactive portion of the view is a region but as a view
+        // may have a transformation matrix which cannot be applied to a
+        // region we compute the view bounds rectangle and all interactive
+        // predecessor's and sibling's (siblings of predecessors included)
+        // rectangles that intersect the view bounds. At the
+        // end if the view was partially covered by another interactive
+        // view we compute the view's interactive region and pick a point
+        // on its boundary path as regions do not offer APIs to get inner
+        // points. Note that the the code is optimized to fail early and
+        // avoid unnecessary allocations plus computations.
+
+        // The current approach has edge cases that may produce false
+        // positives or false negatives. For example, a portion of the
+        // view may be covered by an interactive descendant of a
+        // predecessor, which we do not compute. Also a view may be handling
+        // raw touch events instead registering click listeners, which
+        // we cannot compute. Despite these limitations this approach will
+        // work most of the time and it is a huge improvement over just
+        // blindly sending the down and up events in the center of the
+        // view.
+
+        // Cannot click on an unattached view.
+        if (mAttachInfo == null) {
+            return false;
+        }
+
+        // Attached to an invisible window means this view is not visible.
+        if (mAttachInfo.mWindowVisibility != View.VISIBLE) {
+            return false;
+        }
+
+        RectF bounds = mAttachInfo.mTmpTransformRect;
+        bounds.set(0, 0, getWidth(), getHeight());
+        List<RectF> intersections = mAttachInfo.mTmpRectList;
+        intersections.clear();
+
+        if (mParent instanceof ViewGroup) {
+            ViewGroup parentGroup = (ViewGroup) mParent;
+            if (!parentGroup.translateBoundsAndIntersectionsInWindowCoordinates(
+                    this, bounds, intersections)) {
+                intersections.clear();
+                return false;
+            }
+        }
+
+        // Take into account the window location.
+        final int dx = mAttachInfo.mWindowLeft;
+        final int dy = mAttachInfo.mWindowTop;
+        bounds.offset(dx, dy);
+        offsetRects(intersections, dx, dy);
+
+        if (intersections.isEmpty() && interactiveRegion == null) {
+            outPoint.set((int) bounds.centerX(), (int) bounds.centerY());
+        } else {
+            // This view is partially covered by other views, then compute
+            // the not covered region and pick a point on its boundary.
+            Region region = new Region();
+            region.set((int) bounds.left, (int) bounds.top,
+                    (int) bounds.right, (int) bounds.bottom);
+
+            final int intersectionCount = intersections.size();
+            for (int i = intersectionCount - 1; i >= 0; i--) {
+                RectF intersection = intersections.remove(i);
+                region.op((int) intersection.left, (int) intersection.top,
+                        (int) intersection.right, (int) intersection.bottom,
+                        Region.Op.DIFFERENCE);
+            }
+
+            // If the view is completely covered, done.
+            if (region.isEmpty()) {
+                return false;
+            }
+
+            // Take into account the interactive portion of the window
+            // as the rest is covered by other windows. If no such a region
+            // then the whole window is interactive.
+            if (interactiveRegion != null) {
+                region.op(interactiveRegion, Region.Op.INTERSECT);
+            }
+
+            // If the view is completely covered, done.
+            if (region.isEmpty()) {
+                return false;
+            }
+
+            // Try a shortcut here.
+            if (region.isRect()) {
+                Rect regionBounds = mAttachInfo.mTmpInvalRect;
+                region.getBounds(regionBounds);
+                outPoint.set(regionBounds.centerX(), regionBounds.centerY());
+                return true;
+            }
+
+            // Get the a point on the region boundary path.
+            Path path = region.getBoundaryPath();
+            PathMeasure pathMeasure = new PathMeasure(path, false);
+            final float[] coordinates = mAttachInfo.mTmpTransformLocation;
+
+            // Without loss of generality pick a point.
+            final float point = pathMeasure.getLength() * 0.01f;
+            if (!pathMeasure.getPosTan(point, coordinates, null)) {
+                return false;
+            }
+
+            outPoint.set(Math.round(coordinates[0]), Math.round(coordinates[1]));
+        }
+
+        return true;
+    }
+
+    static void offsetRects(List<RectF> rects, float offsetX, float offsetY) {
+        final int rectCount = rects.size();
+        for (int i = 0; i < rectCount; i++) {
+            RectF intersection = rects.get(i);
+            intersection.offset(offsetX, offsetY);
+        }
+    }
+
+    /**
      * Returns the delegate for implementing accessibility support via
      * composition. For more details see {@link AccessibilityDelegate}.
      *
@@ -10248,6 +10356,7 @@
      *
      * @return true if the content in this view might overlap, false otherwise.
      */
+    @ViewDebug.ExportedProperty(category = "drawing")
     public boolean hasOverlappingRendering() {
         return true;
     }
@@ -10852,6 +10961,12 @@
     /**
      * Sets whether the View's Outline should be used to clip the contents of the View.
      * <p>
+     * Only a single non-rectangular clip can be applied on a View at any time.
+     * Circular clips from a {@link ViewAnimationUtils#createCircularReveal(View, int, int, float, float)
+     * circular reveal} animation take priority over Outline clipping, and
+     * child Outline clipping takes priority over Outline clipping done by a
+     * parent.
+     * <p>
      * Note that this flag will only be respected if the View's Outline returns true from
      * {@link Outline#canClip()}.
      *
@@ -10944,6 +11059,17 @@
         invalidateViewProperty(false, false);
     }
 
+    /**
+     * HierarchyViewer only
+     *
+     * @hide
+     */
+    @ViewDebug.ExportedProperty(category = "drawing")
+    public boolean hasShadow() {
+        return mRenderNode.hasShadow();
+    }
+
+
     /** @hide */
     public void setRevealClip(boolean shouldClip, float x, float y, float radius) {
         mRenderNode.setRevealClip(shouldClip, x, y, radius);
@@ -15118,10 +15244,12 @@
             bounds.set(0, 0, mRight - mLeft, mBottom - mTop);
         }
 
+        canvas.save();
         canvas.translate(mScrollX, mScrollY);
+        canvas.clipRect(bounds, Region.Op.REPLACE);
         drawable.setBounds(bounds);
         drawable.draw(canvas);
-        canvas.translate(-mScrollX, -mScrollY);
+        canvas.restore();
     }
 
     /**
@@ -20158,6 +20286,16 @@
         final RectF mTmpTransformRect = new RectF();
 
         /**
+         * Temporary for use in computing hit areas with transformed views
+         */
+        final RectF mTmpTransformRect1 = new RectF();
+
+        /**
+         * Temporary list of rectanges.
+         */
+        final List<RectF> mTmpRectList = new ArrayList<>();
+
+        /**
          * Temporary for use in transforming invalidation rect
          */
         final Matrix mTmpMatrix = new Matrix();
diff --git a/core/java/android/view/ViewAnimationUtils.java b/core/java/android/view/ViewAnimationUtils.java
index 7ced088..001cd01 100644
--- a/core/java/android/view/ViewAnimationUtils.java
+++ b/core/java/android/view/ViewAnimationUtils.java
@@ -27,9 +27,13 @@
     private ViewAnimationUtils() {}
     /**
      * Returns an Animator which can animate a clipping circle.
-     *
+     * <p>
      * Any shadow cast by the View will respect the circular clip from this animator.
-     *
+     * <p>
+     * Only a single non-rectangular clip can be applied on a View at any time.
+     * Views clipped by a circular reveal animation take priority over
+     * {@link View#setClipToOutline(boolean) View Outline clipping}.
+     * <p>
      * Note that the animation returned here is a one-shot animation. It cannot
      * be re-used, and once started it cannot be paused or resumed.
      *
@@ -39,7 +43,7 @@
      * @param startRadius The starting radius of the animating circle.
      * @param endRadius The ending radius of the animating circle.
      */
-    public static final Animator createCircularReveal(View view,
+    public static Animator createCircularReveal(View view,
             int centerX,  int centerY, float startRadius, float endRadius) {
         return new RevealAnimator(view, centerX, centerY, startRadius, endRadius);
     }
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 6c66eb0..12a49d5 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -26,6 +26,7 @@
 import android.os.RemoteException;
 import android.util.DisplayMetrics;
 import android.util.Log;
+import android.util.TypedValue;
 
 import java.io.BufferedOutputStream;
 import java.io.BufferedWriter;
@@ -315,6 +316,7 @@
 
     private static final String REMOTE_COMMAND_CAPTURE = "CAPTURE";
     private static final String REMOTE_COMMAND_DUMP = "DUMP";
+    private static final String REMOTE_COMMAND_DUMP_THEME = "DUMP_THEME";
     private static final String REMOTE_COMMAND_INVALIDATE = "INVALIDATE";
     private static final String REMOTE_COMMAND_REQUEST_LAYOUT = "REQUEST_LAYOUT";
     private static final String REMOTE_PROFILE = "PROFILE";
@@ -430,6 +432,8 @@
 
         if (REMOTE_COMMAND_DUMP.equalsIgnoreCase(command)) {
             dump(view, false, true, clientStream);
+        } else if (REMOTE_COMMAND_DUMP_THEME.equalsIgnoreCase(command)) {
+            dumpTheme(view, clientStream);
         } else if (REMOTE_COMMAND_CAPTURE_LAYERS.equalsIgnoreCase(command)) {
             captureLayers(view, new DataOutputStream(clientStream));
         } else {
@@ -820,6 +824,69 @@
         }
     }
 
+    /**
+     * Dumps the theme attributes from the given View.
+     * @hide
+     */
+    public static void dumpTheme(View view, OutputStream clientStream) throws IOException {
+        BufferedWriter out = null;
+        try {
+            out = new BufferedWriter(new OutputStreamWriter(clientStream, "utf-8"), 32 * 1024);
+            String[] attributes = getStyleAttributesDump(view.getContext().getResources(),
+                    view.getContext().getTheme());
+            if (attributes != null) {
+                for (int i = 0; i < attributes.length; i += 2) {
+                    if (attributes[i] != null) {
+                        out.write(attributes[i] + "\n");
+                        out.write(attributes[i + 1] + "\n");
+                    }
+                }
+            }
+            out.write("DONE.");
+            out.newLine();
+        } catch (Exception e) {
+            android.util.Log.w("View", "Problem dumping View Theme:", e);
+        } finally {
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+    /**
+     * Gets the style attributes from the {@link Resources.Theme}. For debugging only.
+     *
+     * @param resources Resources to resolve attributes from.
+     * @param theme Theme to dump.
+     * @return a String array containing pairs of adjacent Theme attribute data: name followed by
+     * its value.
+     *
+     * @hide
+     */
+    private static String[] getStyleAttributesDump(Resources resources, Resources.Theme theme) {
+        TypedValue outValue = new TypedValue();
+        String nullString = "null";
+        int i = 0;
+        int[] attributes = theme.getAllAttributes();
+        String[] data = new String[attributes.length * 2];
+        for (int attributeId : attributes) {
+            try {
+                data[i] = resources.getResourceName(attributeId);
+                data[i + 1] = theme.resolveAttribute(attributeId, outValue, true) ?
+                        outValue.coerceToString().toString() :  nullString;
+                i += 2;
+
+                // attempt to replace reference data with its name
+                if (outValue.type == TypedValue.TYPE_REFERENCE) {
+                    data[i - 1] = resources.getResourceName(outValue.resourceId);
+                }
+            } catch (Resources.NotFoundException e) {
+                // ignore resources we can't resolve
+            }
+        }
+        return data;
+    }
+
     private static View findView(ViewGroup group, String className, int hashCode) {
         if (isRequestedView(group, className, hashCode)) {
             return group;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index adad082..4e1db90 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -771,6 +771,112 @@
     }
 
     /**
+     * Translates the given bounds and intersections from child coordinates to
+     * local coordinates. In case any interactive sibling of the calling child
+     * covers the latter, a new intersections is added to the intersection list.
+     * This method is for the exclusive use by the accessibility layer to compute
+     * a point where a sequence of down and up events would click on a view.
+     *
+     * @param child The child making the call.
+     * @param bounds The bounds to translate in child coordinates.
+     * @param intersections The intersections of interactive views covering the child.
+     * @return True if the bounds and intersections were computed, false otherwise.
+     */
+    boolean translateBoundsAndIntersectionsInWindowCoordinates(View child,
+            RectF bounds, List<RectF> intersections) {
+        // Not attached, done.
+        if (mAttachInfo == null) {
+            return false;
+        }
+
+        if (getAlpha() <= 0 || getTransitionAlpha() <= 0 ||
+                getVisibility() != VISIBLE) {
+            // Cannot click on a view with an invisible predecessor.
+            return false;
+        }
+
+        // Compensate for the child transformation.
+        if (!child.hasIdentityMatrix()) {
+            Matrix matrix = child.getMatrix();
+            matrix.mapRect(bounds);
+            final int intersectionCount = intersections.size();
+            for (int i = 0; i < intersectionCount; i++) {
+                RectF intersection = intersections.get(i);
+                matrix.mapRect(intersection);
+            }
+        }
+
+        // Translate the bounds from child to parent coordinates.
+        final int dx = child.mLeft - mScrollX;
+        final int dy = child.mTop - mScrollY;
+        bounds.offset(dx, dy);
+        offsetRects(intersections, dx, dy);
+
+        // If the bounds do not intersect our bounds, done.
+        if (!bounds.intersects(0, 0, getWidth(), getHeight())) {
+            return false;
+        }
+
+        // Check whether any clickable siblings cover the child
+        // view and if so keep track of the intersections. Also
+        // respect Z ordering when iterating over children.
+        ArrayList<View> orderedList = buildOrderedChildList();
+        final boolean useCustomOrder = orderedList == null
+                && isChildrenDrawingOrderEnabled();
+
+        final int childCount = mChildrenCount;
+        for (int i = childCount - 1; i >= 0; i--) {
+            final int childIndex = useCustomOrder
+                    ? getChildDrawingOrder(childCount, i) : i;
+            final View sibling = (orderedList == null)
+                    ? mChildren[childIndex] : orderedList.get(childIndex);
+
+            // We care only about siblings over the child.
+            if (sibling == child) {
+                break;
+            }
+
+            // If sibling is not interactive we do not care.
+            if (!sibling.isClickable() && !sibling.isLongClickable()) {
+                continue;
+            }
+
+            // Compute the sibling bounds in its coordinates.
+            RectF siblingBounds = mAttachInfo.mTmpTransformRect1;
+            siblingBounds.set(0, 0, sibling.getWidth(), sibling.getHeight());
+
+            // Take into account the sibling transformation matrix.
+            if (!sibling.hasIdentityMatrix()) {
+                sibling.getMatrix().mapRect(siblingBounds);
+            }
+
+            // Offset the sibling to our coordinates.
+            final int siblingDx = sibling.mLeft - mScrollX;
+            final int siblingDy = sibling.mTop - mScrollY;
+            siblingBounds.offset(siblingDx, siblingDy);
+
+            // Compute the intersection between the child and the sibling.
+            if (siblingBounds.intersect(bounds)) {
+                // If an interactive sibling completely covers the child, done.
+                if (siblingBounds.equals(bounds)) {
+                    return false;
+                }
+                // Keep track of the intersection rectangle.
+                RectF intersection = new RectF(siblingBounds);
+                intersections.add(intersection);
+            }
+        }
+
+        if (mParent instanceof ViewGroup) {
+            ViewGroup parentGroup = (ViewGroup) mParent;
+            return parentGroup.translateBoundsAndIntersectionsInWindowCoordinates(
+                    this, bounds, intersections);
+        }
+
+        return true;
+    }
+
+    /**
      * Called when a child view has changed whether or not it is tracking transient state.
      */
     public void childHasTransientStateChanged(View child, boolean childHasTransientState) {
@@ -3301,6 +3407,7 @@
      * @return True if the group's children will be clipped to their bounds,
      * false otherwise.
      */
+    @ViewDebug.ExportedProperty(category = "drawing")
     public boolean getClipChildren() {
         return ((mGroupFlags & FLAG_CLIP_CHILDREN) != 0);
     }
@@ -3349,6 +3456,7 @@
      *
      * @attr ref android.R.styleable#ViewGroup_clipToPadding
      */
+    @ViewDebug.ExportedProperty(category = "drawing")
     public boolean getClipToPadding() {
         return hasBooleanFlag(FLAG_CLIP_TO_PADDING);
     }
@@ -5034,6 +5142,9 @@
     /**
      * Tells the ViewGroup whether to draw its children in the order defined by the method
      * {@link #getChildDrawingOrder(int, int)}.
+     * <p>
+     * Note that {@link View#getZ() Z} reordering, done by {@link #dispatchDraw(Canvas)},
+     * will override custom child ordering done via this method.
      *
      * @param enabled true if the order of the children when drawing is determined by
      *        {@link #getChildDrawingOrder(int, int)}, false otherwise
@@ -5719,6 +5830,28 @@
     }
 
     @Override
+    public void drawableHotspotChanged(float x, float y) {
+        super.drawableHotspotChanged(x, y);
+
+        if ((mGroupFlags & FLAG_NOTIFY_CHILDREN_ON_DRAWABLE_STATE_CHANGE) != 0) {
+            if ((mGroupFlags & FLAG_ADD_STATES_FROM_CHILDREN) != 0) {
+                throw new IllegalStateException("addStateFromChildren cannot be enabled if a"
+                        + " child has duplicateParentState set to true");
+            }
+
+            final View[] children = mChildren;
+            final int count = mChildrenCount;
+
+            for (int i = 0; i < count; i++) {
+                final View child = children[i];
+                if ((child.mViewFlags & DUPLICATE_PARENT_STATE) != 0) {
+                    child.drawableHotspotChanged(x, y);
+                }
+            }
+        }
+    }
+
+    @Override
     protected int[] onCreateDrawableState(int extraSpace) {
         if ((mGroupFlags & FLAG_ADD_STATES_FROM_CHILDREN) == 0) {
             return super.onCreateDrawableState(extraSpace);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 49d925f..43ab4ef 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -121,7 +121,7 @@
     private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media";
 
     // property used by emulator to determine display shape
-    private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular";
+    public static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular";
 
     /**
      * Maximum time we allow the user to roll the trackball enough to generate
@@ -6111,6 +6111,33 @@
                     }
                 }
             } break;
+
+
+            case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED: {
+                if (mAccessibilityFocusedHost != null && mAccessibilityFocusedVirtualView != null) {
+                    // We care only for changes rooted in the focused host.
+                    final long eventSourceId = event.getSourceNodeId();
+                    final int hostViewId = AccessibilityNodeInfo.getAccessibilityViewId(
+                            eventSourceId);
+                    if (hostViewId != mAccessibilityFocusedHost.getAccessibilityViewId()) {
+                        break;
+                    }
+
+                    // We only care about changes that may change the virtual focused view bounds.
+                    final int changes = event.getContentChangeTypes();
+                    if ((changes & AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE) != 0
+                            || changes == AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED) {
+                        AccessibilityNodeProvider provider = mAccessibilityFocusedHost
+                                .getAccessibilityNodeProvider();
+                        if (provider != null) {
+                            final int virtualChildId = AccessibilityNodeInfo.getVirtualDescendantId(
+                                    mAccessibilityFocusedVirtualView.getSourceNodeId());
+                            mAccessibilityFocusedVirtualView = provider.createAccessibilityNodeInfo(
+                                    virtualChildId);
+                        }
+                    }
+                }
+            } break;
         }
         mAccessibilityManager.sendAccessibilityEvent(event);
         return true;
@@ -6629,14 +6656,15 @@
 
         @Override
         public void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId,
-                int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+                Region interactiveRegion, int interactionId,
+                IAccessibilityInteractionConnectionCallback callback, int flags,
                 int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
                     .findAccessibilityNodeInfoByAccessibilityIdClientThread(accessibilityNodeId,
-                            interactionId, callback, flags, interrogatingPid, interrogatingTid,
-                            spec);
+                            interactiveRegion, interactionId, callback, flags, interrogatingPid,
+                            interrogatingTid, spec);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
@@ -6651,12 +6679,12 @@
         public void performAccessibilityAction(long accessibilityNodeId, int action,
                 Bundle arguments, int interactionId,
                 IAccessibilityInteractionConnectionCallback callback, int flags,
-                int interogatingPid, long interrogatingTid) {
+                int interrogatingPid, long interrogatingTid) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
                     .performAccessibilityActionClientThread(accessibilityNodeId, action, arguments,
-                            interactionId, callback, flags, interogatingPid, interrogatingTid);
+                            interactionId, callback, flags, interrogatingPid, interrogatingTid);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
@@ -6668,16 +6696,36 @@
         }
 
         @Override
+        public void computeClickPointInScreen(long accessibilityNodeId, Region interactiveRegion,
+                int interactionId, IAccessibilityInteractionConnectionCallback callback,
+                int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
+            ViewRootImpl viewRootImpl = mViewRootImpl.get();
+            if (viewRootImpl != null && viewRootImpl.mView != null) {
+                viewRootImpl.getAccessibilityInteractionController()
+                        .computeClickPointInScreenClientThread(accessibilityNodeId,
+                                interactiveRegion, interactionId, callback, interrogatingPid,
+                                interrogatingTid, spec);
+            } else {
+                // We cannot make the call and notify the caller so it does not wait.
+                try {
+                    callback.setComputeClickPointInScreenActionResult(null, interactionId);
+                } catch (RemoteException re) {
+                    /* best effort - ignore */
+                }
+            }
+        }
+
+        @Override
         public void findAccessibilityNodeInfosByViewId(long accessibilityNodeId,
-                String viewId, int interactionId,
+                String viewId, Region interactiveRegion, int interactionId,
                 IAccessibilityInteractionConnectionCallback callback, int flags,
                 int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
                     .findAccessibilityNodeInfosByViewIdClientThread(accessibilityNodeId,
-                            viewId, interactionId, callback, flags, interrogatingPid,
-                            interrogatingTid, spec);
+                            viewId, interactiveRegion, interactionId, callback, flags,
+                            interrogatingPid, interrogatingTid, spec);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
@@ -6690,14 +6738,15 @@
 
         @Override
         public void findAccessibilityNodeInfosByText(long accessibilityNodeId, String text,
-                int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+                Region interactiveRegion, int interactionId,
+                IAccessibilityInteractionConnectionCallback callback, int flags,
                 int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
                     .findAccessibilityNodeInfosByTextClientThread(accessibilityNodeId, text,
-                            interactionId, callback, flags, interrogatingPid, interrogatingTid,
-                            spec);
+                            interactiveRegion, interactionId, callback, flags, interrogatingPid,
+                            interrogatingTid, spec);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
@@ -6709,14 +6758,15 @@
         }
 
         @Override
-        public void findFocus(long accessibilityNodeId, int focusType, int interactionId,
-                IAccessibilityInteractionConnectionCallback callback, int flags,
+        public void findFocus(long accessibilityNodeId, int focusType, Region interactiveRegion,
+                int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
                 int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
-                    .findFocusClientThread(accessibilityNodeId, focusType, interactionId, callback,
-                            flags, interrogatingPid, interrogatingTid, spec);
+                    .findFocusClientThread(accessibilityNodeId, focusType, interactiveRegion,
+                            interactionId, callback, flags, interrogatingPid, interrogatingTid,
+                            spec);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
@@ -6728,14 +6778,15 @@
         }
 
         @Override
-        public void focusSearch(long accessibilityNodeId, int direction, int interactionId,
-                IAccessibilityInteractionConnectionCallback callback, int flags,
+        public void focusSearch(long accessibilityNodeId, int direction, Region interactiveRegion,
+                int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
                 int interrogatingPid, long interrogatingTid, MagnificationSpec spec) {
             ViewRootImpl viewRootImpl = mViewRootImpl.get();
             if (viewRootImpl != null && viewRootImpl.mView != null) {
                 viewRootImpl.getAccessibilityInteractionController()
-                    .focusSearchClientThread(accessibilityNodeId, direction, interactionId,
-                            callback, flags, interrogatingPid, interrogatingTid, spec);
+                    .focusSearchClientThread(accessibilityNodeId, direction, interactiveRegion,
+                            interactionId, callback, flags, interrogatingPid, interrogatingTid,
+                            spec);
             } else {
                 // We cannot make the call and notify the caller so it does not wait.
                 try {
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 9b6f200..ebc683a 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -1430,7 +1430,9 @@
      * {@link android.transition.Visibility} as entering is governed by changing visibility from
      * {@link View#INVISIBLE} to {@link View#VISIBLE}. If <code>transition</code> is null,
      * entering Views will remain unaffected.
+     *
      * @param transition The Transition to use to move Views into the initial Scene.
+     * @attr ref android.R.styleable#Window_windowEnterTransition
      */
     public void setEnterTransition(Transition transition) {}
 
@@ -1444,8 +1446,10 @@
      * {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
      * entering Views will remain unaffected. If nothing is set, the default will be to
      * use the same value as set in {@link #setEnterTransition(android.transition.Transition)}.
+     *
      * @param transition The Transition to use to move Views out of the Scene when the Window
      *                   is preparing to close.
+     * @attr ref android.R.styleable#Window_windowReturnTransition
      */
     public void setReturnTransition(Transition transition) {}
 
@@ -1456,8 +1460,10 @@
      * {@link android.transition.Visibility} as exiting is governed by changing visibility
      * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
      * remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use to move Views out of the scene when calling a
      *                   new Activity.
+     * @attr ref android.R.styleable#Window_windowExitTransition
      */
     public void setExitTransition(Transition transition) {}
 
@@ -1470,8 +1476,10 @@
      * the views will remain unaffected. If nothing is set, the default will be to use the same
      * transition as {@link #setExitTransition(android.transition.Transition)}.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use to move Views into the scene when reentering from a
      *                   previously-started Activity.
+     * @attr ref android.R.styleable#Window_windowReenterTransition
      */
     public void setReenterTransition(Transition transition) {}
 
@@ -1484,6 +1492,7 @@
      * entering Views will remain unaffected.  Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
      *
      * @return the Transition to use to move Views into the initial Scene.
+     * @attr ref android.R.styleable#Window_windowEnterTransition
      */
     public Transition getEnterTransition() { return null; }
 
@@ -1495,8 +1504,10 @@
      * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
      * {@link android.transition.Visibility} as entering is governed by changing visibility from
      * {@link View#VISIBLE} to {@link View#INVISIBLE}.
+     *
      * @return The Transition to use to move Views out of the Scene when the Window
      *         is preparing to close.
+     * @attr ref android.R.styleable#Window_windowReturnTransition
      */
     public Transition getReturnTransition() { return null; }
 
@@ -1507,8 +1518,10 @@
      * {@link android.transition.Visibility} as exiting is governed by changing visibility
      * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
      * remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @return the Transition to use to move Views out of the scene when calling a
      * new Activity.
+     * @attr ref android.R.styleable#Window_windowExitTransition
      */
     public Transition getExitTransition() { return null; }
 
@@ -1519,8 +1532,10 @@
      * will extend {@link android.transition.Visibility} as exiting is governed by changing
      * visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @return The Transition to use to move Views into the scene when reentering from a
      *         previously-started Activity.
+     * @attr ref android.R.styleable#Window_windowReenterTransition
      */
     public Transition getReenterTransition() { return null; }
 
@@ -1530,8 +1545,10 @@
      * {@link android.transition.ChangeBounds}. A null
      * value will cause transferred shared elements to blink to the final position.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use for shared elements transferred into the content
      *                   Scene.
+     * @attr ref android.R.styleable#Window_windowSharedElementEnterTransition
      */
     public void setSharedElementEnterTransition(Transition transition) {}
 
@@ -1543,22 +1560,28 @@
      * If no value is set, the default will be to use the same value as
      * {@link #setSharedElementEnterTransition(android.transition.Transition)}.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use for shared elements transferred out of the content
      *                   Scene.
+     * @attr ref android.R.styleable#Window_windowSharedElementReturnTransition
      */
     public void setSharedElementReturnTransition(Transition transition) {}
 
     /**
      * Returns the Transition that will be used for shared elements transferred into the content
      * Scene. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @return Transition to use for sharend elements transferred into the content Scene.
+     * @attr ref android.R.styleable#Window_windowSharedElementEnterTransition
      */
     public Transition getSharedElementEnterTransition() { return null; }
 
     /**
      * Returns the Transition that will be used for shared elements transferred back to a
      * calling Activity. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @return Transition to use for sharend elements transferred into the content Scene.
+     * @attr ref android.R.styleable#Window_windowSharedElementReturnTransition
      */
     public Transition getSharedElementReturnTransition() { return null; }
 
@@ -1568,8 +1591,10 @@
      * must animate during the exit transition, this Transition should be used. Upon completion,
      * the shared elements may be transferred to the started Activity.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use for shared elements in the launching Window
      *                   prior to transferring to the launched Activity's Window.
+     * @attr ref android.R.styleable#Window_windowSharedElementExitTransition
      */
     public void setSharedElementExitTransition(Transition transition) {}
 
@@ -1579,8 +1604,10 @@
      * is set, this will default to
      * {@link #setSharedElementExitTransition(android.transition.Transition)}.
      * Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+     *
      * @param transition The Transition to use for shared elements in the launching Window
      *                   after the shared element has returned to the Window.
+     * @attr ref android.R.styleable#Window_windowSharedElementReenterTransition
      */
     public void setSharedElementReenterTransition(Transition transition) {}
 
@@ -1591,6 +1618,7 @@
      *
      * @return the Transition to use for shared elements in the launching Window prior
      * to transferring to the launched Activity's Window.
+     * @attr ref android.R.styleable#Window_windowSharedElementExitTransition
      */
     public Transition getSharedElementExitTransition() { return null; }
 
@@ -1601,6 +1629,7 @@
      *
      * @return the Transition that will be used for shared elements reentering from a started
      * Activity after it has returned the shared element to it start location.
+     * @attr ref android.R.styleable#Window_windowSharedElementReenterTransition
      */
     public Transition getSharedElementReenterTransition() { return null; }
 
@@ -1610,8 +1639,10 @@
      * transition of the calling Activity. When true, the transition will start as soon as possible.
      * When false, the transition will wait until the remote exiting transition completes before
      * starting.
+     *
      * @param allow true to start the enter transition when possible or false to
      *              wait until the exiting transition completes.
+     * @attr ref android.R.styleable#Window_windowAllowEnterTransitionOverlap
      */
     public void setAllowEnterTransitionOverlap(boolean allow) {}
 
@@ -1621,8 +1652,10 @@
      * transition of the calling Activity. When true, the transition will start as soon as possible.
      * When false, the transition will wait until the remote exiting transition completes before
      * starting.
+     *
      * @return true when the enter transition should start as soon as possible or false to
      * when it should wait until the exiting transition completes.
+     * @attr ref android.R.styleable#Window_windowAllowEnterTransitionOverlap
      */
     public boolean getAllowEnterTransitionOverlap() { return true; }
 
@@ -1632,10 +1665,20 @@
      * transition of the called Activity when reentering after if finishes. When true,
      * the transition will start as soon as possible. When false, the transition will wait
      * until the called Activity's exiting transition completes before starting.
+     *
      * @param allow true to start the transition when possible or false to wait until the
      *              called Activity's exiting transition completes.
+     * @attr ref android.R.styleable#Window_windowAllowReturnTransitionOverlap
      */
-    public void setAllowExitTransitionOverlap(boolean allow) {}
+    public void setAllowReturnTransitionOverlap(boolean allow) {}
+
+    /**
+     * TODO: remove this.
+     * @hide
+     */
+    public void setAllowExitTransitionOverlap(boolean allow) {
+        setAllowReturnTransitionOverlap(allow);
+    }
 
     /**
      * Returns how the transition set in
@@ -1643,10 +1686,18 @@
      * transition of the called Activity when reentering after if finishes. When true,
      * the transition will start as soon as possible. When false, the transition will wait
      * until the called Activity's exiting transition completes before starting.
+     *
      * @return true when the transition should start when possible or false when it should wait
      * until the called Activity's exiting transition completes.
+     * @attr ref android.R.styleable#Window_windowAllowReturnTransitionOverlap
      */
-    public boolean getAllowExitTransitionOverlap() { return true; }
+    public boolean getAllowReturnTransitionOverlap() { return true; }
+
+    /**
+     * TODO: remove this.
+     * @hide
+     */
+    public boolean getAllowExitTransitionOverlap() { return getAllowReturnTransitionOverlap(); }
 
     /**
      * Returns the duration, in milliseconds, of the window background fade
@@ -1654,8 +1705,10 @@
      * <p>When executing the enter transition, the background starts transparent
      * and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
      * 300 milliseconds.</p>
+     *
      * @return The duration of the window background fade to opaque during enter transition.
      * @see #getEnterTransition()
+     * @attr ref android.R.styleable#Window_windowTransitionBackgroundFadeDuration
      */
     public long getTransitionBackgroundFadeDuration() { return 0; }
 
@@ -1665,9 +1718,11 @@
      * <p>When executing the enter transition, the background starts transparent
      * and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
      * 300 milliseconds.</p>
+     *
      * @param fadeDurationMillis The duration of the window background fade to or from opaque
      *                           during enter transition.
      * @see #setEnterTransition(android.transition.Transition)
+     * @attr ref android.R.styleable#Window_windowTransitionBackgroundFadeDuration
      */
     public void setTransitionBackgroundFadeDuration(long fadeDurationMillis) { }
 
@@ -1679,6 +1734,7 @@
      * @return <code>true</code> when shared elements should use an Overlay during
      * shared element transitions or <code>false</code> when they should animate as
      * part of the normal View hierarchy.
+     * @attr ref android.R.styleable#Window_windowSharedElementsUseOverlay
      */
     public boolean getSharedElementsUseOverlay() { return true; }
 
@@ -1689,6 +1745,7 @@
      * @param sharedElementsUseOverlay <code>true</code> indicates that shared elements should
      *                                 be transitioned with an Overlay or <code>false</code>
      *                                 to transition within the normal View hierarchy.
+     * @attr ref android.R.styleable#Window_windowSharedElementsUseOverlay
      */
     public void setSharedElementsUseOverlay(boolean sharedElementsUseOverlay) { }
 
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 571a8f0..24c3c1a 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -378,35 +378,75 @@
     }
 
     /**
-     * @hide
+     * Returns the top stable inset in pixels.
+     *
+     * <p>The stable inset represents the area of a full-screen window that <b>may</b> be
+     * partially or fully obscured by the system UI elements.  This value does not change
+     * based on the visibility state of those elements; for example, if the status bar is
+     * normally shown, but temporarily hidden, the stable inset will still provide the inset
+     * associated with the status bar being shown.</p>
+     *
+     * @return The top stable inset
      */
     public int getStableInsetTop() {
         return mStableInsets.top;
     }
 
     /**
-     * @hide
+     * Returns the left stable inset in pixels.
+     *
+     * <p>The stable inset represents the area of a full-screen window that <b>may</b> be
+     * partially or fully obscured by the system UI elements.  This value does not change
+     * based on the visibility state of those elements; for example, if the status bar is
+     * normally shown, but temporarily hidden, the stable inset will still provide the inset
+     * associated with the status bar being shown.</p>
+     *
+     * @return The left stable inset
      */
     public int getStableInsetLeft() {
         return mStableInsets.left;
     }
 
     /**
-     * @hide
+     * Returns the right stable inset in pixels.
+     *
+     * <p>The stable inset represents the area of a full-screen window that <b>may</b> be
+     * partially or fully obscured by the system UI elements.  This value does not change
+     * based on the visibility state of those elements; for example, if the status bar is
+     * normally shown, but temporarily hidden, the stable inset will still provide the inset
+     * associated with the status bar being shown.</p>
+     *
+     * @return The right stable inset
      */
     public int getStableInsetRight() {
         return mStableInsets.right;
     }
 
     /**
-     * @hide
+     * Returns the bottom stable inset in pixels.
+     *
+     * <p>The stable inset represents the area of a full-screen window that <b>may</b> be
+     * partially or fully obscured by the system UI elements.  This value does not change
+     * based on the visibility state of those elements; for example, if the status bar is
+     * normally shown, but temporarily hidden, the stable inset will still provide the inset
+     * associated with the status bar being shown.</p>
+     *
+     * @return The bottom stable inset
      */
     public int getStableInsetBottom() {
         return mStableInsets.bottom;
     }
 
     /**
-     * @hide
+     * Returns true if this WindowInsets has nonzero stable insets.
+     *
+     * <p>The stable inset represents the area of a full-screen window that <b>may</b> be
+     * partially or fully obscured by the system UI elements.  This value does not change
+     * based on the visibility state of those elements; for example, if the status bar is
+     * normally shown, but temporarily hidden, the stable inset will still provide the inset
+     * associated with the status bar being shown.</p>
+     *
+     * @return true if any of the stable inset values are nonzero
      */
     public boolean hasStableInsets() {
         return mStableInsets.top != 0 || mStableInsets.left != 0 || mStableInsets.right != 0
@@ -414,7 +454,9 @@
     }
 
     /**
-     * @hide
+     * Returns a copy of this WindowInsets with the stable insets fully consumed.
+     *
+     * @return A modified copy of this WindowInsets
      */
     public WindowInsets consumeStableInsets() {
         final WindowInsets result = new WindowInsets(this);
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 053fdd0..2ed125d 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -379,6 +379,10 @@
         public static final int LID_CLOSED = 0;
         public static final int LID_OPEN = 1;
 
+        public static final int CAMERA_LENS_COVER_ABSENT = -1;
+        public static final int CAMERA_LENS_UNCOVERED = 0;
+        public static final int CAMERA_LENS_COVERED = 1;
+
         /**
          * Ask the window manager to re-evaluate the system UI flags.
          */
@@ -399,6 +403,11 @@
         public int getLidState();
 
         /**
+         * Returns a code that descripbes whether the camera lens is covered or not.
+         */
+        public int getCameraLensCoverState();
+
+        /**
          * Switch the keyboard layout for the given device.
          * Direction should be +1 or -1 to go to the next or previous keyboard layout.
          */
@@ -761,7 +770,8 @@
     public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags);
 
     /**
-     * Called from the input reader thread before a motion is enqueued when the screen is off.
+     * Called from the input reader thread before a motion is enqueued when the device is in a
+     * non-interactive state.
      *
      * <p>There are some actions that need to be handled here because they
      * affect the power state of the device, for example, waking on motions.
@@ -771,7 +781,7 @@
      *
      * @return Actions flags: may be {@link #ACTION_PASS_TO_USER}.
      */
-    public int interceptWakeMotionBeforeQueueing(long whenNanos, int policyFlags);
+    public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags);
 
     /**
      * Called from the input dispatcher thread before a key is dispatched to a window.
@@ -951,7 +961,14 @@
      * @param lidOpen True if the lid is now open.
      */
     public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen);
-    
+
+    /**
+     * Tell the policy that the camera lens has been covered or uncovered.
+     * @param whenNanos The time when the change occurred in uptime nanoseconds.
+     * @param lensCovered True if the lens is covered.
+     */
+    public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered);
+
     /**
      * Tell the policy if anyone is requesting that keyguard not come on.
      *
diff --git a/core/java/android/view/accessibility/AccessibilityInteractionClient.java b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
index db78ec5..374f7e0 100644
--- a/core/java/android/view/accessibility/AccessibilityInteractionClient.java
+++ b/core/java/android/view/accessibility/AccessibilityInteractionClient.java
@@ -17,6 +17,7 @@
 package android.view.accessibility;
 
 import android.accessibilityservice.IAccessibilityServiceConnection;
+import android.graphics.Point;
 import android.os.Binder;
 import android.os.Build;
 import android.os.Bundle;
@@ -98,6 +99,8 @@
 
     private boolean mPerformAccessibilityActionResult;
 
+    private Point mComputeClickPointResult;
+
     private Message mSameThreadMessage;
 
     private static final SparseArray<IAccessibilityServiceConnection> sConnectionCache =
@@ -519,6 +522,43 @@
         return false;
     }
 
+    /**
+     * Computes a point in screen coordinates where sending a down/up events would
+     * perform a click on an {@link AccessibilityNodeInfo}.
+     *
+     * @param connectionId The id of a connection for interacting with the system.
+     * @param accessibilityWindowId A unique window id. Use
+     *     {@link android.view.accessibility.AccessibilityNodeInfo#ACTIVE_WINDOW_ID}
+     *     to query the currently active window.
+     * @param accessibilityNodeId A unique view id or virtual descendant id from
+     *     where to start the search. Use
+     *     {@link android.view.accessibility.AccessibilityNodeInfo#ROOT_NODE_ID}
+     *     to start from the root.
+     * @return Point the click point of null if no such point.
+     */
+    public Point computeClickPointInScreen(int connectionId, int accessibilityWindowId,
+            long accessibilityNodeId) {
+        try {
+            IAccessibilityServiceConnection connection = getConnection(connectionId);
+            if (connection != null) {
+                final int interactionId = mInteractionIdCounter.getAndIncrement();
+                final boolean success = connection.computeClickPointInScreen(
+                        accessibilityWindowId, accessibilityNodeId,
+                        interactionId, this, Thread.currentThread().getId());
+                if (success) {
+                    return getComputeClickPointInScreenResultAndClear(interactionId);
+                }
+            } else {
+                if (DEBUG) {
+                    Log.w(LOG_TAG, "No connection for connection id: " + connectionId);
+                }
+            }
+        } catch (RemoteException re) {
+            Log.w(LOG_TAG, "Error while calling remote computeClickPointInScreen", re);
+        }
+        return null;
+    }
+
     public void clearCache() {
         sAccessibilityCache.clear();
     }
@@ -634,6 +674,34 @@
     }
 
     /**
+     * Gets the result of a request to compute a point in screen for clicking on a node.
+     *
+     * @param interactionId The interaction id to match the result with the request.
+     * @return The point or null if no such point.
+     */
+    private Point getComputeClickPointInScreenResultAndClear(int interactionId) {
+        synchronized (mInstanceLock) {
+            final boolean success = waitForResultTimedLocked(interactionId);
+            Point result = success ? mComputeClickPointResult : null;
+            clearResultLocked();
+            return result;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setComputeClickPointInScreenActionResult(Point point, int interactionId) {
+        synchronized (mInstanceLock) {
+            if (interactionId > mInteractionId) {
+                mComputeClickPointResult = point;
+                mInteractionId = interactionId;
+            }
+            mInstanceLock.notifyAll();
+        }
+    }
+
+    /**
      * Clears the result state.
      */
     private void clearResultLocked() {
@@ -641,6 +709,7 @@
         mFindAccessibilityNodeInfoResult = null;
         mFindAccessibilityNodeInfosResult = null;
         mPerformAccessibilityActionResult = false;
+        mComputeClickPointResult = null;
     }
 
     /**
diff --git a/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl b/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
index 8d15472..66a3f46 100644
--- a/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityInteractionConnection.aidl
@@ -16,6 +16,8 @@
 
 package android.view.accessibility;
 
+import android.graphics.Region;
+import android.graphics.Point;
 import android.os.Bundle;
 import android.view.MagnificationSpec;
 import android.view.accessibility.AccessibilityNodeInfo;
@@ -29,27 +31,31 @@
  */
 oneway interface IAccessibilityInteractionConnection {
 
-    void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId, int interactionId,
-        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
-        long interrogatingTid, in MagnificationSpec spec);
-
-    void findAccessibilityNodeInfosByViewId(long accessibilityNodeId, String viewId,
+    void findAccessibilityNodeInfoByAccessibilityId(long accessibilityNodeId, in Region bounds,
         int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
         int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
 
-    void findAccessibilityNodeInfosByText(long accessibilityNodeId, String text, int interactionId,
+    void findAccessibilityNodeInfosByViewId(long accessibilityNodeId, String viewId,
+        in Region bounds, int interactionId, IAccessibilityInteractionConnectionCallback callback,
+        int flags, int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findAccessibilityNodeInfosByText(long accessibilityNodeId, String text, in Region bounds,
+        int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
+        int interrogatingPid, long interrogatingTid, in MagnificationSpec spec);
+
+    void findFocus(long accessibilityNodeId, int focusType, in Region bounds, int interactionId,
         IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
         long interrogatingTid, in MagnificationSpec spec);
 
-    void findFocus(long accessibilityNodeId, int focusType, int interactionId,
-        IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
-        long interrogatingTid, in MagnificationSpec spec);
-
-    void focusSearch(long accessibilityNodeId, int direction, int interactionId,
+    void focusSearch(long accessibilityNodeId, int direction, in Region bounds, int interactionId,
         IAccessibilityInteractionConnectionCallback callback, int flags, int interrogatingPid,
         long interrogatingTid, in MagnificationSpec spec);
 
     void performAccessibilityAction(long accessibilityNodeId, int action, in Bundle arguments,
         int interactionId, IAccessibilityInteractionConnectionCallback callback, int flags,
         int interrogatingPid, long interrogatingTid);
+
+    void computeClickPointInScreen(long accessibilityNodeId, in Region bounds, int interactionId,
+        IAccessibilityInteractionConnectionCallback callback, int interrogatingPid,
+        long interrogatingTid, in MagnificationSpec spec);
 }
diff --git a/core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl b/core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl
index c1a3ab7..f480216 100644
--- a/core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityInteractionConnectionCallback.aidl
@@ -16,6 +16,7 @@
 
 package android.view.accessibility;
 
+import android.graphics.Point;
 import android.view.accessibility.AccessibilityNodeInfo;
 import java.util.List;
 
@@ -51,4 +52,12 @@
      * @param interactionId The interaction id to match the result with the request.
      */
     void setPerformAccessibilityActionResult(boolean succeeded, int interactionId);
+
+    /**
+     * Sets the result of a request to compute a point for clicking in a view.
+     *
+     * @param point The point of null if no such point.
+     * @param interactionId The interaction id to match the result with the request.
+     */
+    void setComputeClickPointInScreenActionResult(in Point point, int interactionId);
 }
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 4d2f57a..20adfe4 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -431,7 +431,15 @@
     /**
      * The default implementation does nothing.
      */
-    public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+    public boolean requestCursorUpdates(int cursorUpdateMode) {
+        return false;
+    }
+
+    /**
+     * The default implementation does nothing.
+     * @removed
+     */
+    public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
         return false;
     }
 
diff --git a/core/java/android/view/inputmethod/CursorAnchorInfo.java b/core/java/android/view/inputmethod/CursorAnchorInfo.java
index 730b7f6..600fffe 100644
--- a/core/java/android/view/inputmethod/CursorAnchorInfo.java
+++ b/core/java/android/view/inputmethod/CursorAnchorInfo.java
@@ -35,9 +35,21 @@
  * actually inserted.</p>
  */
 public final class CursorAnchorInfo implements Parcelable {
+    /**
+     * The index of the first character of the selected text (inclusive). {@code -1} when there is
+     * no text selection.
+     */
     private final int mSelectionStart;
+    /**
+     * The index of the first character of the selected text (exclusive). {@code -1} when there is
+     * no text selection.
+     */
     private final int mSelectionEnd;
 
+    /**
+     * The index of the first character of the composing text (inclusive). {@code -1} when there is
+     * no composing text.
+     */
     private final int mComposingTextStart;
     /**
      * The text, tracked as a composing region.
@@ -45,9 +57,9 @@
     private final CharSequence mComposingText;
 
     /**
-     * {@code True} if the insertion marker is partially or entirely clipped by other UI elements.
+     * Flags of the insertion marker. See {@link #FLAG_HAS_VISIBLE_REGION} for example.
      */
-    private final boolean mInsertionMarkerClipped;
+    private final int mInsertionMarkerFlags;
     /**
      * Horizontal position of the insertion marker, in the local coordinates that will be
      * transformed with the transformation matrix when rendered on the screen. This should be
@@ -82,7 +94,7 @@
      * Java chars, in the local coordinates that will be transformed with the transformation matrix
      * when rendered on the screen.
      */
-    private final SparseRectFArray mCharacterRects;
+    private final SparseRectFArray mCharacterBoundsArray;
 
     /**
      * Transformation matrix that is applied to any positional information of this class to
@@ -90,27 +102,53 @@
      */
     private final Matrix mMatrix;
 
+    /**
+     * Flag for {@link #getInsertionMarkerFlags()} and {@link #getCharacterBoundsFlags(int)}: the
+     * insertion marker or character bounds have at least one visible region.
+     */
+    public static final int FLAG_HAS_VISIBLE_REGION = 0x01;
+
+    /**
+     * Flag for {@link #getInsertionMarkerFlags()} and {@link #getCharacterBoundsFlags(int)}: the
+     * insertion marker or character bounds have at least one invisible (clipped) region.
+     */
+    public static final int FLAG_HAS_INVISIBLE_REGION = 0x02;
+
+    /**
+     * Flag for {@link #getInsertionMarkerFlags()} and {@link #getCharacterBoundsFlags(int)}: the
+     * insertion marker or character bounds is placed at right-to-left (RTL) character.
+     */
+    public static final int FLAG_IS_RTL = 0x04;
+
+    /**
+     * @removed
+     */
     public static final int CHARACTER_RECT_TYPE_MASK = 0x0f;
     /**
      * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the editor did not specify any type of this
      * character. Editor authors should not use this flag.
+     * @removed
      */
     public static final int CHARACTER_RECT_TYPE_UNSPECIFIED = 0;
     /**
      * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the character is entirely visible.
+     * @removed
      */
     public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1;
     /**
      * Type for {@link #CHARACTER_RECT_TYPE_MASK}: some area of the character is invisible.
+     * @removed
      */
     public static final int CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE = 2;
     /**
      * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the character is entirely invisible.
+     * @removed
      */
     public static final int CHARACTER_RECT_TYPE_INVISIBLE = 3;
     /**
      * Type for {@link #CHARACTER_RECT_TYPE_MASK}: the editor gave up to calculate the rectangle
      * for this character. Input method authors should ignore the returned rectangle.
+     * @removed
      */
     public static final int CHARACTER_RECT_TYPE_NOT_FEASIBLE = 4;
 
@@ -119,12 +157,12 @@
         mSelectionEnd = source.readInt();
         mComposingTextStart = source.readInt();
         mComposingText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
-        mInsertionMarkerClipped = (source.readInt() != 0);
+        mInsertionMarkerFlags = source.readInt();
         mInsertionMarkerHorizontal = source.readFloat();
         mInsertionMarkerTop = source.readFloat();
         mInsertionMarkerBaseline = source.readFloat();
         mInsertionMarkerBottom = source.readFloat();
-        mCharacterRects = source.readParcelable(SparseRectFArray.class.getClassLoader());
+        mCharacterBoundsArray = source.readParcelable(SparseRectFArray.class.getClassLoader());
         mMatrix = new Matrix();
         mMatrix.setValues(source.createFloatArray());
     }
@@ -141,12 +179,12 @@
         dest.writeInt(mSelectionEnd);
         dest.writeInt(mComposingTextStart);
         TextUtils.writeToParcel(mComposingText, dest, flags);
-        dest.writeInt(mInsertionMarkerClipped ? 1 : 0);
+        dest.writeInt(mInsertionMarkerFlags);
         dest.writeFloat(mInsertionMarkerHorizontal);
         dest.writeFloat(mInsertionMarkerTop);
         dest.writeFloat(mInsertionMarkerBaseline);
         dest.writeFloat(mInsertionMarkerBottom);
-        dest.writeParcelable(mCharacterRects, flags);
+        dest.writeParcelable(mCharacterBoundsArray, flags);
         final float[] matrixArray = new float[9];
         mMatrix.getValues(matrixArray);
         dest.writeFloatArray(matrixArray);
@@ -154,18 +192,17 @@
 
     @Override
     public int hashCode(){
-        // TODO: Improve the hash function.
         final float floatHash = mInsertionMarkerHorizontal + mInsertionMarkerTop
                 + mInsertionMarkerBaseline + mInsertionMarkerBottom;
         int hash = floatHash > 0 ? (int) floatHash : (int)(-floatHash);
         hash *= 31;
-        hash += (mInsertionMarkerClipped ? 2 : 1);
+        hash += mInsertionMarkerFlags;
         hash *= 31;
         hash += mSelectionStart + mSelectionEnd + mComposingTextStart;
         hash *= 31;
         hash += Objects.hashCode(mComposingText);
         hash *= 31;
-        hash += Objects.hashCode(mCharacterRects);
+        hash += Objects.hashCode(mCharacterBoundsArray);
         hash *= 31;
         hash += Objects.hashCode(mMatrix);
         return hash;
@@ -204,17 +241,14 @@
                 || !Objects.equals(mComposingText, that.mComposingText)) {
             return false;
         }
-        if (mInsertionMarkerClipped != that.mInsertionMarkerClipped
+        if (mInsertionMarkerFlags != that.mInsertionMarkerFlags
                 || !areSameFloatImpl(mInsertionMarkerHorizontal, that.mInsertionMarkerHorizontal)
                 || !areSameFloatImpl(mInsertionMarkerTop, that.mInsertionMarkerTop)
                 || !areSameFloatImpl(mInsertionMarkerBaseline, that.mInsertionMarkerBaseline)
                 || !areSameFloatImpl(mInsertionMarkerBottom, that.mInsertionMarkerBottom)) {
             return false;
         }
-        if (!Objects.equals(mComposingTextStart, that.mComposingTextStart)) {
-            return false;
-        }
-        if (!Objects.equals(mCharacterRects, that.mCharacterRects)) {
+        if (!Objects.equals(mCharacterBoundsArray, that.mCharacterBoundsArray)) {
             return false;
         }
         if (!Objects.equals(mMatrix, that.mMatrix)) {
@@ -228,12 +262,12 @@
         return "SelectionInfo{mSelection=" + mSelectionStart + "," + mSelectionEnd
                 + " mComposingTextStart=" + mComposingTextStart
                 + " mComposingText=" + Objects.toString(mComposingText)
-                + " mInsertionMarkerClipped=" + mInsertionMarkerClipped
+                + " mInsertionMarkerFlags=" + mInsertionMarkerFlags
                 + " mInsertionMarkerHorizontal=" + mInsertionMarkerHorizontal
                 + " mInsertionMarkerTop=" + mInsertionMarkerTop
                 + " mInsertionMarkerBaseline=" + mInsertionMarkerBaseline
                 + " mInsertionMarkerBottom=" + mInsertionMarkerBottom
-                + " mCharacterRects=" + Objects.toString(mCharacterRects)
+                + " mCharacterBoundsArray=" + Objects.toString(mCharacterBoundsArray)
                 + " mMatrix=" + Objects.toString(mMatrix)
                 + "}";
     }
@@ -242,6 +276,19 @@
      * Builder for {@link CursorAnchorInfo}. This class is not designed to be thread-safe.
      */
     public static final class Builder {
+        private int mSelectionStart = -1;
+        private int mSelectionEnd = -1;
+        private int mComposingTextStart = -1;
+        private CharSequence mComposingText = null;
+        private float mInsertionMarkerHorizontal = Float.NaN;
+        private float mInsertionMarkerTop = Float.NaN;
+        private float mInsertionMarkerBaseline = Float.NaN;
+        private float mInsertionMarkerBottom = Float.NaN;
+        private int mInsertionMarkerFlags = 0;
+        private SparseRectFArrayBuilder mCharacterBoundsArrayBuilder = null;
+        private final Matrix mMatrix = new Matrix(Matrix.IDENTITY_MATRIX);
+        private boolean mMatrixInitialized = false;
+
         /**
          * Sets the text range of the selection. Calling this can be skipped if there is no
          * selection.
@@ -251,8 +298,6 @@
             mSelectionEnd = newEnd;
             return this;
         }
-        private int mSelectionStart = -1;
-        private int mSelectionEnd = -1;
 
         /**
          * Sets the text range of the composing text. Calling this can be skipped if there is
@@ -271,8 +316,20 @@
             }
             return this;
         }
-        private int mComposingTextStart = -1;
-        private CharSequence mComposingText = null;
+
+        /**
+         * @removed
+         */
+        public Builder setInsertionMarkerLocation(final float horizontalPosition,
+                final float lineTop, final float lineBaseline, final float lineBottom,
+                final boolean clipped){
+            mInsertionMarkerHorizontal = horizontalPosition;
+            mInsertionMarkerTop = lineTop;
+            mInsertionMarkerBaseline = lineBaseline;
+            mInsertionMarkerBottom = lineBottom;
+            mInsertionMarkerFlags = clipped ? FLAG_HAS_INVISIBLE_REGION : 0;
+            return this;
+        }
 
         /**
          * Sets the location of the text insertion point (zero width cursor) as a rectangle in
@@ -291,24 +348,46 @@
          * @param lineBottom vertical position of the insertion marker, in the local coordinates
          * that will be transformed with the transformation matrix when rendered on the screen. This
          * should be calculated or compatible with {@link Layout#getLineBottom(int)}.
-         * @param clipped {@code true} is the insertion marker is partially or entierly clipped by
-         * other UI elements.
+         * @param flags flags of the insertion marker. See {@link #FLAG_HAS_VISIBLE_REGION} for
+         * example.
          */
         public Builder setInsertionMarkerLocation(final float horizontalPosition,
                 final float lineTop, final float lineBaseline, final float lineBottom,
-                final boolean clipped){
+                final int flags){
             mInsertionMarkerHorizontal = horizontalPosition;
             mInsertionMarkerTop = lineTop;
             mInsertionMarkerBaseline = lineBaseline;
             mInsertionMarkerBottom = lineBottom;
-            mInsertionMarkerClipped = clipped;
+            mInsertionMarkerFlags = flags;
             return this;
         }
-        private float mInsertionMarkerHorizontal = Float.NaN;
-        private float mInsertionMarkerTop = Float.NaN;
-        private float mInsertionMarkerBaseline = Float.NaN;
-        private float mInsertionMarkerBottom = Float.NaN;
-        private boolean mInsertionMarkerClipped = false;
+
+        /**
+         * Adds the bounding box of the character specified with the index.
+         *
+         * @param index index of the character in Java chars units. Must be specified in
+         * ascending order across successive calls.
+         * @param left x coordinate of the left edge of the character in local coordinates.
+         * @param top y coordinate of the top edge of the character in local coordinates.
+         * @param right x coordinate of the right edge of the character in local coordinates.
+         * @param bottom y coordinate of the bottom edge of the character in local coordinates.
+         * @param flags flags for this character bounds. See {@link #FLAG_HAS_VISIBLE_REGION},
+         * {@link #FLAG_HAS_INVISIBLE_REGION} and {@link #FLAG_IS_RTL}. These flags must be
+         * specified when necessary.
+         * @throws IllegalArgumentException If the index is a negative value, or not greater than
+         * all of the previously called indices.
+         */
+        public Builder addCharacterBounds(final int index, final float left, final float top,
+                final float right, final float bottom, final int flags) {
+            if (index < 0) {
+                throw new IllegalArgumentException("index must not be a negative integer.");
+            }
+            if (mCharacterBoundsArrayBuilder == null) {
+                mCharacterBoundsArrayBuilder = new SparseRectFArrayBuilder();
+            }
+            mCharacterBoundsArrayBuilder.append(index, left, top, right, bottom, flags);
+            return this;
+        }
 
         /**
          * Adds the bounding box of the character specified with the index.
@@ -323,30 +402,29 @@
          * coordinates, that is, right edge for LTR text and left edge for RTL text.
          * @param trailingEdgeY y coordinate of the trailing edge of the character in local
          * coordinates.
-         * @param flags type and flags for this character. See
-         * {@link #CHARACTER_RECT_TYPE_FULLY_VISIBLE} for example.
+         * @param flags flags for this character rect. See {@link #FLAG_HAS_VISIBLE_REGION} for
+         * example.
          * @throws IllegalArgumentException If the index is a negative value, or not greater than
          * all of the previously called indices.
+         * @removed
          */
         public Builder addCharacterRect(final int index, final float leadingEdgeX,
                 final float leadingEdgeY, final float trailingEdgeX, final float trailingEdgeY,
                 final int flags) {
-            if (index < 0) {
-                throw new IllegalArgumentException("index must not be a negative integer.");
+            final int newFlags;
+            final float left;
+            final float right;
+            if (leadingEdgeX <= trailingEdgeX) {
+                newFlags = flags;
+                left = leadingEdgeX;
+                right = trailingEdgeX;
+            } else {
+                newFlags = flags | FLAG_IS_RTL;
+                left = trailingEdgeX;
+                right = leadingEdgeX;
             }
-            final int type = flags & CHARACTER_RECT_TYPE_MASK;
-            if (type == CHARACTER_RECT_TYPE_UNSPECIFIED) {
-                throw new IllegalArgumentException("Type except for "
-                        + "CHARACTER_RECT_TYPE_UNSPECIFIED must be specified.");
-            }
-            if (mCharacterRectBuilder == null) {
-                mCharacterRectBuilder = new SparseRectFArrayBuilder();
-            }
-            mCharacterRectBuilder.append(index, leadingEdgeX, leadingEdgeY, trailingEdgeX,
-                    trailingEdgeY, flags);
-            return this;
+            return addCharacterBounds(index, left, leadingEdgeY, right, trailingEdgeY, newFlags);
         }
-        private SparseRectFArrayBuilder mCharacterRectBuilder = null;
 
         /**
          * Sets the matrix that transforms local coordinates into screen coordinates.
@@ -358,8 +436,6 @@
             mMatrixInitialized = true;
             return this;
         }
-        private final Matrix mMatrix = new Matrix(Matrix.IDENTITY_MATRIX);
-        private boolean mMatrixInitialized = false;
 
         /**
          * @return {@link CursorAnchorInfo} using parameters in this {@link Builder}.
@@ -368,13 +444,15 @@
          */
         public CursorAnchorInfo build() {
             if (!mMatrixInitialized) {
-                // Coordinate transformation matrix is mandatory when positional parameters are
-                // specified.
-                if ((mCharacterRectBuilder != null && !mCharacterRectBuilder.isEmpty()) ||
-                        !Float.isNaN(mInsertionMarkerHorizontal) ||
-                        !Float.isNaN(mInsertionMarkerTop) ||
-                        !Float.isNaN(mInsertionMarkerBaseline) ||
-                        !Float.isNaN(mInsertionMarkerBottom)) {
+                // Coordinate transformation matrix is mandatory when at least one positional
+                // parameter is specified.
+                final boolean hasCharacterBounds = (mCharacterBoundsArrayBuilder != null
+                        && !mCharacterBoundsArrayBuilder.isEmpty());
+                if (hasCharacterBounds
+                        || !Float.isNaN(mInsertionMarkerHorizontal)
+                        || !Float.isNaN(mInsertionMarkerTop)
+                        || !Float.isNaN(mInsertionMarkerBaseline)
+                        || !Float.isNaN(mInsertionMarkerBottom)) {
                     throw new IllegalArgumentException("Coordinate transformation matrix is " +
                             "required when positional parameters are specified.");
                 }
@@ -391,15 +469,15 @@
             mSelectionEnd = -1;
             mComposingTextStart = -1;
             mComposingText = null;
-            mInsertionMarkerClipped = false;
+            mInsertionMarkerFlags = 0;
             mInsertionMarkerHorizontal = Float.NaN;
             mInsertionMarkerTop = Float.NaN;
             mInsertionMarkerBaseline = Float.NaN;
             mInsertionMarkerBottom = Float.NaN;
             mMatrix.set(Matrix.IDENTITY_MATRIX);
             mMatrixInitialized = false;
-            if (mCharacterRectBuilder != null) {
-                mCharacterRectBuilder.reset();
+            if (mCharacterBoundsArrayBuilder != null) {
+                mCharacterBoundsArrayBuilder.reset();
             }
         }
     }
@@ -409,13 +487,13 @@
         mSelectionEnd = builder.mSelectionEnd;
         mComposingTextStart = builder.mComposingTextStart;
         mComposingText = builder.mComposingText;
-        mInsertionMarkerClipped = builder.mInsertionMarkerClipped;
+        mInsertionMarkerFlags = builder.mInsertionMarkerFlags;
         mInsertionMarkerHorizontal = builder.mInsertionMarkerHorizontal;
         mInsertionMarkerTop = builder.mInsertionMarkerTop;
         mInsertionMarkerBaseline = builder.mInsertionMarkerBaseline;
         mInsertionMarkerBottom = builder.mInsertionMarkerBottom;
-        mCharacterRects = builder.mCharacterRectBuilder != null ?
-                builder.mCharacterRectBuilder.build() : null;
+        mCharacterBoundsArray = builder.mCharacterBoundsArrayBuilder != null ?
+                builder.mCharacterBoundsArrayBuilder.build() : null;
         mMatrix = new Matrix(builder.mMatrix);
     }
 
@@ -452,11 +530,20 @@
     }
 
     /**
+     * Returns the flag of the insertion marker.
+     * @return the flag of the insertion marker. {@code 0} if no flag is specified.
+     */
+    public int getInsertionMarkerFlags() {
+        return mInsertionMarkerFlags;
+    }
+
+    /**
      * Returns the visibility of the insertion marker.
      * @return {@code true} if the insertion marker is partially or entirely clipped.
+     * @removed
      */
     public boolean isInsertionMarkerClipped() {
-        return mInsertionMarkerClipped;
+        return (mInsertionMarkerFlags & FLAG_HAS_VISIBLE_REGION) != 0;
     }
 
     /**
@@ -504,6 +591,19 @@
     /**
      * Returns a new instance of {@link RectF} that indicates the location of the character
      * specified with the index.
+     * @param index index of the character in a Java chars.
+     * @return the character bounds in local coordinates as a new instance of {@link RectF}.
+     */
+    public RectF getCharacterBounds(final int index) {
+        if (mCharacterBoundsArray == null) {
+            return null;
+        }
+        return mCharacterBoundsArray.get(index);
+    }
+
+    /**
+     * Returns a new instance of {@link RectF} that indicates the location of the character
+     * specified with the index.
      * <p>
      * Note that coordinates are not necessarily contiguous or even monotonous, especially when
      * RTL text and LTR text are mixed.
@@ -514,28 +614,32 @@
      * the location. Note that the {@code left} field can be greater than the {@code right} field
      * if the character is in RTL text. Returns {@code null} if no location information is
      * available.
+     * @removed
      */
-    // TODO: Prepare a document about the expected behavior for surrogate pairs, combining
-    // characters, and non-graphical chars.
     public RectF getCharacterRect(final int index) {
-        if (mCharacterRects == null) {
-            return null;
-        }
-        return mCharacterRects.get(index);
+        return getCharacterBounds(index);
     }
 
     /**
-     * Returns the flags associated with the character specified with the index.
+     * Returns the flags associated with the character bounds specified with the index.
      * @param index index of the character in a Java chars.
-     * @return {@link #CHARACTER_RECT_TYPE_UNSPECIFIED} if no flag is specified.
+     * @return {@code 0} if no flag is specified.
      */
-    // TODO: Prepare a document about the expected behavior for surrogate pairs, combining
-    // characters, and non-graphical chars.
-    public int getCharacterRectFlags(final int index) {
-        if (mCharacterRects == null) {
-            return CHARACTER_RECT_TYPE_UNSPECIFIED;
+    public int getCharacterBoundsFlags(final int index) {
+        if (mCharacterBoundsArray == null) {
+            return 0;
         }
-        return mCharacterRects.getFlags(index, CHARACTER_RECT_TYPE_UNSPECIFIED);
+        return mCharacterBoundsArray.getFlags(index, 0);
+    }
+
+    /**
+     * Returns the flags associated with the character rect specified with the index.
+     * @param index index of the character in a Java chars.
+     * @return {@code 0} if no flag is specified.
+     * @removed
+     */
+    public int getCharacterRectFlags(final int index) {
+        return getCharacterBoundsFlags(index);
     }
 
     /**
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index ca094c1..093fb2f 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -728,31 +728,47 @@
      * The editor is requested to call
      * {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)} at
      * once, as soon as possible, regardless of cursor/anchor position changes. This flag can be
-     * used together with {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR}.
+     * used together with {@link #CURSOR_UPDATE_MONITOR}.
      */
-    public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE = 1 << 0;
+    public static final int CURSOR_UPDATE_IMMEDIATE = 1 << 0;
 
     /**
      * The editor is requested to call
      * {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)}
      * whenever cursor/anchor position is changed. To disable monitoring, call
-     * {@link InputConnection#requestUpdateCursorAnchorInfo(int)} again with this flag off.
+     * {@link InputConnection#requestCursorUpdates(int)} again with this flag off.
      * <p>
-     * This flag can be used together with {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE}.
+     * This flag can be used together with {@link #CURSOR_UPDATE_IMMEDIATE}.
      * </p>
      */
-    public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 1 << 1;
+    public static final int CURSOR_UPDATE_MONITOR = 1 << 1;
 
     /**
      * Called by the input method to ask the editor for calling back
      * {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)} to
      * notify cursor/anchor locations.
      *
-     * @param cursorUpdateMode {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE} and/or
-     * {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR}
+     * @param cursorUpdateMode {@link #CURSOR_UPDATE_IMMEDIATE} and/or
+     * {@link #CURSOR_UPDATE_MONITOR}. Pass {@code 0} to disable the effect of
+     * {@link #CURSOR_UPDATE_MONITOR}.
      * @return {@code true} if the request is scheduled. {@code false} to indicate that when the
      * application will not call
      * {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)}.
      */
+    public boolean requestCursorUpdates(int cursorUpdateMode);
+
+    /**
+     * @removed
+     */
+    public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1 << 0;
+
+    /**
+     * @removed
+     */
+    public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 1 << 1;
+
+    /**
+     * @removed
+     */
     public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode);
 }
diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java
index d95df25..87853de 100644
--- a/core/java/android/view/inputmethod/InputConnectionWrapper.java
+++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java
@@ -126,7 +126,14 @@
         return mTarget.performPrivateCommand(action, data);
     }
 
-    public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
-        return mTarget.requestUpdateCursorAnchorInfo(cursorUpdateMode);
+    public boolean requestCursorUpdates(int cursorUpdateMode) {
+        return mTarget.requestCursorUpdates(cursorUpdateMode);
     }
- }
+
+    /**
+     * @removed
+     */
+    public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+        return mTarget.requestCursorUpdates(cursorUpdateMode);
+    }
+}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 0a472c7..b56378f 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1526,7 +1526,7 @@
      * Return true if the current input method wants to watch the location
      * of the input editor's cursor in its window.
      *
-     * @deprecated Use {@link InputConnection#requestUpdateCursorAnchorInfo(int)} instead.
+     * @deprecated Use {@link InputConnection#requestCursorUpdates(int)} instead.
      */
     @Deprecated
     public boolean isWatchingCursor(View view) {
@@ -1542,9 +1542,9 @@
     public boolean isCursorAnchorInfoEnabled() {
         synchronized (mH) {
             final boolean isImmediate = (mRequestUpdateCursorAnchorInfoMonitorMode &
-                    InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0;
+                    InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0;
             final boolean isMonitoring = (mRequestUpdateCursorAnchorInfoMonitorMode &
-                    InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR) != 0;
+                    InputConnection.CURSOR_UPDATE_MONITOR) != 0;
             return isImmediate || isMonitoring;
         }
     }
@@ -1608,7 +1608,7 @@
             // If immediate bit is set, we will call updateCursorAnchorInfo() even when the data has
             // not been changed from the previous call.
             final boolean isImmediate = (mRequestUpdateCursorAnchorInfoMonitorMode &
-                    InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0;
+                    InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0;
             if (!isImmediate && Objects.equals(mCursorAnchorInfo, cursorAnchorInfo)) {
                 // TODO: Consider always emitting this message once we have addressed redundant
                 // calls of this method from android.widget.Editor.
@@ -1624,7 +1624,7 @@
                 mCursorAnchorInfo = cursorAnchorInfo;
                 // Clear immediate bit (if any).
                 mRequestUpdateCursorAnchorInfoMonitorMode &=
-                        ~InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE;
+                        ~InputConnection.CURSOR_UPDATE_IMMEDIATE;
             } catch (RemoteException e) {
                 Log.w(TAG, "IME died: " + mCurId, e);
             }
diff --git a/core/java/android/view/inputmethod/InputMethodSubtype.java b/core/java/android/view/inputmethod/InputMethodSubtype.java
index e7ada27..1671faa 100644
--- a/core/java/android/view/inputmethod/InputMethodSubtype.java
+++ b/core/java/android/view/inputmethod/InputMethodSubtype.java
@@ -211,18 +211,6 @@
      }
 
     /**
-     * Constructor with no subtype ID specified, overridesImplicitlyEnabledSubtype not specified.
-     * Arguments for this constructor have the same meanings as
-     * {@link InputMethodSubtype#InputMethodSubtype(int, int, String, String, String, boolean,
-     * boolean, int)} except "id" and "overridesImplicitlyEnabledSubtype".
-     * @hide
-     */
-    public InputMethodSubtype(int nameId, int iconId, String locale, String mode, String extraValue,
-            boolean isAuxiliary) {
-        this(nameId, iconId, locale, mode, extraValue, isAuxiliary, false);
-    }
-
-    /**
      * Constructor with no subtype ID specified.
      * @deprecated use {@link InputMethodSubtypeBuilder} instead.
      * Arguments for this constructor have the same meanings as
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 547acfa..46a7fd0 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -416,38 +416,6 @@
     }
 
     /**
-     * UploadHelper simplifies file upload operations by providing helper methods that
-     * would handle most common file picker/media capture requests. The application
-     * can use the helper to build an intent to start a file picker, and then parse
-     * the result returned by the activity.
-     *
-     * How to use:
-     * 1. Create a helper using {@link FileChooserParams#getUploadHelper}
-     * 2. Build an intent using {@link UploadHelper#buildIntent}
-     * 3. Fire the intent using {@link android.app.Activity#startActivityForResult}.
-     * 4. Check for ActivityNotFoundException and take a user friendly action if thrown.
-     * 5. Listen the result using {@link android.app.Activity#onActivityResult}
-     * 6. Parse the result using {@link UploadHelper#parseResult}
-     * 7. Send the result using filePathCallback of {@link WebChromeClient#onShowFileChooser}
-     */
-    public static abstract class UploadHelper {
-        /**
-         * Returns an intent that would start a file picker for file selection/media capture.
-         */
-        public abstract Intent buildIntent();
-
-        /**
-         * Parses the result returned by the file picker activity.
-         *
-         * @param resultCode the integer result code returned by the file picker activity.
-         * @param data the intent returned by the file picker activity.
-         * @return the Uris of selected file(s) or null if the resultCode indicates
-         *         activity canceled or any other error.
-         */
-        public abstract Uri[] parseResult(int resultCode, Intent data);
-    }
-
-    /**
      * Parameters used in the {@link #onShowFileChooser} method.
      */
     public static abstract class FileChooserParams {
@@ -464,11 +432,17 @@
         public static final int MODE_SAVE = 3;
 
         /**
-         * Returns a helper to simplify choosing and uploading files. The helper builds a default
-         * intent that the application can send using startActivityForResult and processes the
-         * results.
+         * Parse the result returned by the file picker activity. This method should be used with
+         * {@link #createIntent}. Refer to {@link #createIntent} for how to use it.
+         *
+         * @param resultCode the integer result code returned by the file picker activity.
+         * @param data the intent returned by the file picker activity.
+         * @return the Uris of selected file(s) or null if the resultCode indicates
+         *         activity canceled or any other error.
          */
-        public abstract UploadHelper getUploadHelper();
+        public static Uri[] parseResult(int resultCode, Intent data) {
+            return WebViewFactory.getProvider().getStatics().parseFileChooserResult(resultCode, data);
+        }
 
         /**
          * Returns file chooser mode.
@@ -500,7 +474,28 @@
          * The file name of a default selection if specified, or null.
          */
         public abstract String getFilenameHint();
-    };
+
+        /**
+         * Creates an intent that would start a file picker for file selection.
+         * The Intent supports choosing files from simple file sources available
+         * on the device. Some advanced sources (for example, live media capture)
+         * may not be supported and applications wishing to support these sources
+         * or more advanced file operations should build their own Intent.
+         *
+         * <pre>
+         * How to use:
+         * 1. Build an intent using {@link #createIntent}
+         * 2. Fire the intent using {@link android.app.Activity#startActivityForResult}.
+         * 3. Check for ActivityNotFoundException and take a user friendly action if thrown.
+         * 4. Listen the result using {@link android.app.Activity#onActivityResult}
+         * 5. Parse the result using {@link #parseResult} only if media capture was not requested.
+         * 6. Send the result using filePathCallback of {@link WebChromeClient#onShowFileChooser}
+         * </pre>
+         *
+         * @return an Intent that supports basic file chooser sources.
+         */
+        public abstract Intent createIntent();
+    }
 
     /**
      * Tell the client to open a file chooser.
diff --git a/core/java/android/webkit/WebResourceRequest.java b/core/java/android/webkit/WebResourceRequest.java
index dc7c808..b46ac9a 100644
--- a/core/java/android/webkit/WebResourceRequest.java
+++ b/core/java/android/webkit/WebResourceRequest.java
@@ -41,7 +41,7 @@
     boolean isForMainFrame();
 
     /**
-     * Gets whether a gesture was associated with the request.
+     * Gets whether a gesture (such as a link click) was associated with the request.
      * <p>
      * <strong>IMPORTANT:</strong>
      * This should not be used to implement any form of security. It is possible for the content
@@ -49,6 +49,11 @@
      *
      * @return whether a gesture was associated with the request.
      */
+    boolean hasGesture();
+
+    /*
+     * @removed
+     */
     boolean hasUserGestureInsecure();
 
     /**
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index e1f19ee..081bfdf 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -1810,21 +1810,6 @@
     }
 
     /**
-     * Sets whether the application wants to opt out from using the Data Reduction Proxy
-     * service.
-     * Data reduction proxy can only be enabled by the user and will almost always be
-     * transparent to the application. In rare cases where using the proxy interferes
-     * with the app, the application developer can use this API to opt out from using the
-     * proxy. Note that this may increase network bandwidth usage.
-     *
-     * See <a href=http://developer.chrome.com/multidevice/data-compression>
-     * Data Compression Proxy</a>
-     */
-    public static void optOutDataReductionProxy() {
-        getFactory().getStatics().optOutDataReductionProxy();
-    }
-
-    /**
      * Gets the list of currently loaded plugins.
      *
      * @return the list of currently loaded plugins
@@ -1954,16 +1939,14 @@
      *
      * @param zoomFactor the zoom factor to apply. The zoom factor will be clamped to the Webview's
      * zoom limits. This value must be in the range 0.01 to 100.0 inclusive.
-     *
-     * @return false if no zoom changes, true otherwise.
      */
-    public boolean zoomBy(float zoomFactor) {
+    public void zoomBy(float zoomFactor) {
         checkThread();
         if (zoomFactor < 0.01)
             throw new IllegalArgumentException("zoomFactor must be greater than 0.01.");
         if (zoomFactor > 100.0)
             throw new IllegalArgumentException("zoomFactor must be less than 100.");
-        return mProvider.zoomBy(zoomFactor);
+        mProvider.zoomBy(zoomFactor);
     }
 
     /**
diff --git a/core/java/android/webkit/WebViewFactoryProvider.java b/core/java/android/webkit/WebViewFactoryProvider.java
index 48f3ca3..d37d217 100644
--- a/core/java/android/webkit/WebViewFactoryProvider.java
+++ b/core/java/android/webkit/WebViewFactoryProvider.java
@@ -17,6 +17,8 @@
 package android.webkit;
 
 import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
 
 /**
  * This is the main entry-point into the WebView back end implementations, which the WebView
@@ -61,15 +63,15 @@
 
         /**
          * Implements the API method:
-         * {@link android.webkit.WebView#optOutDataReductionProxy() }
-         */
-        void optOutDataReductionProxy();
-
-        /**
-         * Implements the API method:
          * {@link android.webkit.WebView#setSlowWholeDocumentDrawEnabled(boolean) }
          */
         void enableSlowWholeDocumentDraw();
+
+        /**
+         * Implement the API method
+         * {@link android.webkit.WebChromeClient.FileChooserParams#parseResult(int, Intent)}
+         */
+        Uri[] parseFileChooserResult(int resultCode, Intent intent);
     }
 
     Statics getStatics();
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index eb93745..94d52d5 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -3325,8 +3325,8 @@
         }
         if (dispatchNestedPreScroll(0, -rawDeltaY, mScrollConsumed, mScrollOffset)) {
             rawDeltaY += mScrollConsumed[1];
-            scrollOffsetCorrection -= mScrollOffset[1];
-            scrollConsumedCorrection -= mScrollConsumed[1];
+            scrollOffsetCorrection = -mScrollOffset[1];
+            scrollConsumedCorrection = mScrollConsumed[1];
             if (vtev != null) {
                 vtev.offsetLocation(0, mScrollOffset[1]);
             }
@@ -3437,7 +3437,7 @@
                             }
                         }
                     }
-                    mMotionY = y + scrollOffsetCorrection;
+                    mMotionY = y + lastYCorrection + scrollOffsetCorrection;
                 }
                 mLastY = y + lastYCorrection + scrollOffsetCorrection;
             }
@@ -3505,10 +3505,10 @@
                     mMotionCorrection = 0;
                     View motionView = getChildAt(motionPosition - mFirstPosition);
                     mMotionViewOriginalTop = motionView != null ? motionView.getTop() : 0;
-                    mMotionY = y;
+                    mMotionY =  y + scrollOffsetCorrection;
                     mMotionPosition = motionPosition;
                 }
-                mLastY = y;
+                mLastY = y + lastYCorrection + scrollOffsetCorrection;
                 mDirection = newDirection;
             }
         }
@@ -3876,7 +3876,7 @@
                         if (mPositionScroller != null) {
                             mPositionScroller.stop();
                         }
-                        if (flingVelocity) {
+                        if (flingVelocity && !dispatchNestedPreFling(0, -initialVelocity)) {
                             dispatchNestedFling(0, -initialVelocity, false);
                         }
                     }
@@ -4001,14 +4001,15 @@
      * <p>Applications can use this method to manually initiate a fling as if the user
      * initiated it via touch interaction.</p>
      *
-     * @param velocityY Vertical velocity in pixels per second
+     * @param velocityY Vertical velocity in pixels per second. Note that this is velocity of
+     *                  content, not velocity of a touch that initiated the fling.
      */
     public void fling(int velocityY) {
         if (mFlingRunnable == null) {
             mFlingRunnable = new FlingRunnable();
         }
         reportScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
-        mFlingRunnable.start(-velocityY);
+        mFlingRunnable.start(velocityY);
     }
 
     @Override
@@ -5717,8 +5718,16 @@
         }
 
         @Override
+        public boolean requestCursorUpdates(int cursorUpdateMode) {
+            return getTarget().requestCursorUpdates(cursorUpdateMode);
+        }
+
+        /**
+         * @removed
+         */
+        @Override
         public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
-            return getTarget().requestUpdateCursorAnchorInfo(cursorUpdateMode);
+            return getTarget().requestCursorUpdates(cursorUpdateMode);
         }
     }
 
diff --git a/core/java/android/widget/ActionMenuView.java b/core/java/android/widget/ActionMenuView.java
index 96abf51..7198e52 100644
--- a/core/java/android/widget/ActionMenuView.java
+++ b/core/java/android/widget/ActionMenuView.java
@@ -29,6 +29,7 @@
 import com.android.internal.view.menu.ActionMenuItemView;
 import com.android.internal.view.menu.MenuBuilder;
 import com.android.internal.view.menu.MenuItemImpl;
+import com.android.internal.view.menu.MenuPresenter;
 import com.android.internal.view.menu.MenuView;
 
 /**
@@ -53,6 +54,8 @@
 
     private boolean mReserveOverflow;
     private ActionMenuPresenter mPresenter;
+    private MenuPresenter.Callback mActionMenuPresenterCallback;
+    private MenuBuilder.Callback mMenuBuilderCallback;
     private boolean mFormatItems;
     private int mFormatItemsWidth;
     private int mMinCellSize;
@@ -608,7 +611,9 @@
             mMenu = new MenuBuilder(context);
             mMenu.setCallback(new MenuBuilderCallback());
             mPresenter = new ActionMenuPresenter(context);
-            mPresenter.setCallback(new ActionMenuPresenterCallback());
+            mPresenter.setReserveOverflow(true);
+            mPresenter.setCallback(mActionMenuPresenterCallback != null
+                    ? mActionMenuPresenterCallback : new ActionMenuPresenterCallback());
             mMenu.addMenuPresenter(mPresenter, mPopupContext);
             mPresenter.setMenuView(this);
         }
@@ -617,6 +622,15 @@
     }
 
     /**
+     * Must be called before the first call to getMenu()
+     * @hide
+     */
+    public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) {
+        mActionMenuPresenterCallback = pcb;
+        mMenuBuilderCallback = mcb;
+    }
+
+    /**
      * Returns the current menu or null if one has not yet been configured.
      * @hide Internal use only for action bar integration
      */
@@ -719,6 +733,9 @@
 
         @Override
         public void onMenuModeChange(MenuBuilder menu) {
+            if (mMenuBuilderCallback != null) {
+                mMenuBuilderCallback.onMenuModeChange(menu);
+            }
         }
     }
 
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java
index 1da22ca..b9f891c 100644
--- a/core/java/android/widget/AdapterView.java
+++ b/core/java/android/widget/AdapterView.java
@@ -297,10 +297,10 @@
     public boolean performItemClick(View view, int position, long id) {
         if (mOnItemClickListener != null) {
             playSoundEffect(SoundEffectConstants.CLICK);
+            mOnItemClickListener.onItemClick(this, view, position, id);
             if (view != null) {
                 view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
             }
-            mOnItemClickListener.onItemClick(this, view, position, id);
             return true;
         }
 
diff --git a/core/java/android/widget/DatePicker.java b/core/java/android/widget/DatePicker.java
index 26c1f96..d77f0b2 100644
--- a/core/java/android/widget/DatePicker.java
+++ b/core/java/android/widget/DatePicker.java
@@ -71,9 +71,9 @@
  * @attr ref android.R.styleable#DatePicker_minDate
  * @attr ref android.R.styleable#DatePicker_spinnersShown
  * @attr ref android.R.styleable#DatePicker_calendarViewShown
- * @attr ref android.R.styleable#DatePicker_dayOfWeekBackgroundColor
+ * @attr ref android.R.styleable#DatePicker_dayOfWeekBackground
  * @attr ref android.R.styleable#DatePicker_dayOfWeekTextAppearance
- * @attr ref android.R.styleable#DatePicker_headerBackgroundColor
+ * @attr ref android.R.styleable#DatePicker_headerBackground
  * @attr ref android.R.styleable#DatePicker_headerMonthTextAppearance
  * @attr ref android.R.styleable#DatePicker_headerDayOfMonthTextAppearance
  * @attr ref android.R.styleable#DatePicker_headerYearTextAppearance
@@ -125,6 +125,7 @@
         final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DatePicker,
                 defStyleAttr, defStyleRes);
         final int mode = a.getInt(R.styleable.DatePicker_datePickerMode, MODE_SPINNER);
+        final int firstDayOfWeek = a.getInt(R.styleable.DatePicker_firstDayOfWeek, 0);
         a.recycle();
 
         switch (mode) {
@@ -136,6 +137,10 @@
                 mDelegate = createSpinnerUIDelegate(context, attrs, defStyleAttr, defStyleRes);
                 break;
         }
+
+        if (firstDayOfWeek != 0) {
+            setFirstDayOfWeek(firstDayOfWeek);
+        }
     }
 
     private DatePickerDelegate createSpinnerUIDelegate(Context context, AttributeSet attrs,
@@ -300,6 +305,47 @@
     }
 
     /**
+     * Sets the first day of week.
+     *
+     * @param firstDayOfWeek The first day of the week conforming to the
+     *            {@link CalendarView} APIs.
+     * @see Calendar#SUNDAY
+     * @see Calendar#MONDAY
+     * @see Calendar#TUESDAY
+     * @see Calendar#WEDNESDAY
+     * @see Calendar#THURSDAY
+     * @see Calendar#FRIDAY
+     * @see Calendar#SATURDAY
+     *
+     * @attr ref android.R.styleable#DatePicker_firstDayOfWeek
+     */
+    public void setFirstDayOfWeek(int firstDayOfWeek) {
+        if (firstDayOfWeek < Calendar.SUNDAY || firstDayOfWeek > Calendar.SATURDAY) {
+            throw new IllegalArgumentException("firstDayOfWeek must be between 1 and 7");
+        }
+        mDelegate.setFirstDayOfWeek(firstDayOfWeek);
+    }
+
+    /**
+     * Gets the first day of week.
+     *
+     * @return The first day of the week conforming to the {@link CalendarView}
+     *         APIs.
+     * @see Calendar#SUNDAY
+     * @see Calendar#MONDAY
+     * @see Calendar#TUESDAY
+     * @see Calendar#WEDNESDAY
+     * @see Calendar#THURSDAY
+     * @see Calendar#FRIDAY
+     * @see Calendar#SATURDAY
+     *
+     * @attr ref android.R.styleable#DatePicker_firstDayOfWeek
+     */
+    public int getFirstDayOfWeek() {
+        return mDelegate.getFirstDayOfWeek();
+    }
+
+    /**
      * Gets whether the {@link CalendarView} is shown.
      *
      * @return True if the calendar view is shown.
@@ -315,7 +361,7 @@
      * @return The calendar view.
      * @see #getCalendarViewShown()
      */
-    public CalendarView getCalendarView () {
+    public CalendarView getCalendarView() {
         return mDelegate.getCalendarView();
     }
 
@@ -382,6 +428,9 @@
         int getMonth();
         int getDayOfMonth();
 
+        void setFirstDayOfWeek(int firstDayOfWeek);
+        int getFirstDayOfWeek();
+
         void setMinDate(long minDate);
         Calendar getMinDate();
 
@@ -699,6 +748,16 @@
         }
 
         @Override
+        public void setFirstDayOfWeek(int firstDayOfWeek) {
+            mCalendarView.setFirstDayOfWeek(firstDayOfWeek);
+        }
+
+        @Override
+        public int getFirstDayOfWeek() {
+            return mCalendarView.getFirstDayOfWeek();
+        }
+
+        @Override
         public void setMinDate(long minDate) {
             mTempDate.setTimeInMillis(minDate);
             if (mTempDate.get(Calendar.YEAR) == mMinDate.get(Calendar.YEAR)
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 7df1fa3..b962962 100644
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -21,7 +21,7 @@
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
-import android.graphics.Color;
+import android.graphics.drawable.Drawable;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.format.DateFormat;
@@ -49,6 +49,7 @@
  */
 class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate implements
         View.OnClickListener, DatePickerController {
+    private static final int USE_LOCALE = 0;
 
     private static final int UNINITIALIZED = -1;
     private static final int MONTH_AND_DAY_VIEW = 0;
@@ -99,6 +100,8 @@
     private Calendar mMinDate;
     private Calendar mMaxDate;
 
+    private int mFirstDayOfWeek = USE_LOCALE;
+
     private HashSet<OnDateChangedListener> mListeners = new HashSet<OnDateChangedListener>();
 
     public DatePickerCalendarDelegate(DatePicker delegator, Context context, AttributeSet attrs,
@@ -149,16 +152,12 @@
             mDayOfWeekView.setTextAppearance(context, dayOfWeekTextAppearanceResId);
         }
 
-        final int dayOfWeekBackgroundColor = a.getColor(
-                R.styleable.DatePicker_dayOfWeekBackgroundColor, Color.TRANSPARENT);
-        mDayOfWeekView.setBackgroundColor(dayOfWeekBackgroundColor);
+        mDayOfWeekView.setBackground(a.getDrawable(R.styleable.DatePicker_dayOfWeekBackground));
+
+        dateLayout.setBackground(a.getDrawable(R.styleable.DatePicker_headerBackground));
 
         final int headerSelectedTextColor = a.getColor(
                 R.styleable.DatePicker_headerSelectedTextColor, defaultHighlightColor);
-        final int headerBackgroundColor = a.getColor(R.styleable.DatePicker_headerBackgroundColor,
-                Color.TRANSPARENT);
-        dateLayout.setBackgroundColor(headerBackgroundColor);
-
         final int monthTextAppearanceResId = a.getResourceId(
                 R.styleable.DatePicker_headerMonthTextAppearance, -1);
         if (monthTextAppearanceResId != -1) {
@@ -442,7 +441,15 @@
     }
 
     @Override
+    public void setFirstDayOfWeek(int firstDayOfWeek) {
+        mFirstDayOfWeek = firstDayOfWeek;
+    }
+
+    @Override
     public int getFirstDayOfWeek() {
+        if (mFirstDayOfWeek != USE_LOCALE) {
+            return mFirstDayOfWeek;
+        }
         return mCurrentDate.getFirstDayOfWeek();
     }
 
diff --git a/core/java/android/widget/DatePickerController.java b/core/java/android/widget/DatePickerController.java
index 6a074da..059709d 100644
--- a/core/java/android/widget/DatePickerController.java
+++ b/core/java/android/widget/DatePickerController.java
@@ -35,6 +35,7 @@
 
     Calendar getSelectedDay();
 
+    void setFirstDayOfWeek(int firstDayOfWeek);
     int getFirstDayOfWeek();
 
     int getMinYear();
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index 57b8dcb..033b99a 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -52,12 +52,15 @@
     private static final String TAG = "EdgeEffect";
 
     // Time it will take the effect to fully recede in ms
-    private static final int RECEDE_TIME = 1000;
+    private static final int RECEDE_TIME = 600;
 
     // Time it will take before a pulled glow begins receding in ms
     private static final int PULL_TIME = 167;
 
-    private static final float MAX_ALPHA = 1.f;
+    // Time it will take in ms for a pulled glow to decay to partial strength before release
+    private static final int PULL_DECAY_TIME = 2000;
+
+    private static final float MAX_ALPHA = 0.5f;
 
     private static final float MAX_GLOW_SCALE = 2.f;
 
@@ -93,12 +96,9 @@
     private static final int STATE_RECEDE = 3;
     private static final int STATE_PULL_DECAY = 4;
 
-    // How much dragging should effect the height of the glow image.
-    // Number determined by user testing.
-    private static final int PULL_DISTANCE_GLOW_FACTOR = 7;
-    private static final float PULL_DISTANCE_ALPHA_GLOW_FACTOR = 1.1f;
+    private static final float PULL_DISTANCE_ALPHA_GLOW_FACTOR = 0.8f;
 
-    private static final int VELOCITY_GLOW_FACTOR = 12;
+    private static final int VELOCITY_GLOW_FACTOR = 6;
 
     private int mState = STATE_IDLE;
 
@@ -107,7 +107,7 @@
     private final Rect mBounds = new Rect();
     private final Paint mPaint = new Paint();
     private float mRadius;
-    private float mBaseGlowHeight;
+    private float mBaseGlowScale;
     private float mDisplacement = 0.5f;
     private float mTargetDisplacement = 0.5f;
 
@@ -138,8 +138,12 @@
         final float r = width * 0.75f / SIN;
         final float y = COS * r;
         final float h = r - y;
+        final float or = height * 0.75f / SIN;
+        final float oy = COS * or;
+        final float oh = or - oy;
+
         mRadius = r;
-        mBaseGlowHeight = h;
+        mBaseGlowScale = h > 0 ? Math.min(oh / h, 1.f) : 1.f;
 
         mBounds.set(mBounds.left, mBounds.top, width, (int) Math.min(height, h));
     }
@@ -319,13 +323,14 @@
         final float centerX = mBounds.centerX();
         final float centerY = mBounds.height() - mRadius;
 
-        canvas.scale(1.f, Math.min(mGlowScaleY, 1.f), centerX, 0);
+        canvas.scale(1.f, Math.min(mGlowScaleY, 1.f) * mBaseGlowScale, centerX, 0);
 
         final float displacement = Math.max(0, Math.min(mDisplacement, 1.f)) - 0.5f;
         float translateX = mBounds.width() * displacement / 2;
 
         canvas.clipRect(mBounds);
         canvas.translate(translateX, 0);
+        mPaint.setAlpha((int) (0xff * mGlowAlpha));
         canvas.drawCircle(centerX, centerY, mRadius, mPaint);
         canvas.restoreToCount(count);
 
@@ -372,7 +377,16 @@
                     mGlowScaleYFinish = 0.f;
                     break;
                 case STATE_PULL:
-                    // Hold in this state until explicitly released.
+                    mState = STATE_PULL_DECAY;
+                    mStartTime = AnimationUtils.currentAnimationTimeMillis();
+                    mDuration = PULL_DECAY_TIME;
+
+                    mGlowAlphaStart = mGlowAlpha;
+                    mGlowScaleYStart = mGlowScaleY;
+
+                    // After pull, the glow should fade to nothing.
+                    mGlowAlphaFinish = 0.f;
+                    mGlowScaleYFinish = 0.f;
                     break;
                 case STATE_PULL_DECAY:
                     mState = STATE_RECEDE;
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 46b225d..128a06c 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1860,9 +1860,8 @@
         }
 
         final int originalLength = mTextView.getText().length();
-        long minMax = mTextView.prepareSpacesAroundPaste(offset, offset, content);
-        int min = TextUtils.unpackRangeStartFromLong(minMax);
-        int max = TextUtils.unpackRangeEndFromLong(minMax);
+        int min = offset;
+        int max = offset;
 
         Selection.setSelection((Spannable) mTextView.getText(), max);
         mTextView.replaceText_internal(min, max, content);
@@ -3060,48 +3059,69 @@
                     final CharSequence composingText = text.subSequence(composingTextStart,
                             composingTextEnd);
                     builder.setComposingText(composingTextStart, composingText);
-                }
-                // TODO: Optimize this loop by caching the result.
-                for (int offset = composingTextStart; offset < composingTextEnd; offset++) {
-                    if (offset < 0) {
-                        continue;
+
+                    final int minLine = layout.getLineForOffset(composingTextStart);
+                    final int maxLine = layout.getLineForOffset(composingTextEnd - 1);
+                    for (int line = minLine; line <= maxLine; ++line) {
+                        final int lineStart = layout.getLineStart(line);
+                        final int lineEnd = layout.getLineEnd(line);
+                        final int offsetStart = Math.max(lineStart, composingTextStart);
+                        final int offsetEnd = Math.min(lineEnd, composingTextEnd);
+                        final boolean ltrLine =
+                                layout.getParagraphDirection(line) == Layout.DIR_LEFT_TO_RIGHT;
+                        final float[] widths = new float[offsetEnd - offsetStart];
+                        layout.getPaint().getTextWidths(text, offsetStart, offsetEnd, widths);
+                        final float top = layout.getLineTop(line);
+                        final float bottom = layout.getLineBottom(line);
+                        for (int offset = offsetStart; offset < offsetEnd; ++offset) {
+                            final float charWidth = widths[offset - offsetStart];
+                            final boolean isRtl = layout.isRtlCharAt(offset);
+                            final float primary = layout.getPrimaryHorizontal(offset);
+                            final float secondary = layout.getSecondaryHorizontal(offset);
+                            // TODO: This doesn't work perfectly for text with custom styles and
+                            // TAB chars.
+                            final float left;
+                            final float right;
+                            if (ltrLine) {
+                                if (isRtl) {
+                                    left = secondary - charWidth;
+                                    right = secondary;
+                                } else {
+                                    left = primary;
+                                    right = primary + charWidth;
+                                }
+                            } else {
+                                if (!isRtl) {
+                                    left = secondary;
+                                    right = secondary + charWidth;
+                                } else {
+                                    left = primary - charWidth;
+                                    right = primary;
+                                }
+                            }
+                            // TODO: Check top-right and bottom-left as well.
+                            final float localLeft = left + viewportToContentHorizontalOffset;
+                            final float localRight = right + viewportToContentHorizontalOffset;
+                            final float localTop = top + viewportToContentVerticalOffset;
+                            final float localBottom = bottom + viewportToContentVerticalOffset;
+                            final boolean isTopLeftVisible = isPositionVisible(localLeft, localTop);
+                            final boolean isBottomRightVisible =
+                                    isPositionVisible(localRight, localBottom);
+                            int characterBoundsFlags = 0;
+                            if (isTopLeftVisible || isBottomRightVisible) {
+                                characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
+                            }
+                            if (!isTopLeftVisible || !isTopLeftVisible) {
+                                characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
+                            }
+                            if (isRtl) {
+                                characterBoundsFlags |= CursorAnchorInfo.FLAG_IS_RTL;
+                            }
+                            // Here offset is the index in Java chars.
+                            builder.addCharacterBounds(offset, localLeft, localTop, localRight,
+                                    localBottom, characterBoundsFlags);
+                        }
                     }
-                    final boolean isRtl = layout.isRtlCharAt(offset);
-                    final int line = layout.getLineForOffset(offset);
-                    final int nextCharIndex = offset + 1;
-                    final float localLeadingEdgeX = layout.getPrimaryHorizontal(offset);
-                    final float localTrailingEdgeX;
-                    if (nextCharIndex != layout.getLineEnd(line)) {
-                        localTrailingEdgeX = layout.getPrimaryHorizontal(nextCharIndex);
-                    } else if (isRtl) {
-                        localTrailingEdgeX = layout.getLineLeft(line);
-                    } else {
-                        localTrailingEdgeX = layout.getLineRight(line);
-                    }
-                    final float leadingEdgeX = localLeadingEdgeX
-                            + viewportToContentHorizontalOffset;
-                    final float trailingEdgeX = localTrailingEdgeX
-                            + viewportToContentHorizontalOffset;
-                    final float top = layout.getLineTop(line) + viewportToContentVerticalOffset;
-                    final float bottom = layout.getLineBottom(line)
-                            + viewportToContentVerticalOffset;
-                    // TODO: Check right-top and left-bottom as well.
-                    final boolean isLeadingEdgeTopVisible = isPositionVisible(leadingEdgeX, top);
-                    final boolean isTrailingEdgeBottomVisible =
-                            isPositionVisible(trailingEdgeX, bottom);
-                    final int characterRectFlags;
-                    if (isLeadingEdgeTopVisible && isTrailingEdgeBottomVisible) {
-                        characterRectFlags = CursorAnchorInfo.CHARACTER_RECT_TYPE_FULLY_VISIBLE;
-                    } else if (isLeadingEdgeTopVisible || isTrailingEdgeBottomVisible) {
-                        characterRectFlags = CursorAnchorInfo.CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE;
-                    } else {
-                        characterRectFlags = CursorAnchorInfo.CHARACTER_RECT_TYPE_INVISIBLE;
-                    }
-                    // Here offset is the index in Java chars.
-                    // TODO: We must have a well-defined specification. For example, how
-                    // surrogate pairs and composition letters are handled must be documented.
-                    builder.addCharacterRect(offset, leadingEdgeX, top, trailingEdgeX, bottom,
-                            characterRectFlags);
                 }
             }
 
@@ -3117,11 +3137,22 @@
                         + viewportToContentVerticalOffset;
                 final float insertionMarkerBottom = layout.getLineBottom(line)
                         + viewportToContentVerticalOffset;
-                // Take TextView's padding and scroll into account.
-                final boolean isClipped = !isPositionVisible(insertionMarkerX, insertionMarkerTop)
-                        || !isPositionVisible(insertionMarkerX, insertionMarkerBottom);
+                final boolean isTopVisible =
+                        isPositionVisible(insertionMarkerX, insertionMarkerTop);
+                final boolean isBottomVisible =
+                        isPositionVisible(insertionMarkerX, insertionMarkerBottom);
+                int insertionMarkerFlags = 0;
+                if (isTopVisible || isBottomVisible) {
+                    insertionMarkerFlags |= CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
+                }
+                if (!isTopVisible || !isBottomVisible) {
+                    insertionMarkerFlags |= CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
+                }
+                if (layout.isRtlCharAt(offset)) {
+                    insertionMarkerFlags |= CursorAnchorInfo.FLAG_IS_RTL;
+                }
                 builder.setInsertionMarkerLocation(insertionMarkerX, insertionMarkerTop,
-                        insertionMarkerBaseline, insertionMarkerBottom, isClipped);
+                        insertionMarkerBaseline, insertionMarkerBottom, insertionMarkerFlags);
             }
 
             imm.updateCursorAnchorInfo(mTextView, builder.build());
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index d263625..efd6fc0 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -2356,7 +2356,7 @@
         final int rowsCount = getCount() / columnsCount;
         final int selectionMode = getSelectionModeForAccessibility();
         final CollectionInfo collectionInfo = CollectionInfo.obtain(
-                columnsCount, rowsCount, false, selectionMode);
+                rowsCount, columnsCount, false, selectionMode);
         info.setCollectionInfo(collectionInfo);
     }
 
@@ -2385,7 +2385,7 @@
         final boolean isHeading = lp != null && lp.viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER;
         final boolean isSelected = isItemChecked(position);
         final CollectionItemInfo itemInfo = CollectionItemInfo.obtain(
-                column, 1, row, 1, isHeading, isSelected);
+                row, 1, column, 1, isHeading, isSelected);
         info.setCollectionItemInfo(itemInfo);
     }
 }
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 1368cd3..2e9858c 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3882,9 +3882,10 @@
         super.onInitializeAccessibilityNodeInfo(info);
         info.setClassName(ListView.class.getName());
 
-        final int count = getCount();
+        final int rowsCount = getCount();
         final int selectionMode = getSelectionModeForAccessibility();
-        final CollectionInfo collectionInfo = CollectionInfo.obtain(1, count, false, selectionMode);
+        final CollectionInfo collectionInfo = CollectionInfo.obtain(
+                rowsCount, 1, false, selectionMode);
         info.setCollectionInfo(collectionInfo);
     }
 
@@ -3897,7 +3898,7 @@
         final boolean isHeading = lp != null && lp.viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER;
         final boolean isSelected = isItemChecked(position);
         final CollectionItemInfo itemInfo = CollectionItemInfo.obtain(
-                0, 1, position, 1, isHeading, isSelected);
+                position, 1, 0, 1, isHeading, isSelected);
         info.setCollectionItemInfo(itemInfo);
     }
 }
diff --git a/core/java/android/widget/RadialTimePickerView.java b/core/java/android/widget/RadialTimePickerView.java
index adca4cc..d2f68d0 100644
--- a/core/java/android/widget/RadialTimePickerView.java
+++ b/core/java/android/widget/RadialTimePickerView.java
@@ -458,6 +458,7 @@
         a.recycle();
 
         setOnTouchListener(this);
+        setClickable(true);
 
         // Initial values
         final Calendar calendar = Calendar.getInstance(Locale.getDefault());
@@ -612,9 +613,9 @@
             mMinutesTexts[i] = String.format("%02d", MINUTES_NUMBERS[i]);
         }
 
-        String[] amPmTexts = new DateFormatSymbols().getAmPmStrings();
-        mAmPmText[AM] = amPmTexts[0];
-        mAmPmText[PM] = amPmTexts[1];
+        String[] amPmStrings = TimePickerClockDelegate.getAmPmStrings(mContext);
+        mAmPmText[AM] = amPmStrings[0];
+        mAmPmText[PM] = amPmStrings[1];
     }
 
     private void initData() {
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 05ff151..90e9c69 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -22,11 +22,13 @@
 import android.app.PendingIntent;
 import android.appwidget.AppWidgetHostView;
 import android.content.Context;
+import android.content.ContextWrapper;
 import android.content.Intent;
 import android.content.IntentSender;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Configuration;
+import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.PorterDuff;
 import android.graphics.Rect;
@@ -864,7 +866,7 @@
                 if (alpha != -1) {
                     targetDrawable.setAlpha(alpha);
                 }
-                if (colorFilter != -1 && filterMode != null) {
+                if (filterMode != null) {
                     targetDrawable.setColorFilter(colorFilter, filterMode);
                 }
                 if (level != -1) {
@@ -1653,8 +1655,10 @@
      *
      * @param application The application whose content is shown by the views.
      * @param layoutId The id of the layout resource.
+     *
+     * @hide
      */
-    private RemoteViews(ApplicationInfo application, int layoutId) {
+    protected RemoteViews(ApplicationInfo application, int layoutId) {
         mApplication = application;
         mLayoutId = layoutId;
         mBitmapCache = new BitmapCache();
@@ -2189,8 +2193,8 @@
      * @param alpha Specify an alpha value for the drawable, or -1 to leave
      *            unchanged.
      * @param colorFilter Specify a color for a
-     *            {@link android.graphics.ColorFilter} for this drawable, or -1
-     *            to leave unchanged.
+     *            {@link android.graphics.ColorFilter} for this drawable. This will be ignored if
+     *            {@code mode} is {@code null}.
      * @param mode Specify a PorterDuff mode for this drawable, or null to leave
      *            unchanged.
      * @param level Specify the level for the drawable, or -1 to leave
@@ -2515,15 +2519,29 @@
         RemoteViews rvToApply = getRemoteViewsToApply(context);
 
         View result;
-
-        Context c = prepareContext(context);
+        // RemoteViews may be built by an application installed in another
+        // user. So build a context that loads resources from that user but
+        // still returns the current users userId so settings like data / time formats
+        // are loaded without requiring cross user persmissions.
+        final Context contextForResources = getContextForResources(context);
+        Context inflationContext = new ContextWrapper(context) {
+            @Override
+            public Resources getResources() {
+                return contextForResources.getResources();
+            }
+            @Override
+            public Resources.Theme getTheme() {
+                return contextForResources.getTheme();
+            }
+        };
 
         LayoutInflater inflater = (LayoutInflater)
-                c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+                context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
-        inflater = inflater.cloneInContext(c);
+        // Clone inflater so we load resources from correct context and
+        // we don't add a filter to the static version returned by getSystemService.
+        inflater = inflater.cloneInContext(inflationContext);
         inflater.setFilter(this);
-
         result = inflater.inflate(rvToApply.getLayoutId(), parent, false);
 
         rvToApply.performApply(result, parent, handler);
@@ -2557,7 +2575,6 @@
             }
         }
 
-        prepareContext(context);
         rvToApply.performApply(v, (ViewGroup) v.getParent(), handler);
     }
 
@@ -2572,7 +2589,7 @@
         }
     }
 
-    private Context prepareContext(Context context) {
+    private Context getContextForResources(Context context) {
         if (mApplication != null) {
             if (context.getUserId() == UserHandle.getUserId(mApplication.uid)
                     && context.getPackageName().equals(mApplication.packageName)) {
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java
index 0a3c7ff..dfdf606 100644
--- a/core/java/android/widget/SearchView.java
+++ b/core/java/android/widget/SearchView.java
@@ -262,7 +262,7 @@
                 attrs, R.styleable.SearchView, defStyleAttr, defStyleRes);
         final LayoutInflater inflater = (LayoutInflater) context.getSystemService(
                 Context.LAYOUT_INFLATER_SERVICE);
-        final int layoutResId = a.getResourceId(R.styleable.SearchView_layout, 0);
+        final int layoutResId = a.getResourceId(R.styleable.SearchView_layout, R.layout.search_view);
         inflater.inflate(layoutResId, this, true);
 
         mQueryTextView = (SearchAutoComplete) findViewById(R.id.search_src_text);
@@ -288,7 +288,8 @@
         mSearchHintIcon.setImageDrawable(a.getDrawable(R.styleable.SearchView_searchIcon));
 
         // Extract dropdown layout resource IDs for later use.
-        mSuggestionRowLayout = a.getResourceId(R.styleable.SearchView_suggestionRowLayout, 0);
+        mSuggestionRowLayout = a.getResourceId(R.styleable.SearchView_suggestionRowLayout,
+                R.layout.search_dropdown_item_icons_2line);
         mSuggestionCommitIconResId = a.getResourceId(R.styleable.SearchView_commitIcon, 0);
 
         mSearchButton.setOnClickListener(mOnClickListener);
@@ -334,6 +335,10 @@
             setInputType(inputType);
         }
 
+        boolean focusable = true;
+        focusable = a.getBoolean(R.styleable.SearchView_focusable, focusable);
+        setFocusable(focusable);
+
         a.recycle();
 
         // Save voice intent for later queries/launching
diff --git a/core/java/android/widget/SimpleMonthView.java b/core/java/android/widget/SimpleMonthView.java
index 27763eb..a76241e 100644
--- a/core/java/android/widget/SimpleMonthView.java
+++ b/core/java/android/widget/SimpleMonthView.java
@@ -31,6 +31,7 @@
 import android.text.format.DateUtils;
 import android.text.format.Time;
 import android.util.AttributeSet;
+import android.util.MathUtils;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.accessibility.AccessibilityEvent;
@@ -300,7 +301,11 @@
     }
 
     private static boolean isValidDayOfWeek(int day) {
-        return (day >= Time.SUNDAY && day <= Time.SATURDAY);
+        return day >= Calendar.SUNDAY && day <= Calendar.SATURDAY;
+    }
+
+    private static boolean isValidMonth(int month) {
+        return month >= Calendar.JANUARY && month <= Calendar.DECEMBER;
     }
 
     /**
@@ -312,8 +317,8 @@
      * @param selectedDay the selected day of the month, or -1 for no selection.
      * @param month the month.
      * @param year the year.
-     * @param weekStart which day the week should start on. {@link Time#SUNDAY} through
-     *        {@link Time#SATURDAY}.
+     * @param weekStart which day the week should start on. {@link Calendar#SUNDAY} through
+     *        {@link Calendar#SATURDAY}.
      * @param enabledDayStart the first enabled day.
      * @param enabledDayEnd the last enabled day.
      */
@@ -325,7 +330,7 @@
 
         mSelectedDay = selectedDay;
 
-        if (month >= Calendar.JANUARY && month <= Calendar.DECEMBER) {
+        if (isValidMonth(month)) {
             mMonth = month;
         }
         mYear = year;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 9b3a1e0..a81ff97 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -17,6 +17,7 @@
 package android.widget;
 
 import android.R;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.ClipData;
 import android.content.ClipboardManager;
@@ -1861,6 +1862,10 @@
             return getCompoundPaddingTop();
         }
 
+        if (mLayout == null) {
+            assumeLayout();
+        }
+
         if (mLayout.getLineCount() <= mMaximum) {
             return getCompoundPaddingTop();
         }
@@ -1894,6 +1899,10 @@
             return getCompoundPaddingBottom();
         }
 
+        if (mLayout == null) {
+            assumeLayout();
+        }
+
         if (mLayout.getLineCount() <= mMaximum) {
             return getCompoundPaddingBottom();
         }
@@ -1968,23 +1977,34 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the left of, above,
-     * to the right of, and below the text.  Use null if you do not
-     * want a Drawable there.  The Drawables must already have had
+     * Sets the Drawables (if any) to appear to the left of, above, to the
+     * right of, and below the text. Use {@code null} if you do not want a
+     * Drawable there. The Drawables must already have had
      * {@link Drawable#setBounds} called.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawablesRelative} or related methods.
      *
      * @attr ref android.R.styleable#TextView_drawableLeft
      * @attr ref android.R.styleable#TextView_drawableTop
      * @attr ref android.R.styleable#TextView_drawableRight
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
-    public void setCompoundDrawables(Drawable left, Drawable top,
-                                     Drawable right, Drawable bottom) {
+    public void setCompoundDrawables(@Nullable Drawable left, @Nullable Drawable top,
+            @Nullable Drawable right, @Nullable Drawable bottom) {
         Drawables dr = mDrawables;
 
-        final boolean drawables = left != null || top != null
-                || right != null || bottom != null;
+        // We're switching to absolute, discard relative.
+        if (dr != null) {
+            if (dr.mDrawableStart != null) dr.mDrawableStart.setCallback(null);
+            dr.mDrawableStart = null;
+            if (dr.mDrawableEnd != null) dr.mDrawableEnd.setCallback(null);
+            dr.mDrawableEnd = null;
+            dr.mDrawableSizeStart = dr.mDrawableHeightStart = 0;
+            dr.mDrawableSizeEnd = dr.mDrawableHeightEnd = 0;
+        }
 
+        final boolean drawables = left != null || top != null || right != null || bottom != null;
         if (!drawables) {
             // Clearing drawables...  can we free the data structure?
             if (dr != null) {
@@ -2093,10 +2113,12 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the left of, above,
-     * to the right of, and below the text.  Use 0 if you do not
-     * want a Drawable there. The Drawables' bounds will be set to
-     * their intrinsic bounds.
+     * Sets the Drawables (if any) to appear to the left of, above, to the
+     * right of, and below the text. Use 0 if you do not want a Drawable there.
+     * The Drawables' bounds will be set to their intrinsic bounds.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawablesRelative} or related methods.
      *
      * @param left Resource identifier of the left Drawable.
      * @param top Resource identifier of the top Drawable.
@@ -2118,18 +2140,21 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the left of, above,
-     * to the right of, and below the text.  Use null if you do not
-     * want a Drawable there. The Drawables' bounds will be set to
-     * their intrinsic bounds.
+     * Sets the Drawables (if any) to appear to the left of, above, to the
+     * right of, and below the text. Use {@code null} if you do not want a
+     * Drawable there. The Drawables' bounds will be set to their intrinsic
+     * bounds.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawablesRelative} or related methods.
      *
      * @attr ref android.R.styleable#TextView_drawableLeft
      * @attr ref android.R.styleable#TextView_drawableTop
      * @attr ref android.R.styleable#TextView_drawableRight
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
-    public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top,
-            Drawable right, Drawable bottom) {
+    public void setCompoundDrawablesWithIntrinsicBounds(@Nullable Drawable left,
+            @Nullable Drawable top, @Nullable Drawable right, @Nullable Drawable bottom) {
 
         if (left != null) {
             left.setBounds(0, 0, left.getIntrinsicWidth(), left.getIntrinsicHeight());
@@ -2147,20 +2172,33 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the start of, above,
-     * to the end of, and below the text.  Use null if you do not
-     * want a Drawable there.  The Drawables must already have had
-     * {@link Drawable#setBounds} called.
+     * Sets the Drawables (if any) to appear to the start of, above, to the end
+     * of, and below the text. Use {@code null} if you do not want a Drawable
+     * there. The Drawables must already have had {@link Drawable#setBounds}
+     * called.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawables} or related methods.
      *
      * @attr ref android.R.styleable#TextView_drawableStart
      * @attr ref android.R.styleable#TextView_drawableTop
      * @attr ref android.R.styleable#TextView_drawableEnd
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
-    public void setCompoundDrawablesRelative(Drawable start, Drawable top,
-                                     Drawable end, Drawable bottom) {
+    public void setCompoundDrawablesRelative(@Nullable Drawable start, @Nullable Drawable top,
+            @Nullable Drawable end, @Nullable Drawable bottom) {
         Drawables dr = mDrawables;
 
+        // We're switching to relative, discard absolute.
+        if (dr != null) {
+            if (dr.mDrawableLeft != null) dr.mDrawableLeft.setCallback(null);
+            dr.mDrawableLeft = dr.mDrawableLeftInitial = null;
+            if (dr.mDrawableRight != null) dr.mDrawableRight.setCallback(null);
+            dr.mDrawableRight = dr.mDrawableRightInitial = null;
+            dr.mDrawableSizeLeft = dr.mDrawableHeightLeft = 0;
+            dr.mDrawableSizeRight = dr.mDrawableHeightRight = 0;
+        }
+
         final boolean drawables = start != null || top != null
                 || end != null || bottom != null;
 
@@ -2266,10 +2304,12 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the start of, above,
-     * to the end of, and below the text.  Use 0 if you do not
-     * want a Drawable there. The Drawables' bounds will be set to
-     * their intrinsic bounds.
+     * Sets the Drawables (if any) to appear to the start of, above, to the end
+     * of, and below the text. Use 0 if you do not want a Drawable there. The
+     * Drawables' bounds will be set to their intrinsic bounds.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawables} or related methods.
      *
      * @param start Resource identifier of the start Drawable.
      * @param top Resource identifier of the top Drawable.
@@ -2293,18 +2333,20 @@
     }
 
     /**
-     * Sets the Drawables (if any) to appear to the start of, above,
-     * to the end of, and below the text.  Use null if you do not
-     * want a Drawable there. The Drawables' bounds will be set to
-     * their intrinsic bounds.
+     * Sets the Drawables (if any) to appear to the start of, above, to the end
+     * of, and below the text. Use {@code null} if you do not want a Drawable
+     * there. The Drawables' bounds will be set to their intrinsic bounds.
+     * <p>
+     * Calling this method will overwrite any Drawables previously set using
+     * {@link #setCompoundDrawables} or related methods.
      *
      * @attr ref android.R.styleable#TextView_drawableStart
      * @attr ref android.R.styleable#TextView_drawableTop
      * @attr ref android.R.styleable#TextView_drawableEnd
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
-    public void setCompoundDrawablesRelativeWithIntrinsicBounds(Drawable start, Drawable top,
-            Drawable end, Drawable bottom) {
+    public void setCompoundDrawablesRelativeWithIntrinsicBounds(@Nullable Drawable start,
+            @Nullable Drawable top, @Nullable Drawable end, @Nullable Drawable bottom) {
 
         if (start != null) {
             start.setBounds(0, 0, start.getIntrinsicWidth(), start.getIntrinsicHeight());
@@ -2329,6 +2371,7 @@
      * @attr ref android.R.styleable#TextView_drawableRight
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
+    @NonNull
     public Drawable[] getCompoundDrawables() {
         final Drawables dr = mDrawables;
         if (dr != null) {
@@ -2348,6 +2391,7 @@
      * @attr ref android.R.styleable#TextView_drawableEnd
      * @attr ref android.R.styleable#TextView_drawableBottom
      */
+    @NonNull
     public Drawable[] getCompoundDrawablesRelative() {
         final Drawables dr = mDrawables;
         if (dr != null) {
@@ -8415,6 +8459,33 @@
     @Override
     public boolean performAccessibilityAction(int action, Bundle arguments) {
         switch (action) {
+            case AccessibilityNodeInfo.ACTION_CLICK: {
+                boolean handled = false;
+
+                // Simulate View.onTouchEvent for an ACTION_UP event.
+                if (isClickable() || isLongClickable()) {
+                    if (isFocusable() && !isFocused()) {
+                        requestFocus();
+                    }
+
+                    performClick();
+                    handled = true;
+                }
+
+                // Simulate TextView.onTouchEvent for an ACTION_UP event.
+                if ((mMovement != null || onCheckIsTextEditor()) && isEnabled()
+                        && mText instanceof Spannable && mLayout != null
+                        && (isTextEditable() || isTextSelectable()) && isFocused()) {
+                    // Show the IME, except when selecting in read-only text.
+                    final InputMethodManager imm = InputMethodManager.peekInstance();
+                    viewClicked(imm);
+                    if (!isTextSelectable() && mEditor.mShowSoftInputOnFocus && imm != null) {
+                        handled |= imm.showSoftInput(this, 0);
+                    }
+                }
+
+                return handled;
+            }
             case AccessibilityNodeInfo.ACTION_COPY: {
                 if (isFocused() && canCopy()) {
                     if (onTextContextMenuItem(ID_COPY)) {
@@ -8719,57 +8790,6 @@
     }
 
     /**
-     * Prepare text so that there are not zero or two spaces at beginning and end of region defined
-     * by [min, max] when replacing this region by paste.
-     * Note that if there were two spaces (or more) at that position before, they are kept. We just
-     * make sure we do not add an extra one from the paste content.
-     */
-    long prepareSpacesAroundPaste(int min, int max, CharSequence paste) {
-        if (paste.length() > 0) {
-            if (min > 0) {
-                final char charBefore = mTransformed.charAt(min - 1);
-                final char charAfter = paste.charAt(0);
-
-                if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) {
-                    // Two spaces at beginning of paste: remove one
-                    final int originalLength = mText.length();
-                    deleteText_internal(min - 1, min);
-                    // Due to filters, there is no guarantee that exactly one character was
-                    // removed: count instead.
-                    final int delta = mText.length() - originalLength;
-                    min += delta;
-                    max += delta;
-                } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' &&
-                        !Character.isSpaceChar(charAfter) && charAfter != '\n') {
-                    // No space at beginning of paste: add one
-                    final int originalLength = mText.length();
-                    replaceText_internal(min, min, " ");
-                    // Taking possible filters into account as above.
-                    final int delta = mText.length() - originalLength;
-                    min += delta;
-                    max += delta;
-                }
-            }
-
-            if (max < mText.length()) {
-                final char charBefore = paste.charAt(paste.length() - 1);
-                final char charAfter = mTransformed.charAt(max);
-
-                if (Character.isSpaceChar(charBefore) && Character.isSpaceChar(charAfter)) {
-                    // Two spaces at end of paste: remove one
-                    deleteText_internal(max, max + 1);
-                } else if (!Character.isSpaceChar(charBefore) && charBefore != '\n' &&
-                        !Character.isSpaceChar(charAfter) && charAfter != '\n') {
-                    // No space at end of paste: add one
-                    replaceText_internal(max, max, " ");
-                }
-            }
-        }
-
-        return TextUtils.packRangeInLong(min, max);
-    }
-
-    /**
      * Paste clipboard content between min and max positions.
      */
     private void paste(int min, int max) {
@@ -8782,9 +8802,6 @@
                 CharSequence paste = clip.getItemAt(i).coerceToStyledText(getContext());
                 if (paste != null) {
                     if (!didFirst) {
-                        long minMax = prepareSpacesAroundPaste(min, max, paste);
-                        min = TextUtils.unpackRangeStartFromLong(minMax);
-                        max = TextUtils.unpackRangeEndFromLong(minMax);
                         Selection.setSelection((Spannable) mText, max);
                         ((Editable) mText).replace(min, max, paste);
                         didFirst = true;
diff --git a/core/java/android/widget/TimePickerSpinnerDelegate.java b/core/java/android/widget/TimePickerSpinnerDelegate.java
index 6169d2e..73e05e8 100644
--- a/core/java/android/widget/TimePickerSpinnerDelegate.java
+++ b/core/java/android/widget/TimePickerSpinnerDelegate.java
@@ -21,7 +21,6 @@
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
-import android.graphics.Color;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.TextUtils;
@@ -40,7 +39,6 @@
 
 import com.android.internal.R;
 
-import java.text.DateFormatSymbols;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Locale;
@@ -71,6 +69,7 @@
 
     private static final int HOURS_IN_HALF_DAY = 12;
 
+    private View mHeaderView;
     private TextView mHourView;
     private TextView mMinuteView;
     private TextView mAmPmTextView;
@@ -156,11 +155,8 @@
             mAmPmTextView.setTextAppearance(context, headerAmPmTextAppearance);
         }
 
-        final int headerBackgroundColor = a.getColor(
-                R.styleable.TimePicker_headerBackgroundColor, Color.TRANSPARENT);
-        if (headerBackgroundColor != Color.TRANSPARENT) {
-            mainView.findViewById(R.id.time_header).setBackgroundColor(headerBackgroundColor);
-        }
+        mHeaderView = mainView.findViewById(R.id.time_header);
+        mHeaderView.setBackground(a.getDrawable(R.styleable.TimePicker_headerBackground));
 
         a.recycle();
 
@@ -194,14 +190,11 @@
     }
 
     private void setupListeners() {
-        KeyboardListener keyboardListener = new KeyboardListener();
-        mDelegator.setOnKeyListener(keyboardListener);
+        mHeaderView.setOnKeyListener(mKeyListener);
+        mHeaderView.setOnFocusChangeListener(mFocusListener);
+        mHeaderView.setFocusable(true);
 
-        mHourView.setOnKeyListener(keyboardListener);
-        mMinuteView.setOnKeyListener(keyboardListener);
-        mAmPmTextView.setOnKeyListener(keyboardListener);
         mRadialTimePickerView.setOnValueSelectedListener(this);
-        mRadialTimePickerView.setOnKeyListener(keyboardListener);
 
         mHourView.setOnClickListener(new View.OnClickListener() {
             @Override
@@ -641,7 +634,7 @@
             if (!isTypedTimeFullyLegal()) {
                 mTypedTimes.clear();
             }
-            finishKbMode(true);
+            finishKbMode();
         }
     }
 
@@ -776,27 +769,7 @@
      * @return true if the key was successfully processed, false otherwise.
      */
     private boolean processKeyUp(int keyCode) {
-        if (keyCode == KeyEvent.KEYCODE_ESCAPE || keyCode == KeyEvent.KEYCODE_TAB) {
-            if(mInKbMode) {
-                if (isTypedTimeFullyLegal()) {
-                    finishKbMode(true);
-                }
-                return true;
-            }
-        } else if (keyCode == KeyEvent.KEYCODE_ENTER) {
-            if (mInKbMode) {
-                if (!isTypedTimeFullyLegal()) {
-                    return true;
-                }
-                finishKbMode(false);
-            }
-            if (mOnTimeChangedListener != null) {
-                mOnTimeChangedListener.onTimeChanged(mDelegator,
-                        mRadialTimePickerView.getCurrentHour(),
-                        mRadialTimePickerView.getCurrentMinute());
-            }
-            return true;
-        } else if (keyCode == KeyEvent.KEYCODE_DEL) {
+        if (keyCode == KeyEvent.KEYCODE_DEL) {
             if (mInKbMode) {
                 if (!mTypedTimes.isEmpty()) {
                     int deleted = deleteLastTypedKey();
@@ -925,9 +898,8 @@
 
     /**
      * Get out of keyboard mode. If there is nothing in typedTimes, revert to TimePicker's time.
-     * @param updateDisplays If true, update the displays with the relevant time.
      */
-    private void finishKbMode(boolean updateDisplays) {
+    private void finishKbMode() {
         mInKbMode = false;
         if (!mTypedTimes.isEmpty()) {
             int values[] = getEnteredTime(null);
@@ -938,10 +910,8 @@
             }
             mTypedTimes.clear();
         }
-        if (updateDisplays) {
-            updateDisplay(false);
-            mRadialTimePickerView.setInputEnabled(true);
-        }
+        updateDisplay(false);
+        mRadialTimePickerView.setInputEnabled(true);
     }
 
     /**
@@ -1261,7 +1231,7 @@
         }
     }
 
-    private class KeyboardListener implements View.OnKeyListener {
+    private final View.OnKeyListener mKeyListener = new View.OnKeyListener() {
         @Override
         public boolean onKey(View v, int keyCode, KeyEvent event) {
             if (event.getAction() == KeyEvent.ACTION_UP) {
@@ -1269,5 +1239,20 @@
             }
             return false;
         }
-    }
+    };
+
+    private final View.OnFocusChangeListener mFocusListener = new View.OnFocusChangeListener() {
+        @Override
+        public void onFocusChange(View v, boolean hasFocus) {
+            if (!hasFocus && mInKbMode && isTypedTimeFullyLegal()) {
+                finishKbMode();
+
+                if (mOnTimeChangedListener != null) {
+                    mOnTimeChangedListener.onTimeChanged(mDelegator,
+                            mRadialTimePickerView.getCurrentHour(),
+                            mRadialTimePickerView.getCurrentMinute());
+                }
+            }
+        }
+    };
 }
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index ece8aa4..be28199 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -37,6 +37,7 @@
 import android.view.ViewGroup;
 
 import com.android.internal.R;
+import com.android.internal.app.ToolbarActionBar;
 import com.android.internal.view.menu.MenuBuilder;
 import com.android.internal.view.menu.MenuItemImpl;
 import com.android.internal.view.menu.MenuPresenter;
@@ -153,6 +154,8 @@
     private ToolbarWidgetWrapper mWrapper;
     private ActionMenuPresenter mOuterActionMenuPresenter;
     private ExpandedActionViewMenuPresenter mExpandedMenuPresenter;
+    private MenuPresenter.Callback mActionMenuPresenterCallback;
+    private MenuBuilder.Callback mMenuBuilderCallback;
 
     private boolean mCollapsible;
 
@@ -248,11 +251,12 @@
         final Drawable navIcon = a.getDrawable(R.styleable.Toolbar_navigationIcon);
         if (navIcon != null) {
             setNavigationIcon(navIcon);
-            final CharSequence navDesc = a.getText(
-                    R.styleable.Toolbar_navigationContentDescription);
-            if (!TextUtils.isEmpty(navDesc)) {
-                setNavigationContentDescription(navDesc);
-            }
+        }
+
+        final CharSequence navDesc = a.getText(
+                R.styleable.Toolbar_navigationContentDescription);
+        if (!TextUtils.isEmpty(navDesc)) {
+            setNavigationContentDescription(navDesc);
         }
         a.recycle();
     }
@@ -824,6 +828,7 @@
             mMenuView = new ActionMenuView(getContext());
             mMenuView.setPopupTheme(mPopupTheme);
             mMenuView.setOnMenuItemClickListener(mMenuViewItemClickListener);
+            mMenuView.setMenuCallbacks(mActionMenuPresenterCallback, mMenuBuilderCallback);
             final LayoutParams lp = generateDefaultLayoutParams();
             lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK);
             mMenuView.setLayoutParams(lp);
@@ -1677,6 +1682,15 @@
     }
 
     /**
+     * Must be called before the menu is accessed
+     * @hide
+     */
+    public void setMenuCallbacks(MenuPresenter.Callback pcb, MenuBuilder.Callback mcb) {
+        mActionMenuPresenterCallback = pcb;
+        mMenuBuilderCallback = mcb;
+    }
+
+    /**
      * Interface responsible for receiving menu item click events if the items themselves
      * do not have individual item click listeners.
      */
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index cb0c3d0..572cca2 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -253,6 +253,10 @@
      *
      * @param uri     the URI of the video.
      * @param headers the headers for the URI request.
+     *                Note that the cross domain redirection is allowed by default, but that can be
+     *                changed with key/value pairs through the headers parameter with
+     *                "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
+     *                to disallow or allow cross domain redirection.
      */
     public void setVideoURI(Uri uri, Map<String, String> headers) {
         mUri = uri;
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index c409520..6d5c98e 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -63,63 +63,46 @@
     private final Context mContext;
     private final DialogInterface mDialogInterface;
     private final Window mWindow;
-    
+
     private CharSequence mTitle;
-
     private CharSequence mMessage;
-
     private ListView mListView;
-    
     private View mView;
 
     private int mViewLayoutResId;
 
     private int mViewSpacingLeft;
-    
     private int mViewSpacingTop;
-    
     private int mViewSpacingRight;
-    
     private int mViewSpacingBottom;
-    
     private boolean mViewSpacingSpecified = false;
-    
+
     private Button mButtonPositive;
-
     private CharSequence mButtonPositiveText;
-
     private Message mButtonPositiveMessage;
 
     private Button mButtonNegative;
-
     private CharSequence mButtonNegativeText;
-
     private Message mButtonNegativeMessage;
 
     private Button mButtonNeutral;
-
     private CharSequence mButtonNeutralText;
-
     private Message mButtonNeutralMessage;
 
     private ScrollView mScrollView;
-    
+
     private int mIconId = 0;
-    
     private Drawable mIcon;
-    
+
     private ImageView mIconView;
-    
     private TextView mTitleView;
-
     private TextView mMessageView;
-
     private View mCustomTitleView;
-    
+
     private boolean mForceInverseBackground;
-    
+
     private ListAdapter mAdapter;
-    
+
     private int mCheckedItem = -1;
 
     private int mAlertDialogLayout;
@@ -130,7 +113,7 @@
     private int mListItemLayout;
 
     private int mButtonPanelLayoutHint = AlertDialog.LAYOUT_HINT_NONE;
-    
+
     private Handler mHandler;
 
     private final View.OnClickListener mButtonHandler = new View.OnClickListener() {
@@ -160,7 +143,7 @@
     private static final class ButtonHandler extends Handler {
         // Button clicks have Message.what as the BUTTON{1,2,3} constant
         private static final int MSG_DISMISS_DIALOG = 1;
-        
+
         private WeakReference<DialogInterface> mDialog;
 
         public ButtonHandler(DialogInterface dialog) {
@@ -170,13 +153,13 @@
         @Override
         public void handleMessage(Message msg) {
             switch (msg.what) {
-                
+
                 case DialogInterface.BUTTON_POSITIVE:
                 case DialogInterface.BUTTON_NEGATIVE:
                 case DialogInterface.BUTTON_NEUTRAL:
                     ((DialogInterface.OnClickListener) msg.obj).onClick(mDialog.get(), msg.what);
                     break;
-                    
+
                 case MSG_DISMISS_DIALOG:
                     ((DialogInterface) msg.obj).dismiss();
             }
@@ -220,16 +203,16 @@
 
         a.recycle();
     }
-    
+
     static boolean canTextInput(View v) {
         if (v.onCheckIsTextEditor()) {
             return true;
         }
-        
+
         if (!(v instanceof ViewGroup)) {
             return false;
         }
-        
+
         ViewGroup vg = (ViewGroup)v;
         int i = vg.getChildCount();
         while (i > 0) {
@@ -239,10 +222,10 @@
                 return true;
             }
         }
-        
+
         return false;
     }
-    
+
     public void installContent() {
         /* We use a custom title so never request a window title */
         mWindow.requestFeature(Window.FEATURE_NO_TITLE);
@@ -262,7 +245,7 @@
         // TODO: use layout hint side for long messages/lists
         return mAlertDialogLayout;
     }
-    
+
     public void setTitle(CharSequence title) {
         mTitle = title;
         if (mTitleView != null) {
@@ -276,7 +259,7 @@
     public void setCustomTitle(View customTitleView) {
         mCustomTitleView = customTitleView;
     }
-    
+
     public void setMessage(CharSequence message) {
         mMessage = message;
         if (mMessageView != null) {
@@ -301,7 +284,7 @@
         mViewLayoutResId = 0;
         mViewSpacingSpecified = false;
     }
-    
+
     /**
      * Set the view to display in the dialog along with the spacing around that view
      */
@@ -326,7 +309,7 @@
     /**
      * Sets a click listener or a message to be sent when the button is clicked.
      * You only need to pass one of {@code listener} or {@code msg}.
-     * 
+     *
      * @param whichButton Which button, can be one of
      *            {@link DialogInterface#BUTTON_POSITIVE},
      *            {@link DialogInterface#BUTTON_NEGATIVE}, or
@@ -341,24 +324,24 @@
         if (msg == null && listener != null) {
             msg = mHandler.obtainMessage(whichButton, listener);
         }
-        
+
         switch (whichButton) {
 
             case DialogInterface.BUTTON_POSITIVE:
                 mButtonPositiveText = text;
                 mButtonPositiveMessage = msg;
                 break;
-                
+
             case DialogInterface.BUTTON_NEGATIVE:
                 mButtonNegativeText = text;
                 mButtonNegativeMessage = msg;
                 break;
-                
+
             case DialogInterface.BUTTON_NEUTRAL:
                 mButtonNeutralText = text;
                 mButtonNeutralMessage = msg;
                 break;
-                
+
             default:
                 throw new IllegalArgumentException("Button does not exist");
         }
@@ -416,11 +399,11 @@
     public void setInverseBackgroundForced(boolean forceInverseBackground) {
         mForceInverseBackground = forceInverseBackground;
     }
-    
+
     public ListView getListView() {
         return mListView;
     }
-    
+
     public Button getButton(int whichButton) {
         switch (whichButton) {
             case DialogInterface.BUTTON_POSITIVE:
@@ -433,7 +416,7 @@
                 return null;
         }
     }
-    
+
     @SuppressWarnings({"UnusedDeclaration"})
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         return mScrollView != null && mScrollView.executeKeyEvent(event);
@@ -469,12 +452,12 @@
         final LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel);
         setupContent(contentPanel);
         final boolean hasButtons = setupButtons();
-        
+
         final LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel);
         final TypedArray a = mContext.obtainStyledAttributes(
                 null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0);
         final boolean hasTitle = setupTitle(topPanel);
-            
+
         final View buttonPanel = mWindow.findViewById(R.id.buttonPanel);
         if (!hasButtons) {
             buttonPanel.setVisibility(View.GONE);
@@ -536,14 +519,14 @@
 
     private boolean setupTitle(LinearLayout topPanel) {
         boolean hasTitle = true;
-        
+
         if (mCustomTitleView != null) {
             // Add the custom title view directly to the topPanel layout
             LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
                     LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
-            
+
             topPanel.addView(mCustomTitleView, 0, lp);
-            
+
             // Hide the title template
             View titleTemplate = mWindow.findViewById(R.id.title_template);
             titleTemplate.setVisibility(View.GONE);
@@ -587,19 +570,19 @@
     private void setupContent(LinearLayout contentPanel) {
         mScrollView = (ScrollView) mWindow.findViewById(R.id.scrollView);
         mScrollView.setFocusable(false);
-        
+
         // Special case for users that only want to display a String
         mMessageView = (TextView) mWindow.findViewById(R.id.message);
         if (mMessageView == null) {
             return;
         }
-        
+
         if (mMessage != null) {
             mMessageView.setText(mMessage);
         } else {
             mMessageView.setVisibility(View.GONE);
             mScrollView.removeView(mMessageView);
-            
+
             if (mListView != null) {
                 contentPanel.removeView(mWindow.findViewById(R.id.scrollView));
                 contentPanel.addView(mListView,
@@ -664,7 +647,7 @@
                 centerButton(mButtonNeutral);
             }
         }
-        
+
         return whichButtons != 0;
     }
 
@@ -694,7 +677,12 @@
         int centerBright = 0;
         int bottomBright = 0;
         int bottomMedium = 0;
-        if (mContext.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.KITKAT) {
+
+        // If the needsDefaultBackgrounds attribute is set, we know we're
+        // inheriting from a framework style.
+        final boolean needsDefaultBackgrounds = a.getBoolean(
+                R.styleable.AlertDialog_needsDefaultBackgrounds, true);
+        if (needsDefaultBackgrounds) {
             fullDark = R.drawable.popup_full_dark;
             topDark = R.drawable.popup_top_dark;
             centerDark = R.drawable.popup_center_dark;
@@ -705,12 +693,12 @@
             bottomBright = R.drawable.popup_bottom_bright;
             bottomMedium = R.drawable.popup_bottom_medium;
         }
+
         topBright = a.getResourceId(R.styleable.AlertDialog_topBright, topBright);
         topDark = a.getResourceId(R.styleable.AlertDialog_topDark, topDark);
         centerBright = a.getResourceId(R.styleable.AlertDialog_centerBright, centerBright);
         centerDark = a.getResourceId(R.styleable.AlertDialog_centerDark, centerDark);
 
-
         /* We now set the background of all of the sections of the alert.
          * First collect together each section that is being displayed along
          * with whether it is on a light or dark background, then run through
@@ -789,31 +777,6 @@
             }
         }
 
-        /* TODO: uncomment section below. The logic for this should be if 
-         * it's a Contextual menu being displayed AND only a Cancel button 
-         * is shown then do this.
-         */
-//        if (hasButtons && (mListView != null)) {
-            
-            /* Yet another *special* case. If there is a ListView with buttons
-             * don't put the buttons on the bottom but instead put them in the
-             * footer of the ListView this will allow more items to be
-             * displayed.
-             */
-            
-            /*
-            contentPanel.setBackgroundResource(bottomBright);
-            buttonPanel.setBackgroundResource(centerMedium);
-            ViewGroup parent = (ViewGroup) mWindow.findViewById(R.id.parentPanel);
-            parent.removeView(buttonPanel);
-            AbsListView.LayoutParams params = new AbsListView.LayoutParams(
-                    AbsListView.LayoutParams.MATCH_PARENT, 
-                    AbsListView.LayoutParams.MATCH_PARENT);
-            buttonPanel.setLayoutParams(params);
-            mListView.addFooterView(buttonPanel);
-            */
-//        }
-
         final ListView listView = mListView;
         if (listView != null && mAdapter != null) {
             listView.setAdapter(mAdapter);
@@ -854,7 +817,7 @@
     public static class AlertParams {
         public final Context mContext;
         public final LayoutInflater mInflater;
-        
+
         public int mIconId = 0;
         public Drawable mIcon;
         public int mIconAttrId = 0;
@@ -899,20 +862,20 @@
          * will be bound to an adapter.
          */
         public interface OnPrepareListViewListener {
-            
+
             /**
              * Called before the ListView is bound to an adapter.
              * @param listView The ListView that will be shown in the dialog.
              */
             void onPrepareListView(ListView listView);
         }
-        
+
         public AlertParams(Context context) {
             mContext = context;
             mCancelable = true;
             mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
         }
-    
+
         public void apply(AlertController dialog) {
             if (mCustomTitleView != null) {
                 dialog.setCustomTitle(mCustomTitleView);
@@ -972,12 +935,12 @@
             }
             */
         }
-        
+
         private void createListView(final AlertController dialog) {
             final RecycleListView listView = (RecycleListView)
                     mInflater.inflate(dialog.mListLayout, null);
             ListAdapter adapter;
-            
+
             if (mIsMultiChoice) {
                 if (mCursor == null) {
                     adapter = new ArrayAdapter<CharSequence>(
@@ -1012,37 +975,37 @@
                             listView.setItemChecked(cursor.getPosition(),
                                     cursor.getInt(mIsCheckedIndex) == 1);
                         }
-    
+
                         @Override
                         public View newView(Context context, Cursor cursor, ViewGroup parent) {
                             return mInflater.inflate(dialog.mMultiChoiceItemLayout,
                                     parent, false);
                         }
-                        
+
                     };
                 }
             } else {
-                int layout = mIsSingleChoice 
+                int layout = mIsSingleChoice
                         ? dialog.mSingleChoiceItemLayout : dialog.mListItemLayout;
                 if (mCursor == null) {
                     adapter = (mAdapter != null) ? mAdapter
                             : new CheckedItemAdapter(mContext, layout, R.id.text1, mItems);
                 } else {
-                    adapter = new SimpleCursorAdapter(mContext, layout, 
+                    adapter = new SimpleCursorAdapter(mContext, layout,
                             mCursor, new String[]{mLabelColumn}, new int[]{R.id.text1});
                 }
             }
-            
+
             if (mOnPrepareListViewListener != null) {
                 mOnPrepareListViewListener.onPrepareListView(listView);
             }
-            
+
             /* Don't directly set the adapter on the ListView as we might
              * want to add a footer to the ListView later.
              */
             dialog.mAdapter = adapter;
             dialog.mCheckedItem = mCheckedItem;
-            
+
             if (mOnClickListener != null) {
                 listView.setOnItemClickListener(new OnItemClickListener() {
                     @Override
@@ -1065,12 +1028,12 @@
                     }
                 });
             }
-            
+
             // Attach a given OnItemSelectedListener to the ListView
             if (mOnItemSelectedListener != null) {
                 listView.setOnItemSelectedListener(mOnItemSelectedListener);
             }
-            
+
             if (mIsSingleChoice) {
                 listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
             } else if (mIsMultiChoice) {
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index b6e7353..107e8c6 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -90,7 +90,7 @@
     private boolean mSafeForwardingMode;
     private boolean mAlwaysUseOption;
     private boolean mShowExtended;
-    private GridView mGridView;
+    private ListView mListView;
     private Button mAlwaysButton;
     private Button mOnceButton;
     private int mIconDpi;
@@ -228,10 +228,13 @@
                 mLaunchedFromUid, alwaysUseOption);
 
         final int layoutId;
+        final boolean useHeader;
         if (mAdapter.hasFilteredItem()) {
             layoutId = R.layout.resolver_list_with_default;
             alwaysUseOption = false;
+            useHeader = true;
         } else {
+            useHeader = false;
             layoutId = R.layout.resolver_list;
         }
         mAlwaysUseOption = alwaysUseOption;
@@ -243,16 +246,19 @@
             return;
         } else if (count > 1) {
             setContentView(layoutId);
-            mGridView = (GridView) findViewById(R.id.resolver_list);
-            mGridView.setAdapter(mAdapter);
-            mGridView.setOnItemClickListener(this);
-            mGridView.setOnItemLongClickListener(new ItemLongClickListener());
+            mListView = (ListView) findViewById(R.id.resolver_list);
+            mListView.setAdapter(mAdapter);
+            mListView.setOnItemClickListener(this);
+            mListView.setOnItemLongClickListener(new ItemLongClickListener());
 
             if (alwaysUseOption) {
-                mGridView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+                mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
             }
 
-            resizeGrid();
+            if (useHeader) {
+                mListView.addHeaderView(LayoutInflater.from(this).inflate(
+                        R.layout.resolver_different_item_header, mListView, false));
+            }
         } else if (count == 1) {
             safelyStartActivity(mAdapter.intentForPosition(0, false));
             mPackageMonitor.unregister();
@@ -265,8 +271,8 @@
             final TextView empty = (TextView) findViewById(R.id.empty);
             empty.setVisibility(View.VISIBLE);
 
-            mGridView = (GridView) findViewById(R.id.resolver_list);
-            mGridView.setVisibility(View.GONE);
+            mListView = (ListView) findViewById(R.id.resolver_list);
+            mListView.setVisibility(View.GONE);
         }
 
         final ResolverDrawerLayout rdl = (ResolverDrawerLayout) findViewById(R.id.contentPanel);
@@ -340,11 +346,6 @@
         }
     }
 
-    void resizeGrid() {
-        final int itemCount = mAdapter.getCount();
-        mGridView.setNumColumns(Math.min(itemCount, mMaxColumns));
-    }
-
     void dismiss() {
         if (!isFinishing()) {
             finish();
@@ -419,19 +420,24 @@
     protected void onRestoreInstanceState(Bundle savedInstanceState) {
         super.onRestoreInstanceState(savedInstanceState);
         if (mAlwaysUseOption) {
-            final int checkedPos = mGridView.getCheckedItemPosition();
+            final int checkedPos = mListView.getCheckedItemPosition();
             final boolean hasValidSelection = checkedPos != ListView.INVALID_POSITION;
             mLastSelected = checkedPos;
             setAlwaysButtonEnabled(hasValidSelection, checkedPos, true);
             mOnceButton.setEnabled(hasValidSelection);
             if (hasValidSelection) {
-                mGridView.setSelection(checkedPos);
+                mListView.setSelection(checkedPos);
             }
         }
     }
 
     @Override
     public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        position -= mListView.getHeaderViewsCount();
+        if (position < 0) {
+            // Header views don't count.
+            return;
+        }
         ResolveInfo resolveInfo = mAdapter.resolveInfoForPosition(position, true);
         if (mResolvingHome && hasManagedProfile()
                 && !supportsManagedProfiles(resolveInfo)) {
@@ -441,13 +447,13 @@
                     Toast.LENGTH_LONG).show();
             return;
         }
-        final int checkedPos = mGridView.getCheckedItemPosition();
+        final int checkedPos = mListView.getCheckedItemPosition();
         final boolean hasValidSelection = checkedPos != ListView.INVALID_POSITION;
         if (mAlwaysUseOption && (!hasValidSelection || mLastSelected != checkedPos)) {
             setAlwaysButtonEnabled(hasValidSelection, checkedPos, true);
             mOnceButton.setEnabled(hasValidSelection);
             if (hasValidSelection) {
-                mGridView.smoothScrollToPosition(checkedPos);
+                mListView.smoothScrollToPosition(checkedPos);
             }
             mLastSelected = checkedPos;
         } else {
@@ -504,7 +510,7 @@
     public void onButtonClick(View v) {
         final int id = v.getId();
         startSelected(mAlwaysUseOption ?
-                mGridView.getCheckedItemPosition() : mAdapter.getFilteredPosition(),
+                mListView.getCheckedItemPosition() : mAdapter.getFilteredPosition(),
                 id == R.id.button_always,
                 mAlwaysUseOption);
         dismiss();
@@ -714,8 +720,6 @@
             if (newItemCount == 0) {
                 // We no longer have any items...  just finish the activity.
                 finish();
-            } else if (newItemCount != oldItemCount) {
-                resizeGrid();
             }
         }
 
@@ -957,19 +961,13 @@
         }
 
         public View getView(int position, View convertView, ViewGroup parent) {
-            View view;
-            if (convertView == null) {
+            View view = convertView;
+            if (view == null) {
                 view = mInflater.inflate(
                         com.android.internal.R.layout.resolve_list_item, parent, false);
 
                 final ViewHolder holder = new ViewHolder(view);
                 view.setTag(holder);
-
-                // Fix the icon size even if we have different sized resources
-                ViewGroup.LayoutParams lp = holder.icon.getLayoutParams();
-                lp.width = lp.height = mIconSize;
-            } else {
-                view = convertView;
             }
             bindView(view, getItem(position));
             return view;
@@ -1007,6 +1005,11 @@
 
         @Override
         public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
+            position -= mListView.getHeaderViewsCount();
+            if (position < 0) {
+                // Header views don't count.
+                return false;
+            }
             ResolveInfo ri = mAdapter.resolveInfoForPosition(position, true);
             showAppDetails(ri);
             return true;
diff --git a/core/java/com/android/internal/app/ToolbarActionBar.java b/core/java/com/android/internal/app/ToolbarActionBar.java
index abe8a9f..99c87ea 100644
--- a/core/java/com/android/internal/app/ToolbarActionBar.java
+++ b/core/java/com/android/internal/app/ToolbarActionBar.java
@@ -22,6 +22,7 @@
 import android.content.Context;
 import android.content.res.Configuration;
 import android.graphics.drawable.Drawable;
+import android.text.TextUtils;
 import android.view.ActionMode;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -32,7 +33,9 @@
 import android.view.WindowCallbackWrapper;
 import android.widget.SpinnerAdapter;
 import android.widget.Toolbar;
+import com.android.internal.R;
 import com.android.internal.view.menu.MenuBuilder;
+import com.android.internal.view.menu.MenuPresenter;
 import com.android.internal.widget.DecorToolbar;
 import com.android.internal.widget.ToolbarWidgetWrapper;
 
@@ -43,6 +46,9 @@
     private DecorToolbar mDecorToolbar;
     private boolean mToolbarMenuPrepared;
     private Window.Callback mWindowCallback;
+    private boolean mMenuCallbackSet;
+
+    private CharSequence mHomeDescription;
 
     private boolean mLastMenuVisibility;
     private ArrayList<OnMenuVisibilityListener> mMenuVisibilityListeners =
@@ -70,6 +76,8 @@
         mDecorToolbar.setWindowCallback(mWindowCallback);
         toolbar.setOnMenuItemClickListener(mMenuClicker);
         mDecorToolbar.setWindowTitle(title);
+        mHomeDescription = mToolbar.getNavigationContentDescription();
+        updateNavDescription();
     }
 
     public Window.Callback getWrappedWindowCallback() {
@@ -161,6 +169,7 @@
     @Override
     public void setHomeActionContentDescription(CharSequence description) {
         mToolbar.setNavigationContentDescription(description);
+        mHomeDescription = description;
     }
 
     @Override
@@ -171,6 +180,7 @@
     @Override
     public void setHomeActionContentDescription(int resId) {
         mToolbar.setNavigationContentDescription(resId);
+        mHomeDescription = mToolbar.getNavigationContentDescription();
     }
 
     @Override
@@ -247,8 +257,22 @@
 
     @Override
     public void setDisplayOptions(@DisplayOptions int options, @DisplayOptions int mask) {
-        mDecorToolbar.setDisplayOptions((options & mask) |
-                mDecorToolbar.getDisplayOptions() & ~mask);
+        final int currentOptions = mDecorToolbar.getDisplayOptions();
+        final int changed = (options ^ currentOptions) & mask;
+        mDecorToolbar.setDisplayOptions(options & mask | currentOptions & ~mask);
+        if ((changed & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+            updateNavDescription();
+        }
+    }
+
+    private void updateNavDescription() {
+        if ((mDecorToolbar.getDisplayOptions() & ActionBar.DISPLAY_HOME_AS_UP) != 0) {
+            if (TextUtils.isEmpty(mHomeDescription)) {
+                mToolbar.setNavigationContentDescription(R.string.action_bar_up_description);
+            } else {
+                mToolbar.setNavigationContentDescription(mHomeDescription);
+            }
+        }
     }
 
     @Override
@@ -431,6 +455,10 @@
     }
 
     void populateOptionsMenu() {
+        if (!mMenuCallbackSet) {
+            mToolbar.setMenuCallbacks(new ActionMenuPresenterCallback(), new MenuBuilderCallback());
+            mMenuCallbackSet = true;
+        }
         final Menu menu = mToolbar.getMenu();
         final MenuBuilder mb = menu instanceof MenuBuilder ? (MenuBuilder) menu : null;
         if (mb != null) {
@@ -492,4 +520,51 @@
             return result;
         }
     }
+
+    private final class ActionMenuPresenterCallback implements MenuPresenter.Callback {
+        private boolean mClosingActionMenu;
+
+        @Override
+        public boolean onOpenSubMenu(MenuBuilder subMenu) {
+            if (mWindowCallback != null) {
+                mWindowCallback.onMenuOpened(Window.FEATURE_ACTION_BAR, subMenu);
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public void onCloseMenu(MenuBuilder menu, boolean allMenusAreClosing) {
+            if (mClosingActionMenu) {
+                return;
+            }
+
+            mClosingActionMenu = true;
+            mToolbar.dismissPopupMenus();
+            if (mWindowCallback != null) {
+                mWindowCallback.onPanelClosed(Window.FEATURE_ACTION_BAR, menu);
+            }
+            mClosingActionMenu = false;
+        }
+    }
+
+    private final class MenuBuilderCallback implements MenuBuilder.Callback {
+
+        @Override
+        public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
+            return false;
+        }
+
+        @Override
+        public void onMenuModeChange(MenuBuilder menu) {
+            if (mWindowCallback != null) {
+                if (mToolbar.isOverflowMenuShowing()) {
+                    mWindowCallback.onPanelClosed(Window.FEATURE_ACTION_BAR, menu);
+                } else if (mWindowCallback.onPreparePanel(Window.FEATURE_OPTIONS_PANEL,
+                        null, menu)) {
+                    mWindowCallback.onMenuOpened(Window.FEATURE_ACTION_BAR, menu);
+                }
+            }
+        }
+    }
 }
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index c17f4ee..7bdb4be 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -390,7 +390,10 @@
         if (!emulated && (checkBoth || prefer == RECOMMEND_INSTALL_EXTERNAL)) {
             final File target = new UserEnvironment(UserHandle.USER_OWNER)
                     .getExternalStorageDirectory();
-            fitsOnExternal = (sizeBytes <= storage.getStorageBytesUntilLow(target));
+            // External is only an option when size is known
+            if (sizeBytes > 0) {
+                fitsOnExternal = (sizeBytes <= storage.getStorageBytesUntilLow(target));
+            }
         }
 
         if (prefer == RECOMMEND_INSTALL_INTERNAL) {
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 69cdbff..45a9dde 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -94,7 +94,7 @@
     private static final int MAGIC = 0xBA757475; // 'BATSTATS'
 
     // Current on-disk Parcel version
-    private static final int VERSION = 113 + (USE_OLD_HISTORY ? 1000 : 0);
+    private static final int VERSION = 114 + (USE_OLD_HISTORY ? 1000 : 0);
 
     // Maximum number of items we will record in the history.
     private static final int MAX_HISTORY_ITEMS = 2000;
@@ -385,10 +385,9 @@
 
     String mLastWakeupReason = null;
     long mLastWakeupUptimeMs = 0;
-    private final HashMap<String, LongSamplingCounter> mWakeupReasonStats =
-            new HashMap<String, LongSamplingCounter>();
+    private final HashMap<String, SamplingTimer> mWakeupReasonStats = new HashMap<>();
 
-    public Map<String, ? extends LongCounter> getWakeupReasonStats() {
+    public Map<String, ? extends Timer> getWakeupReasonStats() {
         return mWakeupReasonStats;
     }
 
@@ -1131,6 +1130,10 @@
             mCurrentReportedCount = count;
         }
 
+        public void addCurrentReportedCount(int delta) {
+            updateCurrentReportedCount(mCurrentReportedCount + delta);
+        }
+
         public void updateCurrentReportedTotalTime(long totalTime) {
             if (mTimeBaseRunning && mUnpluggedReportedTotalTime == 0) {
                 // Updating the reported value for the first time.
@@ -1141,6 +1144,10 @@
             mCurrentReportedTotalTime = totalTime;
         }
 
+        public void addCurrentReportedTotalTime(long delta) {
+            updateCurrentReportedTotalTime(mCurrentReportedTotalTime + delta);
+        }
+
         public void onTimeStarted(long elapsedRealtime, long baseUptime, long baseRealtime) {
             super.onTimeStarted(elapsedRealtime, baseUptime, baseRealtime);
             if (mTrackingReportedValues) {
@@ -1688,13 +1695,13 @@
      * Get the wakeup reason counter, and create a new one if one
      * doesn't already exist.
      */
-    public LongSamplingCounter getWakeupReasonCounterLocked(String name) {
-        LongSamplingCounter counter = mWakeupReasonStats.get(name);
-        if (counter == null) {
-            counter = new LongSamplingCounter(mOnBatteryScreenOffTimeBase);
-            mWakeupReasonStats.put(name, counter);
+    public SamplingTimer getWakeupReasonTimerLocked(String name) {
+        SamplingTimer timer = mWakeupReasonStats.get(name);
+        if (timer == null) {
+            timer = new SamplingTimer(mOnBatteryTimeBase, true);
+            mWakeupReasonStats.put(name, timer);
         }
-        return counter;
+        return timer;
     }
 
     private final Map<String, KernelWakelockStats> readKernelWakelockStats() {
@@ -2753,8 +2760,9 @@
     void aggregateLastWakeupUptimeLocked(long uptimeMs) {
         if (mLastWakeupReason != null) {
             long deltaUptime = uptimeMs - mLastWakeupUptimeMs;
-            LongSamplingCounter timer = getWakeupReasonCounterLocked(mLastWakeupReason);
-            timer.addCountLocked(deltaUptime);
+            SamplingTimer timer = getWakeupReasonTimerLocked(mLastWakeupReason);
+            timer.addCurrentReportedCount(1);
+            timer.addCurrentReportedTotalTime(deltaUptime * 1000); // time is in microseconds
             mLastWakeupReason = null;
         }
     }
@@ -2762,7 +2770,7 @@
     public void noteWakeupReasonLocked(String reason) {
         final long elapsedRealtime = SystemClock.elapsedRealtime();
         final long uptime = SystemClock.uptimeMillis();
-        if (DEBUG_HISTORY) Slog.v(TAG, "Wakeup reason reason \"" + reason +"\": "
+        if (DEBUG_HISTORY) Slog.v(TAG, "Wakeup reason \"" + reason +"\": "
                 + Integer.toHexString(mHistoryCur.states));
         aggregateLastWakeupUptimeLocked(uptime);
         mHistoryCur.wakeReasonTag = mHistoryCur.localWakeReasonTag;
@@ -6193,7 +6201,7 @@
         }
 
         public void noteStartJobLocked(String name, long elapsedRealtimeMs) {
-            StopwatchTimer t = mJobStats.stopObject(name);
+            StopwatchTimer t = mJobStats.startObject(name);
             if (t != null) {
                 t.startRunningLocked(elapsedRealtimeMs);
             }
@@ -6636,8 +6644,8 @@
         }
 
         if (mWakeupReasonStats.size() > 0) {
-            for (LongSamplingCounter timer : mWakeupReasonStats.values()) {
-                mOnBatteryScreenOffTimeBase.remove(timer);
+            for (SamplingTimer timer : mWakeupReasonStats.values()) {
+                mOnBatteryTimeBase.remove(timer);
             }
             mWakeupReasonStats.clear();
         }
@@ -7848,7 +7856,7 @@
         for (int iwr = 0; iwr < NWR; iwr++) {
             if (in.readInt() != 0) {
                 String reasonName = in.readString();
-                getWakeupReasonCounterLocked(reasonName).readSummaryFromParcelLocked(in);
+                getWakeupReasonTimerLocked(reasonName).readSummaryFromParcelLocked(in);
             }
         }
 
@@ -8122,12 +8130,12 @@
         }
 
         out.writeInt(mWakeupReasonStats.size());
-        for (Map.Entry<String, LongSamplingCounter> ent : mWakeupReasonStats.entrySet()) {
-            LongSamplingCounter counter = ent.getValue();
-            if (counter != null) {
+        for (Map.Entry<String, SamplingTimer> ent : mWakeupReasonStats.entrySet()) {
+            SamplingTimer timer = ent.getValue();
+            if (timer != null) {
                 out.writeInt(1);
                 out.writeString(ent.getKey());
-                counter.writeSummaryFromParcelLocked(out);
+                timer.writeSummaryFromParcelLocked(out, NOWREAL_SYS);
             } else {
                 out.writeInt(0);
             }
@@ -8438,7 +8446,7 @@
         for (int ikw = 0; ikw < NKW; ikw++) {
             if (in.readInt() != 0) {
                 String wakelockName = in.readString();
-                SamplingTimer kwlt = new SamplingTimer(mOnBatteryTimeBase, in);
+                SamplingTimer kwlt = new SamplingTimer(mOnBatteryScreenOffTimeBase, in);
                 mKernelWakelockStats.put(wakelockName, kwlt);
             }
         }
@@ -8448,9 +8456,8 @@
         for (int iwr = 0; iwr < NWR; iwr++) {
             if (in.readInt() != 0) {
                 String reasonName = in.readString();
-                LongSamplingCounter counter = new LongSamplingCounter(mOnBatteryScreenOffTimeBase,
-                        in);
-                mWakeupReasonStats.put(reasonName, counter);
+                SamplingTimer timer = new SamplingTimer(mOnBatteryTimeBase, in);
+                mWakeupReasonStats.put(reasonName, timer);
             }
         }
 
@@ -8585,12 +8592,12 @@
                 }
             }
             out.writeInt(mWakeupReasonStats.size());
-            for (Map.Entry<String, LongSamplingCounter> ent : mWakeupReasonStats.entrySet()) {
-                LongSamplingCounter counter = ent.getValue();
-                if (counter != null) {
+            for (Map.Entry<String, SamplingTimer> ent : mWakeupReasonStats.entrySet()) {
+                SamplingTimer timer = ent.getValue();
+                if (timer != null) {
                     out.writeInt(1);
                     out.writeString(ent.getKey());
-                    counter.writeToParcel(out);
+                    timer.writeToParcel(out, uSecRealtime);
                 } else {
                     out.writeInt(0);
                 }
diff --git a/core/java/com/android/internal/os/ProcessCpuTracker.java b/core/java/com/android/internal/os/ProcessCpuTracker.java
index e58d68f..86f580d 100644
--- a/core/java/com/android/internal/os/ProcessCpuTracker.java
+++ b/core/java/com/android/internal/os/ProcessCpuTracker.java
@@ -64,7 +64,9 @@
 
     /** Stores user time and system time in 100ths of a second. */
     private final long[] mProcessStatsData = new long[4];
-    /** Stores user time and system time in 100ths of a second. */
+
+    /** Stores user time and system time in 100ths of a second.  Used for
+     * public API to retrieve CPU use for a process.  Must lock while in use. */
     private final long[] mSinglePidStatsData = new long[4];
 
     private static final int[] PROCESS_FULL_STATS_FORMAT = new int[] {
@@ -533,18 +535,20 @@
 
     /**
      * Returns the total time (in clock ticks, or 1/100 sec) spent executing in
-     * both user and system code.
+     * both user and system code.  Safe to call without lock held.
      */
     public long getCpuTimeForPid(int pid) {
-        final String statFile = "/proc/" + pid + "/stat";
-        final long[] statsData = mSinglePidStatsData;
-        if (Process.readProcFile(statFile, PROCESS_STATS_FORMAT,
-                null, statsData, null)) {
-            long time = statsData[PROCESS_STAT_UTIME]
-                    + statsData[PROCESS_STAT_STIME];
-            return time;
+        synchronized (mSinglePidStatsData) {
+            final String statFile = "/proc/" + pid + "/stat";
+            final long[] statsData = mSinglePidStatsData;
+            if (Process.readProcFile(statFile, PROCESS_STATS_FORMAT,
+                    null, statsData, null)) {
+                long time = statsData[PROCESS_STAT_UTIME]
+                        + statsData[PROCESS_STAT_STIME];
+                return time;
+            }
+            return 0;
         }
-        return 0;
     }
 
     /**
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 54c532a..c579a15 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -20,9 +20,12 @@
 import dalvik.system.ZygoteHooks;
 import android.system.ErrnoException;
 import android.system.Os;
+import android.os.SystemClock;
+import android.util.Slog;
 
 /** @hide */
 public final class Zygote {
+    private static final String TAG = "Zygote";
     /*
     * Bit values for "debugFlags" argument.  The definitions are duplicated
     * in the native code.
@@ -75,21 +78,41 @@
      * file descriptor numbers that are to be closed by the child
      * (and replaced by /dev/null) after forking.  An integer value
      * of -1 in any entry in the array means "ignore this one".
+     * @param instructionSet null-ok the instruction set to use.
      *
      * @return 0 if this is the child, pid of the child
      * if this is the parent, or -1 on error.
      */
     public static int forkAndSpecialize(int uid, int gid, int[] gids, int debugFlags,
-          int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose) {
+          int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose,
+          String instructionSet) {
+        long startTime = SystemClock.elapsedRealtime();
         VM_HOOKS.preFork();
+        checkTime(startTime, "Zygote.preFork");
         int pid = nativeForkAndSpecialize(
-                  uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose);
+                  uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose,
+                  instructionSet);
+        checkTime(startTime, "Zygote.nativeForkAndSpecialize");
         VM_HOOKS.postForkCommon();
+        checkTime(startTime, "Zygote.postForkCommon");
         return pid;
     }
 
     native private static int nativeForkAndSpecialize(int uid, int gid, int[] gids,int debugFlags,
-          int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose);
+          int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose,
+          String instructionSet);
+
+    /**
+     * Temporary hack: check time since start time and log if over a fixed threshold.
+     *
+     */
+    private static void checkTime(long startTime, String where) {
+        long now = SystemClock.elapsedRealtime();
+        if ((now-startTime) > 1000) {
+            // If we are taking more than a second, log about it.
+            Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where);
+        }
+    }
 
     /**
      * Special method to start the system server process. In addition to the
@@ -126,8 +149,10 @@
     native private static int nativeForkSystemServer(int uid, int gid, int[] gids, int debugFlags,
             int[][] rlimits, long permittedCapabilities, long effectiveCapabilities);
 
-    private static void callPostForkChildHooks(int debugFlags) {
-        VM_HOOKS.postForkChild(debugFlags);
+    private static void callPostForkChildHooks(int debugFlags, String instructionSet) {
+        long startTime = SystemClock.elapsedRealtime();
+        VM_HOOKS.postForkChild(debugFlags, instructionSet);
+        checkTime(startTime, "Zygote.callPostForkChildHooks");
     }
 
 
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 43ebb3d..fb50b25 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -37,6 +37,8 @@
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import libcore.io.IoUtils;
+import android.os.SystemClock;
+import android.util.Slog;
 
 /**
  * A connection that can make spawn requests.
@@ -103,11 +105,23 @@
     }
 
     /**
+     * Temporary hack: check time since start time and log if over a fixed threshold.
+     *
+     */
+    private void checkTime(long startTime, String where) {
+        long now = SystemClock.elapsedRealtime();
+        if ((now-startTime) > 1000) {
+            // If we are taking more than a second, log about it.
+            Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where);
+        }
+    }
+
+    /**
      * Returns the file descriptor of the associated socket.
      *
      * @return null-ok; file descriptor
      */
-    FileDescriptor getFileDesciptor() {
+    FileDescriptor getFileDescriptor() {
         return mSocket.getFileDescriptor();
     }
 
@@ -131,6 +145,8 @@
         Arguments parsedArgs = null;
         FileDescriptor[] descriptors;
 
+        long startTime = SystemClock.elapsedRealtime();
+
         try {
             args = readArgumentList();
             descriptors = mSocket.getAncillaryFileDescriptors();
@@ -140,6 +156,7 @@
             return true;
         }
 
+        checkTime(startTime, "zygoteConnection.runOnce: readArgumentList");
         if (args == null) {
             // EOF reached.
             closeSocket();
@@ -171,14 +188,19 @@
                         ", effective=0x" + Long.toHexString(parsedArgs.effectiveCapabilities));
             }
 
+
             applyUidSecurityPolicy(parsedArgs, peer, peerSecurityContext);
             applyRlimitSecurityPolicy(parsedArgs, peer, peerSecurityContext);
             applyInvokeWithSecurityPolicy(parsedArgs, peer, peerSecurityContext);
             applyseInfoSecurityPolicy(parsedArgs, peer, peerSecurityContext);
 
+            checkTime(startTime, "zygoteConnection.runOnce: apply security policies");
+
             applyDebuggerSystemProperty(parsedArgs);
             applyInvokeWithSystemProperty(parsedArgs);
 
+            checkTime(startTime, "zygoteConnection.runOnce: apply security policies");
+
             int[][] rlimits = null;
 
             if (parsedArgs.rlimits != null) {
@@ -220,9 +242,11 @@
 
             fd = null;
 
+            checkTime(startTime, "zygoteConnection.runOnce: preForkAndSpecialize");
             pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids,
                     parsedArgs.debugFlags, rlimits, parsedArgs.mountExternal, parsedArgs.seInfo,
-                    parsedArgs.niceName, fdsToClose);
+                    parsedArgs.niceName, fdsToClose, parsedArgs.instructionSet);
+            checkTime(startTime, "zygoteConnection.runOnce: postForkAndSpecialize");
         } catch (IOException ex) {
             logAndPrintError(newStderr, "Exception creating pipe", ex);
         } catch (ErrnoException ex) {
@@ -311,6 +335,7 @@
      *      [--] &lt;args for RuntimeInit &gt;
      *   <li> If <code>--runtime-init</code> is absent:
      *      [--] &lt;classname&gt; [args...]
+     *   <li> --instruction-set=<i>instruction-set-string</i> which instruction set to use/emulate.
      * </ul>
      */
     static class Arguments {
@@ -374,6 +399,11 @@
         boolean abiListQuery;
 
         /**
+         * The instruction set to use, or null when not important.
+         */
+        String instructionSet;
+
+        /**
          * Constructs instance and parses args
          * @param args zygote command-line args
          * @throws IllegalArgumentException
@@ -528,6 +558,8 @@
                     mountExternal = Zygote.MOUNT_EXTERNAL_MULTIUSER_ALL;
                 } else if (arg.equals("--query-abi-list")) {
                     abiListQuery = true;
+                } else if (arg.startsWith("--instruction-set=")) {
+                    instructionSet = arg.substring(arg.indexOf('=') + 1);
                 } else {
                     break;
                 }
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 051de6e..0aee0e3 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -770,7 +770,7 @@
             } else if (index == 0) {
                 ZygoteConnection newPeer = acceptCommandPeer(abiList);
                 peers.add(newPeer);
-                fds.add(newPeer.getFileDesciptor());
+                fds.add(newPeer.getFileDescriptor());
             } else {
                 boolean done;
                 done = peers.get(index).runOnce();
diff --git a/core/java/com/android/internal/util/ArrayUtils.java b/core/java/com/android/internal/util/ArrayUtils.java
index 3ed4d51..8e786da 100644
--- a/core/java/com/android/internal/util/ArrayUtils.java
+++ b/core/java/com/android/internal/util/ArrayUtils.java
@@ -107,7 +107,7 @@
             return (T[]) EmptyArray.OBJECT;
         }
 
-        int bucket = ((System.identityHashCode(kind) / 8) & 0x7FFFFFFF) % CACHE_SIZE;
+        int bucket = (kind.hashCode() & 0x7FFFFFFF) % CACHE_SIZE;
         Object cache = sCache[bucket];
 
         if (cache == null || cache.getClass().getComponentType() != kind) {
diff --git a/core/java/com/android/internal/util/ImageUtils.java b/core/java/com/android/internal/util/ImageUtils.java
index a5ce6e0ca..c153904 100644
--- a/core/java/com/android/internal/util/ImageUtils.java
+++ b/core/java/com/android/internal/util/ImageUtils.java
@@ -17,6 +17,10 @@
 package com.android.internal.util;
 
 import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
 
 /**
  * Utility class for image analysis and processing.
@@ -31,17 +35,49 @@
     // Alpha amount for which values below are considered transparent.
     private static final int ALPHA_TOLERANCE = 50;
 
+    // Size of the smaller bitmap we're actually going to scan.
+    private static final int COMPACT_BITMAP_SIZE = 64; // pixels
+
     private int[] mTempBuffer;
+    private Bitmap mTempCompactBitmap;
+    private Canvas mTempCompactBitmapCanvas;
+    private Paint mTempCompactBitmapPaint;
+    private final Matrix mTempMatrix = new Matrix();
 
     /**
      * Checks whether a bitmap is grayscale. Grayscale here means "very close to a perfect
      * gray".
+     *
+     * Instead of scanning every pixel in the bitmap, we first resize the bitmap to no more than
+     * COMPACT_BITMAP_SIZE^2 pixels using filtering. The hope is that any non-gray color elements
+     * will survive the squeezing process, contaminating the result with color.
      */
     public boolean isGrayscale(Bitmap bitmap) {
-        final int height = bitmap.getHeight();
-        final int width = bitmap.getWidth();
-        int size = height*width;
+        int height = bitmap.getHeight();
+        int width = bitmap.getWidth();
 
+        // shrink to a more manageable (yet hopefully no more or less colorful) size
+        if (height > COMPACT_BITMAP_SIZE || width > COMPACT_BITMAP_SIZE) {
+            if (mTempCompactBitmap == null) {
+                mTempCompactBitmap = Bitmap.createBitmap(
+                        COMPACT_BITMAP_SIZE, COMPACT_BITMAP_SIZE, Bitmap.Config.ARGB_8888
+                );
+                mTempCompactBitmapCanvas = new Canvas(mTempCompactBitmap);
+                mTempCompactBitmapPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+                mTempCompactBitmapPaint.setFilterBitmap(true);
+            }
+            mTempMatrix.reset();
+            mTempMatrix.setScale(
+                    (float) COMPACT_BITMAP_SIZE / width,
+                    (float) COMPACT_BITMAP_SIZE / height,
+                    0, 0);
+            mTempCompactBitmapCanvas.drawColor(0, PorterDuff.Mode.SRC); // select all, erase
+            mTempCompactBitmapCanvas.drawBitmap(bitmap, mTempMatrix, mTempCompactBitmapPaint);
+            bitmap = mTempCompactBitmap;
+            width = height = COMPACT_BITMAP_SIZE;
+        }
+
+        final int size = height*width;
         ensureBufferSize(size);
         bitmap.getPixels(mTempBuffer, 0, width, 0, 0, width, height);
         for (int i = 0; i < size; i++) {
diff --git a/core/java/com/android/internal/util/NotificationColorUtil.java b/core/java/com/android/internal/util/NotificationColorUtil.java
index 665055c..3249ea3 100644
--- a/core/java/com/android/internal/util/NotificationColorUtil.java
+++ b/core/java/com/android/internal/util/NotificationColorUtil.java
@@ -50,23 +50,36 @@
     private final WeakHashMap<Bitmap, Pair<Boolean, Integer>> mGrayscaleBitmapCache =
             new WeakHashMap<Bitmap, Pair<Boolean, Integer>>();
 
-    public static NotificationColorUtil getInstance() {
+    private final int mGrayscaleIconMaxSize; // @dimen/notification_large_icon_width (64dp)
+
+    public static NotificationColorUtil getInstance(Context context) {
         synchronized (sLock) {
             if (sInstance == null) {
-                sInstance = new NotificationColorUtil();
+                sInstance = new NotificationColorUtil(context);
             }
             return sInstance;
         }
     }
 
+    private NotificationColorUtil(Context context) {
+        mGrayscaleIconMaxSize = context.getResources().getDimensionPixelSize(
+                com.android.internal.R.dimen.notification_large_icon_width);
+    }
+
     /**
-     * Checks whether a bitmap is grayscale. Grayscale here means "very close to a perfect
-     * gray".
+     * Checks whether a Bitmap is a small grayscale icon.
+     * Grayscale here means "very close to a perfect gray"; icon means "no larger than 64dp".
      *
      * @param bitmap The bitmap to test.
-     * @return Whether the bitmap is grayscale.
+     * @return True if the bitmap is grayscale; false if it is color or too large to examine.
      */
-    public boolean isGrayscale(Bitmap bitmap) {
+    public boolean isGrayscaleIcon(Bitmap bitmap) {
+        // quick test: reject large bitmaps
+        if (bitmap.getWidth() > mGrayscaleIconMaxSize
+                || bitmap.getHeight() > mGrayscaleIconMaxSize) {
+            return false;
+        }
+
         synchronized (sLock) {
             Pair<Boolean, Integer> cached = mGrayscaleBitmapCache.get(bitmap);
             if (cached != null) {
@@ -92,22 +105,22 @@
     }
 
     /**
-     * Checks whether a drawable is grayscale. Grayscale here means "very close to a perfect
-     * gray".
+     * Checks whether a Drawable is a small grayscale icon.
+     * Grayscale here means "very close to a perfect gray"; icon means "no larger than 64dp".
      *
      * @param d The drawable to test.
-     * @return Whether the drawable is grayscale.
+     * @return True if the bitmap is grayscale; false if it is color or too large to examine.
      */
-    public boolean isGrayscale(Drawable d) {
+    public boolean isGrayscaleIcon(Drawable d) {
         if (d == null) {
             return false;
         } else if (d instanceof BitmapDrawable) {
             BitmapDrawable bd = (BitmapDrawable) d;
-            return bd.getBitmap() != null && isGrayscale(bd.getBitmap());
+            return bd.getBitmap() != null && isGrayscaleIcon(bd.getBitmap());
         } else if (d instanceof AnimationDrawable) {
             AnimationDrawable ad = (AnimationDrawable) d;
             int count = ad.getNumberOfFrames();
-            return count > 0 && isGrayscale(ad.getFrame(0));
+            return count > 0 && isGrayscaleIcon(ad.getFrame(0));
         } else if (d instanceof VectorDrawable) {
             // We just assume you're doing the right thing if using vectors
             return true;
@@ -117,16 +130,16 @@
     }
 
     /**
-     * Checks whether a drawable with a resoure id is grayscale. Grayscale here means "very close
-     * to a perfect gray".
+     * Checks whether a drawable with a resoure id is a small grayscale icon.
+     * Grayscale here means "very close to a perfect gray"; icon means "no larger than 64dp".
      *
      * @param context The context to load the drawable from.
-     * @return Whether the drawable is grayscale.
+     * @return True if the bitmap is grayscale; false if it is color or too large to examine.
      */
-    public boolean isGrayscale(Context context, int drawableResId) {
+    public boolean isGrayscaleIcon(Context context, int drawableResId) {
         if (drawableResId != 0) {
             try {
-                return isGrayscale(context.getDrawable(drawableResId));
+                return isGrayscaleIcon(context.getDrawable(drawableResId));
             } catch (Resources.NotFoundException ex) {
                 Log.e(TAG, "Drawable not found: " + drawableResId);
                 return false;
diff --git a/core/java/com/android/internal/util/ParcelableString.java b/core/java/com/android/internal/util/ParcelableString.java
new file mode 100644
index 0000000..6bd856f
--- /dev/null
+++ b/core/java/com/android/internal/util/ParcelableString.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 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.internal.util;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Helper class to adapt a simple String to cases where a Parcelable is expected.
+ * @hide
+ */
+public class ParcelableString implements Parcelable {
+    public String string;
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeString(string);
+    }
+
+    public static final Parcelable.Creator<ParcelableString> CREATOR =
+            new Parcelable.Creator<ParcelableString>() {
+                @Override
+                public ParcelableString createFromParcel(Parcel in) {
+                    ParcelableString ret = new ParcelableString();
+                    ret.string = in.readString();
+                    return ret;
+                }
+                @Override
+                public ParcelableString[] newArray(int size) {
+                    return new ParcelableString[size];
+                }
+    };
+}
\ No newline at end of file
diff --git a/core/java/com/android/internal/util/XmlUtils.java b/core/java/com/android/internal/util/XmlUtils.java
index 7db70ba..45d790b 100644
--- a/core/java/com/android/internal/util/XmlUtils.java
+++ b/core/java/com/android/internal/util/XmlUtils.java
@@ -1440,6 +1440,16 @@
         return Boolean.parseBoolean(value);
     }
 
+    public static boolean readBooleanAttribute(XmlPullParser in, String name,
+            boolean defaultValue) {
+        final String value = in.getAttributeValue(null, name);
+        if (value == null) {
+            return defaultValue;
+        } else {
+            return Boolean.parseBoolean(value);
+        }
+    }
+
     public static void writeBooleanAttribute(XmlSerializer out, String name, boolean value)
             throws IOException {
         out.attribute(null, name, Boolean.toString(value));
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index b1f5d90..e19b2b6 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -437,7 +437,7 @@
                         return;
                     }
                     args.callback.setRequestUpdateCursorAnchorInfoResult(
-                            ic.requestUpdateCursorAnchorInfo(msg.arg1), args.seq);
+                            ic.requestCursorUpdates(msg.arg1), args.seq);
                 } catch (RemoteException e) {
                     Log.w(TAG, "Got RemoteException calling requestCursorAnchorInfo", e);
                 }
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index a8526c8..0c65ad1 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -428,7 +428,7 @@
         }
     }
 
-    public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+    public boolean requestCursorUpdates(int cursorUpdateMode) {
         boolean result = false;
         try {
             InputContextCallback callback = InputContextCallback.getInstance();
@@ -445,4 +445,11 @@
         }
         return result;
     }
+
+    /**
+     * @removed
+     */
+    public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+        return requestCursorUpdates(cursorUpdateMode);
+    }
 }
diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java
index c7ac815..062a9b1 100644
--- a/core/java/com/android/internal/widget/ActionBarContextView.java
+++ b/core/java/com/android/internal/widget/ActionBarContextView.java
@@ -59,6 +59,7 @@
     private int mSubtitleStyleRes;
     private Drawable mSplitBackground;
     private boolean mTitleOptional;
+    private int mCloseItemLayout;
 
     private Animator mCurrentAnimation;
     private boolean mAnimateInOnLayout;
@@ -99,6 +100,10 @@
         mSplitBackground = a.getDrawable(
                 com.android.internal.R.styleable.ActionMode_backgroundSplit);
 
+        mCloseItemLayout = a.getResourceId(
+                com.android.internal.R.styleable.ActionMode_closeItemLayout,
+                R.layout.action_mode_close_item);
+
         a.recycle();
     }
 
@@ -120,7 +125,7 @@
                         LayoutParams.MATCH_PARENT);
                 if (!split) {
                     mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
-                    mMenuView.setBackgroundDrawable(null);
+                    mMenuView.setBackground(null);
                     final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
                     if (oldParent != null) oldParent.removeView(mMenuView);
                     addView(mMenuView, layoutParams);
@@ -134,7 +139,7 @@
                     layoutParams.width = LayoutParams.MATCH_PARENT;
                     layoutParams.height = mContentHeight;
                     mMenuView = (ActionMenuView) mActionMenuPresenter.getMenuView(this);
-                    mMenuView.setBackgroundDrawable(mSplitBackground);
+                    mMenuView.setBackground(mSplitBackground);
                     final ViewGroup oldParent = (ViewGroup) mMenuView.getParent();
                     if (oldParent != null) oldParent.removeView(mMenuView);
                     mSplitView.addView(mMenuView, layoutParams);
@@ -211,7 +216,7 @@
     public void initForMode(final ActionMode mode) {
         if (mClose == null) {
             LayoutInflater inflater = LayoutInflater.from(mContext);
-            mClose = inflater.inflate(R.layout.action_mode_close_item, this, false);
+            mClose = inflater.inflate(mCloseItemLayout, this, false);
             addView(mClose);
         } else if (mClose.getParent() == null) {
             addView(mClose);
diff --git a/core/java/com/android/internal/widget/EditableInputConnection.java b/core/java/com/android/internal/widget/EditableInputConnection.java
index ba236f3..f211ff2 100644
--- a/core/java/com/android/internal/widget/EditableInputConnection.java
+++ b/core/java/com/android/internal/widget/EditableInputConnection.java
@@ -188,13 +188,13 @@
     }
 
     @Override
-    public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+    public boolean requestCursorUpdates(int cursorUpdateMode) {
         if (DEBUG) Log.v(TAG, "requestUpdateCursorAnchorInfo " + cursorUpdateMode);
 
         // It is possible that any other bit is used as a valid flag in a future release.
         // We should reject the entire request in such a case.
-        final int KNOWN_FLAGS_MASK = InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE |
-                InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR;
+        final int KNOWN_FLAGS_MASK = InputConnection.CURSOR_UPDATE_IMMEDIATE |
+                InputConnection.CURSOR_UPDATE_MONITOR;
         final int unknownFlags = cursorUpdateMode & ~KNOWN_FLAGS_MASK;
         if (unknownFlags != 0) {
             if (DEBUG) {
@@ -212,7 +212,7 @@
             return false;
         }
         mIMM.setUpdateCursorAnchorInfoMode(cursorUpdateMode);
-        if ((cursorUpdateMode & InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0) {
+        if ((cursorUpdateMode & InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0) {
             if (mTextView == null) {
                 // In this case, FLAG_CURSOR_ANCHOR_INFO_IMMEDIATE is silently ignored.
                 // TODO: Return some notification code for the input method that indicates
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 71cf391..c84708e 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -862,14 +862,23 @@
      * @return stored password quality
      */
     public int getKeyguardStoredPasswordQuality() {
-        int quality =
-                (int) getLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED);
+        return getKeyguardStoredPasswordQuality(getCurrentOrCallingUserId());
+    }
+
+    /**
+     * Retrieves the quality mode for {@param userHandle}.
+     * {@see DevicePolicyManager#getPasswordQuality(android.content.ComponentName)}
+     *
+     * @return stored password quality
+     */
+    public int getKeyguardStoredPasswordQuality(int userHandle) {
+        int quality = (int) getLong(PASSWORD_TYPE_KEY,
+                DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, userHandle);
         // If the user has chosen to use weak biometric sensor, then return the backup locking
         // method and treat biometric as a special case.
         if (quality == DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK) {
-            quality =
-                (int) getLong(PASSWORD_TYPE_ALTERNATE_KEY,
-                        DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED);
+            quality = (int) getLong(PASSWORD_TYPE_ALTERNATE_KEY,
+                        DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, userHandle);
         }
         return quality;
     }
@@ -1440,7 +1449,7 @@
         }
 
         int textId;
-        if (getTelecommManager().isInCall()) {
+        if (isInCall()) {
             // show "return to call" text and show phone icon
             textId = R.string.lockscreen_return_to_call;
             int phoneCallIcon = showIcon ? R.drawable.stat_sys_phone_call : 0;
@@ -1461,6 +1470,13 @@
         getTelecommManager().showInCallScreen(false);
     }
 
+    /**
+     * @return {@code true} if there is a call currently in progress, {@code false} otherwise.
+     */
+    public boolean isInCall() {
+        return getTelecommManager().isInCall();
+    }
+
     private TelecommManager getTelecommManager() {
         return (TelecommManager) mContext.getSystemService(Context.TELECOMM_SERVICE);
     }
diff --git a/core/java/com/android/internal/widget/ResolverDrawerLayout.java b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
index e53f9dd..375822f 100644
--- a/core/java/com/android/internal/widget/ResolverDrawerLayout.java
+++ b/core/java/com/android/internal/widget/ResolverDrawerLayout.java
@@ -20,15 +20,15 @@
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.graphics.Rect;
+import android.os.Parcel;
+import android.os.Parcelable;
 import android.util.AttributeSet;
 import android.util.Log;
-import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.VelocityTracker;
 import android.view.View;
 import android.view.ViewConfiguration;
 import android.view.ViewGroup;
-
 import android.view.ViewParent;
 import android.view.ViewTreeObserver;
 import android.view.animation.AnimationUtils;
@@ -68,6 +68,7 @@
 
     private boolean mIsDragging;
     private boolean mOpenOnClick;
+    private boolean mOpenOnLayout;
     private final int mTouchSlop;
     private final float mMinFlingVelocity;
     private final OverScroller mScroller;
@@ -202,6 +203,8 @@
     public boolean onTouchEvent(MotionEvent ev) {
         final int action = ev.getActionMasked();
 
+        mVelocityTracker.addMovement(ev);
+
         boolean handled = false;
         switch (action) {
             case MotionEvent.ACTION_DOWN: {
@@ -288,6 +291,10 @@
             break;
 
             case MotionEvent.ACTION_CANCEL: {
+                if (mIsDragging) {
+                    smoothScrollTo(
+                            mCollapseOffset < mCollapsibleHeight / 2 ? 0 : mCollapsibleHeight, 0);
+                }
                 resetTouch();
                 return true;
             }
@@ -498,28 +505,39 @@
     @Override
     public void onStopNestedScroll(View child) {
         super.onStopNestedScroll(child);
-        smoothScrollTo(mCollapseOffset < mCollapsibleHeight / 2 ? 0 : mCollapsibleHeight, 0);
+        if (mScroller.isFinished()) {
+            smoothScrollTo(mCollapseOffset < mCollapsibleHeight / 2 ? 0 : mCollapsibleHeight, 0);
+        }
     }
 
     @Override
     public void onNestedScroll(View target, int dxConsumed, int dyConsumed,
             int dxUnconsumed, int dyUnconsumed) {
-        if (dyUnconsumed > 0) {
+        if (dyUnconsumed < 0) {
             performDrag(-dyUnconsumed);
         }
     }
 
     @Override
     public void onNestedPreScroll(View target, int dx, int dy, int[] consumed) {
-        if (dy < 0) {
-            consumed[1] = (int) performDrag(-dy);
+        if (dy > 0) {
+            consumed[1] = (int) -performDrag(-dy);
         }
     }
 
     @Override
+    public boolean onNestedPreFling(View target, float velocityX, float velocityY) {
+        if (velocityY > mMinFlingVelocity && mCollapseOffset != 0) {
+            smoothScrollTo(0, velocityY);
+            return true;
+        }
+        return false;
+    }
+
+    @Override
     public boolean onNestedFling(View target, float velocityX, float velocityY, boolean consumed) {
         if (!consumed && Math.abs(velocityY) > mMinFlingVelocity) {
-            smoothScrollTo(velocityY < 0 ? 0 : mCollapsibleHeight, velocityY);
+            smoothScrollTo(velocityY > 0 ? 0 : mCollapsibleHeight, velocityY);
             return true;
         }
         return false;
@@ -571,8 +589,8 @@
         if (isLaidOut()) {
             mCollapseOffset = Math.min(mCollapseOffset, mCollapsibleHeight);
         } else {
-            // Start out collapsed at first
-            mCollapseOffset = mCollapsibleHeight;
+            // Start out collapsed at first unless we restored state for otherwise
+            mCollapseOffset = mOpenOnLayout ? 0 : mCollapsibleHeight;
         }
 
         mTopOffset = Math.max(0, heightSize - heightUsed) + (int) mCollapseOffset;
@@ -634,6 +652,20 @@
         return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
     }
 
+    @Override
+    protected Parcelable onSaveInstanceState() {
+        final SavedState ss = new SavedState(super.onSaveInstanceState());
+        ss.open = mCollapsibleHeight > 0 && mCollapseOffset == 0;
+        return ss;
+    }
+
+    @Override
+    protected void onRestoreInstanceState(Parcelable state) {
+        final SavedState ss = (SavedState) state;
+        super.onRestoreInstanceState(ss.getSuperState());
+        mOpenOnLayout = ss.open;
+    }
+
     public static class LayoutParams extends MarginLayoutParams {
         public boolean alwaysShow;
         public boolean ignoreOffset;
@@ -670,4 +702,36 @@
             super(source);
         }
     }
+
+    static class SavedState extends BaseSavedState {
+        boolean open;
+
+        SavedState(Parcelable superState) {
+            super(superState);
+        }
+
+        private SavedState(Parcel in) {
+            super(in);
+            open = in.readInt() != 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            super.writeToParcel(out, flags);
+            out.writeInt(open ? 1 : 0);
+        }
+
+        public static final Parcelable.Creator<SavedState> CREATOR =
+                new Parcelable.Creator<SavedState>() {
+            @Override
+            public SavedState createFromParcel(Parcel in) {
+                return new SavedState(in);
+            }
+
+            @Override
+            public SavedState[] newArray(int size) {
+                return new SavedState[size];
+            }
+        };
+    }
 }
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 2106d38..dbaa4b8 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -129,6 +129,7 @@
 	android/graphics/Xfermode.cpp \
 	android/graphics/YuvToJpegEncoder.cpp \
 	android/graphics/pdf/PdfDocument.cpp \
+	android/graphics/pdf/PdfEditor.cpp \
 	android/graphics/pdf/PdfRenderer.cpp \
 	android_media_AudioRecord.cpp \
 	android_media_AudioSystem.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 62d8036..a63258c 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -126,6 +126,7 @@
 extern int register_android_graphics_SurfaceTexture(JNIEnv* env);
 extern int register_android_graphics_Xfermode(JNIEnv* env);
 extern int register_android_graphics_pdf_PdfDocument(JNIEnv* env);
+extern int register_android_graphics_pdf_PdfEditor(JNIEnv* env);
 extern int register_android_graphics_pdf_PdfRenderer(JNIEnv* env);
 extern int register_android_view_DisplayEventReceiver(JNIEnv* env);
 extern int register_android_view_RenderNode(JNIEnv* env);
@@ -1305,6 +1306,7 @@
     REG_JNI(register_android_graphics_Xfermode),
     REG_JNI(register_android_graphics_YuvImage),
     REG_JNI(register_android_graphics_pdf_PdfDocument),
+    REG_JNI(register_android_graphics_pdf_PdfEditor),
     REG_JNI(register_android_graphics_pdf_PdfRenderer),
 
     REG_JNI(register_android_database_CursorWindow),
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 62ea351..8ea28ec 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -367,6 +367,9 @@
                 peeker.mOpticalInsets[0], peeker.mOpticalInsets[1], peeker.mOpticalInsets[2], peeker.mOpticalInsets[3],
                 peeker.mOutlineInsets[0], peeker.mOutlineInsets[1], peeker.mOutlineInsets[2], peeker.mOutlineInsets[3],
                 peeker.mOutlineRadius, peeker.mOutlineAlpha, scale);
+        if (ninePatchInsets == NULL) {
+            return nullObjectReturn("nine patch insets == null");
+        }
         if (javaBitmap != NULL) {
             env->SetObjectField(javaBitmap, gBitmap_ninePatchInsetsFieldID, ninePatchInsets);
         }
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index 7c41c2e..d7b75db 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -419,6 +419,7 @@
 {
     SkASSERT(bitmap);
     SkASSERT(bitmap->pixelRef());
+    SkASSERT(!env->ExceptionCheck());
     bool isMutable = bitmapCreateFlags & kBitmapCreateFlag_Mutable;
     bool isPremultiplied = bitmapCreateFlags & kBitmapCreateFlag_Premultiplied;
 
diff --git a/core/jni/android/graphics/pdf/PdfEditor.cpp b/core/jni/android/graphics/pdf/PdfEditor.cpp
new file mode 100644
index 0000000..5f60c9e
--- /dev/null
+++ b/core/jni/android/graphics/pdf/PdfEditor.cpp
@@ -0,0 +1,161 @@
+/*
+ * 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.
+ */
+
+#include "jni.h"
+#include "JNIHelp.h"
+#include "fpdfview.h"
+#include "fpdfedit.h"
+#include "fpdfsave.h"
+
+#include <android_runtime/AndroidRuntime.h>
+#include <vector>
+#include <utils/Log.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+namespace android {
+
+static Mutex sLock;
+
+static int sUnmatchedInitRequestCount = 0;
+
+static void initializeLibraryIfNeeded() {
+    Mutex::Autolock _l(sLock);
+    if (sUnmatchedInitRequestCount == 0) {
+        FPDF_InitLibrary(NULL);
+    }
+    sUnmatchedInitRequestCount++;
+}
+
+static void destroyLibraryIfNeeded() {
+    Mutex::Autolock _l(sLock);
+    sUnmatchedInitRequestCount--;
+    if (sUnmatchedInitRequestCount == 0) {
+       FPDF_DestroyLibrary();
+    }
+}
+
+static int getBlock(void* param, unsigned long position, unsigned char* outBuffer,
+        unsigned long size) {
+    const int fd = reinterpret_cast<intptr_t>(param);
+    const int readCount = pread(fd, outBuffer, size, position);
+    if (readCount < 0) {
+        ALOGE("Cannot read from file descriptor. Error:%d", errno);
+        return 0;
+    }
+    return 1;
+}
+
+static jlong nativeOpen(JNIEnv* env, jclass thiz, jint fd, jlong size) {
+    initializeLibraryIfNeeded();
+
+    FPDF_FILEACCESS loader;
+    loader.m_FileLen = size;
+    loader.m_Param = reinterpret_cast<void*>(intptr_t(fd));
+    loader.m_GetBlock = &getBlock;
+
+    FPDF_DOCUMENT document = FPDF_LoadCustomDocument(&loader, NULL);
+
+    if (!document) {
+        const long error = FPDF_GetLastError();
+        jniThrowException(env, "java/io/IOException",
+                "cannot create document. Error:" + error);
+        destroyLibraryIfNeeded();
+        return -1;
+    }
+
+    return reinterpret_cast<jlong>(document);
+}
+
+static void nativeClose(JNIEnv* env, jclass thiz, jlong documentPtr) {
+    FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
+    FPDF_CloseDocument(document);
+    destroyLibraryIfNeeded();
+}
+
+static jint nativeGetPageCount(JNIEnv* env, jclass thiz, jlong documentPtr) {
+    FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
+    return FPDF_GetPageCount(document);
+}
+
+static jint nativeRemovePage(JNIEnv* env, jclass thiz, jlong documentPtr, jint pageIndex) {
+    FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
+    FPDFPage_Delete(document, pageIndex);
+    return FPDF_GetPageCount(document);
+}
+
+struct PdfToFdWriter : FPDF_FILEWRITE {
+    int dstFd;
+};
+
+static bool writeAllBytes(const int fd, const void* buffer, const size_t byteCount) {
+    char* writeBuffer = static_cast<char*>(const_cast<void*>(buffer));
+    size_t remainingBytes = byteCount;
+    while (remainingBytes > 0) {
+        ssize_t writtenByteCount = write(fd, writeBuffer, remainingBytes);
+        if (writtenByteCount == -1) {
+            if (errno == EINTR) {
+                continue;
+            }
+            __android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
+                    "Error writing to buffer: %d", errno);
+            return false;
+        }
+        remainingBytes -= writtenByteCount;
+        writeBuffer += writtenByteCount;
+    }
+    return true;
+}
+
+static int writeBlock(FPDF_FILEWRITE* owner, const void* buffer, unsigned long size) {
+    const PdfToFdWriter* writer = reinterpret_cast<PdfToFdWriter*>(owner);
+    const bool success = writeAllBytes(writer->dstFd, buffer, size);
+    if (success < 0) {
+        ALOGE("Cannot write to file descriptor. Error:%d", errno);
+        return 0;
+    }
+    return 1;
+}
+
+static void nativeWrite(JNIEnv* env, jclass thiz, jlong documentPtr, jint fd) {
+    FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
+    PdfToFdWriter writer;
+    writer.dstFd = fd;
+    writer.WriteBlock = &writeBlock;
+    const bool success = FPDF_SaveAsCopy(document, &writer, FPDF_NO_INCREMENTAL);
+    if (!success) {
+        jniThrowException(env, "java/io/IOException",
+                "cannot write to fd. Error:" + errno);
+        destroyLibraryIfNeeded();
+    }
+}
+
+static JNINativeMethod gPdfEditor_Methods[] = {
+    {"nativeOpen", "(IJ)J", (void*) nativeOpen},
+    {"nativeClose", "(J)V", (void*) nativeClose},
+    {"nativeGetPageCount", "(J)I", (void*) nativeGetPageCount},
+    {"nativeRemovePage", "(JI)I", (void*) nativeRemovePage},
+    {"nativeWrite", "(JI)V", (void*) nativeWrite}
+};
+
+int register_android_graphics_pdf_PdfEditor(JNIEnv* env) {
+    return android::AndroidRuntime::registerNativeMethods(
+            env, "android/graphics/pdf/PdfEditor", gPdfEditor_Methods,
+            NELEM(gPdfEditor_Methods));
+};
+
+};
diff --git a/core/jni/android_ddm_DdmHandleNativeHeap.cpp b/core/jni/android_ddm_DdmHandleNativeHeap.cpp
index f5eaf94..9b96320 100644
--- a/core/jni/android_ddm_DdmHandleNativeHeap.cpp
+++ b/core/jni/android_ddm_DdmHandleNativeHeap.cpp
@@ -35,7 +35,15 @@
 
 extern "C" void free_malloc_leak_info(uint8_t* info);
 
+#define DDMS_HEADER_SIGNATURE 0x812345dd
+#define DDMS_VERSION 2
+
 struct Header {
+#if defined(__LP64__)
+    uint32_t signature;
+    uint16_t version;
+    uint16_t pointerSize;
+#endif
     size_t mapSize;
     size_t allocSize;
     size_t allocInfoSize;
@@ -77,6 +85,12 @@
     ALOGD("*** mapSize: %d allocSize: %d allocInfoSize: %d totalMemory: %d",
           header.mapSize, header.allocSize, header.allocInfoSize, header.totalMemory);
 
+#if defined(__LP64__)
+    header.signature = DDMS_HEADER_SIGNATURE;
+    header.version = DDMS_VERSION;
+    header.pointerSize = sizeof(void*);
+#endif
+
     jbyteArray array = env->NewByteArray(sizeof(Header) + header.mapSize + header.allocSize);
     if (array != NULL) {
         env->SetByteArrayRegion(array, 0,
diff --git a/core/jni/android_hardware_SoundTrigger.cpp b/core/jni/android_hardware_SoundTrigger.cpp
index f0d7a35..7b33bc2 100644
--- a/core/jni/android_hardware_SoundTrigger.cpp
+++ b/core/jni/android_hardware_SoundTrigger.cpp
@@ -211,7 +211,7 @@
     }
 
     jobject jAudioFormat = NULL;
-    if (event->trigger_in_data) {
+    if (event->trigger_in_data || event->capture_available) {
         jAudioFormat = env->NewObject(gAudioFormatClass,
                                     gAudioFormatCstor,
                                     audioFormatFromNative(event->audio_config.format),
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index 5faf03d..396f3ec 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -1888,6 +1888,37 @@
     return array;
 }
 
+static jintArray android_content_AssetManager_getStyleAttributes(JNIEnv* env, jobject clazz,
+                                                                 jint styleId)
+{
+    AssetManager* am = assetManagerForJavaObject(env, clazz);
+    if (am == NULL) {
+        return NULL;
+    }
+    const ResTable& res(am->getResources());
+
+    const ResTable::bag_entry* startOfBag;
+    const ssize_t N = res.lockBag(styleId, &startOfBag);
+    if (N < 0) {
+        return NULL;
+    }
+
+    jintArray array = env->NewIntArray(N);
+    if (array == NULL) {
+        res.unlockBag(startOfBag);
+        return NULL;
+    }
+
+    Res_value value;
+    const ResTable::bag_entry* bag = startOfBag;
+    for (size_t i=0; ((ssize_t)i)<N; i++, bag++) {
+        int resourceId = bag->map.name.ident;
+        env->SetIntArrayRegion(array, i, 1, &resourceId);
+    }
+    res.unlockBag(startOfBag);
+    return array;
+}
+
 static void android_content_AssetManager_init(JNIEnv* env, jobject clazz, jboolean isSystem)
 {
     if (isSystem) {
@@ -2038,6 +2069,8 @@
         (void*) android_content_AssetManager_getArrayStringInfo },
     { "getArrayIntResource","(I)[I",
         (void*) android_content_AssetManager_getArrayIntResource },
+    { "getStyleAttributes","(I)[I",
+        (void*) android_content_AssetManager_getStyleAttributes },
 
     // Bookkeeping.
     { "init",           "(Z)V",
diff --git a/core/jni/android_view_RenderNode.cpp b/core/jni/android_view_RenderNode.cpp
index 1296831..050037e 100644
--- a/core/jni/android_view_RenderNode.cpp
+++ b/core/jni/android_view_RenderNode.cpp
@@ -173,6 +173,12 @@
     return true;
 }
 
+static jboolean android_view_RenderNode_hasShadow(JNIEnv* env,
+        jobject clazz, jlong renderNodePtr) {
+    RenderNode* renderNode = reinterpret_cast<RenderNode*>(renderNodePtr);
+    return renderNode->stagingProperties().hasShadow();
+}
+
 static jboolean android_view_RenderNode_setClipToOutline(JNIEnv* env,
         jobject clazz, jlong renderNodePtr, jboolean clipToOutline) {
     RenderNode* renderNode = reinterpret_cast<RenderNode*>(renderNodePtr);
@@ -458,7 +464,7 @@
 static void android_view_RenderNode_endAllAnimators(JNIEnv* env, jobject clazz,
         jlong renderNodePtr) {
     RenderNode* renderNode = reinterpret_cast<RenderNode*>(renderNodePtr);
-    renderNode->animators().endAllAnimators();
+    renderNode->animators().endAllStagingAnimators();
 }
 
 #endif // USE_OPENGL_RENDERER
@@ -491,6 +497,7 @@
     { "nSetOutlineConvexPath", "(JJF)Z", (void*) android_view_RenderNode_setOutlineConvexPath },
     { "nSetOutlineEmpty",      "(J)Z",   (void*) android_view_RenderNode_setOutlineEmpty },
     { "nSetOutlineNone",       "(J)Z",   (void*) android_view_RenderNode_setOutlineNone },
+    { "nHasShadow",            "(J)Z",   (void*) android_view_RenderNode_hasShadow },
     { "nSetClipToOutline",     "(JZ)Z",  (void*) android_view_RenderNode_setClipToOutline },
     { "nSetRevealClip",        "(JZFFF)Z", (void*) android_view_RenderNode_setRevealClip },
 
diff --git a/core/jni/android_view_RenderNodeAnimator.cpp b/core/jni/android_view_RenderNodeAnimator.cpp
index 85c2a09..84b7913 100644
--- a/core/jni/android_view_RenderNodeAnimator.cpp
+++ b/core/jni/android_view_RenderNodeAnimator.cpp
@@ -159,6 +159,11 @@
     animator->setInterpolator(interpolator);
 }
 
+static void setAllowRunningAsync(JNIEnv* env, jobject clazz, jlong animatorPtr, jboolean mayRunAsync) {
+    BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr);
+    animator->setAllowRunningAsync(mayRunAsync);
+}
+
 static void start(JNIEnv* env, jobject clazz, jlong animatorPtr, jobject finishListener) {
     BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr);
     if (finishListener) {
@@ -191,6 +196,7 @@
     { "nGetDuration", "(J)J", (void*) getDuration },
     { "nSetStartDelay", "(JJ)V", (void*) setStartDelay },
     { "nSetInterpolator", "(JJ)V", (void*) setInterpolator },
+    { "nSetAllowRunningAsync", "(JZ)V", (void*) setAllowRunningAsync },
     { "nStart", "(JLandroid/view/RenderNodeAnimator;)V", (void*) start },
     { "nEnd", "(J)V", (void*) end },
 #endif
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 8f30f5d..06c22ae 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -117,7 +117,8 @@
 
 static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz,
         jobject displayTokenObj, jobject sourceCropObj, jint width, jint height,
-        jint minLayer, jint maxLayer, bool allLayers, bool useIdentityTransform) {
+        jint minLayer, jint maxLayer, bool allLayers, bool useIdentityTransform,
+        int rotation) {
     sp<IBinder> displayToken = ibinderForJavaObject(env, displayTokenObj);
     if (displayToken == NULL) {
         return NULL;
@@ -131,17 +132,13 @@
 
     SkAutoTDelete<ScreenshotClient> screenshot(new ScreenshotClient());
     status_t res;
-    if (width > 0 && height > 0) {
-        if (allLayers) {
-            res = screenshot->update(displayToken, sourceCrop, width, height,
-                    useIdentityTransform);
-        } else {
-            res = screenshot->update(displayToken, sourceCrop, width, height,
-                    minLayer, maxLayer, useIdentityTransform);
-        }
-    } else {
-        res = screenshot->update(displayToken, sourceCrop, useIdentityTransform);
+    if (allLayers) {
+        minLayer = 0;
+        maxLayer = -1UL;
     }
+
+    res = screenshot->update(displayToken, sourceCrop, width, height,
+        minLayer, maxLayer, useIdentityTransform, static_cast<uint32_t>(rotation));
     if (res != NO_ERROR) {
         return NULL;
     }
@@ -588,7 +585,7 @@
             (void*)nativeRelease },
     {"nativeDestroy", "(J)V",
             (void*)nativeDestroy },
-    {"nativeScreenshot", "(Landroid/os/IBinder;Landroid/graphics/Rect;IIIIZZ)Landroid/graphics/Bitmap;",
+    {"nativeScreenshot", "(Landroid/os/IBinder;Landroid/graphics/Rect;IIIIZZI)Landroid/graphics/Bitmap;",
             (void*)nativeScreenshotBitmap },
     {"nativeScreenshot", "(Landroid/os/IBinder;Landroid/view/Surface;Landroid/graphics/Rect;IIIIZZ)V",
             (void*)nativeScreenshot },
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 99babac..a8edb77 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -158,20 +158,17 @@
 
     // Marks the start of a frame, which will update the frame time and move all
     // next frame animations into the current frame
-    virtual void startFrame() {
-        mRootNode->doAttachAnimatingNodes(this);
-        AnimationContext::startFrame();
+    virtual void startFrame(TreeInfo::TraversalMode mode) {
+        if (mode == TreeInfo::MODE_FULL) {
+            mRootNode->doAttachAnimatingNodes(this);
+        }
+        AnimationContext::startFrame(mode);
     }
 
     // Runs any animations still left in mCurrentFrameAnimations
     virtual void runRemainingAnimations(TreeInfo& info) {
         AnimationContext::runRemainingAnimations(info);
-        // post all the finished stuff
-        if (mOnFinishedEvents.size()) {
-            sp<InvokeAnimationListeners> message
-                    = new InvokeAnimationListeners(mOnFinishedEvents);
-            mRootNode->sendMessage(message);
-        }
+        postOnFinishedEvents();
     }
 
     virtual void callOnFinished(BaseRenderNodeAnimator* animator, AnimationListener* listener) {
@@ -179,9 +176,22 @@
         mOnFinishedEvents.push_back(event);
     }
 
+    virtual void destroy() {
+        AnimationContext::destroy();
+        postOnFinishedEvents();
+    }
+
 private:
     sp<RootRenderNode> mRootNode;
     std::vector<OnFinishedEvent> mOnFinishedEvents;
+
+    void postOnFinishedEvents() {
+        if (mOnFinishedEvents.size()) {
+            sp<InvokeAnimationListeners> message
+                    = new InvokeAnimationListeners(mOnFinishedEvents);
+            mRootNode->sendMessage(message);
+        }
+    }
 };
 
 class ContextFactoryImpl : public IContextFactory {
@@ -291,10 +301,10 @@
     return proxy->syncAndDrawFrame(frameTimeNanos, recordDuration, density);
 }
 
-static void android_view_ThreadedRenderer_destroyCanvasAndSurface(JNIEnv* env, jobject clazz,
+static void android_view_ThreadedRenderer_destroy(JNIEnv* env, jobject clazz,
         jlong proxyPtr) {
     RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
-    proxy->destroyCanvasAndSurface();
+    proxy->destroy();
 }
 
 static void android_view_ThreadedRenderer_registerAnimatingRenderNode(JNIEnv* env, jobject clazz,
@@ -430,7 +440,7 @@
     { "nSetup", "(JIIFFFFII)V", (void*) android_view_ThreadedRenderer_setup },
     { "nSetOpaque", "(JZ)V", (void*) android_view_ThreadedRenderer_setOpaque },
     { "nSyncAndDrawFrame", "(JJJF)I", (void*) android_view_ThreadedRenderer_syncAndDrawFrame },
-    { "nDestroyCanvasAndSurface", "(J)V", (void*) android_view_ThreadedRenderer_destroyCanvasAndSurface },
+    { "nDestroy", "(J)V", (void*) android_view_ThreadedRenderer_destroy },
     { "nRegisterAnimatingRenderNode", "(JJ)V", (void*) android_view_ThreadedRenderer_registerAnimatingRenderNode },
     { "nInvokeFunctor", "(JZ)V", (void*) android_view_ThreadedRenderer_invokeFunctor },
     { "nCreateDisplayListLayer", "(JII)J", (void*) android_view_ThreadedRenderer_createDisplayListLayer },
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index c84a466..2e2d0c7 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -175,17 +175,23 @@
                 continue;
             }
         }
-        // Skip whitespace.
-        while (*pos == ' ') {
-            pos++;
-        }
-        // Next field is tag.
-        rawTag = strtoll(pos, &endPos, 16);
-        //ALOGI("Index #%d: %s", idx, buffer);
-        if (pos == endPos) {
-            ALOGE("bad tag: %s", pos);
-            fclose(fp);
-            return -1;
+
+        // Ignore whitespace
+        while (*pos == ' ') pos++;
+
+        // Find end of tag field
+        endPos = pos;
+        while (*endPos != ' ') endPos++;
+
+        // Three digit field is always 0x0, otherwise parse
+        if (endPos - pos == 3) {
+            rawTag = 0;
+        } else {
+            if (sscanf(pos, "%llx", &rawTag) != 1) {
+                ALOGE("bad tag: %s", pos);
+                fclose(fp);
+                return -1;
+            }
         }
         s.tag = rawTag >> 32;
         if (limitTag != -1 && s.tag != limitTag) {
@@ -193,10 +199,10 @@
             continue;
         }
         pos = endPos;
-        // Skip whitespace.
-        while (*pos == ' ') {
-            pos++;
-        }
+
+        // Ignore whitespace
+        while (*pos == ' ') pos++;
+
         // Parse remaining fields.
         if (sscanf(pos, "%u %u %llu %llu %llu %llu",
                 &s.uid, &s.set, &s.rxBytes, &s.rxPackets,
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 1f7acec..451d97a 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -43,6 +43,7 @@
 #include <utils/String8.h>
 #include <selinux/android.h>
 #include <processgroup/processgroup.h>
+#include <inttypes.h>
 
 #include "android_runtime/AndroidRuntime.h"
 #include "JNIHelp.h"
@@ -398,14 +399,33 @@
   }
 }
 
+  // Temporary timing check.
+uint64_t MsTime() {
+  timespec now;
+  clock_gettime(CLOCK_MONOTONIC, &now);
+  return static_cast<uint64_t>(now.tv_sec) * UINT64_C(1000) + now.tv_nsec / UINT64_C(1000000);
+}
+
+
+void ckTime(uint64_t start, const char* where) {
+  uint64_t now = MsTime();
+  if ((now-start) > 1000) {
+    // If we are taking more than a second, log about it.
+    ALOGW("Slow operation: %"PRIu64" ms in %s", (uint64_t)(now-start), where);
+  }
+}
+
 // Utility routine to fork zygote and specialize the child process.
 static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray javaGids,
                                      jint debug_flags, jobjectArray javaRlimits,
                                      jlong permittedCapabilities, jlong effectiveCapabilities,
                                      jint mount_external,
                                      jstring java_se_info, jstring java_se_name,
-                                     bool is_system_server, jintArray fdsToClose) {
+                                     bool is_system_server, jintArray fdsToClose,
+                                     jstring instructionSet) {
+  uint64_t start = MsTime();
   SetSigChldHandler();
+  ckTime(start, "ForkAndSpecializeCommon:SetSigChldHandler");
 
   pid_t pid = fork();
 
@@ -413,9 +433,12 @@
     // The child process.
     gMallocLeakZygoteChild = 1;
 
+
     // Clean up any descriptors which must be closed immediately
     DetachDescriptors(env, fdsToClose);
 
+    ckTime(start, "ForkAndSpecializeCommon:Fork and detach");
+
     // Keep capabilities across UID change, unless we're staying root.
     if (uid != 0) {
       EnableKeepCapabilities(env);
@@ -518,7 +541,11 @@
 
     UnsetSigChldHandler();
 
-    env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags);
+    ckTime(start, "ForkAndSpecializeCommon:child process setup");
+
+    env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags,
+                              is_system_server ? NULL : instructionSet);
+    ckTime(start, "ForkAndSpecializeCommon:PostForkChildHooks returns");
     if (env->ExceptionCheck()) {
       ALOGE("Error calling post fork hooks.");
       RuntimeAbort(env);
@@ -536,7 +563,7 @@
         JNIEnv* env, jclass, jint uid, jint gid, jintArray gids,
         jint debug_flags, jobjectArray rlimits,
         jint mount_external, jstring se_info, jstring se_name,
-        jintArray fdsToClose) {
+        jintArray fdsToClose, jstring instructionSet) {
     // Grant CAP_WAKE_ALARM to the Bluetooth process.
     jlong capabilities = 0;
     if (uid == AID_BLUETOOTH) {
@@ -545,7 +572,7 @@
 
     return ForkAndSpecializeCommon(env, uid, gid, gids, debug_flags,
             rlimits, capabilities, capabilities, mount_external, se_info,
-            se_name, false, fdsToClose);
+            se_name, false, fdsToClose, instructionSet);
 }
 
 static jint com_android_internal_os_Zygote_nativeForkSystemServer(
@@ -555,7 +582,7 @@
   pid_t pid = ForkAndSpecializeCommon(env, uid, gid, gids,
                                       debug_flags, rlimits,
                                       permittedCapabilities, effectiveCapabilities,
-                                      MOUNT_EXTERNAL_NONE, NULL, NULL, true, NULL);
+                                      MOUNT_EXTERNAL_NONE, NULL, NULL, true, NULL, NULL);
   if (pid > 0) {
       // The zygote process checks whether the child process has died or not.
       ALOGI("System server process %d has been created", pid);
@@ -573,7 +600,8 @@
 }
 
 static JNINativeMethod gMethods[] = {
-    { "nativeForkAndSpecialize", "(II[II[[IILjava/lang/String;Ljava/lang/String;[I)I",
+    { "nativeForkAndSpecialize",
+      "(II[II[[IILjava/lang/String;Ljava/lang/String;[ILjava/lang/String;)I",
       (void *) com_android_internal_os_Zygote_nativeForkAndSpecialize },
     { "nativeForkSystemServer", "(II[II[[IJJ)I",
       (void *) com_android_internal_os_Zygote_nativeForkSystemServer }
@@ -584,7 +612,8 @@
   if (gZygoteClass == NULL) {
     RuntimeAbort(env);
   }
-  gCallPostForkChildHooks = env->GetStaticMethodID(gZygoteClass, "callPostForkChildHooks", "(I)V");
+  gCallPostForkChildHooks = env->GetStaticMethodID(gZygoteClass, "callPostForkChildHooks",
+                                                   "(ILjava/lang/String;)V");
 
   return AndroidRuntime::registerNativeMethods(env, "com/android/internal/os/Zygote",
       gMethods, NELEM(gMethods));
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 7c5233c..bf2d09b 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -182,11 +182,11 @@
     <protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
 
     <protected-broadcast android:name="android.intent.action.HEADSET_PLUG" />
-    <protected-broadcast android:name="android.intent.action.ANALOG_AUDIO_DOCK_PLUG" />
-    <protected-broadcast android:name="android.intent.action.DIGITAL_AUDIO_DOCK_PLUG" />
-    <protected-broadcast android:name="android.intent.action.HDMI_AUDIO_PLUG" />
-    <protected-broadcast android:name="android.intent.action.USB_AUDIO_ACCESSORY_PLUG" />
-    <protected-broadcast android:name="android.intent.action.USB_AUDIO_DEVICE_PLUG" />
+    <protected-broadcast android:name="android.media.action.ANALOG_AUDIO_DOCK_PLUG" />
+    <protected-broadcast android:name="android.media.action.DIGITAL_AUDIO_DOCK_PLUG" />
+    <protected-broadcast android:name="android.media.action.HDMI_AUDIO_PLUG" />
+    <protected-broadcast android:name="android.media.action.USB_AUDIO_ACCESSORY_PLUG" />
+    <protected-broadcast android:name="android.media.action.USB_AUDIO_DEVICE_PLUG" />
 
     <protected-broadcast android:name="android.media.AUDIO_BECOMING_NOISY" />
     <protected-broadcast android:name="android.media.RINGER_MODE_CHANGED" />
@@ -2502,7 +2502,7 @@
     <permission android:name="android.permission.PACKAGE_USAGE_STATS"
         android:label="@string/permlab_pkgUsageStats"
         android:description="@string/permdesc_pkgUsageStats"
-        android:protectionLevel="signature|system|development|appop" />
+        android:protectionLevel="signature|development|appop" />
     <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
 
     <!-- @SystemApi Allows an application to collect battery statistics -->
@@ -2773,7 +2773,7 @@
         android:description="@string/permdesc_bindNotificationListenerService"
         android:protectionLevel="signature" />
 
-    <!-- Must be required by an {@link
+    <!-- @SystemApi Must be required by a {@link
          android.service.notification.ConditionProviderService},
          to ensure that only the system can bind to it.
          @hide -->
diff --git a/core/res/res/drawable-hdpi/pointer_spot_anchor.png b/core/res/res/drawable-hdpi/pointer_spot_anchor.png
index d7aca36..bdb5311 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_anchor.png
+++ b/core/res/res/drawable-hdpi/pointer_spot_anchor.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/pointer_spot_hover.png b/core/res/res/drawable-hdpi/pointer_spot_hover.png
index 5041aa3..e7f2a0c 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_hover.png
+++ b/core/res/res/drawable-hdpi/pointer_spot_hover.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/pointer_spot_touch.png b/core/res/res/drawable-hdpi/pointer_spot_touch.png
index 64a42a1..0326f91 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_touch.png
+++ b/core/res/res/drawable-hdpi/pointer_spot_touch.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_arrow_icon.xml b/core/res/res/drawable-mdpi/pointer_arrow_icon.xml
deleted file mode 100644
index 2f5676f..0000000
--- a/core/res/res/drawable-mdpi/pointer_arrow_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
-    android:bitmap="@drawable/pointer_arrow"
-    android:hotSpotX="6"
-    android:hotSpotY="6" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_anchor.png b/core/res/res/drawable-mdpi/pointer_spot_anchor.png
index d7aca36..4e282e7 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_anchor.png
+++ b/core/res/res/drawable-mdpi/pointer_spot_anchor.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml b/core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml
deleted file mode 100644
index 2222b8e..0000000
--- a/core/res/res/drawable-mdpi/pointer_spot_anchor_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
-    android:bitmap="@drawable/pointer_spot_anchor"
-    android:hotSpotX="33"
-    android:hotSpotY="33" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_hover.png b/core/res/res/drawable-mdpi/pointer_spot_hover.png
index 5041aa3..67d0b06 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_hover.png
+++ b/core/res/res/drawable-mdpi/pointer_spot_hover.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml b/core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml
deleted file mode 100644
index dc62a69..0000000
--- a/core/res/res/drawable-mdpi/pointer_spot_hover_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
-    android:bitmap="@drawable/pointer_spot_hover"
-    android:hotSpotX="33"
-    android:hotSpotY="33" />
diff --git a/core/res/res/drawable-mdpi/pointer_spot_touch.png b/core/res/res/drawable-mdpi/pointer_spot_touch.png
index 64a42a1..45dc5c0 100644
--- a/core/res/res/drawable-mdpi/pointer_spot_touch.png
+++ b/core/res/res/drawable-mdpi/pointer_spot_touch.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml b/core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml
deleted file mode 100644
index 4bffee6..0000000
--- a/core/res/res/drawable-mdpi/pointer_spot_touch_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
-    android:bitmap="@drawable/pointer_spot_touch"
-    android:hotSpotX="24"
-    android:hotSpotY="24" />
diff --git a/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml b/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml
deleted file mode 100644
index 2fbe45a..0000000
--- a/core/res/res/drawable-xhdpi/pointer_arrow_icon.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
-    android:bitmap="@drawable/pointer_arrow"
-    android:hotSpotX="12"
-    android:hotSpotY="12" />
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_anchor.png b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
index ad41c97..fa9226e 100644
--- a/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
+++ b/core/res/res/drawable-xhdpi/pointer_spot_anchor.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_hover.png b/core/res/res/drawable-xhdpi/pointer_spot_hover.png
index e9b98f6..f09a778 100644
--- a/core/res/res/drawable-xhdpi/pointer_spot_hover.png
+++ b/core/res/res/drawable-xhdpi/pointer_spot_hover.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/pointer_spot_touch.png b/core/res/res/drawable-xhdpi/pointer_spot_touch.png
index e10d998..53d7a20 100644
--- a/core/res/res/drawable-xhdpi/pointer_spot_touch.png
+++ b/core/res/res/drawable-xhdpi/pointer_spot_touch.png
Binary files differ
diff --git a/core/res/res/drawable/ic_cab_done_material.xml b/core/res/res/drawable/emulator_circular_window_overlay.xml
similarity index 80%
rename from core/res/res/drawable/ic_cab_done_material.xml
rename to core/res/res/drawable/emulator_circular_window_overlay.xml
index a370288..7616b37 100644
--- a/core/res/res/drawable/ic_cab_done_material.xml
+++ b/core/res/res/drawable/emulator_circular_window_overlay.xml
@@ -14,6 +14,7 @@
      limitations under the License.
 -->
 
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_cab_done_mtrl_alpha"
-    android:tint="?attr/colorControlNormal" />
+<!-- Default to an empty shape drawable -->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+</shape>
diff --git a/core/res/res/drawable/notification_material_action_background.xml b/core/res/res/drawable/notification_material_action_background.xml
new file mode 100644
index 0000000..ff6f69d
--- /dev/null
+++ b/core/res/res/drawable/notification_material_action_background.xml
@@ -0,0 +1,23 @@
+<?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="@color/ripple_material_light">
+    <item android:id="@id/mask"
+          android:drawable="@drawable/btn_default_mtrl_shape" />
+</ripple>
+
diff --git a/core/res/res/drawable/notification_material_media_action_background.xml b/core/res/res/drawable/notification_material_media_action_background.xml
new file mode 100644
index 0000000..8e559d5
--- /dev/null
+++ b/core/res/res/drawable/notification_material_media_action_background.xml
@@ -0,0 +1,19 @@
+<?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="@color/ripple_material_dark" />
diff --git a/core/res/res/drawable/notification_material_media_progress.xml b/core/res/res/drawable/notification_material_media_progress.xml
deleted file mode 100644
index 74d871b..0000000
--- a/core/res/res/drawable/notification_material_media_progress.xml
+++ /dev/null
@@ -1,28 +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.
--->
-
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:id="@id/background" android:drawable="@color/transparent">
-    </item>
-    <item android:id="@id/secondaryProgress">
-        <scale android:scaleWidth="100%"
-            android:drawable="@color/notification_media_progress" />
-    </item>
-    <item android:id="@id/progress">
-        <scale android:scaleWidth="100%"
-            android:drawable="@color/notification_media_progress" />
-    </item>
-</layer-list>
diff --git a/core/res/res/drawable-hdpi/pointer_arrow_icon.xml b/core/res/res/drawable/pointer_arrow_icon.xml
similarity index 73%
rename from core/res/res/drawable-hdpi/pointer_arrow_icon.xml
rename to core/res/res/drawable/pointer_arrow_icon.xml
index a4cce5c..8f7d658 100644
--- a/core/res/res/drawable-hdpi/pointer_arrow_icon.xml
+++ b/core/res/res/drawable/pointer_arrow_icon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
     android:bitmap="@drawable/pointer_arrow"
-    android:hotSpotX="9"
-    android:hotSpotY="9" />
+    android:hotSpotX="6dp"
+    android:hotSpotY="6dp" />
diff --git a/core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml b/core/res/res/drawable/pointer_spot_anchor_icon.xml
similarity index 73%
rename from core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml
rename to core/res/res/drawable/pointer_spot_anchor_icon.xml
index 2222b8e..73c0c11 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_anchor_icon.xml
+++ b/core/res/res/drawable/pointer_spot_anchor_icon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
     android:bitmap="@drawable/pointer_spot_anchor"
-    android:hotSpotX="33"
-    android:hotSpotY="33" />
+    android:hotSpotX="22dp"
+    android:hotSpotY="22dp" />
diff --git a/core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml b/core/res/res/drawable/pointer_spot_hover_icon.xml
similarity index 73%
rename from core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml
rename to core/res/res/drawable/pointer_spot_hover_icon.xml
index dc62a69..1d7440b 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_hover_icon.xml
+++ b/core/res/res/drawable/pointer_spot_hover_icon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
     android:bitmap="@drawable/pointer_spot_hover"
-    android:hotSpotX="33"
-    android:hotSpotY="33" />
+    android:hotSpotX="22dp"
+    android:hotSpotY="22dp" />
diff --git a/core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml b/core/res/res/drawable/pointer_spot_touch_icon.xml
similarity index 73%
rename from core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml
rename to core/res/res/drawable/pointer_spot_touch_icon.xml
index 4bffee6..f4f0639 100644
--- a/core/res/res/drawable-hdpi/pointer_spot_touch_icon.xml
+++ b/core/res/res/drawable/pointer_spot_touch_icon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
     android:bitmap="@drawable/pointer_spot_touch"
-    android:hotSpotX="24"
-    android:hotSpotY="24" />
+    android:hotSpotX="16dp"
+    android:hotSpotY="16dp" />
diff --git a/core/res/res/drawable/stat_sys_tether_wifi.xml b/core/res/res/drawable/stat_sys_tether_wifi.xml
index a816db8..4396962 100644
--- a/core/res/res/drawable/stat_sys_tether_wifi.xml
+++ b/core/res/res/drawable/stat_sys_tether_wifi.xml
@@ -14,11 +14,12 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="26.0dp"
+        android:width="24.0dp"
         android:height="24.0dp"
-        android:viewportWidth="26.0"
-        android:viewportHeight="24.0">
+        android:viewportWidth="48.0"
+        android:viewportHeight="48.0">
+
     <path
         android:fillColor="#FFFFFFFF"
-        android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
+        android:pathData="M24.000000,22.000000c-2.200000,0.000000 -4.000000,1.800000 -4.000000,4.000000c0.000000,2.200000 1.800000,4.000000 4.000000,4.000000c2.200000,0.000000 4.000000,-1.800000 4.000000,-4.000000C28.000000,23.799999 26.200001,22.000000 24.000000,22.000000zM36.000000,26.000000c0.000000,-6.600000 -5.400000,-12.000000 -12.000000,-12.000000c-6.600000,0.000000 -12.000000,5.400000 -12.000000,12.000000c0.000000,4.400000 2.400000,8.300000 6.000000,10.400000l2.000000,-3.500000c-2.400000,-1.400000 -4.000000,-3.900000 -4.000000,-6.900000c0.000000,-4.400000 3.600000,-8.000000 8.000000,-8.000000s8.000000,3.600000 8.000000,8.000000c0.000000,3.000000 -1.600000,5.500000 -4.000000,6.900000l2.000000,3.500000C33.599998,34.299999 36.000000,30.400000 36.000000,26.000000zM24.000000,6.000000C13.000000,6.000000 4.000000,15.000000 4.000000,26.000000c0.000000,7.400000 4.000000,13.800000 10.000000,17.299999l2.000000,-3.500000c-4.800000,-2.800000 -8.000000,-7.900000 -8.000000,-13.800000c0.000000,-8.800000 7.200000,-16.000000 16.000000,-16.000000s16.000000,7.200000 16.000000,16.000000c0.000000,5.900000 -3.200000,11.100000 -8.000000,13.800000l2.000000,3.500000c6.000000,-3.500000 10.000000,-9.900000 10.000000,-17.299999C44.000000,15.000000 35.000000,6.000000 24.000000,6.000000z"/>
 </vector>
diff --git a/core/res/res/drawable/ic_cab_done_material.xml b/core/res/res/drawable/time_picker_header_material.xml
similarity index 77%
copy from core/res/res/drawable/ic_cab_done_material.xml
copy to core/res/res/drawable/time_picker_header_material.xml
index a370288..cdb92b6 100644
--- a/core/res/res/drawable/ic_cab_done_material.xml
+++ b/core/res/res/drawable/time_picker_header_material.xml
@@ -14,6 +14,9 @@
      limitations under the License.
 -->
 
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_cab_done_mtrl_alpha"
-    android:tint="?attr/colorControlNormal" />
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+    android:color="?attr/colorControlHighlight">
+    <item>
+        <color android:color="?attr/colorAccent" />
+    </item>
+</ripple>
diff --git a/core/res/res/layout-land/time_picker_holo.xml b/core/res/res/layout-land/time_picker_holo.xml
index f316f1b..ce90a5b 100644
--- a/core/res/res/layout-land/time_picker_holo.xml
+++ b/core/res/res/layout-land/time_picker_holo.xml
@@ -21,7 +21,6 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="horizontal"
-    android:focusable="true"
     android:layout_marginLeft="@dimen/timepicker_minimum_margin_sides"
     android:layout_marginRight="@dimen/timepicker_minimum_margin_sides"
     android:layout_marginTop="@dimen/timepicker_minimum_margin_top_bottom"
@@ -42,7 +41,5 @@
         android:id="@+id/radial_picker"
         android:layout_width="@dimen/timepicker_radial_picker_dimen"
         android:layout_height="match_parent"
-        android:layout_gravity="center"
-        android:focusable="true"
-        android:focusableInTouchMode="true" />
+        android:layout_gravity="center" />
 </LinearLayout>
diff --git a/core/res/res/layout/action_mode_close_item_material.xml b/core/res/res/layout/action_mode_close_item_material.xml
new file mode 100644
index 0000000..8eb780b
--- /dev/null
+++ b/core/res/res/layout/action_mode_close_item_material.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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.
+-->
+
+<ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/action_mode_close_button"
+        android:focusable="true"
+        android:clickable="true"
+        android:paddingStart="8dip"
+        android:src="?android:attr/actionModeCloseDrawable"
+        style="?android:attr/actionModeCloseButtonStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_marginEnd="16dip" />
diff --git a/core/res/res/layout/alert_dialog_material.xml b/core/res/res/layout/alert_dialog_material.xml
index 5f9066a..be89e41 100644
--- a/core/res/res/layout/alert_dialog_material.xml
+++ b/core/res/res/layout/alert_dialog_material.xml
@@ -33,8 +33,7 @@
             android:gravity="center_vertical|start"
             android:paddingStart="@dimen/alert_dialog_padding_material"
             android:paddingEnd="@dimen/alert_dialog_padding_material"
-            android:paddingTop="@dimen/alert_dialog_padding_material"
-            android:paddingBottom="8dip">
+            android:paddingTop="@dimen/alert_dialog_padding_top_material">
             <ImageView android:id="@+id/icon"
                 android:layout_width="32dip"
                 android:layout_height="32dip"
@@ -57,7 +56,8 @@
         android:layout_height="wrap_content"
         android:layout_weight="1"
         android:orientation="vertical"
-        android:minHeight="64dp">
+        android:minHeight="64dp"
+        android:paddingTop="@dimen/alert_dialog_padding_top_material">
         <ScrollView android:id="@+id/scrollView"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -67,9 +67,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:paddingStart="@dimen/alert_dialog_padding_material"
-                android:paddingEnd="@dimen/alert_dialog_padding_material"
-                android:paddingTop="@dimen/alert_dialog_padding_material"
-                android:paddingBottom="@dimen/alert_dialog_padding_material" />
+                android:paddingEnd="@dimen/alert_dialog_padding_material" />
         </ScrollView>
     </LinearLayout>
 
@@ -89,15 +87,14 @@
         android:layout_height="wrap_content"
         android:layoutDirection="locale"
         android:orientation="horizontal"
-        android:paddingStart="6dp"
-        android:paddingEnd="6dp"
-        android:paddingBottom="6dp">
+        android:paddingStart="12dp"
+        android:paddingEnd="12dp"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp">
         <Button android:id="@+id/button3"
             style="?attr/buttonBarNeutralButtonStyle"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:maxLines="2"
-            android:minHeight="@dimen/alert_dialog_button_bar_height" />
+            android:layout_height="wrap_content" />
         <Space
             android:layout_width="0dp"
             android:layout_height="0dp"
@@ -106,14 +103,10 @@
         <Button android:id="@+id/button2"
             style="?attr/buttonBarNegativeButtonStyle"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:maxLines="2"
-            android:minHeight="@dimen/alert_dialog_button_bar_height" />
+            android:layout_height="wrap_content" />
         <Button android:id="@+id/button1"
             style="?attr/buttonBarPositiveButtonStyle"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:maxLines="2"
-            android:minHeight="@dimen/alert_dialog_button_bar_height" />
+            android:layout_height="wrap_content" />
     </LinearLayout>
 </LinearLayout>
diff --git a/core/res/res/layout/alert_dialog_progress_material.xml b/core/res/res/layout/alert_dialog_progress_material.xml
index b9d0814..d005a44 100644
--- a/core/res/res/layout/alert_dialog_progress_material.xml
+++ b/core/res/res/layout/alert_dialog_progress_material.xml
@@ -17,32 +17,27 @@
 
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
-    android:layout_height="match_parent">
-    <ProgressBar android:id="@+id/progress"
-        style="?android:attr/progressBarStyleHorizontal"
+    android:layout_height="match_parent"
+    android:paddingStart="@dimen/alert_dialog_padding_material"
+    android:paddingTop="@dimen/alert_dialog_padding_top_material"
+    android:paddingEnd="@dimen/alert_dialog_padding_material"
+    android:paddingBottom="@dimen/alert_dialog_padding_top_material">
+    <ProgressBar
+        android:id="@+id/progress"
+        style="?attr/progressBarStyleHorizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="16dip"
-        android:layout_marginBottom="1dip"
-        android:layout_marginStart="16dip"
-        android:layout_marginEnd="16dip"
         android:layout_centerHorizontal="true" />
     <TextView
         android:id="@+id/progress_percent"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingBottom="16dip"
-        android:layout_marginStart="16dip"
-        android:layout_marginEnd="16dip"
         android:layout_alignParentStart="true"
         android:layout_below="@id/progress" />
     <TextView
         android:id="@+id/progress_number"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingBottom="16dip"
-        android:layout_marginStart="16dip"
-        android:layout_marginEnd="16dip"
         android:layout_alignParentEnd="true"
         android:layout_below="@id/progress" />
 </RelativeLayout>
diff --git a/core/res/res/layout/dialog_custom_title_material.xml b/core/res/res/layout/dialog_custom_title_material.xml
index 550b72e..248a05e 100644
--- a/core/res/res/layout/dialog_custom_title_material.xml
+++ b/core/res/res/layout/dialog_custom_title_material.xml
@@ -23,17 +23,17 @@
     android:fitsSystemWindows="true">
     <FrameLayout android:id="@android:id/title_container"
         android:layout_width="match_parent"
-        android:layout_height="?android:attr/windowTitleSize"
+        android:layout_height="?attr/windowTitleSize"
         android:layout_weight="0"
         android:gravity="center_vertical|start"
-        style="?android:attr/windowTitleBackgroundStyle" />
+        style="?attr/windowTitleBackgroundStyle" />
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_weight="1"
         android:orientation="vertical"
-        android:foreground="?android:attr/windowContentOverlay">
-        <FrameLayout android:id="@android:id/content"
+        android:foreground="?attr/windowContentOverlay">
+        <FrameLayout android:id="@id/content"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
     </FrameLayout>
diff --git a/core/res/res/layout/dialog_title_icons_material.xml b/core/res/res/layout/dialog_title_icons_material.xml
index 28e20d9..21396da 100644
--- a/core/res/res/layout/dialog_title_icons_material.xml
+++ b/core/res/res/layout/dialog_title_icons_material.xml
@@ -28,16 +28,16 @@
         android:layout_height="wrap_content"
         android:orientation="horizontal"
         android:gravity="center_vertical"
-        android:paddingStart="16dip"
-        android:paddingEnd="16dip"
-        android:paddingTop="16dip">
+        android:paddingStart="@dimen/alert_dialog_padding_material"
+        android:paddingEnd="@dimen/alert_dialog_padding_material"
+        android:paddingTop="@dimen/alert_dialog_padding_material">
         <ImageView android:id="@+id/left_icon"
             android:layout_width="32dip"
             android:layout_height="32dip"
             android:scaleType="fitCenter"
             android:layout_marginEnd="8dip" />
-        <TextView android:id="@android:id/title"
-            style="?android:attr/windowTitleStyle"
+        <TextView android:id="@id/title"
+            style="?attr/windowTitleStyle"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="0" />
@@ -52,8 +52,8 @@
         android:layout_width="match_parent" android:layout_height="wrap_content"
         android:layout_weight="1"
         android:orientation="vertical"
-        android:foreground="?android:attr/windowContentOverlay">
-        <FrameLayout android:id="@android:id/content"
+        android:foreground="?attr/windowContentOverlay">
+        <FrameLayout android:id="@id/content"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
     </FrameLayout>
diff --git a/core/res/res/layout/dialog_title_material.xml b/core/res/res/layout/dialog_title_material.xml
index 918c8f1..fcf6164 100644
--- a/core/res/res/layout/dialog_title_material.xml
+++ b/core/res/res/layout/dialog_title_material.xml
@@ -29,15 +29,15 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:textAlignment="viewStart"
-        android:paddingStart="16dip"
-        android:paddingEnd="16dip"
-        android:paddingTop="16dip" />
+        android:paddingStart="@dimen/alert_dialog_padding_material"
+        android:paddingEnd="@dimen/alert_dialog_padding_material"
+        android:paddingTop="@dimen/alert_dialog_padding_top_material" />
     <FrameLayout
         android:layout_width="match_parent" android:layout_height="wrap_content"
         android:layout_weight="1"
         android:orientation="vertical"
-        android:foreground="?android:attr/windowContentOverlay">
-        <FrameLayout android:id="@android:id/content"
+        android:foreground="?attr/windowContentOverlay">
+        <FrameLayout android:id="@id/content"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
     </FrameLayout>
diff --git a/core/res/res/layout/notification_material_action.xml b/core/res/res/layout/notification_material_action.xml
index 637d941..da8b2e7 100644
--- a/core/res/res/layout/notification_material_action.xml
+++ b/core/res/res/layout/notification_material_action.xml
@@ -29,4 +29,5 @@
     android:textSize="13sp"
     android:singleLine="true"
     android:ellipsize="end"
+    android:background="@drawable/notification_material_action_background"
     />
diff --git a/core/res/res/layout/notification_material_media_action.xml b/core/res/res/layout/notification_material_media_action.xml
index 331ee57..1d52e54 100644
--- a/core/res/res/layout/notification_material_media_action.xml
+++ b/core/res/res/layout/notification_material_media_action.xml
@@ -16,10 +16,13 @@
   -->
 
 <ImageButton xmlns:android="http://schemas.android.com/apk/res/android"
-    style="@android:style/Widget.Material.Light.Button.Borderless.Small"
+    style="@android:style/Widget.Material.Button.Borderless.Small"
     android:id="@+id/action0"
-    android:layout_width="60dp"
+    android:layout_width="48dp"
     android:layout_height="match_parent"
+    android:layout_marginLeft="2dp"
+    android:layout_marginRight="2dp"
     android:layout_weight="1"
     android:gravity="center"
+    android:background="@drawable/notification_material_media_action_background"
     />
diff --git a/core/res/res/layout/notification_template_material_big_media.xml b/core/res/res/layout/notification_template_material_big_media.xml
index 3c44141..93acdbf 100644
--- a/core/res/res/layout/notification_template_material_big_media.xml
+++ b/core/res/res/layout/notification_template_material_big_media.xml
@@ -15,143 +15,43 @@
   ~ limitations under the License
   -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:internal="http://schemas.android.com/apk/prv/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/status_bar_latest_event_content"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    internal:layout_minHeight="65dp"
-    internal:layout_maxHeight="unbounded"
+    android:layout_height="128dp"
+    android:background="#00000000"
     >
+    <include layout="@layout/notification_template_icon_group"
+        android:layout_width="@dimen/notification_large_icon_width"
+        android:layout_height="@dimen/notification_large_icon_height"
+        />
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="fill_vertical"
+        android:layout_marginStart="@dimen/notification_large_icon_width"
         android:minHeight="@dimen/notification_large_icon_height"
         android:orientation="vertical"
-        android:gravity="top"
         >
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingStart="@dimen/notification_large_icon_width"
-            android:minHeight="@dimen/notification_large_icon_height"
-            android:paddingTop="2dp"
-            android:orientation="vertical"
-            >
-            <LinearLayout
-                android:id="@+id/line1"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:paddingTop="6dp"
-                android:layout_marginEnd="8dp"
-                android:layout_marginStart="8dp"
-                android:orientation="horizontal"
-                >
-                <TextView android:id="@+id/title"
-                    android:textAppearance="@style/TextAppearance.Material.Notification.Title"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:singleLine="true"
-                    android:ellipsize="marquee"
-                    android:fadingEdge="horizontal"
-                    android:layout_weight="1"
-                    />
-                <ViewStub android:id="@+id/time"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="0"
-                    android:visibility="gone"
-                    android:layout="@layout/notification_template_part_time"
-                    />
-                <ViewStub android:id="@+id/chronometer"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="0"
-                    android:visibility="gone"
-                    android:layout="@layout/notification_template_part_chronometer"
-                    />
-            </LinearLayout>
-            <TextView android:id="@+id/text2"
-                android:textAppearance="@style/TextAppearance.Material.Notification.Line2"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="-2dp"
-                android:layout_marginBottom="-2dp"
-                android:layout_marginStart="8dp"
-                android:layout_marginEnd="8dp"
-                android:singleLine="true"
-                android:fadingEdge="horizontal"
-                android:ellipsize="marquee"
-                android:visibility="gone"
-                />
-            <TextView android:id="@+id/big_text"
-                android:textAppearance="@style/TextAppearance.Material.Notification"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="8dp"
-                android:layout_marginEnd="8dp"
-                android:singleLine="false"
-                android:visibility="gone"
-                />
-            <LinearLayout
-                android:id="@+id/line3"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="8dp"
-                android:layout_marginEnd="8dp"
-                android:orientation="horizontal"
-                android:gravity="center_vertical"
-                >
-                <TextView android:id="@+id/text"
-                    android:textAppearance="@style/TextAppearance.Material.Notification"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:layout_gravity="center"
-                    android:singleLine="true"
-                    android:ellipsize="marquee"
-                    android:fadingEdge="horizontal"
-                    />
-                <TextView android:id="@+id/info"
-                    android:textAppearance="@style/TextAppearance.Material.Notification.Info"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center"
-                    android:layout_weight="0"
-                    android:singleLine="true"
-                    android:gravity="center"
-                    android:paddingStart="8dp"
-                    />
-            </LinearLayout>
-        </LinearLayout>
-        <FrameLayout
-                android:layout_width="match_parent"
-                android:layout_height="60dp"
-                android:id="@+id/media_action_area"
-                android:background="@color/notification_media_action_bg"
-                >
-            <LinearLayout
-                android:id="@+id/actions"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_marginTop="6dp"
-                android:orientation="horizontal"
-                >
-                <!-- media buttons will be added here -->
-            </LinearLayout>
-            <ProgressBar
-                android:id="@android:id/progress"
-                android:layout_width="match_parent"
-                android:layout_height="6dp"
-                android:layout_gravity="top"
-                android:visibility="gone"
-                style="@style/Widget.Material.Notification.ProgressBar.Media"
-                />
-        </FrameLayout>
+        <include layout="@layout/notification_template_part_line1" />
+        <include layout="@layout/notification_template_part_line2" />
+        <include layout="@layout/notification_template_part_line3" />
     </LinearLayout>
-    <include layout="@layout/notification_template_icon_group"
-             android:layout_width="@dimen/notification_large_icon_width"
-             android:layout_height="@dimen/notification_large_icon_height"
-            />
-</FrameLayout>
+    <LinearLayout
+        android:id="@+id/media_actions"
+        android:layout_width="match_parent"
+        android:layout_height="48dp"
+        android:layout_alignParentBottom="true"
+        android:layout_marginStart="12dp"
+        android:layout_marginEnd="12dp"
+        android:orientation="horizontal"
+        android:layoutDirection="ltr"
+        >
+        <!-- media buttons will be added here -->
+    </LinearLayout>
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_above="@id/media_actions"
+        android:id="@+id/action_divider"
+        android:background="@drawable/notification_template_divider_media" />
+</RelativeLayout>
diff --git a/core/res/res/layout/notification_template_material_big_media_narrow.xml b/core/res/res/layout/notification_template_material_big_media_narrow.xml
new file mode 100644
index 0000000..21e5ff8
--- /dev/null
+++ b/core/res/res/layout/notification_template_material_big_media_narrow.xml
@@ -0,0 +1,62 @@
+<?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
+  -->
+
+<!-- Layout to be used with only max 3 actions. It has a much larger picture at the left side-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/status_bar_latest_event_content"
+    android:layout_width="match_parent"
+    android:layout_height="128dp"
+    android:background="#00000000"
+    >
+    <ImageView android:id="@+id/icon"
+        android:layout_width="128dp"
+        android:layout_height="128dp"
+        android:scaleType="centerCrop"
+        />
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:layout_toEndOf="@id/icon"
+        android:minHeight="@dimen/notification_large_icon_height"
+        android:orientation="vertical"
+        >
+        <include layout="@layout/notification_template_part_line1" />
+        <include layout="@layout/notification_template_part_line2" />
+        <include layout="@layout/notification_template_part_line3" />
+    </LinearLayout>
+    <LinearLayout
+        android:id="@+id/media_actions"
+        android:layout_width="match_parent"
+        android:layout_height="48dp"
+        android:layout_toEndOf="@id/icon"
+        android:layout_alignParentBottom="true"
+        android:layout_marginStart="12dp"
+        android:layout_marginEnd="12dp"
+        android:orientation="horizontal"
+        android:layoutDirection="ltr"
+        >
+        <!-- media buttons will be added here -->
+    </LinearLayout>
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_toEndOf="@id/icon"
+        android:layout_above="@id/media_actions"
+        android:id="@+id/action_divider"
+        android:background="@drawable/notification_template_divider_media" />
+</RelativeLayout>
diff --git a/core/res/res/layout/notification_template_material_inbox.xml b/core/res/res/layout/notification_template_material_inbox.xml
index 2382d18..8a66c3f 100644
--- a/core/res/res/layout/notification_template_material_inbox.xml
+++ b/core/res/res/layout/notification_template_material_inbox.xml
@@ -44,6 +44,7 @@
             android:layout_width="match_parent"
             android:layout_weight="1"
             android:layout_height="0dp"
+            android:layout_marginEnd="8dp"
             android:orientation="horizontal"
             >
             <TextView android:id="@+id/inbox_text0"
@@ -60,7 +61,6 @@
                 android:layout_height="@dimen/notification_badge_size"
                 android:layout_weight="0"
                 android:layout_marginStart="4dp"
-                android:layout_marginEnd="8dp"
                 android:scaleType="fitCenter"
                 android:visibility="gone"
                 />
diff --git a/core/res/res/layout/notification_template_material_media.xml b/core/res/res/layout/notification_template_material_media.xml
index db24c1f..69020a4 100644
--- a/core/res/res/layout/notification_template_material_media.xml
+++ b/core/res/res/layout/notification_template_material_media.xml
@@ -21,6 +21,7 @@
     android:layout_width="match_parent"
     android:layout_height="64dp"
     android:orientation="horizontal"
+    android:background="#00000000"
     internal:layout_minHeight="64dp"
     internal:layout_maxHeight="64dp"
     >
@@ -36,99 +37,19 @@
         android:layout_gravity="fill_vertical"
         android:minHeight="@dimen/notification_large_icon_height"
         android:orientation="vertical"
-        android:paddingEnd="8dp"
-        android:paddingTop="2dp"
-        android:paddingBottom="2dp"
-        android:gravity="top"
         >
-        <LinearLayout
-            android:id="@+id/line1"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="6dp"
-            android:layout_marginStart="8dp"
-            android:orientation="horizontal"
-            >
-            <TextView android:id="@+id/title"
-                android:textAppearance="@style/TextAppearance.Material.Notification.Title"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:singleLine="true"
-                android:ellipsize="marquee"
-                android:fadingEdge="horizontal"
-                android:layout_weight="1"
-                />
-            <ViewStub android:id="@+id/time"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_weight="0"
-                android:visibility="gone"
-                android:layout="@layout/notification_template_part_time"
-                />
-            <ViewStub android:id="@+id/chronometer"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_weight="0"
-                android:visibility="gone"
-                android:layout="@layout/notification_template_part_chronometer"
-                />
-        </LinearLayout>
-        <TextView android:id="@+id/text2"
-            android:textAppearance="@style/TextAppearance.Material.Notification.Line2"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="-2dp"
-            android:layout_marginBottom="-2dp"
-            android:layout_marginStart="8dp"
-            android:singleLine="true"
-            android:fadingEdge="horizontal"
-            android:ellipsize="marquee"
-            android:visibility="gone"
-            />
-        <ProgressBar
-            android:id="@android:id/progress"
-            android:layout_width="match_parent"
-            android:layout_height="12dp"
-            android:layout_marginStart="8dp"
-            android:visibility="gone"
-            style="@style/Widget.Material.Notification.ProgressBar"
-            />
-        <LinearLayout
-            android:id="@+id/line3"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:gravity="center_vertical"
-            android:layout_marginStart="8dp"
-            >
-            <TextView android:id="@+id/text"
-                android:textAppearance="@style/TextAppearance.Material.Notification"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:layout_gravity="center"
-                android:singleLine="true"
-                android:ellipsize="marquee"
-                android:fadingEdge="horizontal"
-                />
-            <TextView android:id="@+id/info"
-                android:textAppearance="@style/TextAppearance.Material.Notification.Info"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:layout_weight="0"
-                android:singleLine="true"
-                android:gravity="center"
-                android:paddingStart="8dp"
-                />
-        </LinearLayout>
+        <include layout="@layout/notification_template_part_line1" />
+        <include layout="@layout/notification_template_part_line2" />
+        <include layout="@layout/notification_template_part_line3" />
     </LinearLayout>
     <LinearLayout
-        android:id="@+id/actions"
+        android:id="@+id/media_actions"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
+        android:layout_marginEnd="6dp"
         android:layout_gravity="center_vertical|end"
         android:orientation="horizontal"
+        android:layoutDirection="ltr"
         >
         <!-- media buttons will be added here -->
     </LinearLayout>
diff --git a/core/res/res/layout/notification_template_part_line2.xml b/core/res/res/layout/notification_template_part_line2.xml
index 7e99c5e..aeef3ab 100644
--- a/core/res/res/layout/notification_template_part_line2.xml
+++ b/core/res/res/layout/notification_template_part_line2.xml
@@ -45,13 +45,13 @@
             android:visibility="gone"
             />
     </LinearLayout>
-    <ProgressBar
+    <ViewStub
         android:id="@android:id/progress"
+        android:layout="@layout/notification_template_progressbar"
         android:layout_width="match_parent"
         android:layout_height="15dp"
         android:layout_marginEnd="8dp"
         android:visibility="gone"
         android:layout_weight="0"
-        style="@style/Widget.Material.Light.ProgressBar.Horizontal"
         />
 </merge>
diff --git a/core/res/res/layout/notification_template_progressbar.xml b/core/res/res/layout/notification_template_progressbar.xml
new file mode 100644
index 0000000..61480b8
--- /dev/null
+++ b/core/res/res/layout/notification_template_progressbar.xml
@@ -0,0 +1,23 @@
+<?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
+  -->
+
+<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/progress"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    style="@style/Widget.Material.Light.ProgressBar.Horizontal"
+    />
diff --git a/core/res/res/layout/preference_material.xml b/core/res/res/layout/preference_material.xml
index 778e70a..a137149 100644
--- a/core/res/res/layout/preference_material.xml
+++ b/core/res/res/layout/preference_material.xml
@@ -24,7 +24,8 @@
     android:gravity="center_vertical"
     android:paddingStart="?attr/listPreferredItemPaddingStart"
     android:paddingEnd="?attr/listPreferredItemPaddingEnd"
-    android:background="?attr/activatedBackgroundIndicator">
+    android:background="?attr/activatedBackgroundIndicator"
+    android:clipToPadding="false">
 
     <LinearLayout
         android:id="@+id/icon_frame"
diff --git a/core/res/res/layout/progress_dialog_material.xml b/core/res/res/layout/progress_dialog_material.xml
index 84d06b5..54af106 100644
--- a/core/res/res/layout/progress_dialog_material.xml
+++ b/core/res/res/layout/progress_dialog_material.xml
@@ -19,21 +19,27 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
-    <LinearLayout android:id="@+id/body"
+    <LinearLayout
+        android:id="@+id/body"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:baselineAligned="false"
-        android:padding="16dip">
+        android:paddingStart="@dimen/alert_dialog_padding_material"
+        android:paddingTop="@dimen/alert_dialog_padding_top_material"
+        android:paddingEnd="@dimen/alert_dialog_padding_material"
+        android:paddingBottom="@dimen/alert_dialog_padding_top_material">
 
-        <ProgressBar android:id="@android:id/progress"
+        <ProgressBar
+            android:id="@id/progress"
             style="?android:attr/progressBarStyle"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:max="10000"
-            android:layout_marginEnd="16dip" />
+            android:layout_marginEnd="@dimen/alert_dialog_padding_material" />
 
-        <TextView android:id="@+id/message"
+        <TextView
+            android:id="@+id/message"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical" />
diff --git a/core/res/res/layout/resolve_list_item.xml b/core/res/res/layout/resolve_list_item.xml
index 7aa9a72..37c4270 100644
--- a/core/res/res/layout/resolve_list_item.xml
+++ b/core/res/res/layout/resolve_list_item.xml
@@ -18,9 +18,10 @@
 */
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
+              android:orientation="horizontal"
               android:layout_height="wrap_content"
               android:layout_width="match_parent"
+              android:minHeight="?attr/listPreferredItemHeightSmall"
               android:paddingTop="4dp"
               android:paddingBottom="4dp"
               android:background="?attr/activatedBackgroundIndicator">
@@ -28,37 +29,40 @@
     <!-- Activity icon when presenting dialog
          Size will be filled in by ResolverActivity -->
     <ImageView android:id="@+id/icon"
-               android:layout_width="0dp"
-               android:layout_height="0dp"
-               android:layout_gravity="center"
-               android:layout_margin="4dp"
+               android:layout_width="24dp"
+               android:layout_height="24dp"
+               android:layout_gravity="start|center_vertical"
+               android:layout_marginStart="16dp"
+               android:layout_marginEnd="16dp"
+               android:layout_marginTop="12dp"
+               android:layout_marginBottom="12dp"
                android:scaleType="fitCenter" />
 
     <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:gravity="center"
+              android:gravity="start|center_vertical"
               android:orientation="vertical"
+              android:paddingStart="16dp"
+              android:paddingEnd="16dp"
               android:layout_height="wrap_content"
               android:layout_width="wrap_content"
-              android:layout_gravity="center">
+              android:layout_gravity="start|center_vertical">
         <!-- Activity name -->
         <TextView android:id="@android:id/text1"
-                  android:textAppearance="?android:attr/textAppearanceSmall"
-                  android:fontFamily="sans-serif-condensed"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
-                  android:gravity="center"
-                  android:minLines="2"
-                  android:maxLines="2" />
+                  android:textAppearance="?attr/textAppearanceMedium"
+                  android:textColor="?attr/textColorPrimary"
+                  android:minLines="1"
+                  android:maxLines="1"
+                  android:ellipsize="marquee" />
         <!-- Extended activity info to distinguish between duplicate activity names -->
         <TextView android:id="@android:id/text2"
                   android:textAppearance="?android:attr/textAppearanceSmall"
-                  android:fontFamily="sans-serif-condensed"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
-                  android:gravity="center"
-                  android:minLines="2"
-                  android:maxLines="2"
-                  android:paddingTop="4dip" />
+                  android:minLines="1"
+                  android:maxLines="1"
+                  android:ellipsize="marquee" />
     </LinearLayout>
 </LinearLayout>
 
diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml
new file mode 100644
index 0000000..5889136
--- /dev/null
+++ b/core/res/res/layout/resolver_different_item_header.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_alwaysShow="true"
+    android:text="@string/use_a_different_app"
+    android:minHeight="56dp"
+    android:textAppearance="?android:attr/textAppearanceMedium"
+    android:gravity="start|center_vertical"
+    android:paddingStart="16dp"
+    android:paddingEnd="16dp"
+    android:paddingTop="8dp"
+    android:paddingBottom="8dp"
+    android:background="@color/white"
+    android:elevation="8dp"
+    />
diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml
index 8e57543..727f9c6 100644
--- a/core/res/res/layout/resolver_list.xml
+++ b/core/res/res/layout/resolver_list.xml
@@ -21,38 +21,36 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:maxWidth="@dimen/resolver_max_width"
-    android:maxCollapsedHeight="260dp"
+    android:maxCollapsedHeight="192dp"
     android:maxCollapsedHeightSmall="56dp"
     android:id="@id/contentPanel"
     >
 
     <TextView android:id="@+id/title"
               android:layout_width="match_parent"
-              android:layout_height="?android:attr/listPreferredItemHeight"
+              android:layout_height="wrap_content"
               android:layout_alwaysShow="true"
+              android:minHeight="56dp"
               android:textAppearance="?android:attr/textAppearanceMedium"
               android:gravity="start|center_vertical"
-              android:paddingLeft="32dp"
-              android:paddingRight="32dp"
+              android:paddingStart="16dp"
+              android:paddingEnd="16dp"
+              android:paddingTop="8dp"
+              android:paddingBottom="8dp"
               android:background="@color/white"
               android:elevation="8dp"
               />
 
-    <GridView
+    <ListView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/resolver_list"
-        android:numColumns="4"
-        android:columnWidth="128dp"
         android:clipToPadding="false"
         android:scrollbarStyle="outsideOverlay"
-        android:paddingLeft="32dp"
-        android:paddingRight="32dp"
-        android:paddingTop="16dp"
-        android:paddingBottom="16dp"
         android:background="@color/white"
         android:elevation="8dp"
         android:nestedScrollingEnabled="true"
+        android:divider="@null"
         />
 
     <TextView android:id="@+id/empty"
@@ -72,14 +70,15 @@
         android:layout_height="wrap_content"
         android:layout_ignoreOffset="true"
         android:layout_alwaysShow="true"
-        android:gravity="end"
+        android:gravity="end|center_vertical"
         android:orientation="horizontal"
         android:layoutDirection="locale"
         android:measureWithLargestChild="true"
         android:background="@color/white"
-        android:paddingBottom="16dp"
-        android:paddingStart="32dp"
-        android:paddingEnd="32dp"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp"
+        android:paddingStart="12dp"
+        android:paddingEnd="12dp"
         android:elevation="8dp">
         <Button android:id="@+id/button_once"
                 android:layout_width="wrap_content"
diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
index 0bd0e14..884f41e 100644
--- a/core/res/res/layout/resolver_list_with_default.xml
+++ b/core/res/res/layout/resolver_list_with_default.xml
@@ -21,7 +21,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:maxWidth="@dimen/resolver_max_width"
-    android:maxCollapsedHeight="48dp"
+    android:maxCollapsedHeight="144dp"
     android:id="@id/contentPanel"
     >
 
@@ -35,26 +35,28 @@
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="80dp"
-            android:paddingStart="32dp"
-            android:paddingEnd="32dp"
+            android:layout_height="64dp"
             android:orientation="horizontal"
             >
 
+            <ImageView android:id="@+id/icon"
+                       android:layout_width="24dp"
+                       android:layout_height="24dp"
+                       android:layout_gravity="start|top"
+                       android:layout_marginStart="16dp"
+                       android:layout_marginEnd="16dp"
+                       android:layout_marginTop="20dp"
+                       android:scaleType="fitCenter"
+                       />
             <TextView android:id="@+id/title"
                       android:layout_width="0dp"
                       android:layout_weight="1"
                       android:layout_height="?android:attr/listPreferredItemHeight"
+                      android:layout_marginStart="16dp"
                       android:textAppearance="?android:attr/textAppearanceMedium"
                       android:gravity="start|center_vertical"
                       android:paddingEnd="16dp"
                       />
-            <ImageView android:id="@+id/icon"
-                       android:layout_width="56dp"
-                       android:layout_height="56dp"
-                       android:layout_gravity="center_vertical"
-                       android:scaleType="fitCenter"
-                       />
         </LinearLayout>
 
         <LinearLayout
@@ -64,13 +66,14 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_alwaysShow="true"
-            android:gravity="end"
+            android:gravity="end|center_vertical"
             android:orientation="horizontal"
             android:layoutDirection="locale"
             android:measureWithLargestChild="true"
-            android:paddingBottom="16dp"
-            android:paddingStart="32dp"
-            android:paddingEnd="32dp"
+            android:paddingTop="8dp"
+            android:paddingBottom="8dp"
+            android:paddingStart="12dp"
+            android:paddingEnd="12dp"
             android:background="@color/white"
             android:elevation="8dp">
             <Button android:id="@+id/button_once"
@@ -99,21 +102,16 @@
               android:background="?android:attr/dividerVertical" />
     </LinearLayout>
 
-    <GridView
+    <ListView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:id="@+id/resolver_list"
-        android:numColumns="4"
-        android:columnWidth="128dp"
         android:clipToPadding="false"
         android:scrollbarStyle="outsideOverlay"
-        android:paddingLeft="32dp"
-        android:paddingRight="32dp"
-        android:paddingTop="16dp"
-        android:paddingBottom="16dp"
         android:background="@color/white"
         android:elevation="8dp"
         android:nestedScrollingEnabled="true"
+        android:divider="@null"
         />
 
 </com.android.internal.widget.ResolverDrawerLayout>
diff --git a/core/res/res/layout/screen_toolbar.xml b/core/res/res/layout/screen_toolbar.xml
index 039e89f..88c9cf6 100644
--- a/core/res/res/layout/screen_toolbar.xml
+++ b/core/res/res/layout/screen_toolbar.xml
@@ -41,6 +41,7 @@
             android:id="@+id/action_bar"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:navigationContentDescription="@string/action_bar_up_description"
             style="?attr/toolbarStyle" />
         <com.android.internal.widget.ActionBarContextView
             android:id="@+id/action_context_bar"
diff --git a/core/res/res/layout/simple_spinner_dropdown_item.xml b/core/res/res/layout/simple_spinner_dropdown_item.xml
index e2bd474..f276cfa 100644
--- a/core/res/res/layout/simple_spinner_dropdown_item.xml
+++ b/core/res/res/layout/simple_spinner_dropdown_item.xml
@@ -4,24 +4,23 @@
 **
 ** Copyright 2008, 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 
+** 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, 
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-** See the License for the specific language governing permissions and 
+** 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.
 */
 -->
-<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" 
+<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@android:id/text1"
     style="?android:attr/spinnerDropDownItemStyle"
     android:singleLine="true"
     android:layout_width="match_parent"
     android:layout_height="?android:attr/dropdownListPreferredItemHeight"
-    android:ellipsize="marquee"
-    android:textAlignment="inherit"/>
+    android:ellipsize="marquee"/>
diff --git a/core/res/res/layout/time_picker_holo.xml b/core/res/res/layout/time_picker_holo.xml
index 483eb6d..08d2211 100644
--- a/core/res/res/layout/time_picker_holo.xml
+++ b/core/res/res/layout/time_picker_holo.xml
@@ -18,20 +18,17 @@
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-          android:layout_width="wrap_content"
-          android:layout_height="match_parent"
-          android:orientation="vertical"
-          android:focusable="true" >
+    android:layout_width="wrap_content"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
     <include
-            layout="@layout/time_header_label"
-            android:layout_width="match_parent"
-            android:layout_height="@dimen/timepicker_header_height"
-            android:layout_gravity="center" />
+        layout="@layout/time_header_label"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/timepicker_header_height"
+        android:layout_gravity="center" />
     <android.widget.RadialTimePickerView
-            android:id="@+id/radial_picker"
-            android:layout_width="wrap_content"
-            android:layout_height="@dimen/timepicker_radial_picker_dimen"
-            android:layout_gravity="center"
-            android:focusable="true"
-            android:focusableInTouchMode="true" />
+        android:id="@+id/radial_picker"
+        android:layout_width="wrap_content"
+        android:layout_height="@dimen/timepicker_radial_picker_dimen"
+        android:layout_gravity="center" />
 </LinearLayout>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 312ffb138..8cb0bae 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Laat toe"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Weier"</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; wil \'n boodskap na &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; stuur."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Hierdie "<font fgcolor="#ffffb060">"kan heffings veroorsaak"</font>" op jou selfoonrekening."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Dit sal heffings op jou selfoonrekening veroorsaak."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Dit "<b>"kan heffings veroorsaak"</b>" op jou selfoonrekening."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Dit sal heffings op jou selfoonrekening veroorsaak."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Stuur"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Kanselleer"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Onthou my keuse"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index a1de99e..478a8de 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"ፍቀድ"</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; ለ&lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; መልዕክት ለመላክ ይፈልጋል።"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ይሄ በተንቀሳቃሽ ስልክ መለያዎ ላይ "<font fgcolor="#ffffb060">"ክፍያዎችን ሊያስከትል ይችላል"</font>"።"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"ይሄ በተንቀሳቃሽ ስልክ መለያዎ ላይ ክፍያዎችን ያስከትላል።"</font></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">"ላክ"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ይቅር"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ምርጫዬን አስታውስ"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ተደራሽነት ነቅቷል።"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ተደራሽነት ተሰርዟል።"</string>
     <string name="user_switched" msgid="3768006783166984410">"የአሁኑ ተጠቃሚ <xliff:g id="NAME">%1$s</xliff:g>።"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"ወደ <xliff:g id="NAME">%1$s</xliff:g> በመቀየር ላይ…"</string>
     <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>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index ba2194e..b4b8c82 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1071,7 +1071,7 @@
   </plurals>
   <plurals name="num_hours_ago">
     <item quantity="one" msgid="9150797944610821849">"قبل ساعة واحدة"</item>
-    <item quantity="other" msgid="2467273239587587569">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعة"</item>
+    <item quantity="other" msgid="2467273239587587569">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعات"</item>
   </plurals>
   <plurals name="last_num_days">
     <item quantity="other" msgid="3069992808164318268">"آخر <xliff:g id="COUNT">%d</xliff:g> من الأيام"</item>
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"السماح"</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; في إرسال رسالة إلى &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"هذا "<font fgcolor="#ffffb060">"قد يؤدي إلى فرض رسوم"</font>" على حسابك على الجوال."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"سيؤدي هذا إلى فرض رسوم على حسابك على الجوال."</font></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">"إرسال"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"إلغاء"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"تذكر اختياري"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"تم تمكين إمكانية الدخول."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"تم إلغاء تسهيل الدخول."</string>
     <string name="user_switched" msgid="3768006783166984410">"المستخدم الحالي <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"جارٍ التبديل إلى <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 5e2c5d8..e87c6e3 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"включване или изключване на телефона"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Разрешава на приложението да включва или изключва таблета."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Разрешава на приложението да включва или изключва телефона."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"нулиране на времето за изчакване на екрана"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Разрешава на приложението да нулира времето за изчакване на екрана."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"изпълнение в режим на фабричен тест"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Изпълнява се като тест на ниско ниво от производителя, което позволява пълен достъп до хардуера на таблета. Налице е само когато таблетът работи в режим на тест от производителя."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Изпълнява се като тест на ниско ниво от производителя, което позволява пълен достъп до хардуера на телефона. Налице е само когато телефонът работи в режим на тест от производителя."</string>
@@ -1296,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Разрешаване"</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; иска да изпрати съобщение до &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Това "<font fgcolor="#ffffb060">"може да доведе до таксуване"</font>" на мобилната ви сметка."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Това ще доведе до таксуване на мобилната ви сметка."</font></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">"Изпращане"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Отказ"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Изборът ми да се запомни"</string>
@@ -1425,8 +1423,7 @@
     <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>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Използвате това приложение извън служебния си потребителски профил"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Използвате това приложение в служебния си потребителски профил"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод на въвеждане"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхронизиране"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Да се приеме ли обаждането?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Винаги"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Само веднъж"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s не поддържа служебен потребителски профил"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Таблет"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Слушалки"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Достъпността е активирана."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Функцията за достъпност е анулирана."</string>
     <string name="user_switched" msgid="3768006783166984410">"Текущ потребител <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Превключва се към <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 07cf6c0..e847631 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"অনুমতি দিন"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; এ একটি বার্তা পাঠাতে চায়৷"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"এটির জন্য আপনার মোবাইল অ্যাকাউন্টে "<font fgcolor="#ffffb060">"চার্জ করা হতে পারে"</font>"৷"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"এর ফলে আপনার মোবাইল অ্যাকাউন্টের উপরে চার্জ করা হবে৷"</font></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">"পাঠান"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"বাতিল করুন"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"আমার পছন্দ মনে রাখুন"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 6859fe5..bc97ac0 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permet"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Denega"</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; vol enviar un missatge a &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Aquesta acció "<font fgcolor="#ffffb060">"pot fer que s\'apliquin càrrecs"</font>" al compte del mòbil."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Aquesta acció farà que s\'apliquin càrrecs al compte del mòbil."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Aquesta acció "<b>"pot produir càrrecs"</b>" al teu compte per a mòbils."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Aquesta acció produirà càrrecs al teu compte per a mòbils."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Envia"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancel·la"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Recorda la meva selecció"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"S\'ha activat l\'accessibilitat."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilitat cancel·lada."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuari actual: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"S\'està canviant a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propietari"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"L\'administrador no permet aquest canvi."</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index e1ab6c4..35ff766 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1228,9 +1228,9 @@
     <string name="smv_application" msgid="3307209192155442829">"Aplikace <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) porušila své vlastní vynucené zásady StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> porušil své vlastní vynucené zásady StrictMode."</string>
     <string name="android_upgrading_title" msgid="1584192285441405746">"Android se upgraduje..."</string>
-    <string name="android_upgrading_apk" msgid="7904042682111526169">"Optimalizace aplikace <xliff:g id="NUMBER_0">%1$d</xliff:g> z <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
+    <string name="android_upgrading_apk" msgid="7904042682111526169">"Optimalizování aplikace <xliff:g id="NUMBER_0">%1$d</xliff:g> z <xliff:g id="NUMBER_1">%2$d</xliff:g>."</string>
     <string name="android_upgrading_starting_apps" msgid="451464516346926713">"Spouštění aplikací."</string>
-    <string name="android_upgrading_complete" msgid="1405954754112999229">"Probíhá dokončování spouštění."</string>
+    <string name="android_upgrading_complete" msgid="1405954754112999229">"Dokončování inicializace."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Běží aplikace <xliff:g id="APP">%1$s</xliff:g>"</string>
     <string name="heavy_weight_notification_detail" msgid="1721681741617898865">"Dotykem přepnete aplikaci"</string>
     <string name="heavy_weight_switcher_title" msgid="7153167085403298169">"Přepnout aplikace?"</string>
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Povolit"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Odmítnout"</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; chce odeslat zprávu na adresu &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Mohou být účtovány poplatky"</font>" na váš mobilní účet."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Budou účtovány poplatky na váš mobilní účet."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Tato akce "<b>"může vést k naúčtování poplatků"</b>" na váš účet u mobilního operátora."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Tato akce povede k naúčtování poplatku na váš účet u mobilního operátora."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Odeslat"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Zrušit"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapamatovat moji volbu"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Usnadnění přístupu je aktivováno."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Usnadnění zrušeno."</string>
     <string name="user_switched" msgid="3768006783166984410">"Aktuální uživatel je <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Přepínání na uživatele <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Vlastník"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Chyba"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Administrátor tuto změnu zakázal"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 195743d..8f2dcd7 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Tillad"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Afvis"</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; vil sende en besked til &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Dette "<font fgcolor="#ffffb060">"kan medføre gebyrer"</font>" på din mobilkonto."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Dette vil medføre gebyrer på din mobilkonto."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Dette "<b>"kan medføre gebyrer"</b>" på din mobilkonto."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Dette vil medføre gebyrer på din mobilkonto."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Send"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Annuller"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Husk mit valg"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Hjælpefunktioner er aktiveret."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hjælpefunktioner er annulleret."</string>
     <string name="user_switched" msgid="3768006783166984410">"Nuværende bruger <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Skifter til <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Ejer"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Fejl"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Din administrator har ikke givet tilladelse til at foretage denne ændring"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index d958619..4c98e05 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Zulassen"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Nicht zulassen"</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; möchte eine Nachricht an &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; senden."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Hierfür könnten Ihrem Mobilfunkkonto "<font fgcolor="#ffffb060">"Gebühren berechnet werden"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Hierfür werden Ihrem Mobilfunkkonto Gebühren berechnet."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Hierfür könnten Ihrem Mobilfunkkonto "<b>"Gebühren berechnet werden"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Hierfür werden Ihrem Mobilfunkkonto Gebühren berechnet."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Senden"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Abbrechen"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Auswahl merken"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 929a726..6e7c2a4 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Αποδοχή"</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; θέλει να αποστείλει ένα μήνυμα στη διεύθυνση &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Αυτή η ρύθμιση "<font fgcolor="#ffffb060">"ενδέχεται να επιφέρει χρεώσεις"</font>" στον λογαριασμό κινητού σας."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Αυτή η ρύθμιση θα επιφέρει χρεώσεις στον λογαριασμό κινητού σας."</font></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">"Αποστολή"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Ακύρωση"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Απομνημόνευση της επιλογής μου"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index e3148ec..8804e86 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Allow"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Deny"</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; would like to send a message to &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"This "<font fgcolor="#ffffb060">"may cause charges"</font>" on your mobile account."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"This will cause charges on your mobile account."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"This "<b>"may cause charges"</b>" on your mobile account."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"This will cause charges on your mobile account."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Send"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancel"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Remember my choice"</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index e3148ec..8804e86 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Allow"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Deny"</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; would like to send a message to &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"This "<font fgcolor="#ffffb060">"may cause charges"</font>" on your mobile account."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"This will cause charges on your mobile account."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"This "<b>"may cause charges"</b>" on your mobile account."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"This will cause charges on your mobile account."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Send"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancel"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Remember my choice"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 3820ee5..d18d63b 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permitir"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Rechazar"</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; desea enviar un mensaje a &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Esto "<font fgcolor="#ffffb060">" puede causar que se apliquen cargos "</font>" en tu cuenta móvil."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Se aplicarán cargos en tu cuenta móvil."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400"><b>"Es posible que se apliquen cargos"</b>" en la cuenta del dispositivo móvil."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Se aplicarán cargos en la cuenta del dispositivo móvil."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Enviar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancelar"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Recordar mi elección"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Se activó la accesibilidad."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Se canceló la accesibilidad."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propietario"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"El administrador no permite este cambio."</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 9faf680..da03aa1 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permitir"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Denegar"</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; quiere enviar un mensaje a &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Es posible que se apliquen cargos"</font>" en tu cuenta móvil."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Se aplicarán cargos en tu cuenta móvil."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400"><b>"Es posible que se apliquen cargos"</b>" en tu cuenta móvil."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Se aplicarán cargos en tu cuenta móvil."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Enviar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancelar"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Recordar opción seleccionada"</string>
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index dc7c625..bc210fd 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Luba"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Keela"</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; soovib saata sõnumi aadressile &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"See "<font fgcolor="#ffffb060">"võib põhjustada kulusid"</font>" teie mobiilikontole."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"See lisab kulusid teie mobiilikontole."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Sellega võivad teie mobiilikontol "<b>"kaasneda kulud"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Sellega kaasnevad teie mobiilikontol kulud."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Saada"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Tühista"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Jäta minu valik meelde"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Hõlbustus on lubatud."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Hõlbustus on tühistatud."</string>
     <string name="user_switched" msgid="3768006783166984410">"Praegune kasutaja <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Üleminek kasutajale <xliff:g id="NAME">%1$s</xliff:g> ..."</string>
     <string name="owner_name" msgid="2716755460376028154">"Omanik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Viga"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Administraator ei luba sellist muudatust teha"</string>
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 6183bc0..f2a737e 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Onartu"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Eragotzi"</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; aplikazioak mezu bat bidali nahi du &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; helbidera."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Gastuak sor daitezke"</font>" mugikorreko kontuan."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Mugikorreko kontuan aldaketak egingo dira."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Baliteke horrek mugikorreko kontuan "<b>"gastuak eragitea"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Mugikorreko kontuan gastuak eragingo ditu horrek."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Bidali"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Utzi"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Gogoratu aukera"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 7f9e77a..57ac13b 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"اجازه دادن"</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; مایل است پیامی به &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; ارسال کند."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"این کار "<font fgcolor="#ffffb060">"می‌تواند منجر به شارژ"</font>" حساب تلفن همراه شما شود."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"این کار حساب تلفن همراه شما را شارژ خواهد کرد."</font></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">"ارسال"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"لغو"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"این انتخاب را به خاطر بسپار"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 66ddf0f..7d89fe4 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Salli"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Kiellä"</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; haluaa lähettää viestin osoitteeseen &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Tämä "<font fgcolor="#ffffb060">"voi aiheuttaa kuluja"</font>" matkapuhelinliittymälaskuusi."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Tämä aiheuttaa kuluja matkapuhelinliittymälaskuusi."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Tämä "<b>"voi aiheuttaa kuluja"</b>" matkapuhelinliittymälaskuusi."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Tämä aiheuttaa kuluja matkapuhelinliittymälaskuusi."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Lähetä"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Peruuta"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Muista valintani"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Esteettömyystila käytössä."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Esteettömyystila peruutettu."</string>
     <string name="user_switched" msgid="3768006783166984410">"Nykyinen käyttäjä: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Vaihdetaan käyttäjään <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Omistaja"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Virhe"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Järjestelmänvalvoja ei salli tätä muutosta"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index d7f3771..fb635dd 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Autoriser"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Refuser"</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; souhaite envoyer un message à &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ceci "<font fgcolor="#ffffb060">"peut entraîner des frais"</font>" sur votre compte mobile."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ceci entraînera des frais sur votre compte mobile."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Ceci "<b>"peut entraîner des frais"</b>" sur votre compte."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Cela entraînera des frais sur votre compte."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Envoyer"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Annuler"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Mémoriser mon choix"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"L\'accessibilité a bien été activée."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilité annulée."</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Changement d\'utilisateur (<xliff:g id="NAME">%1$s</xliff:g>) en cours…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propriétaire"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erreur"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Cette modification n\'est pas autorisée par votre administrateur"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b52cb21..d6074ed 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Éteindre ou allumer le téléphone"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permet à l\'application d\'éteindre et d\'allumer la tablette."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permet à l\'application d\'éteindre et d\'allumer le téléphone."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"réinitialiser le délai d\'affichage"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Permet à l\'application de réinitialiser le délai d\'affichage."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"Exécution en mode Test d\'usine"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Permet d\'exécuter une application en mode test fabricant de faible niveau, autorisant ainsi l\'accès complet à la tablette. Cette fonctionnalité est uniquement disponible lorsque la tablette est en mode test fabricant."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Permet d\'exécuter une application en mode test fabricant de faible niveau en autorisant ainsi l\'accès au téléphone. Cette fonctionnalité est uniquement disponible lorsque le téléphone est en mode test fabricant."</string>
@@ -1296,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Autoriser"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Refuser"</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; souhaite envoyer un message à &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ceci "<font fgcolor="#ffffb060">"peut entraîner des frais"</font>" sur votre compte mobile."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ceci entraînera des frais sur votre compte mobile."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Ceci "<b>"peut entraîner des frais"</b>" sur votre compte de téléphonie mobile."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Ceci entraînera des frais sur votre compte de téléphonie mobile."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Envoyer"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Annuler"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Mémoriser mon choix"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Refuser"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Autorisation demandée"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Autorisation demandée\npour le compte \"<xliff:g id="ACCOUNT">%s</xliff:g>\""</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Vous utilisez cette application en dehors de votre profil professionnel."</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Vous utilisez cette application dans votre profil professionnel."</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mode de saisie"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Synchronisation"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Prendre l\'appel ?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Toujours"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Une seule fois"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s n\'est pas compatible avec le profil professionnel."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablette"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Téléphone"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Écouteurs"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"L\'accessibilité a bien été activée."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accessibilité annulée."</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Changement d\'utilisateur (<xliff:g id="NAME">%1$s</xliff:g>) en cours…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Propriétaire"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erreur"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Votre administrateur n\'autorise pas cette modification."</string>
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index e6ff7eb..5db9bb4 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permitir"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Rexeitar"</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; quere enviar unha mensaxe a &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Esta acción "<font fgcolor="#ffffb060">"pode implicar custos"</font>" na túa conta de teléfono móbil."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Esta acción provocará a aplicación de custos na túa conta de teléfono móbil."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Esta acción "<b>"pode supoñer custos"</b>" na túa conta de teléfono móbil."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Esta acción suporá custos na túa conta de teléfono móbil."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Enviar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancelar"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Lembrar a miña opción"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 5b6008e..a524bbe 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"अनुमति दें"</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;, &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; पर संदेश भेजना चाहता है."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"इससे आपके मोबाइल खाते पर "<font fgcolor="#ffffb060">"शुल्क लग सकते हैं"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"इससे आपके मोबाइल खाते पर शुल्क लगेंगे."</font></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">"भेजें"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"रद्द करें"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"मेरी पसंद को याद रखें"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"आसान तरीका सक्षम कर दी है."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"आसान तरीका रद्द की गई."</string>
     <string name="user_switched" msgid="3768006783166984410">"वर्तमान उपयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> पर स्विच किया जा रहा है…"</string>
     <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>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index bfa871e..6bbcb58 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Dopusti"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Odbij"</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; želi poslati poruku na &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ovo "<font fgcolor="#ffffb060">"će se možda naplaćivati"</font>" putem vašeg mobilnog računa."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ovo se naplaćuje putem vašeg mobilnog računa."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"To "<b>"će se možda naplatiti"</b>" putem vašeg mobilnog računa."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"To se naplaćuje putem vašeg mobilnog računa."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Pošalji"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Odustani"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapamti odabir"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Dostupnost je omogućena."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pristupačnost otkazana."</string>
     <string name="user_switched" msgid="3768006783166984410">"Trenutačni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Prebacivanje na korisnika <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Vlasnik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Pogreška"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Vaš administrator ne dopušta tu promjenu"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 9fc1366..f453bdb 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Engedélyezés"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Elutasítás"</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; üzenetet szeretne küldeni &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; számra."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ezzel "<font fgcolor="#ffffb060">"díjtételek keletkezhetnek"</font>" mobilszámláján."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ezzel díjtételek keletkeznek mobilszámláján."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Ez "<b>"költségeket eredményezhet"</b>" mobilszámláján."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Ez költségeket eredményez mobilszámláján."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Küldés"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Mégse"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"A választás mentése"</string>
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index f35c1d4..e244ec7 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Թույլատրել"</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; ուզում է հաղորդագրություն ուղարկել &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>-ին&lt;/b&gt;:"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Այս "<font fgcolor="#ffffb060">"-ը կարող է գանձումներ առաջացնել"</font>" ձեր բջջային հաշվի վրա:"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Սրա հետևանքով ձեր բջջային հաշվին կներկայացվի հաշիվ:"</font></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">"Ուղարկել"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Չեղարկել"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Հիշել իմ ընտրությունը"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Մատչելիությունը միացված է:"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Մուտքի հնարավորությունը չեղարկված է:"</string>
     <string name="user_switched" msgid="3768006783166984410">"Ներկայիս օգտվողը <xliff:g id="NAME">%1$s</xliff:g>:"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Փոխարկվում է <xliff:g id="NAME">%1$s</xliff:g>-ին..."</string>
     <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>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 7878d71..7add9a6 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Izinkan"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Tolak"</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; ingin mengirim pesan kepada &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Hal ini "<font fgcolor="#ffffb060">"dapat menyebabkan akun ponsel Anda"</font>" mendapat tagihan."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Hal ini akan menyebabkan tagihan diberlakukan pada akun seluler Anda."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Tindakan ini "<b>"dapat menimbulkan tagihan"</b>" untuk ponsel Anda."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Tindakan ini akan menimbulkan tagihan untuk ponsel Anda."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Kirim"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Batal"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Ingat pilihan saya"</string>
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index b8582f5..8dced19 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Leyfa"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Hafna"</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; vill senda skilaboð til &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Þetta "<font fgcolor="#ffffb060">"gæti hækkað farsímareikninginn"</font>" þinn."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Þetta mun hækka farsímareikninginn þinn."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Þetta "<b>"kann að leiða til kostnaðar"</b>" á farsímareikningnum þínum."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Þetta mun leiða til kostnaðar á farsímareikningnum þínum."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Senda"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Hætta við"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Muna valið"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index c039671..95125eb 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Consenti"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Nega"</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; vorrebbe inviare un messaggio a &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Potrebbero essere effettuati addebiti"</font>" sul tuo account per cellulari."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Verranno effettuati addebiti sul tuo account per cellulari."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400"><b>"Potrebbero essere effettuati addebiti"</b>" sull\'account del tuo gestore di telefonia mobile."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Verranno effettuati addebiti sull\'account del tuo gestore di telefonia mobile."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Invia"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Annulla"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Memorizza la mia scelta"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index ad35f39..7a72fd3 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"אפשר"</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; רוצה לשלוח הודעה אל &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"הפעולה "<font fgcolor="#ffffb060">"עשויה לגרום לחיובים"</font>" בחשבון המכשיר הנייד שלך."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"הפעולה תגרום לחיובים בחשבון המכשיר הנייד שלך."</font></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">"שלח"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"בטל"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"זכור את הבחירה שלי"</string>
@@ -1588,7 +1588,7 @@
     <string name="media_route_status_in_use" msgid="4533786031090198063">"בשימוש"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"מסך מובנה"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"‏מסך HDMI"</string>
-    <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"שכבת על #<xliff:g id="ID">%1$d</xliff:g>"</string>
+    <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"שכבת-על #<xliff:g id="ID">%1$d</xliff:g>"</string>
     <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> dpi"</string>
     <string name="display_manager_overlay_display_secure_suffix" msgid="6022119702628572080">", מאובטח"</string>
     <string name="wifi_display_notification_connecting_title" msgid="2838646471050359706">"העברת מסך מתבצעת"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 97cdd7c..93f8b97 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"許可する"</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;が、&lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;にメッセージを送信しようとしています。"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"モバイルアカウントへの"<font fgcolor="#ffffb060">"請求が発生する可能性"</font>"があります。"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"モバイルアカウントへの請求が発生します。"</font></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">"送信"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"キャンセル"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"この選択を保存"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ユーザー補助が有効になりました。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ユーザー補助をキャンセルしました。"</string>
     <string name="user_switched" msgid="3768006783166984410">"現在のユーザーは<xliff:g id="NAME">%1$s</xliff:g>です。"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>に切り替えています…"</string>
     <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>
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 50ac6f1..e93221d 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"უფლების მიცემა"</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; სურს შეტყობინების გაგზავნა &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;-ისთვის."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ამან "<font fgcolor="#ffffb060">"შესაძლოა გამოიწვიოს ცვლილებები"</font>" თქვენი მობილურის ანგარიშზე."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"ეს გამოიწვევს დანახარჯებს თქვენ მობილურ ანგარიშზე."</font></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">"გაგზავნა"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"გაუქმება"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ჩემი არჩევანის დამახსოვრება"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"მარტივი წვდომა ჩართულია."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"მარტივი წვდომა გაუქმდა."</string>
     <string name="user_switched" msgid="3768006783166984410">"ამჟამინდელი მომხმარებელი <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>-ზე გადართვა…"</string>
     <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>
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index 3b7463f..38a1a87d 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Рұқсат беру"</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; қолданбасы &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; мекенжайына хабар жіберуді қалайды."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Бұл ұялы есептік жазбадан "<font fgcolor="#ffffb060">" төлем талап етуі"</font>" мүмкін."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ұялы есептік жазбаңыздан төлемдер талап етілуіне себеп болады."</font></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">"Жіберу"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Бас тарту"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Менің таңдауым есте сақталсын"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Қол жетімділік қосылды."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Қол жетімділік өшірілді."</string>
     <string name="user_switched" msgid="3768006783166984410">"Ағымдағы пайдаланушы <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> ауысу орындалуда…"</string>
     <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>
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index 9f02ea1..11ab285 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -1296,8 +1296,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"អនុញ្ញាត"</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; ចង់​ផ្ញើ​សារ​ទៅ &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; ។"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"នេះ​អាច​កាត់​លុយ"</font>" លើ​គណនី​ចល័ត​របស់​អ្នក។"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"វា​នឹង​គិត​ថ្លៃ​សេវាកម្ម​លើ​គណនី​ចល័ត​របស់​អ្នក។"</font></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">"ផ្ញើ"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"បោះ​បង់​"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ចងចាំ​ជម្រើស​របស់​ខ្ញុំ"</string>
@@ -1641,8 +1641,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"បាន​បើក​មធ្យោបាយ​ងាយស្រួល​។"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"បាន​បោះបង់​ភាព​ងាយស្រួល។"</string>
     <string name="user_switched" msgid="3768006783166984410">"អ្នក​ប្រើ​បច្ចុប្បន្ន <xliff:g id="NAME">%1$s</xliff:g> ។"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"កំពុង​ប្ដូរ​ទៅ <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 3121a7a..6c0de4a 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"ಅನುಮತಿಸು"</string>
     <string name="sms_control_no" msgid="625438561395534982">"ನಿರಾಕರಿಸು"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"&lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; ಗೆ ಸಂದೇಶವನ್ನು ಕಳುಹಿಸಲು &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ಬಯಸುತ್ತದೆ."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ "<font fgcolor="#ffffb060">"ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗಬಹುದು"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"ಇದು ನಿಮ್ಮ ಮೊಬೈಲ್ ಖಾತೆಯಲ್ಲಿ ಶುಲ್ಕಗಳನ್ನು ವಿಧಿಸುವುದಕ್ಕೆ ಕಾರಣವಾಗುತ್ತದೆ."</font></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">"ಕಳುಹಿಸು"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ರದ್ದುಮಾಡು"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ನನ್ನ ಆಯ್ಕೆಯನ್ನು ನೆನಪಿಡು"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 077df60..d5edfc6 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"허용"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;(으)로 메시지를 보내시겠습니까?"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"모바일 계정에 "<font fgcolor="#ffffb060">"요금이 부과될 수 있습니다"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"모바일 계정에 요금이 부과됩니다."</font></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">"전송"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"취소"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"내 선택사항 기억"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"접근성을 사용 설정했습니다."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"접근성이 취소되었습니다."</string>
     <string name="user_switched" msgid="3768006783166984410">"현재 사용자는 <xliff:g id="NAME">%1$s</xliff:g>님입니다."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g>님으로 전환하는 중…"</string>
     <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>
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 1b2e511..5475764 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -1668,8 +1668,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Ооба"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; номуруна билдирүү жөнөткөнү жатат."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Бул мобилдик эсебиңизден "<font fgcolor="#ffffb060">"каражаттардын сарпталуусуна"</font>" алып келет."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Бул мобилдик эсебиңизден каражаттын сарпталуусуна алып келет."</font></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">"Жөнөтүү"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Айнуу"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Менин тандоомду эстеп кал"</string>
@@ -2120,8 +2120,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Жеткиликтүүлүк иштетилди."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Атайын мүмкүнчүлүктөр иштетилген жок."</string>
     <string name="user_switched" msgid="3768006783166984410">"Учурдагы колдонуучу <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> дегенге которулууда…"</string>
     <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>
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index b052ecb..b406836 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"ອະນຸຍາດ"</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; ຕ້ອງການສົ່ງຂໍ້ຄວາມຫາ &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ນີ້ "<font fgcolor="#ffffb060">"ອາດເຮັດໃຫ້ເກີດຄ່າໃຊ້ຈ່າຍ"</font>" ໃນບັນຊີມືຖືຂອງທ່ານໄດ້."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"ມັນຈະເຮັດໃຫ້ທ່ານເສຍຄ່າບໍລິການໃນບັນຊີຂອງທ່ານ."</font></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">"ສົ່ງ"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ຍົກເລີກ"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ຈື່ການເລືອກຂອງຂ້ອຍ"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 5551608..1445df3 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Leisti"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Uždrausti"</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; norėtų išsiųsti pranešimą šiuo adresu: &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Gali būti taikomi mokesčiai"</font>" paskyroje mobiliesiems."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Bus taikomi mokesčiai paskyroje mobiliesiems."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Taip "<b>"galite būti apmokestinti"</b>" mobiliojo ryšio operatoriaus."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Taip būsite apmokestinti mobiliojo ryšio operatoriaus."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Siųsti"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Atšaukti"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Atsiminti mano pasirinkimą"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 47c5e7c..98ac10f 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Atļaut"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Aizliegt"</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; vēlas sūtīt īsziņu adresātam &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"No jūsu mobilās ierīces konta "<font fgcolor="#ffffb060">"var tikt iekasēta maksa"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"No jūsu mobilās ierīces konta tiks iekasēta maksa."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"No jūsu mobilās ierīces konta "<b>"var tikt iekasēta maksa"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"No jūsu mobilās ierīces konta tiks iekasēta maksa."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Sūtīt"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Atcelt"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Atcerēties manu izvēli"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pieejamības režīms ir iespējots."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Pieejamība ir atcelta."</string>
     <string name="user_switched" msgid="3768006783166984410">"Pašreizējais lietotājs: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Notiek pāriešana uz: <xliff:g id="NAME">%1$s</xliff:g>"</string>
     <string name="owner_name" msgid="2716755460376028154">"Īpašnieks"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Kļūda"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Jūsu administrators neļauj veikt šīs izmaiņas."</string>
diff --git a/core/res/res/values-mcc302-mnc220/config.xml b/core/res/res/values-mcc302-mnc220/config.xml
index 5259152..06b6efe 100644
--- a/core/res/res/values-mcc302-mnc220/config.xml
+++ b/core/res/res/values-mcc302-mnc220/config.xml
@@ -25,4 +25,6 @@
         <item>302720</item>
         <item>302780</item>
     </string-array>
+
+    <integer name="config_mobile_mtu">1410</integer>
 </resources>
diff --git a/core/res/res/values-mcc310-mnc260/config.xml b/core/res/res/values-mcc310-mnc260/config.xml
index d602c9f..28cd695 100644
--- a/core/res/res/values-mcc310-mnc260/config.xml
+++ b/core/res/res/values-mcc310-mnc260/config.xml
@@ -25,4 +25,8 @@
     -->
     <integer name="config_mobile_mtu">1440</integer>
 
+    <!-- Flag specifying whether VoLTE & VT should be available for carrier: independent of
+         carrier provisioning. If false: hard disabled. If true: then depends on carrier
+         provisioning, availability etc -->
+    <bool name="config_carrier_volte_vt_available">true</bool>
 </resources>
diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml
index c7ae8c8..b863aae 100644
--- a/core/res/res/values-mcc310-mnc410/config.xml
+++ b/core/res/res/values-mcc310-mnc410/config.xml
@@ -40,4 +40,9 @@
         <item>315</item>
         <item>316</item>
     </string-array>
+    <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
+    <string-array name="config_twoDigitNumberPattern">
+        <item>"0"</item>
+        <item>"00"</item>
+    </string-array>
 </resources>
diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml
index e5af60b..cf19235 100644
--- a/core/res/res/values-mcc311-mnc480/config.xml
+++ b/core/res/res/values-mcc311-mnc480/config.xml
@@ -38,10 +38,10 @@
         be disabled) but individual Features can be disabled using ImsConfig.setFeatureValue() -->
     <bool name="imsServiceAllowTurnOff">false</bool>
 
-    <!-- Flag specifying whether VoLTE & VT should be allowed on device: independent of the
+    <!-- Flag specifying whether VoLTE & VT should be available for carrier: independent of
          carrier provisioning. If false: hard disabled. If true: then depends on carrier
          provisioning, availability etc -->
-    <bool name="config_mobile_allow_volte_vt">false</bool>
+    <bool name="config_carrier_volte_vt_available">false</bool>
 
     <bool name="config_auto_attach_data_on_creation">false</bool>
 </resources>
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index ddfc0bb..b2ae008 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"вклучи или исклучи телефон"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Дозволува апликацијата да го вклучува или исклучува таблетот."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Дозволува апликацијата да го вклучува или исклучува телефонот."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ресетирај истечено време на екран"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Овозможува апликацијата да го ресетира истеченото време на екранот."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"извршувај во режим на фабричко тестирање"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Изврши во режим на фабричко тестирање од ниско ниво; дозволи целосен пристап кон хардверот на таблетот. Достапно само кога таблетот работи во режимот на фабричко тестирање."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Изврши во режим на фабричко тестирање од ниско ниво; дозволи целосен пристап кон хардверот на телефонот. Достапно само кога телефонот работи во режимот на фабричко тестирање."</string>
@@ -1296,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Дозволи"</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; би сакала да испрати порака до &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ова "<font fgcolor="#ffffb060">"може да направи трошоци"</font>" на вашата сметка за мобилен телефон."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ова ќе направи трошоци на вашата сметка за мобилен телефон."</font></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">"Испрати"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Откажи"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Запомни го мојот избор"</string>
@@ -1425,8 +1423,7 @@
     <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>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Ја користите апликацијата надвор од работниот профил"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Ја користите апликацијата во работниот профил"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Метод на внес"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Синхронизирај"</string>
@@ -1571,8 +1568,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Прифати повик?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Секогаш"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Само еднаш"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s не поддржува работен профил"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Таблет"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Телефон"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Слушалки"</string>
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index e2bcb51..1bc1fee 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"അനുവദിക്കുക"</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;, &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; എന്നതിലേക്ക് ഒരു സന്ദേശം അയയ്‌ക്കാൻ താൽപ്പര്യപ്പെടുന്നു."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ഇത് നിങ്ങളുടെ മൊബൈൽ അക്കൗണ്ടിൽ നിന്ന് "<font fgcolor="#ffffb060">"നിരക്കീടാക്കാൻ കാരണമാകാം."</font></string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"ഇത് നിങ്ങളുടെ മൊബൈൽ അക്കൗണ്ടിൽ നിന്നും നിരക്ക് ഈടാക്കുന്നതിന് കാരണമാകും."</font></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">"അയയ്‌ക്കുക"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"റദ്ദാക്കുക"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"എന്റെ ചോയ്‌സ് ഓർമ്മിക്കുക"</string>
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index d63ba81..4fe500a 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Зөвшөөрөх"</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; нь &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; уруу мессеж илгээх гэж байна."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Энэ таны мобайл акаунтад "<font fgcolor="#ffffb060">"төлбөр гаргаж"</font>" болзошгүй."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Энэ таны мобайл акаунтад төлбөр гаргах болно."</font></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">"Илгээх"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Цуцлах"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Миний сонголтыг санах"</string>
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index f05bca5..3947b06 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"अनुमती द्या"</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; हा &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;वर एक संदेश पाठवू इच्छितो."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"यामुळे आपल्या मोबाईल खात्यावर "<font fgcolor="#ffffb060">"शुल्क लागू शकते"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"यामुळे आपल्या मोबाईल खात्यावर शुल्क लागू शकते."</font></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">"पाठवा"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"रद्द करा"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"माझी आवड लक्षात ठेवा"</string>
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index 29b01cf..9685273 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Benarkan"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Nafikan"</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; ingin menghantar mesej kepada &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ini akan menyebabkan akaun mudah alih anda "<font fgcolor="#ffffb060">"dikenakan caj"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ini akan menyebabkan akaun mudah alih anda dikenakan caj."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Ini "<b>"boleh menyebabkan"</b>" akaun mudah alih anda dikenakan bayaran."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Ini akan menyebabkan akaun mudah alih anda dikenakan bayaran."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Hantar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Batal"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Ingat pilihan saya"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Kebolehcapaian didayakan."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Kebolehcapaian dibatalkan."</string>
     <string name="user_switched" msgid="3768006783166984410">"Pengguna semasa <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Bertukar kepada <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Pemilik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Ralat"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Perubahan ini tidak dibenarkan oleh pentadbir anda"</string>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index b5882d5..83e1baa 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"ခွင့်ပြုရန်"</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; မှ &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; ကို စာတို ပို့ချင်ပါသည်"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"ဒီ "<font fgcolor="#ffffb060">"သည် သင့် မိုဘိုင်းအကောင့်တွင်"</font>" အကုန်အကျ ဖြစ်စေနိုင်ပါသည်"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"သင့်မိုဘိုင်း အကောင့်တွင် ပိုက်ဆံကုန်ကျပါမည်"</font></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">"ပို့ရန်"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ပယ်ဖျက်သည်"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"ကျွန်ပ်၏ရွေးချယ်မှုကို မှတ်ထားရန်"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 2ddad21..b80ca56 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Tillat"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Sperr"</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; ønsker å sende en melding til &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Dette "<font fgcolor="#ffffb060">"kan føre til belastninger"</font>" på mobilkontoen din."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Dette kommer til å føre til belastninger på mobilkontoen din."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Dette "<b>"kan føre til kostnader"</b>" på mobilabonnementet ditt."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Dette kommer til å føre til kostnader på mobilabonnementet ditt."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Send"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Avbryt"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Husk valget mitt"</string>
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 6f0e8bc..8f68579 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"फोन खोल्न वा बन्द गर्न उर्जा प्रदान गर्नुहोस"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ट्याब्लेटलाई खोल्न र बन्द गर्न अनुप्रयोगलाई अनुमति दिन्छ।"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"अनुप्रयोगलाई फोन खोल्न र बन्द गर्न अनुमति दिन्छ।"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"प्रदर्शन समाप्ति पुनःसेट गर्नुहोस्"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"प्रदर्शन समाप्ति समायोजन सबै नष्ट गर्न अनुमति दिन्छ।"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"फ्याक्ट्रि परीक्षण मोडमा चालु गर्नुहोस्"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ट्याब्लेट हार्डवेयरलाई पुरा पहुँच गर्न दिँदै तल्लो स्तर उत्त्पादक परीक्षणको रूपमा चलाउनुहोस्। ट्याब्लेट उत्त्पादक परीक्षण मोडमा चलिरहेको बेला मात्र उपलब्ध हुन्छ।"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"तल्लो स्तर उत्त्पादक जस्तै चलाउनुहोस्, पुरा पहुँच दिन फोन हार्डवेयरलाई अनुमति हुन्छ। फोन उत्पादक परीक्षण मोडमा चलिरहेको बेला मात्र उपलब्ध हुन्छ।"</string>
@@ -1304,8 +1302,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"अनुमति दिनुहोस्"</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; के तपाईँ सन्देश पठाउन चाहुनु हुन्छ &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"यसले "<font fgcolor="#ffffb060">" शुल्क लगाउन सक्छ"</font>" तपाईँको मोबाइल खातामा।"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"यसले तपाईंको मोबाइल खातामा चार्जहरू उत्पन्न गर्दछ।"</font></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">"पठाउनुहोस्"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"रद्द गर्नुहोस्"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"मेरो छनौट याद राख्नुहोस्"</string>
@@ -1403,12 +1401,12 @@
     <string name="permdesc_control_keyguard" msgid="3043732290518629061">"अनुप्रयोगलाई किगार्ड नियन्त्रण गर्न अनुमति दिन्छ।"</string>
     <string name="permlab_trust_listener" msgid="1765718054003704476">"भरोसा स्थितिमा परिवर्तनको सुन्नुहोस्।"</string>
     <string name="permdesc_trust_listener" msgid="8233895334214716864">"भरोसा स्थितिमा परिवर्तनको लागि सुन्न अनुप्रयोगलाई अनुमति दिन्छ।"</string>
-    <string name="permlab_provide_trust_agent" msgid="5465587586091358316">"विश्वस्त प्रतिनिधि प्रदान गर्नुहोस्।"</string>
-    <string name="permdesc_provide_trust_agent" msgid="3865702641053068148">"अनुप्रयोगलाई विश्वस्त प्रतिनिधि प्रदान गर्न अनुमति दिन्छ।"</string>
-    <string name="permlab_launch_trust_agent_settings" msgid="5859430082240410200">"विश्वस्त प्रतिनिधि सेटिङ्हरूका मेनु सुरुवात गर्नुहोस्।"</string>
-    <string name="permdesc_launch_trust_agent_settings" msgid="8185142708644913381">"उपकरणलाई विश्वस्त प्रतिनिधिको ब्यवहार परिवर्तन गर्ने गतिविधि सुरुवात गर्न अनुमति दिन्छ।"</string>
-    <string name="permlab_bind_trust_agent_service" msgid="8242093169457695334">"विश्वस्त प्रतिनिधि सेवासँग जोडिएको"</string>
-    <string name="permdesc_bind_trust_agent_service" msgid="7041930026024507515">"विश्वस्त प्रतिनिधि सेवालाई बाँध्न अनुप्रयोगलाई अनुमति दिन्छ।"</string>
+    <string name="permlab_provide_trust_agent" msgid="5465587586091358316">"विश्वस्त एजेन्ट उपलब्ध गराउने।"</string>
+    <string name="permdesc_provide_trust_agent" msgid="3865702641053068148">"अनुप्रयोगलाई एक विश्वस्त एजेन्ट उपलब्ध गराउन अनुमति दिन्छ।"</string>
+    <string name="permlab_launch_trust_agent_settings" msgid="5859430082240410200">"विश्वस्त एजेन्ट सेटिङ मेनु सुरूवात गर्ने।"</string>
+    <string name="permdesc_launch_trust_agent_settings" msgid="8185142708644913381">"अनुप्रयोगलाई विश्वस्त एजेन्ट ब्यवहार परिवर्तन गर्ने गतिविधि सुरूवात गर्न अनुमति दिन्छ।"</string>
+    <string name="permlab_bind_trust_agent_service" msgid="8242093169457695334">"विश्वस्त एजेन्ट सेवासँग सम्बद्ध हुनु"</string>
+    <string name="permdesc_bind_trust_agent_service" msgid="7041930026024507515">"विश्वस्त एजेन्ट सेवासँग सम्बद्ध हुन एक अनुप्रयोगलाई अनुमति दिन्छ।"</string>
     <string name="permlab_recovery" msgid="3157024487744125846">"अद्यावधिक र रिकभरी प्रणालीको साथ अन्तर्क्रिया"</string>
     <string name="permdesc_recovery" msgid="8511774533266359571">"अनुप्रयोगलाई रिकभरी प्रणाली र प्रणाली अद्यावधिकहरूको साथ अन्तर्क्रिया गर्न अनुमति दिन्छ।"</string>
     <string name="permlab_manageMediaProjection" msgid="1120495449419929218">"मिडिया प्रक्षेपण सत्र व्यवस्थापन गर्नुहोस्"</string>
@@ -1433,8 +1431,7 @@
     <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>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"तपाईं तपाईँको कार्य प्रोफाइल बाहिर यो अनुप्रयोग प्रयोग गरिरहनु भएको छ"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"तपाईँ आफ्नो कार्य प्रोफाइलमा यो अनुप्रयोग प्रयोग गरिरहनु भएको छ"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"इनपुट विधि"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"सिङ्क गर्नुहोस्"</string>
@@ -1577,8 +1574,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"कल स्वीकार गर्नुहुन्छ?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"सधैँ"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"एउटा मात्र"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%%१$ को कार्य प्रोफाइल समर्थन गर्दैन"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ट्याब्लेट"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"फोन"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"हेडफोनहरू"</string>
@@ -1651,8 +1647,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"पहुँच सक्षम गरिएको।"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"पहुँचयोग्यता रद्द गरियो।"</string>
     <string name="user_switched" msgid="3768006783166984410">"अहिलेको प्रयोगकर्ता <xliff:g id="NAME">%1$s</xliff:g>।"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> मा स्विच गर्दै..."</string>
     <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>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index c94a0da..d19a8e4 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Toestaan"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Weigeren"</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; wil graag een bericht verzenden naar &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Dit "<font fgcolor="#ffffb060">"kan leiden tot kosten"</font>" in uw mobiele account."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Dit leidt tot kosten in uw mobiele account."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Hiervoor "<b>"worden mogelijk kosten in rekening gebracht"</b>" op uw mobiele account."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Hiervoor worden kosten in rekening gebracht op uw mobiele account."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Verzenden"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Annuleren"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Mijn keuze onthouden"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 419055b..777d2bb 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Pozwól"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Odmów"</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; chce wysłać wiadomość do &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"To "<font fgcolor="#ffffb060">"może spowodować obciążenie"</font>" Twojego konta komórkowego."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"To spowoduje obciążenie Twojego konta komórkowego."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"To "<b>"może spowodować naliczenie opłat"</b>" przez operatora komórkowego."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Spowoduje to naliczanie opłat przez operatora komórkowego."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Wyślij"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Anuluj"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapamiętaj mój wybór"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 8ca9b2a..37ddb14 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permitir"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Recusar"</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; gostaria de enviar uma mensagem para &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Isto "<font fgcolor="#ffffb060">"poderá resultar em custos"</font>" para a sua conta de telemóvel."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Isto resultará em custos para a sua conta de telemóvel."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Isto "<b>"pode resultar em custos"</b>" para a sua conta de dispositivo móvel."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Isto resultará em custos para a sua conta de dispositivo móvel."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Enviar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancelar"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Memorizar a minha escolha"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 5b5c464..2e0792a 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permitir"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Negar"</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; deseja enviar uma mensagem para &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Isto "<font fgcolor="#ffffb060">"poderá gerar cobranças"</font>" em sua conta de celular."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Isto irá gerar cobranças em sua conta de celular."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Isso "<b>"pode resultar em cobranças"</b>" na conta de seu dispositivo móvel."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Isso resultará em cobranças na conta de seu dispositivo móvel."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Enviar"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Cancelar"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Lembrar minha escolha"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Acessibilidade ativada."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Acessibilidade cancelada."</string>
     <string name="user_switched" msgid="3768006783166984410">"Usuário atual <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Alternando para <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Proprietário"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Erro"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Esta alteração não é permitida pelo administrador"</string>
@@ -1775,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Pedir PIN antes de liberar"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pedir padrão de desbloqueio antes de liberar"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pedir senha antes de liberar"</string>
-    <string name="battery_saver_description" msgid="2510530476513605742">"Para ajudar a melhorar a vida útil da bateria, a economia de bateria reduz o desempenho do dispositivo e restringe a vibração e a maioria dos dados em segundo plano. É possível que apps de e-mail, mensagens, entre outros, que dependem de sincronização não sejam atualizados a menos que sejam abertos.\n\nA economia de bateria é desativada automaticamente quando o dispositivo estiver carregando."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"Para ajudar a melhorar a vida útil da bateria, a economia de bateria reduz o desempenho do dispositivo e restringe a vibração e a maioria dos dados em segundo plano. É possível que apps de e-mail, mensagens, entre outros que dependem de sincronização não sejam atualizados a menos que sejam abertos.\n\nA economia de bateria é desativada automaticamente quando o dispositivo estiver carregando."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Até o período de inatividade terminar às <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 6d9ffd7..3ecd9b1 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -613,7 +613,7 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefon pornit sau oprit"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Permite aplicaţiei să pornească sau să oprească tableta."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Permite aplicaţiei să activeze sau să dezactiveze telefonul."</string>
-    <string name="permlab_userActivity" msgid="1677844893921729548">"resetați timpul limită de afișare"</string>
+    <string name="permlab_userActivity" msgid="1677844893921729548">"resetează timpul limită de afișare"</string>
     <string name="permdesc_userActivity" msgid="651746160252248024">"Permite aplicației să reseteze timpul limită de afișare."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"rulare în mod test de fabrică"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Rulează ca test de nivel redus setat de producător, permiţând accesul complet la sistemul hardware al computerului tablet PC. Permisiune disponibilă doar când acesta rulează în modul de testare setat de producător."</string>
@@ -1296,8 +1296,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Permiteţi"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Refuzaţi"</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; intenţionează să trimită un mesaj la &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Aceasta "<font fgcolor="#ffffb060">"poate genera costuri"</font>" în contul dvs. mobil."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Aceasta va genera costuri în contul dvs. mobil."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Acest lucru "<b>"poate genera costuri"</b>" în contul dvs. mobil."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Acest lucru va genera costuri în contul dvs. mobil."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Trimiteţi"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Anulaţi"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Doresc să se reţină opţiunea"</string>
@@ -1641,8 +1641,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"S-a activat accesibilitatea."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Accesibilitatea a fost anulată"</string>
     <string name="user_switched" msgid="3768006783166984410">"Utilizator curent: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Se comută la <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Proprietar"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Eroare"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Această modificare nu este permisă de administratorul dvs."</string>
@@ -1774,9 +1773,9 @@
     <string name="lock_to_app_positive" msgid="7085139175671313864">"PORNIȚI"</string>
     <string name="lock_to_app_start" msgid="6643342070839862795">"Ecran fixat"</string>
     <string name="lock_to_app_exit" msgid="8598219838213787430">"Fixarea ecranului anulată"</string>
-    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Cereți codul PIN înainte de a anula fixarea"</string>
-    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Cereți modelul pentru deblocare înainte de a anula fixarea"</string>
-    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Cereți parola înainte de a anula fixarea"</string>
+    <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Solicită codul PIN înainte de a anula fixarea"</string>
+    <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Solicită modelul pentru deblocare înainte de a anula fixarea"</string>
+    <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Solicită parola înainte de a anula fixarea"</string>
     <string name="battery_saver_description" msgid="2510530476513605742">"Pentru a ajuta la îmbunătățirea duratei bateriei, modul Economisirea bateriei reduce performanțele dispozitivului și limitează vibrațiile și majoritatea datelor de fundal. Mesajele prin e-mail și alte aplicații care se bazează pe sincronizare nu se vor actualiza dacă nu le deschideți.\n\nEconomisirea baterie se dezactivează automat când dispozitivul se încarcă."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"Până când inactivitatea dvs. se încheie la <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>"</string>
 </resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 8287034..76be0a74 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Разрешить"</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; собирается отправить сообщение на адрес &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"С вашего мобильного счета "<font fgcolor="#ffffb060">"могут быть списаны средства"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"С вашего мобильного счета будут списаны средства."</font></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">"Отправить"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Отмена"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Запомнить выбранный телефон"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Специальные возможности включены."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Специальные возможности не будут включены."</string>
     <string name="user_switched" msgid="3768006783166984410">"Выбран аккаунт пользователя <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Переход в профиль пользователя <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index d8d4484..c851aec 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"දුරකථනය බල ගැන්වීම හෝ වැසීම"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"ටැබ්ලටය සක්‍රිය හෝ අක්‍රිය කිරීමට යෙදුමට අවසර දේ."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"දුරකථනය සක්‍රිය සහ අක්‍රිය කිරීමට යෙදුමට අවසර දෙන්න."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"කල් ඉකුත්වීම දර්ශනය යළි පිහිටුවන්න"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"කල් ඉකුත්වීම දර්ශනය යළි පිහිටුවන්න යෙදුමට ඉඩ දෙන්න."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"කර්මාන්තශාලා පරීක්ෂණ ආකාරය තුළ ධාවනය කරන්න"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"ටැබ්ලටයේ දෘඩාංග වෙත සම්පූර්ණ පිවිසුම සඳහා අවසර දීමෙන් පහළ මට්ටමේ නිපැවුම්කරු පරීක්ෂණයක් ලෙස ධාවනය කරන්න. නිපැවුම්කරු පරීක්ෂණ ආකාරයෙන් ටැබ්ලටයේ ධාවනය වන විට පමණි."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"දුරකථනයේ දෘඩාංග වෙත සම්පූර්ණ පිවිසුම සඳහා අවසර දීමෙන් පහළ මට්ටමේ නිපැවුම්කරු පරීක්ෂණයක් ලෙස ධාවනය කරන්න. නිපැවුම්කරු පරීක්ෂණ ආකාරයෙන් දුරකථනයේ ධාවනය වන විට පමණි."</string>
@@ -1298,9 +1296,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"අවසර දෙන්න"</string>
     <string name="sms_control_no" msgid="625438561395534982">"ප්‍රතික්ෂේප කරන්න"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"&lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;b&gt; වෙත කෙටි පණිවීඩයක් යැවීමට &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;b&gt; කැමතිය."</string>
-    <!-- syntax error in translation for sms_short_code_details (3492025719868078457) org.xmlpull.v1.XmlPullParserException: expected: /string read: font (position:END_TAG </font>@1:83 in     <string name="sms_short_code_details" msgid="3492025719868078457">"මෙය "</font>"ඔබගේ ජංගම ගිණුමේ"<font fgcolor="#ffffb060">" අය වීම් වලට හේතුවක් වේ."</string>
-)  -->
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"මෙය ඔබගේ ජංගම ගිණුමෙන් අයවීමට හේතු වේ."</font></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">"යවන්න"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"අවලංගු කරන්න"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"මගේ තේරීම මතක තබාගන්න"</string>
@@ -1428,8 +1425,7 @@
     <string name="deny" msgid="2081879885755434506">"ප්‍රතික්ෂේප කරන්න"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"අවසර ඉල්ලා සිටී"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> ගිණුම සඳහා\nඅවසර ඉල්ලන ලදි."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"මෙම යෙදුම ඔබගේ කාර්යාල පැතිකඩින් පිට දී ඔබ භාවිතා කරයි"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"මෙම යෙදුම ඔබගේ පුද්ගලික කොටසේ ඔබ භාවිතා කරයි"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"ආදාන ක්‍රමය"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"සමමුහුර්තය"</string>
@@ -1572,8 +1568,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"ඇමතුම පිළිගන්නවාද?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"සැම විටම"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"එක් වාරයයි"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s කාර්යාල පැතිකඩ සඳහා සහාය ලබනොදේ."</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"ටැබ්ලට්ය"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"දුරකථනය"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"ඉස් බණු"</string>
@@ -1646,8 +1641,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"ප‍්‍රවේශ්‍යතාව සබල කරන ලදි."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ප‍්‍රවේශ්‍යතාව අවලංගු කර ඇත."</string>
     <string name="user_switched" msgid="3768006783166984410">"දැනට සිටින පරිශීලකයා <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> වෙත මාරු කරමින්…"</string>
     <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>
@@ -1769,15 +1763,15 @@
     <string name="item_is_selected" msgid="949687401682476608">"<xliff:g id="ITEM">%1$s</xliff:g> තෝරාගෙන ඇත"</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="1230563865743799321">"මෙම තිරය අගුළු ඇරීමට , එකම වේලාවේ ස්පර්ශකොට, නැවත සහ මෑතක ස්පර්ශ කර ගෙන සිටින්න."</string>
-    <string name="lock_to_app_toast_accessible" msgid="3340628918851844044">"මෙම තිරය අගුළු ඇරීමට ,ස්පර්ශ්කොට අලුත් දෑ රඳවා ගන්න."</string>
-    <string name="lock_to_app_toast_locked" msgid="8739004135132606329">"තිරය අගුළු දමා ඇත.ඔබගේ සංවිධානය විසින් අගුළු ඇරීමට ඉඩ නොදෙයි."</string>
+    <string name="lock_to_app_toast" msgid="1230563865743799321">"මෙම තිරය අගුළු ඇරීමට, එකම වේලාවේ ස්පර්ශකොට, නැවත සහ මෑතක ස්පර්ශ කර ගෙන සිටින්න."</string>
+    <string name="lock_to_app_toast_accessible" msgid="3340628918851844044">"මෙම තිරය අගුළු ඇරීමට, ස්පර්ශ්කොට අලුත් දෑ රඳවා ගන්න."</string>
+    <string name="lock_to_app_toast_locked" msgid="8739004135132606329">"තිරය අගුළු දමා ඇත. ඔබගේ සංවිධානය විසින් අගුළු ඇරීමට ඉඩ නොදෙයි."</string>
     <string name="lock_to_app_title" msgid="1682643873107812874">"තිරය අගුළු දැමීම භාවිත කරනවාද?"</string>
-    <string name="lock_to_app_description" msgid="9076084599283282800">"Screen pinning locks the display in a single view.\n\nTo exit, touch and hold Back and Recents at the same time."</string>
-    <string name="lock_to_app_description_accessible" msgid="2132076937479670601">"තනි පෙනුමක් තුල තිරයේ අගුළු ඇරීමට , දර්ශනයට අගුළු දමයි.\n\nඉවත් වීමට, ස්පර්ශකොට මෑත දේවල් අල්ලා ගන්න."</string>
+    <string name="lock_to_app_description" msgid="9076084599283282800">"තනි පෙනුමක් තුළ තිරයේ අගුළු ඇරීමට, දර්ශනයට අගුළු දමයි.\n\nඉවත් වීමට, ස්පර්ශකොට මෑත දේවල් අල්ලා ගන්න."</string>
+    <string name="lock_to_app_description_accessible" msgid="2132076937479670601">"තනි පෙනුමක් තුළ තිරයේ අගුළු ඇරීමට, දර්ශනයට අගුළු දමයි.\n\nඉවත් වීමට, ස්පර්ශකොට මෑත දේවල් අල්ලා ගන්න."</string>
     <string name="lock_to_app_negative" msgid="2259143719362732728">"නැත, ස්තූතියි"</string>
     <string name="lock_to_app_positive" msgid="7085139175671313864">"ආරම්භය"</string>
-    <string name="lock_to_app_start" msgid="6643342070839862795">"තිරය අගුළුදමා ඇත"</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>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"ගැලවීමට පෙර අගුළු අරින රටාව සඳහා අසන්න"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index f898582..cdb4672 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Povoliť"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Odmietnuť"</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; chce odoslať správu na adresu &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"Môžu sa účtovať poplatky"</font>" na váš mobilný účet."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Budú sa účtovať poplatky na váš mobilný účet."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Táto akcia "<b>"môže viesť k zaúčtovaniu poplatkov"</b>" na váš účet u mobilného operátora."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Táto akcia povedie k zaúčtovaniu poplatku na váš účet u mobilného operátora."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Odoslať"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Zrušiť"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapamätať si voľbu"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Zjednodušenie ovládania je povolené."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Zjednodušenie ovládania bolo zrušené."</string>
     <string name="user_switched" msgid="3768006783166984410">"Aktuálny používateľ je <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Prepína sa na používateľa <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Vlastník"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Chyba"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Správca túto zmenu zakázal"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index cc50955..cde9e96 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Dovoli"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Zavrni"</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; želi poslati sporočilo na &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"S tem bo "<font fgcolor="#ffffb060">"morda bremenjen"</font>" vaš račun za mobilno napravo."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"S tem bo bremenjen vaš račun za mobilno napravo."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"S tem "<b>"bo morda bremenjen račun"</b>" za vašo mobilno napravo."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"S tem bo bremenjen vaš račun za mobilno napravo."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Pošlji"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Prekliči"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Zapomni si mojo izbiro"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pripomočki za ljudi s posebnimi potrebami so omogočeni."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Omogočanje pripomočkov za ljudi s posebnimi potrebami preklicano."</string>
     <string name="user_switched" msgid="3768006783166984410">"Trenutni uporabnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Preklop na uporabnika <xliff:g id="NAME">%1$s</xliff:g> …"</string>
     <string name="owner_name" msgid="2716755460376028154">"Lastnik"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Napaka"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Skrbnik ne dovoli te spremembe"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index c9b78e9..d0a7916 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Дозволи"</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; жели да пошаље поруку на адресу &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Ово "<font fgcolor="#ffffb060">"може да изазове трошкове"</font>" на налогу за мобилни уређај."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ово ће изазвати трошкове на налогу за мобилни уређај."</font></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">"Пошаљи"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Откажи"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Запамти мој избор"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Приступачност је омогућена."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Приступачност је отказана."</string>
     <string name="user_switched" msgid="3768006783166984410">"Актуелни корисник <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Пребацивање на <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 2201950..559979e 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Tillåt"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Neka"</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; vill skicka ett meddelande till &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Detta "<font fgcolor="#ffffb060">"kan medföra debiteringar"</font>" på ditt mobilkonto."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Ditt mobilkonto kommer att debiteras."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Detta "<b>"kan medföra debiteringar"</b>" på ditt mobilkonto."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Ditt mobilkonto kommer att debiteras."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Skickat"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Avbryt"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Kom ihåg mitt val"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index c22c4cb..f95d29d 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -611,7 +611,7 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"washa au zima simu"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Inaruhusu programu kuwasha au kuzima kompyuta kibao."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Inaruhusu programu kuwasha au kuzima simu."</string>
-    <string name="permlab_userActivity" msgid="1677844893921729548">"weka onyesho la muda umekwisha upya"</string>
+    <string name="permlab_userActivity" msgid="1677844893921729548">"weka upya onyesho la muda umekwisha"</string>
     <string name="permdesc_userActivity" msgid="651746160252248024">"Huruhusu programu kuweka upya onyesho la muda umekwisha."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"endesha katika hali ya jaribio ya kiwanda"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Endesha kama jaribio la mtengenezaji la kiwango cha chini, kwa hivyo kuruhusu ufikiaji kamili wa maunzi ya kompyuta ndogo. Inapatikana tu wakati kompyuta ndogo inaendeshwa katika hali ya jaribio la mtengenezaji."</string>
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Ruhusu"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Kataza"</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; ingependa kutuma ujumbe kwa &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Hii "<font fgcolor="#ffffb060">"huenda ikasababisha gharama"</font>" kwenye akaunti yako ya simu."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Hii itasababisha gharama kwenye akaunti yako ya simu."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Hii "<b>"huenda ikasababisha ulipe gharama"</b>" kwenye akaunti ya kifaa chako cha mkononi."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Hii itafanya ulipe gharama kwenye akaunti ya kifaa chako cha mkononi."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Tuma"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Ghairi"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Kumbuka chaguo yangu"</string>
@@ -1423,8 +1423,8 @@
     <string name="deny" msgid="2081879885755434506">"Kataza"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"Idhini imeitishwa"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"Idhini imeombwa\nya akaunti<xliff:g id="ACCOUNT">%s</xliff:g>."</string>
-    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Unatumia programu hii nje ya wasifu wako wa kazi"</string>
-    <string name="forward_intent_to_work" msgid="621480743856004612">"Unatumia programu hii kwenye wasifu wako wa kazi"</string>
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Unatumia programu hii nje ya wasifu wako wa kazini"</string>
+    <string name="forward_intent_to_work" msgid="621480743856004612">"Unatumia programu hii kwenye wasifu wako wa kazini"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Mbinu ya uingizaji"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Sawazisha"</string>
     <string name="accessibility_binding_label" msgid="4148120742096474641">"Ufikiaji"</string>
@@ -1566,7 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Kubali simu?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Kila mara"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Mara moja tu"</string>
-    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s haitumii wasifu wa kazi"</string>
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s haitumii wasifu wa kazini"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Kompyuta kibao"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Simu"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Vipokeasauti"</string>
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index 1dcd387..2c0ed15 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -54,17 +54,17 @@
     <string name="serviceErased" msgid="1288584695297200972">"அழித்தல் வெற்றியடைந்தது."</string>
     <string name="passwordIncorrect" msgid="7612208839450128715">"தவறான கடவுச்சொல்."</string>
     <string name="mmiComplete" msgid="8232527495411698359">"MMI நிறைவடைந்தது."</string>
-    <string name="badPin" msgid="9015277645546710014">"உள்ளிட்ட பழைய PIN தவறானது."</string>
+    <string name="badPin" msgid="9015277645546710014">"உள்ளிட்ட பழைய பின் தவறானது."</string>
     <string name="badPuk" msgid="5487257647081132201">"உள்ளிட்ட PUK2 தவறானது."</string>
     <string name="mismatchPin" msgid="609379054496863419">"உள்ளிட்ட PINகள் பொருந்தவில்லை."</string>
-    <string name="invalidPin" msgid="3850018445187475377">"4 இலிருந்து 8 எண்கள் வரையுள்ள PIN ஐத் தட்டச்சு செய்யவும்."</string>
+    <string name="invalidPin" msgid="3850018445187475377">"4 இலிருந்து 8 எண்கள் வரையுள்ள பின் ஐத் தட்டச்சு செய்யவும்."</string>
     <string name="invalidPuk" msgid="8761456210898036513">"8 அல்லது அதற்கு மேல் எண்கள் உள்ள PUK ஐத் தட்டச்சு செய்யவும்."</string>
-    <string name="needPuk" msgid="919668385956251611">"உங்கள் SIM கார்டு PUK பூட்டுதல் செய்யப்பட்டுள்ளது. அதைத் திறக்க PUK குறியீட்டைத் உள்ளிடவும்."</string>
-    <string name="needPuk2" msgid="4526033371987193070">"SIM கார்டைத் தடுப்பு நீக்க PUK2 ஐ உள்ளிடவும்."</string>
-    <string name="enablePin" msgid="209412020907207950">"தோல்வி, SIM/RUIM பூட்டை இயக்கவும்."</string>
+    <string name="needPuk" msgid="919668385956251611">"உங்கள் சிம் கார்டு PUK பூட்டுதல் செய்யப்பட்டுள்ளது. அதைத் திறக்க PUK குறியீட்டைத் உள்ளிடவும்."</string>
+    <string name="needPuk2" msgid="4526033371987193070">"சிம் கார்டைத் தடுப்பு நீக்க PUK2 ஐ உள்ளிடவும்."</string>
+    <string name="enablePin" msgid="209412020907207950">"தோல்வி, சிம்/RUIM பூட்டை இயக்கவும்."</string>
   <plurals name="pinpuk_attempts">
-    <item quantity="one" msgid="6596245285809790142">"SIM பூட்டப்படுவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
-    <item quantity="other" msgid="7530597808358774740">"SIM பூட்டப்படுவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
+    <item quantity="one" msgid="6596245285809790142">"சிம் பூட்டப்படுவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
+    <item quantity="other" msgid="7530597808358774740">"சிம் பூட்டப்படுவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
   </plurals>
     <string name="imei" msgid="2625429890869005782">"IMEI"</string>
     <string name="meid" msgid="4841221237681254195">"MEID"</string>
@@ -76,7 +76,7 @@
     <string name="CwMmi" msgid="9129678056795016867">"அழைப்பு காத்திருப்பு"</string>
     <string name="BaMmi" msgid="455193067926770581">"அழைப்புத் தவிர்ப்பு"</string>
     <string name="PwdMmi" msgid="7043715687905254199">"கடவுச்சொல்லை மாற்று"</string>
-    <string name="PinMmi" msgid="3113117780361190304">"PIN ஐ மாற்று"</string>
+    <string name="PinMmi" msgid="3113117780361190304">"பின்னை மாற்று"</string>
     <string name="CnipMmi" msgid="3110534680557857162">"இருக்கும் எண்ணை அழைக்கிறது"</string>
     <string name="CnirMmi" msgid="3062102121430548731">"அழைப்பு எண் வரையறுக்கப்பட்டது"</string>
     <string name="ThreeWCMmi" msgid="9051047170321190368">"மும்முனை அழைப்பு"</string>
@@ -287,13 +287,13 @@
     <string name="permlab_sendSms" msgid="5600830612147671529">"SMS குறுந்தகவல்களை அனுப்புதல்"</string>
     <string name="permdesc_sendSms" msgid="7094729298204937667">"SMS செய்திகளை அனுப்ப பயன்பாட்டை அனுமதிக்கிறது. இதற்கு எதிர்பாராத கட்டணங்கள் விதிக்கப்படலாம். தீங்கு விளைவிக்கும் பயன்பாடுகள் உங்களின் உறுதிப்படுத்தல் எதுவுமின்றி செய்திகளை அனுப்பி உங்களுக்குக் கட்டணம் விதிக்கலாம்."</string>
     <string name="permlab_sendRespondViaMessageRequest" msgid="8713889105305943200">"நிகழ்வுகளுக்குச் செய்தி வழியாகப் பதிலை அனுப்புதல்"</string>
-    <string name="permdesc_sendRespondViaMessageRequest" msgid="7107648548468778734">"உள்வரும் அழைப்புகளுக்கான நிகழ்வுகளுக்கு, செய்தி வழியாகப் பதிலளிப்பதை நிர்வகிப்பதற்கு, பிற செய்தியிடல் பயன்பாடுகளுக்குக் கோரிக்கைகளை அனுப்புவதற்குப் பயன்பாட்டை அனுமதிக்கிறது."</string>
+    <string name="permdesc_sendRespondViaMessageRequest" msgid="7107648548468778734">"உள்வரும் அழைப்புகளுக்கான நிகழ்வுகளுக்கு, செய்தி வழியாகப் பதிலளிப்பதை நிர்வகிப்பதற்கு, பிற மெசேஜ் பயன்பாடுகளுக்குக் கோரிக்கைகளை அனுப்புவதற்குப் பயன்பாட்டை அனுமதிக்கிறது."</string>
     <string name="permlab_readSms" msgid="8745086572213270480">"உங்கள் உரைச் செய்திகளை (SMS அல்லது MMS) படித்தல்"</string>
-    <string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"உங்கள் டேப்லெட் அல்லது SIM கார்டில் சேமிக்கப்பட்ட SMS குறுஞ்செய்திகளைப் படிக்க பயன்பாட்டை அனுமதிக்கிறது. SMS குறுஞ்செய்திகளின் உள்ளடக்கம் அல்லது ரகசியத்தன்மை ஆகியவற்றைப் பொருட்படுத்தாமல் அச்செய்திகளைப் படிக்க பயன்பாட்டை இது அனுமதிக்கிறது."</string>
-    <string name="permdesc_readSms" product="default" msgid="3695967533457240550">"உங்கள் மொபைல் அல்லது SIM கார்டில் சேமிக்கப்பட்ட SMS குறுஞ்செய்திகளைப் படிக்கப் பயன்பாட்டை அனுமதிக்கிறது. SMS குறுஞ்செய்திகளின் உள்ளடக்கம் அல்லது ரகசியத்தன்மை ஆகியவற்றைப் பொருட்படுத்தாமல் அச்செய்திகளைப் படிக்க பயன்பாட்டை இது அனுமதிக்கிறது."</string>
+    <string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"உங்கள் டேப்லெட் அல்லது சிம் கார்டில் சேமிக்கப்பட்ட SMS குறுஞ்செய்திகளைப் படிக்க பயன்பாட்டை அனுமதிக்கிறது. SMS குறுஞ்செய்திகளின் உள்ளடக்கம் அல்லது ரகசியத்தன்மை ஆகியவற்றைப் பொருட்படுத்தாமல் அச்செய்திகளைப் படிக்க பயன்பாட்டை இது அனுமதிக்கிறது."</string>
+    <string name="permdesc_readSms" product="default" msgid="3695967533457240550">"உங்கள் மொபைல் அல்லது சிம் கார்டில் சேமிக்கப்பட்ட SMS குறுஞ்செய்திகளைப் படிக்கப் பயன்பாட்டை அனுமதிக்கிறது. SMS குறுஞ்செய்திகளின் உள்ளடக்கம் அல்லது ரகசியத்தன்மை ஆகியவற்றைப் பொருட்படுத்தாமல் அச்செய்திகளைப் படிக்க பயன்பாட்டை இது அனுமதிக்கிறது."</string>
     <string name="permlab_writeSms" msgid="3216950472636214774">"உங்கள் உரைச் செய்திகளைத் (SMS அல்லது MMS) திருத்துதல்"</string>
-    <string name="permdesc_writeSms" product="tablet" msgid="5160413947794501538">"டேப்லெட் அல்லது SIM கார்டில் சேமிக்கப்பட்ட SMS செய்திகளை எழுத, பயன்பாட்டை அனுமதிக்கிறது. தீங்குவிளைவிக்கும் பயன்பாடுகள் செய்திகளை நீக்கலாம்."</string>
-    <string name="permdesc_writeSms" product="default" msgid="7268668709052328567">"ஃபோன் அல்லது SIM கார்டில் சேமிக்கப்பட்ட SMS செய்திகளை எழுத, பயன்பாட்டை அனுமதிக்கிறது. தீங்குவிளைவிக்கும் பயன்பாடுகள் செய்திகளை நீக்கலாம்."</string>
+    <string name="permdesc_writeSms" product="tablet" msgid="5160413947794501538">"டேப்லெட் அல்லது சிம் கார்டில் சேமிக்கப்பட்ட SMS செய்திகளை எழுத, பயன்பாட்டை அனுமதிக்கிறது. தீங்குவிளைவிக்கும் பயன்பாடுகள் செய்திகளை நீக்கலாம்."</string>
+    <string name="permdesc_writeSms" product="default" msgid="7268668709052328567">"ஃபோன் அல்லது சிம் கார்டில் சேமிக்கப்பட்ட SMS செய்திகளை எழுத, பயன்பாட்டை அனுமதிக்கிறது. தீங்குவிளைவிக்கும் பயன்பாடுகள் செய்திகளை நீக்கலாம்."</string>
     <string name="permlab_receiveWapPush" msgid="5991398711936590410">"உரைச் செய்திகளைப் (WAP) பெறுதல்"</string>
     <string name="permdesc_receiveWapPush" msgid="748232190220583385">"WAP செய்திகளைப் பெற, செயற்படுத்தப் பயன்பாட்டை அனுமதிக்கிறது. உங்களுக்கு அனுப்பப்படும் செய்திகளை உங்களுக்குக் காட்டாமல் கண்காணிக்க அல்லது நீக்குவதற்கான திறன் இந்த அனுமதியில் உள்ளடங்கும்."</string>
     <string name="permlab_receiveBluetoothMap" msgid="7593811487142360528">"Bluetooth செய்திகளைப் (MAP) பெறுதல்"</string>
@@ -541,8 +541,8 @@
     <string name="permdesc_modifyAudioSettings" msgid="3522565366806248517">"ஒலியளவு மற்றும் வெளியீட்டிற்கு ஸ்பீக்கர்கள் பயன்படுத்தப்படுவது போன்ற ஒட்டுமொத்த ஆடியோ அமைப்புகளைக் கட்டுப்படுத்தப் பயன்பாட்டை அனுமதிக்கிறது."</string>
     <string name="permlab_recordAudio" msgid="3876049771427466323">"ஆடியோவைப் பதிவுசெய்தல்"</string>
     <string name="permdesc_recordAudio" msgid="4906839301087980680">"மைக்ரோஃபோன் மூலம் ஆடியோவைப் பதிவுசெய்ய பயன்பாட்டை அனுமதிக்கிறது. உங்கள் உறுதிப்படுத்தல் இல்லாமல் எந்நேரத்திலும் ஆடியோவைப் பதிவுசெய்ய இந்த அனுமதி பயன்பாட்டை அனுமதிக்கிறது."</string>
-    <string name="permlab_sim_communication" msgid="1180265879464893029">"SIM தகவல்தொடர்பு"</string>
-    <string name="permdesc_sim_communication" msgid="5725159654279639498">"SIM க்குக் கட்டளைகளை அனுப்ப பயன்பாட்டை அனுமதிக்கிறது. இது மிகவும் ஆபத்தானதாகும்."</string>
+    <string name="permlab_sim_communication" msgid="1180265879464893029">"சிம் தகவல்தொடர்பு"</string>
+    <string name="permdesc_sim_communication" msgid="5725159654279639498">"சிம் க்குக் கட்டளைகளை அனுப்ப பயன்பாட்டை அனுமதிக்கிறது. இது மிகவும் ஆபத்தானதாகும்."</string>
     <string name="permlab_camera" msgid="3616391919559751192">"படங்கள் மற்றும் வீடியோக்களை எடுத்தல்"</string>
     <string name="permdesc_camera" msgid="8497216524735535009">"கேமரா மூலமாகப் படங்களையும், வீடியோக்களையும் எடுக்க பயன்பாட்டை அனுமதிக்கிறது. உங்கள் உறுதிப்படுத்தல் இன்றி கேமராவை எந்நேரத்திலும் பயன்படுத்தப் பயன்பாட்டை இது அனுமதிக்கிறது."</string>
     <string name="permlab_cameraDisableTransmitLed" msgid="2651072630501126222">"கேமரா பயன்பாட்டில் இருக்கும்போது டிரான்ஸ்மிட் இன்டிகேட்டர் LED ஐ முடக்குதல்"</string>
@@ -882,14 +882,14 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"அலுவலகம்"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"மற்றவை"</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_pin_code" msgid="3037685796058495017">"பின் குறியீட்டை உள்ளிடவும்"</string>
+    <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"PUK மற்றும் புதிய பின் குறியீட்டை உள்ளிடவும்"</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_enter_pin_prompt" msgid="8027680321614196258">"புதிய பின் குறியீடு"</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>
+    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"திறக்க, பின்னை உள்ளிடவும்"</string>
+    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"தவறான பின் குறியீடு."</string>
     <string name="keyguard_label_text" msgid="861796461028298424">"தடைநீக்க, மெனுவை அழுத்தி பின்பு 0 ஐ அழுத்தவும்."</string>
     <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"அவசர எண்"</string>
     <string name="lockscreen_carrier_default" msgid="8963839242565653192">"சேவை இல்லை."</string>
@@ -907,13 +907,13 @@
     <string name="lockscreen_charged" msgid="321635745684060624">"சார்ஜ் செய்யப்பட்டது"</string>
     <string name="lockscreen_battery_short" msgid="4477264849386850266">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
     <string name="lockscreen_low_battery" msgid="1482873981919249740">"உங்கள் சார்ஜரை இணைக்கவும்."</string>
-    <string name="lockscreen_missing_sim_message_short" msgid="5099439277819215399">"SIM கார்டு இல்லை"</string>
-    <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"டேப்லெட்டில் SIM கார்டு இல்லை."</string>
-    <string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"தொலைபேசியில் SIM கார்டு இல்லை."</string>
-    <string name="lockscreen_missing_sim_instructions" msgid="5372787138023272615">"SIM கார்டைச் செருகவும்."</string>
-    <string name="lockscreen_missing_sim_instructions_long" msgid="3526573099019319472">"SIM கார்டு இல்லை அல்லது படிக்கக்கூடியதாக இல்லை. SIM கார்டைச் செருகவும்."</string>
-    <string name="lockscreen_permanent_disabled_sim_message_short" msgid="5096149665138916184">"பயன்படுத்த முடியாத SIM கார்டு."</string>
-    <string name="lockscreen_permanent_disabled_sim_instructions" msgid="910904643433151371">"உங்கள் SIM கார்டு நிரந்தரமாக முடக்கப்பட்டது.\n மற்றொரு SIM கார்டிற்காக உங்கள் வயர்லெஸ் சேவை வழங்குநரைத் தொடர்புகொள்ளவும்."</string>
+    <string name="lockscreen_missing_sim_message_short" msgid="5099439277819215399">"சிம் கார்டு இல்லை"</string>
+    <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"டேப்லெட்டில் சிம் கார்டு இல்லை."</string>
+    <string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"தொலைபேசியில் சிம் கார்டு இல்லை."</string>
+    <string name="lockscreen_missing_sim_instructions" msgid="5372787138023272615">"சிம் கார்டைச் செருகவும்."</string>
+    <string name="lockscreen_missing_sim_instructions_long" msgid="3526573099019319472">"சிம் கார்டு இல்லை அல்லது படிக்கக்கூடியதாக இல்லை. சிம் கார்டைச் செருகவும்."</string>
+    <string name="lockscreen_permanent_disabled_sim_message_short" msgid="5096149665138916184">"பயன்படுத்த முடியாத சிம் கார்டு."</string>
+    <string name="lockscreen_permanent_disabled_sim_instructions" msgid="910904643433151371">"உங்கள் சிம் கார்டு நிரந்தரமாக முடக்கப்பட்டது.\n மற்றொரு சிம் கார்டிற்காக உங்கள் வயர்லெஸ் சேவை வழங்குநரைத் தொடர்புகொள்ளவும்."</string>
     <string name="lockscreen_transport_prev_description" msgid="6300840251218161534">"முந்தைய ட்ராக்"</string>
     <string name="lockscreen_transport_next_description" msgid="573285210424377338">"அடுத்த ட்ராக்"</string>
     <string name="lockscreen_transport_pause_description" msgid="3980308465056173363">"இடைநிறுத்து"</string>
@@ -923,13 +923,13 @@
     <string name="lockscreen_transport_ffw_description" msgid="42987149870928985">"வேகமாக முன்செல்"</string>
     <string name="emergency_calls_only" msgid="6733978304386365407">"அவசர அழைப்புகள் மட்டும்"</string>
     <string name="lockscreen_network_locked_message" msgid="143389224986028501">"நெட்வொர்க் பூட்டப்பட்டது"</string>
-    <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM கார்டு PUK பூட்டுதல் செய்யப்பட்டுள்ளது."</string>
+    <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"சிம் கார்டு PUK பூட்டுதல் செய்யப்பட்டுள்ளது."</string>
     <string name="lockscreen_sim_puk_locked_instructions" msgid="8127916255245181063">"பயனர் கையேட்டைப் பார்க்கவும் அல்லது வாடிக்கையாளர் சேவையைத் தொடர்புகொள்ளவும்."</string>
-    <string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"SIM கார்டு பூட்டப்பட்டுள்ளது."</string>
-    <string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"SIM கார்டைத் திறக்கிறது..."</string>
+    <string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"சிம் கார்டு பூட்டப்பட்டுள்ளது."</string>
+    <string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"சிம் கார்டைத் திறக்கிறது..."</string>
     <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6481623830344107222">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="2725973286239344555">"உங்கள் கடவுச்சொல்லை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
-    <string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="6216672706545696955">"உங்கள் PIN ஐ <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
+    <string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="6216672706545696955">"உங்கள் பின்னை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%d</xliff:g> முறை தவறாக வரைந்தால், உங்கள் Google உள்நுழைவைப் பயன்படுத்தி டேப்லெட்டைத் திறக்குமாறு கேட்கப்படுவீர்கள். \n\n <xliff:g id="NUMBER_2">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%d</xliff:g> முறை தவறாக வரைந்தால், உங்கள் Google உள்நுழைவைப் பயன்படுத்தி மொபைலைத் திறக்குமாறு கேட்கப்படுவீர்கள். \n\n <xliff:g id="NUMBER_2">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="6128106399745755604">"டேப்லெட்டைத் தடைநீக்க <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, டேப்லெட்டானது ஆரம்ப இயல்புநிலைக்கு மீட்டமைக்கப்பட்டு, எல்லா பயனர் தரவும் இழக்கப்படும்."</string>
@@ -1284,8 +1284,8 @@
     <string name="wifi_p2p_invitation_to_connect_title" msgid="4958803948658533637">"இணைவதற்கான அழைப்பு"</string>
     <string name="wifi_p2p_from_message" msgid="570389174731951769">"அனுப்புநர்:"</string>
     <string name="wifi_p2p_to_message" msgid="248968974522044099">"பெறுநர்:"</string>
-    <string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"பின்வரும் அவசியமான PIN ஐ உள்ளிடவும்:"</string>
-    <string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"PIN:"</string>
+    <string name="wifi_p2p_enter_pin_message" msgid="5920929550367828970">"பின்வரும் அவசியமான பின்னை உள்ளிடவும்:"</string>
+    <string name="wifi_p2p_show_pin_message" msgid="8530563323880921094">"பின்:"</string>
     <string name="wifi_p2p_frequency_conflict_message" product="tablet" msgid="8012981257742232475">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> உடன் டேப்லெட் இணைக்கப்படும்போது, வைஃபையிலிருந்து தற்காலிகமாகத் துண்டிக்கப்படும்."</string>
     <string name="wifi_p2p_frequency_conflict_message" product="default" msgid="7363907213787469151">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> உடன் மொபைல் இணைக்கப்படும்போது, வைஃபையிலிருந்து தற்காலிகமாகத் துண்டிக்கப்படும்."</string>
     <string name="select_character" msgid="3365550120617701745">"எழுத்துக்குறியைச் செருகு"</string>
@@ -1294,18 +1294,18 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"அனுமதி"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; க்குச் செய்தியை அனுப்ப விரும்புகிறது."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"உங்கள் மொபைல் கணக்கில் இது "<font fgcolor="#ffffb060">"கட்டணம் விதிக்கலாம்"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"உங்கள் மொபைல் கணக்கில் இது கட்டணம் விதிக்கலாம்."</font></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">"அனுப்பு"</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>
     <string name="sms_short_code_confirm_never_allow" msgid="446992765774269673">"ஒருபோதும் அனுமதிக்காதே"</string>
-    <string name="sim_removed_title" msgid="6227712319223226185">"SIM கார்டு அகற்றப்பட்டது"</string>
-    <string name="sim_removed_message" msgid="5450336489923274918">"சரியான SIM கார்டைச் செருகி, மறுதொடக்கம் செய்யும் வரை செல்லுலார் நெட்வொர்க் கிடைக்காது."</string>
+    <string name="sim_removed_title" msgid="6227712319223226185">"சிம் கார்டு அகற்றப்பட்டது"</string>
+    <string name="sim_removed_message" msgid="5450336489923274918">"சரியான சிம் கார்டைச் செருகி, மறுதொடக்கம் செய்யும் வரை செல்லுலார் நெட்வொர்க் கிடைக்காது."</string>
     <string name="sim_done_button" msgid="827949989369963775">"முடிந்தது"</string>
-    <string name="sim_added_title" msgid="3719670512889674693">"SIM கார்டு சேர்க்கப்பட்டது"</string>
+    <string name="sim_added_title" msgid="3719670512889674693">"சிம் கார்டு சேர்க்கப்பட்டது"</string>
     <string name="sim_added_message" msgid="7797975656153714319">"செல்லுலார் நெட்வொர்க்கை அணுக உங்கள் சாதனத்தை மறுதொடக்கம் செய்யவும்."</string>
     <string name="sim_restart_button" msgid="4722407842815232347">"மறுதொடக்கம்"</string>
     <string name="time_picker_dialog_title" msgid="8349362623068819295">"நேரத்தை அமை"</string>
@@ -1568,7 +1568,7 @@
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"இப்போது மட்டும்"</string>
     <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s பணி சுயவிவரத்தை ஆதரிக்காது"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"டேப்லெட்"</string>
-    <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"மொபைல்"</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_media_route_name_hdmi" msgid="2450970399023478055">"HDMI"</string>
@@ -1600,21 +1600,21 @@
     <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"வடிவத்தை மறந்துவிட்டீர்களா"</string>
     <string name="kg_wrong_pattern" msgid="1850806070801358830">"தவறான வடிவம்"</string>
     <string name="kg_wrong_password" msgid="2333281762128113157">"தவறான கடவுச்சொல்"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"தவறான PIN"</string>
+    <string name="kg_wrong_pin" msgid="1131306510833563801">"தவறான பின்"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%1$d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_pattern_instructions" msgid="398978611683075868">"உங்கள் வடிவத்தை வரையவும்"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN ஐ உள்ளிடவும்"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN ஐ உள்ளிடுக"</string>
+    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"சிம் பின்னை உள்ளிடவும்"</string>
+    <string name="kg_pin_instructions" msgid="2377242233495111557">"பின்னை உள்ளிடுக"</string>
     <string name="kg_password_instructions" msgid="5753646556186936819">"கடவுச்சொல்லை உள்ளிடவும்"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM தற்போது முடக்கப்பட்டுள்ளது. தொடர்வதற்கு PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு மொபைல் நிறுவனங்களைத் தொடர்புகொள்ளவும்."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"விரும்பிய PIN குறியீட்டை உள்ளிடவும்"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"விரும்பிய PIN குறியீட்டை உறுதிப்படுத்தவும்"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM கார்டின் தடையைநீக்குகிறது..."</string>
-    <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"தவறான PIN குறியீடு."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 இலிருந்து 8 எண்கள் வரையுள்ள PIN ஐ உள்ளிடவும்."</string>
+    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"சிம் தற்போது முடக்கப்பட்டுள்ளது. தொடர்வதற்கு PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு மொபைல் நிறுவனங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"விரும்பிய பின் குறியீட்டை உள்ளிடவும்"</string>
+    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"விரும்பிய பின் குறியீட்டை உறுதிப்படுத்தவும்"</string>
+    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"சிம் கார்டின் தடையைநீக்குகிறது..."</string>
+    <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"தவறான பின் குறியீடு."</string>
+    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 இலிருந்து 8 எண்கள் வரையுள்ள பின்னை உள்ளிடவும்."</string>
     <string name="kg_invalid_sim_puk_hint" msgid="6025069204539532000">"PUK குறியீட்டில் 8 எழுத்துக்குறிகள் இருக்க வேண்டும்."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"சரியான PUK குறியீட்டை மீண்டும் உள்ளிடவும். தொடர் முயற்சிகள் SIM ஐ நிரந்தரமாக முடக்கிவிடும்."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN குறியீடுகள் பொருந்தவில்லை"</string>
+    <string name="kg_invalid_puk" msgid="3638289409676051243">"சரியான PUK குறியீட்டை மீண்டும் உள்ளிடவும். தொடர் முயற்சிகள் சிம் ஐ நிரந்தரமாக முடக்கிவிடும்."</string>
+    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"பின் குறியீடுகள் பொருந்தவில்லை"</string>
     <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"அதிகமான வடிவ முயற்சிகள்"</string>
     <string name="kg_login_instructions" msgid="1100551261265506448">"திறக்க, உங்கள் Google கணக்கு மூலம் உள்நுழையவும்."</string>
     <string name="kg_login_username_hint" msgid="5718534272070920364">"பயனர்பெயர் (மின்னஞ்சல்)"</string>
@@ -1623,7 +1623,7 @@
     <string name="kg_login_invalid_input" msgid="5754664119319872197">"தவறான பயனர்பெயர் அல்லது கடவுச்சொல்."</string>
     <string name="kg_login_account_recovery_hint" msgid="5690709132841752974">"உங்கள் பயனர்பெயர் அல்லது கடவுச்சொல்லை மறந்துவிட்டீர்களா?\n"<b>"google.com/accounts/recovery"</b>" ஐப் பார்வையிடவும்."</string>
     <string name="kg_login_checking_password" msgid="1052685197710252395">"கணக்கைச் சரிபார்க்கிறது…"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"உங்கள் PIN ஐ <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
+    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"உங்கள் பின்னை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"உங்கள் கடவுச்சொல்லை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகளில் மீண்டும் முயற்சிக்கவும்."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="1575557200627128949">"டேப்லெட்டைத் திறக்க <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, டேப்லெட்டானது ஆரம்பநிலைக்கு மீட்டமைக்கப்பட்டு, எல்லா பயனர் தரவையும் இழப்பீர்கள்."</string>
@@ -1734,15 +1734,15 @@
     <string name="reason_service_unavailable" msgid="7824008732243903268">"பிரிண்டர் இயக்கத்தில் இல்லை"</string>
     <string name="print_service_installed_title" msgid="2246317169444081628">"<xliff:g id="NAME">%s</xliff:g> சேவை நிறுவப்பட்டது"</string>
     <string name="print_service_installed_message" msgid="5897362931070459152">"இயக்குவதற்குத் தட்டவும்"</string>
-    <string name="restr_pin_enter_admin_pin" msgid="783643731895143970">"நிர்வாகி PIN ஐ உள்ளிடவும்"</string>
-    <string name="restr_pin_enter_pin" msgid="3395953421368476103">"PIN ஐ உள்ளிடவும்"</string>
+    <string name="restr_pin_enter_admin_pin" msgid="783643731895143970">"நிர்வாகி பின்னை உள்ளிடவும்"</string>
+    <string name="restr_pin_enter_pin" msgid="3395953421368476103">"பின்னை உள்ளிடவும்"</string>
     <string name="restr_pin_incorrect" msgid="8571512003955077924">"தவறானது"</string>
-    <string name="restr_pin_enter_old_pin" msgid="1462206225512910757">"நடப்பு PIN"</string>
-    <string name="restr_pin_enter_new_pin" msgid="5959606691619959184">"புதிய PIN"</string>
-    <string name="restr_pin_confirm_pin" msgid="8501523829633146239">"புதிய PIN ஐ உறுதிப்படுத்தவும்"</string>
-    <string name="restr_pin_create_pin" msgid="8017600000263450337">"வரம்புகளைத் திருத்துவதற்கு PIN ஐ உருவாக்கவும்"</string>
+    <string name="restr_pin_enter_old_pin" msgid="1462206225512910757">"நடப்பு பின்"</string>
+    <string name="restr_pin_enter_new_pin" msgid="5959606691619959184">"புதிய பின்"</string>
+    <string name="restr_pin_confirm_pin" msgid="8501523829633146239">"புதிய பின்னை உறுதிப்படுத்தவும்"</string>
+    <string name="restr_pin_create_pin" msgid="8017600000263450337">"வரம்புகளைத் திருத்துவதற்கு பின்னை உருவாக்கவும்"</string>
     <string name="restr_pin_error_doesnt_match" msgid="2224214190906994548">"PINகள் பொருந்தவில்லை. மீண்டும் முயற்சிக்கவும்."</string>
-    <string name="restr_pin_error_too_short" msgid="8173982756265777792">"PIN மிகவும் சிறியதாக உள்ளது. குறைந்தது 4 இலக்கங்கள் இருக்க வேண்டும்."</string>
+    <string name="restr_pin_error_too_short" msgid="8173982756265777792">"பின் மிகவும் சிறியதாக உள்ளது. குறைந்தது 4 இலக்கங்கள் இருக்க வேண்டும்."</string>
   <plurals name="restr_pin_countdown">
     <item quantity="one" msgid="311050995198548675">"1 வினாடி கழித்து முயற்சிக்கவும்"</item>
     <item quantity="other" msgid="4730868920742952817">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்"</item>
@@ -1774,6 +1774,6 @@
     <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"அகற்றும் முன் PINஐக் கேள்"</string>
     <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"அகற்றும் முன் திறத்தல் வடிவத்தைக் கேள்"</string>
     <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"அகற்றும் முன் கடவுச்சொல்லைக் கேள்"</string>
-    <string name="battery_saver_description" msgid="2510530476513605742">"பேட்டரியின் ஆயுட்காலத்தை அதிகரிக்க, பேட்டரி சேமிப்பான் சாதனத்தின் செயல்திறனைக் குறைத்து, அதிர்வுறுவதையும் பெரும்பாலான பின்புலத் தரவையும் வரம்பிடுகிறது. ஒத்திசைவைச் சார்ந்திருக்கும் மின்னஞ்சல், செய்தியிடல், மேலும் பிற பயன்பாடுகளைத் திறக்கும் வரை, அவை புதுப்பிக்கப்படாமல் இருக்கலாம்.\n\nசாதனம் சார்ஜ் ஆகும் போது, பேட்டரி சேமிப்பான் தானாகவே முடக்கப்படும்."</string>
+    <string name="battery_saver_description" msgid="2510530476513605742">"பேட்டரியின் ஆயுட்காலத்தை அதிகரிக்க, பேட்டரி சேமிப்பான் சாதனத்தின் செயல்திறனைக் குறைத்து, அதிர்வுறுவதையும் பெரும்பாலான பின்புலத் தரவையும் வரம்பிடுகிறது. ஒத்திசைவைச் சார்ந்திருக்கும் மின்னஞ்சல், மெசேஜ், மேலும் பிற பயன்பாடுகளைத் திறக்கும் வரை, அவை புதுப்பிக்கப்படாமல் இருக்கலாம்.\n\nசாதனம் சார்ஜ் ஆகும் போது, பேட்டரி சேமிப்பான் தானாகவே முடக்கப்படும்."</string>
     <string name="downtime_condition_summary" msgid="8761776337475705749">"<xliff:g id="FORMATTEDTIME">%1$s</xliff:g>இல் செயல்படாத நேரம் முடியும் வரை"</string>
 </resources>
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index cee97e2..3ce7efb 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"అనుమతిస్తున్నాను"</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; ఒక సందేశాన్ని &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;కి పంపాలనుకుంటోంది."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"దీని వలన మీ మొబైల్ ఖాతాకు "<font fgcolor="#ffffb060">"ఛార్జీలు పడవచ్చు"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"దీని వలన మీ మొబైల్ ఖాతాకు ఛార్జీలు పడవచ్చు."</font></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">"పంపు"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"రద్దు చేయి"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"నా ఎంపికను గుర్తుంచుకో"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 291d8ac..fee6d0d 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"อนุญาต"</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; ต้องการส่งข้อความไปยัง &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"การดำเนินการนี้"<font fgcolor="#ffffb060">"อาจมีค่าใช้จ่ายเพิ่มเติม"</font>"สำหรับบัญชีมือถือของคุณ"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"การดำเนินการนี้อาจมีค่าใช้จ่ายเพิ่มเติมสำหรับบัญชีมือถือของคุณ"</font></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">"ส่ง"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"ยกเลิก"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"จดจำตัวเลือกของฉัน"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"เปิดใช้งานการเข้าถึงแล้ว"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"ยกเลิกการเข้าถึงแล้ว"</string>
     <string name="user_switched" msgid="3768006783166984410">"ผู้ใช้ปัจจุบัน <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"กำลังเปลี่ยนเป็น <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index ab1f19d..4bd8ab8 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Payagan"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Tanggihan"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"Gustong magpadala ng mensahe ng &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; sa &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Magsasanhi ito "<font fgcolor="#ffffb060">"ng mga pagsingil"</font>" sa iyong mobile account."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Magsasanhi ito ng mga pagsingil sa iyong mobile account."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Ito ay "<b>"maaaring magsanhi ng mga singilin"</b>" sa iyong mobile account."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Magsasanhi ito ng mga singilin sa iyong mobile account."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Ipadala"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Kanselahin"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Tandaan ang aking pinili"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Pinagana ang accessibility."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Nakansela ang pagiging naa-access."</string>
     <string name="user_switched" msgid="3768006783166984410">"Kasalukuyang user <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Lumilipat kay <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"May-ari"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Error"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Ang pagbabagong ito ay hindi pinapahintulutan ng iyong administrator"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index a4d83ea..2dffbd4 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"telefonu aç veya kapat"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"Uygulamaya, tabletinizi açma veya kapatma izni verir."</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"Uygulamaya, telefonu açıp kapatma izni verir."</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"ekran zaman aşımını sıfırlama"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"Uygulamanın ekran zaman aşımı süresini sıfırlamasına olanak verir."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"fabrika test modunda çalıştır"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Tabletin donanımına tam erişim veren alt düzey bir üretici testi olarak çalıştırılır. Yalnızca tablet üretici test modunda çalışırken kullanılabilir."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Telefon donanımına tam erişim veren alt düzey bir üretici testi olarak çalıştırılır. Yalnızca telefon üretici test modunda çalışırken kullanılabilir."</string>
@@ -1296,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"İzin ver"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Reddet"</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;, &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; adresine bir mesaj göndermek istiyor."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Bu işlem, mobil hesabınızdan "<font fgcolor="#ffffb060">"ücret alınmasına neden olabilir"</font>"."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Bu işlem, mobil hesabınızdan ücret alınmasına neden olacaktır."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Bu işlem, mobil hesabınızdan "<b>"ödeme alınmasına neden olabilir"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Bu işlem, mobil hesabınızdan ödeme alınmasına neden olacak."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Gönder"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"İptal"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Seçimimi hatırla"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"Reddet"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"İzin istendi"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"<xliff:g id="ACCOUNT">%s</xliff:g> hesabı için\nizin isteğinde bulunuldu."</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"Bu uygulamayı iş profilinizin dışında kullanıyorsunuz"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"Bu uygulamayı iş profilinizde kullanıyorsunuz"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"Giriş yöntemi"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"Senkronizasyon"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"Çağrı kabul edilsin mi?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"Her zaman"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"Yalnızca bir defa"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s, iş profilini desteklemiyor"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"Tablet"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"Telefon"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"Kulaklıklar"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Erişilebilirlik etkinleştirildi."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Erişilebilirlik iptal edildi."</string>
     <string name="user_switched" msgid="3768006783166984410">"Geçerli kullanıcı: <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> adlı kullanıcıya geçiliyor…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Sahibi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Hata"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Yöneticiniz bu değişikliğe izin vermiyor"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index d2f2ace..9081a76 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Дозволити"</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; хоче надіслати повідомлення на таку адресу: &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Це "<font fgcolor="#ffffb060">"може призвести до стягнення плати"</font>" з вашого рахунку в оператора мобільного зв’язку."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Це призведе до стягнення плати з вашого рахунку в оператора мобільного зв’язку."</font></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">"Надіслати"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Скасувати"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Запам’ятати мій вибір"</string>
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index a4870cd..b5ef98a 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"اجازت دیں"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; کو ایک پیغام بھیجنا چاہے گا۔"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"اس کی وجہ سے آپ کے موبائل اکاؤنٹ پر "<font fgcolor="#ffffb060">"چارجز لگ سکتے ہیں"</font>"۔"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"اس کی وجہ سے آپ کے موبائل اکاؤنٹ پر چارجز لگیں گے۔"</font></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">"بھیجیں"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"منسوخ کریں"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"میری پسند یاد رکھیں"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"‏Accessibility فعال۔"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"‏Accessibility منسوخ ہوگئی۔"</string>
     <string name="user_switched" msgid="3768006783166984410">"موجودہ صارف <xliff:g id="NAME">%1$s</xliff:g>۔"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"<xliff:g id="NAME">%1$s</xliff:g> پر سوئچ کیا جا رہا ہے…"</string>
     <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>
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index 851f6c3..f607b6b 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Ruxsat berish"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Rad qilish"</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; &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;ga xabar jo‘natishni xohlaydi."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Bu telefon hisobingizda "<font fgcolor="#ffffb060">"pul yechib olinishiga"</font>" sabab bo‘lishi mumkin."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Bu telefondagi hisobingizdan pul yechib olinishiga sabab bo‘lishi mumkin."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Bunda, mobil hisobingizdan "<b>"to‘lov olinishi mumkin"</b>"."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Bunda, mobil hisobingizdan to‘lov olinishi mumkin."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Jo‘natish"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Bekor qilish"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Tanlovim eslab qolinsin"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Imkoniyatlar yoqilgan."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Qulaylik bekor qilindi."</string>
     <string name="user_switched" msgid="3768006783166984410">"Joriy foydalanuvchi <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Quyidagi foydalanuvchiga o‘tilmoqda: <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Egasi"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Xato"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Ushbu o‘zgarishni amalga oshirish uchun administrator ruxsat bermagan"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 819153b..41c7fc4 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Cho phép"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Từ chối"</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; muốn gửi thư đến &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Điều này "<font fgcolor="#ffffb060">"có thể gây ra các khoản phí"</font>" đối với tài khoản di động của bạn."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Điều này sẽ gây ra các khoản phí đối với tài khoản di động của bạn."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Điều này "<b>"có thể gây ra các khoản phí"</b>" đối với tài khoản di động của bạn."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Điều này sẽ gây ra các khoản phí đối với tài khoản di động của bạn."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Gửi"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Hủy"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Nhớ lựa chọn của tôi"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"Trợ năng đã được bật."</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"Đã hủy trợ năng."</string>
     <string name="user_switched" msgid="3768006783166984410">"Người dùng hiện tại <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"Đang chuyển sang <xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <string name="owner_name" msgid="2716755460376028154">"Chủ sở hữu"</string>
     <string name="error_message_title" msgid="4510373083082500195">"Lỗi"</string>
     <string name="error_message_change_not_allowed" msgid="1347282344200417578">"Quản trị viên của bạn không cho phép thực hiện thay đổi này"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 97402e5..ed3dd01 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -611,10 +611,8 @@
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"开机或关机"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="6689862878984631831">"允许应用打开或关闭平板电脑。"</string>
     <string name="permdesc_devicePower" product="default" msgid="6037057348463131032">"允许应用打开或关闭手机。"</string>
-    <!-- no translation found for permlab_userActivity (1677844893921729548) -->
-    <skip />
-    <!-- no translation found for permdesc_userActivity (651746160252248024) -->
-    <skip />
+    <string name="permlab_userActivity" msgid="1677844893921729548">"重置显示屏超时"</string>
+    <string name="permdesc_userActivity" msgid="651746160252248024">"允许该应用重置显示屏超时。"</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"在出厂测试模式下运行"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"作为低级制造商测试运行,从而允许对平板电脑硬件进行完全访问。此权限仅当平板电脑在制造商测试模式下运行时才可用。"</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"作为一项低级制造商测试来运行,从而允许对手机硬件进行完全访问。此权限仅当手机在制造商测试模式下运行时才可用。。"</string>
@@ -1296,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"允许"</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;想要向 &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt; 发送一条短信。"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457"><font fgcolor="#ffffb060">"这可能会导致您的手机号产生费用。"</font></string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"这会导致您的手机号产生费用。"</font></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">"发送"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"取消"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"记住我的选择"</string>
@@ -1425,8 +1423,7 @@
     <string name="deny" msgid="2081879885755434506">"拒绝"</string>
     <string name="permission_request_notification_title" msgid="6486759795926237907">"权限请求"</string>
     <string name="permission_request_notification_with_subtitle" msgid="8530393139639560189">"应用对帐户 <xliff:g id="ACCOUNT">%s</xliff:g>\n 提出权限请求。"</string>
-    <!-- no translation found for forward_intent_to_owner (1207197447013960896) -->
-    <skip />
+    <string name="forward_intent_to_owner" msgid="1207197447013960896">"您目前是在工作资料之外使用此应用"</string>
     <string name="forward_intent_to_work" msgid="621480743856004612">"您目前是在工作资料内使用此应用"</string>
     <string name="input_method_binding_label" msgid="1283557179944992649">"输入法"</string>
     <string name="sync_binding_label" msgid="3687969138375092423">"同步"</string>
@@ -1569,8 +1566,7 @@
     <string name="SetupCallDefault" msgid="5834948469253758575">"要接听电话吗?"</string>
     <string name="activity_resolver_use_always" msgid="8017770747801494933">"始终"</string>
     <string name="activity_resolver_use_once" msgid="2404644797149173758">"仅此一次"</string>
-    <!-- no translation found for activity_resolver_work_profiles_support (185598180676883455) -->
-    <skip />
+    <string name="activity_resolver_work_profiles_support" msgid="185598180676883455">"%1$s不支持工作资料"</string>
     <string name="default_audio_route_name" product="tablet" msgid="4617053898167127471">"平板电脑"</string>
     <string name="default_audio_route_name" product="default" msgid="4239291273420140123">"手机"</string>
     <string name="default_audio_route_name_headphones" msgid="8119971843803439110">"耳机"</string>
@@ -1643,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"辅助功能已启用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"已取消辅助功能。"</string>
     <string name="user_switched" msgid="3768006783166984410">"当前用户是<xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"正在切换到“<xliff:g id="NAME">%1$s</xliff:g>”…"</string>
     <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>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index d48b428..cd0ef0b 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"允許"</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; 要求將訊息傳送至 &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;。"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"這"<font fgcolor="#ffffb060">"可能將收費計入"</font>"您的流動服務帳戶中。"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"這會將收費計入您的流動服務帳戶中。"</font></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">"發送"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"取消"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"記住我的選擇"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"協助工具已啟用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"協助工具已取消。"</string>
     <string name="user_switched" msgid="3768006783166984410">"目前的用戶是<xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"正在切換至<xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index f95a3cc..fdb54ec 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -376,7 +376,7 @@
     <string name="permdesc_confirm_full_backup" msgid="1748762171637699562">"允許應用程式啟動完整備份確認使用者介面 (不建議任何應用程式使用)。"</string>
     <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"顯示未授權視窗"</string>
     <string name="permdesc_internalSystemWindow" msgid="7458387759461466397">"允許應用程式為內部系統使用者介面建立視窗 (不建議一般應用程式使用)。"</string>
-    <string name="permlab_systemAlertWindow" msgid="3543347980839518613">"在其他應用程式之上顯示内容"</string>
+    <string name="permlab_systemAlertWindow" msgid="3543347980839518613">"在其他應用程式之上顯示內容"</string>
     <string name="permdesc_systemAlertWindow" msgid="8584678381972820118">"允許應用程式在其他應用程式頂層或使用者介面的特定部分繪圖。這可能會干擾您在所有應用程式中的介面使用行為,或是使您在其他應用程式中預期看到的內容發生變化。"</string>
     <string name="permlab_setAnimationScale" msgid="2805103241153907174">"編輯全域動畫速度"</string>
     <string name="permdesc_setAnimationScale" msgid="7690063428924343571">"允許應用程式隨時變更全域的動畫速度 (更快或更慢)。"</string>
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"允許"</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; 要求將訊息傳送至 &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;。"</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"這"<font fgcolor="#ffffb060">"可能會透過您的行動帳戶計費"</font>"。"</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"這會透過您的行動帳戶計費。"</font></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">"傳送"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"取消"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"記住我的選擇"</string>
@@ -1639,8 +1639,7 @@
     <string name="accessibility_enabled" msgid="1381972048564547685">"協助工具已啟用。"</string>
     <string name="enable_accessibility_canceled" msgid="3833923257966635673">"協助工具已取消。"</string>
     <string name="user_switched" msgid="3768006783166984410">"目前的使用者是 <xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <!-- no translation found for user_switching_message (2871009331809089783) -->
-    <skip />
+    <string name="user_switching_message" msgid="2871009331809089783">"正在切換至<xliff:g id="NAME">%1$s</xliff:g>…"</string>
     <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>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index a84be69..072e77a 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1294,8 +1294,8 @@
     <string name="sms_control_yes" msgid="3663725993855816807">"Vumela"</string>
     <string name="sms_control_no" msgid="625438561395534982">"Nqaba"</string>
     <string name="sms_short_code_confirm_message" msgid="1645436466285310855">"I-&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ingathanda ukuthumela umlayezo ku-&lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
-    <string name="sms_short_code_details" msgid="3492025719868078457">"Lokhu "<font fgcolor="#ffffb060">"kungabangela amashaji"</font>" ku-akhawunti yakho yeselula."</string>
-    <string name="sms_premium_short_code_details" msgid="5523826349105123687"><font fgcolor="#ffffb060">"Lokhu kuzobangela amashaji ku-akhawunti yakho yeselula."</font></string>
+    <string name="sms_short_code_details" msgid="5873295990846059400">"Lokhu "<b>"kungabangela ukukhokhiswa"</b>" ku-akhawunti yakho yeselula."</string>
+    <string name="sms_premium_short_code_details" msgid="7869234868023975"><b>"Lokhu kuzobangela ukukhokhiswa ku-akhawunti yakho yeselula."</b></string>
     <string name="sms_short_code_confirm_allow" msgid="4458878637111023413">"Thumela"</string>
     <string name="sms_short_code_confirm_deny" msgid="2927389840209170706">"Khansela"</string>
     <string name="sms_short_code_remember_choice" msgid="5289538592272218136">"Khumbula inketho yami"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a798d2e..026908a 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -514,8 +514,8 @@
         <!-- Flag indicating whether this Window's transition should overlap with
              the exiting transition of the called Activity when the called Activity
              finishes. Corresponds to
-             {@link android.view.Window#setAllowExitTransitionOverlap(boolean)}. -->
-        <attr name="windowAllowExitTransitionOverlap" format="boolean"/>
+             {@link android.view.Window#setAllowReturnTransitionOverlap(boolean)}. -->
+        <attr name="windowAllowReturnTransitionOverlap" format="boolean"/>
 
         <!-- Indicates whether or not shared elements should use an overlay
              during transitions. The default value is true. -->
@@ -1726,6 +1726,34 @@
         <enum name="KEYCODE_LAST_CHANNEL" value="229" />
         <enum name="KEYCODE_TV_DATA_SERVICE" value="230" />
         <enum name="KEYCODE_VOICE_ASSIST" value="231" />
+        <enum name="KEYCODE_TV_RADIO_SERVICE" value="232" />
+        <enum name="KEYCODE_TV_TELETEXT" value="233" />
+        <enum name="KEYCODE_TV_NUMBER_ENTRY" value="234" />
+        <enum name="KEYCODE_TV_TERRESTRIAL_ANALOG" value="235" />
+        <enum name="KEYCODE_TV_TERRESTRIAL_DIGITAL" value="236" />
+        <enum name="KEYCODE_TV_SATELLITE" value="237" />
+        <enum name="KEYCODE_TV_SATELLITE_BS" value="238" />
+        <enum name="KEYCODE_TV_SATELLITE_CS" value="239" />
+        <enum name="KEYCODE_TV_SATELLITE_SERVICE" value="240" />
+        <enum name="KEYCODE_TV_NETWORK" value="241" />
+        <enum name="KEYCODE_TV_ANTENNA_CABLE" value="242" />
+        <enum name="KEYCODE_TV_INPUT_HDMI_1" value="243" />
+        <enum name="KEYCODE_TV_INPUT_HDMI_2" value="244" />
+        <enum name="KEYCODE_TV_INPUT_HDMI_3" value="245" />
+        <enum name="KEYCODE_TV_INPUT_HDMI_4" value="246" />
+        <enum name="KEYCODE_TV_INPUT_COMPOSITE_1" value="247" />
+        <enum name="KEYCODE_TV_INPUT_COMPOSITE_2" value="248" />
+        <enum name="KEYCODE_TV_INPUT_COMPONENT_1" value="249" />
+        <enum name="KEYCODE_TV_INPUT_COMPONENT_2" value="250" />
+        <enum name="KEYCODE_TV_INPUT_VGA_1" value="251" />
+        <enum name="KEYCODE_TV_AUDIO_DESCRIPTION" value="252" />
+        <enum name="KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP" value="253" />
+        <enum name="KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN" value="254" />
+        <enum name="KEYCODE_TV_ZOOM_MODE" value="255" />
+        <enum name="KEYCODE_TV_CONTENTS_MENU" value="256" />
+        <enum name="KEYCODE_TV_MEDIA_CONTEXT_MENU" value="257" />
+        <enum name="KEYCODE_TV_TIMER_PROGRAMMING" value="258" />
+        <enum name="KEYCODE_HELP" value="259" />
     </attr>
 
     <!-- ***************************************************************** -->
@@ -1853,8 +1881,8 @@
         <!-- Flag indicating whether this Window's transition should overlap with
              the exiting transition of the called Activity when the called Activity
              finishes. Corresponds to
-             {@link android.view.Window#setAllowExitTransitionOverlap(boolean)}. -->
-        <attr name="windowAllowExitTransitionOverlap"/>
+             {@link android.view.Window#setAllowReturnTransitionOverlap(boolean)}. -->
+        <attr name="windowAllowReturnTransitionOverlap"/>
 
         <!-- Indicates whether or not shared elements should use an overlay
              during transitions. The default value is true. -->
@@ -1921,6 +1949,8 @@
         <attr name="listItemLayout" format="reference" />
         <attr name="progressLayout" format="reference" />
         <attr name="horizontalProgressLayout" format="reference" />
+        <!-- @hide Whether fullDark, etc. should use default values if null. -->
+        <attr name="needsDefaultBackgrounds" format="boolean" />
     </declare-styleable>
 
     <!-- Fragment animation class attributes. -->
@@ -4311,12 +4341,14 @@
         <attr name="minDate" format="string" />
         <!-- The maximal date shown by this calendar view in mm/dd/yyyy format. -->
         <attr name="maxDate" format="string" />
+        <!-- The first day of week according to {@link java.util.Calendar}. -->
+        <attr name="firstDayOfWeek" />
         <!-- @hide The layout of the date picker. -->
         <attr name="internalLayout" format="reference"  />
         <!-- @hide The layout of the legacy DatePicker. -->
         <attr name="legacyLayout" />
         <!-- The background color for the date selector 's day of week. -->
-        <attr name="dayOfWeekBackgroundColor" format="color" />
+        <attr name="dayOfWeekBackground" format="color|reference" />
         <!-- The text color for the date selector's day of week. -->
         <attr name="dayOfWeekTextAppearance" format="reference" />
         <!-- The month's text appearance in the date selector. -->
@@ -4325,8 +4357,8 @@
         <attr name="headerDayOfMonthTextAppearance" format="reference" />
         <!-- The year's text appearance in the date selector. -->
         <attr name="headerYearTextAppearance" format="reference" />
-        <!-- The background color for the date selector. -->
-        <attr name="headerBackgroundColor" />
+        <!-- The background for the date selector. -->
+        <attr name="headerBackground" />
         <!-- @hide The selected text color for the date selector. Used as a
              backup if the text appearance does not explicitly have a color
              set for the selected state. -->
@@ -4451,12 +4483,12 @@
         <!-- The row boundary delimiting the top of the group of cells
         occupied by this view. -->
         <attr name="layout_row" format="integer" />
-        <!-- The row span: the difference between the bottom and top
+        <!-- The row span: the difference between the top and bottom
         boundaries delimiting the group of cells occupied by this view.
         The default is one.
         See {@link android.widget.GridLayout.Spec}. -->
         <attr name="layout_rowSpan" format="integer" min="1" />
-        <!-- The relative proportion of horizontal space that should be allocated to this view
+        <!-- The relative proportion of vertical space that should be allocated to this view
         during excess space distribution. -->
         <attr name="layout_rowWeight" format="float" />
         <!-- The column boundary delimiting the left of the group of cells
@@ -4467,7 +4499,7 @@
         The default is one.
         See {@link android.widget.GridLayout.Spec}. -->
         <attr name="layout_columnSpan" format="integer" min="1" />
-        <!-- The relative proportion of vertical space that should be allocated to this view
+        <!-- The relative proportion of horizontal space that should be allocated to this view
         during excess space distribution. -->
         <attr name="layout_columnWeight" format="float" />
         <!-- Gravity specifies how a component should be placed in its group of cells.
@@ -4623,29 +4655,29 @@
         <attr name="legacyLayout" format="reference" />
         <!-- @hide The layout of the time picker. -->
         <attr name="internalLayout" />
-        <!-- The text appearance for the AM/PM header of the TimePicker. -->
+        <!-- The text appearance for the AM/PM header. -->
         <attr name="headerAmPmTextAppearance" format="reference" />
-        <!-- The text appearance for the time header of the TimePicker. -->
+        <!-- The text appearance for the time header. -->
         <attr name="headerTimeTextAppearance" format="reference" />
         <!-- @hide The text color for selected time header of the TimePicker.
              This will override the value from the text appearance if it does
              not explicitly have a color set for the selected state. -->
         <attr name="headerSelectedTextColor" format="color" />
-        <!-- The background color for the header of the TimePicker. -->
-        <attr name="headerBackgroundColor" format="color" />
-        <!-- The color for the hours/minutes numbers of the TimePicker. -->
+        <!-- The background for the header containing the currently selected time. -->
+        <attr name="headerBackground" />
+        <!-- The color for the hours/minutes numbers. -->
         <attr name="numbersTextColor" format="color" />
-        <!-- The background color for the hours/minutes numbers of the TimePicker. -->
+        <!-- The background color for the hours/minutes numbers. -->
         <attr name="numbersBackgroundColor" format="color" />
-        <!-- The color for the AM/PM selectors of the TimePicker. -->
+        <!-- The color for the AM/PM selectors. -->
         <attr name="amPmTextColor" format="color" />
-        <!-- The background color state list for the AM/PM selectors of the TimePicker. -->
+        <!-- The background color state list for the AM/PM selectors. -->
         <attr name="amPmBackgroundColor" format="color" />
         <!-- @hide The background color for the AM/PM selectors of the
              TimePicker when selected. Used if the background color does not
              explicitly have a color set for the selected state. -->
         <attr name="amPmSelectedBackgroundColor" format="color" />
-        <!-- The color for the hours/minutes selector of the TimePicker. -->
+        <!-- The color for the hours/minutes selector. -->
         <attr name="numbersSelectorColor" format="color" />
         <!-- Defines the look of the widget. Prior to the L release, the only choice was
              spinner. As of L, with the Material theme selected, the default layout is clock,
@@ -5656,12 +5688,12 @@
         <attr name="maximumAngle" format="float" />
     </declare-styleable>
 
-    <!-- Use <code>patternMotion</code> as the root tag of the XML resource that
-         describes a {@link android.transition.PatternMotion}. This must be used
+    <!-- Use <code>patternPathMotion</code> as the root tag of the XML resource that
+         describes a {@link android.transition.PatternPathMotion}. This must be used
          within a transition with which the PathMotion should be associated. -->
-    <declare-styleable name="PatternMotion">
-        <!-- The path string describing the pattern to use for the PathMotion. -->
-        <attr name="pathData" />
+    <declare-styleable name="PatternPathMotion">
+        <!-- The path string describing the pattern to use for the PathPathMotion. -->
+        <attr name="patternPathData" format="string" />
     </declare-styleable>
 
     <!-- ========================== -->
@@ -6570,12 +6602,12 @@
             <flag name="vertical" value="0x2" />
         </attr>
         <!-- Optional parameter which indicates where this widget can be shown,
-             ie. home screen, keyguard, recents or any combination thereof.
+             ie. home screen, keyguard, search bar or any combination thereof.
              Supports combined values using | operator. -->
         <attr name="widgetCategory" format="integer">
             <flag name="home_screen" value="0x1" />
             <flag name="keyguard" value="0x2" />
-            <flag name="recents" value="0x4" />
+            <flag name="searchbox" value="0x4" />
         </attr>
     </declare-styleable>
 
@@ -6627,6 +6659,53 @@
              IDs (through the android:id attribute) instead of tags because
              they are faster and allow for compile-time type checking. -->
         <attr name="tag" />
+
+        <!-- The Transition that will be used to move Views out of the scene when the
+             fragment is removed, hidden, or detached when not popping the back stack.
+             Corresponds to {@link android.app.Fragment#setExitTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentExitTransition" format="reference"/>
+
+        <!-- The Transition that will be used to move Views into the initial scene.
+             Corresponds to {@link android.app.Fragment#setEnterTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentEnterTransition" format="reference"/>
+
+        <!-- The Transition that will be used for shared elements transferred into the content
+             Scene.
+             Corresponds to {@link android.app.Fragment#setSharedElementEnterTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentSharedElementEnterTransition" format="reference"/>
+
+        <!-- The Transition that will be used to move Views out of the scene when the Fragment is
+             preparing to be removed, hidden, or detached because of popping the back stack.
+             Corresponds to {@link android.app.Fragment#setReturnTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentReturnTransition" format="reference"/>
+
+        <!-- The Transition that will be used for shared elements transferred back during a
+             pop of the back stack. This Transition acts in the leaving Fragment.
+             Corresponds to {@link android.app.Fragment#setSharedElementReturnTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentSharedElementReturnTransition" format="reference"/>
+
+        <!-- The Transition that will be used to move Views in to the scene when returning due
+             to popping a back stack.
+             Corresponds to {@link android.app.Fragment#setReenterTransition(
+             android.transition.Transition)} -->
+        <attr name="fragmentReenterTransition" format="reference"/>
+
+        <!-- Sets whether the enter and exit transitions should overlap when transitioning
+             forward.
+             Corresponds to {@link android.app.Fragment#setAllowEnterTransitionOverlap(
+             boolean)} -->
+        <attr name="fragmentAllowEnterTransitionOverlap" format="reference"/>
+
+        <!-- Sets whether the enter and exit transitions should overlap when transitioning
+             because of popping the back stack.
+             Corresponds to {@link android.app.Fragment#setAllowReturnTransitionOverlap(
+             boolean)} -->
+        <attr name="fragmentAllowReturnTransitionOverlap" format="reference"/>
     </declare-styleable>
 
     <!-- Use <code>device-admin</code> as the root tag of the XML resource that
@@ -7040,6 +7119,8 @@
         <attr name="backgroundSplit" />
         <!-- Specifies a fixed height for the action mode bar. -->
         <attr name="height" />
+        <!-- Specifies a layout to use for the "close" item at the starting edge. -->
+        <attr name="closeItemLayout" format="reference" />
     </declare-styleable>
 
     <declare-styleable name="SearchView">
@@ -7072,6 +7153,7 @@
         <attr name="queryBackground" format="reference" />
         <!-- Background for the section containing the action (e.g. voice search) -->
         <attr name="submitBackground" format="reference" />
+        <attr name="focusable" />
     </declare-styleable>
 
     <declare-styleable name="Switch">
@@ -7112,9 +7194,9 @@
         <!-- Drawable to use as the icon bitmap. -->
         <attr name="bitmap" format="reference" />
         <!-- X coordinate of the icon hot spot. -->
-        <attr name="hotSpotX" format="float" />
+        <attr name="hotSpotX" format="dimension" />
         <!-- Y coordinate of the icon hot spot. -->
-        <attr name="hotSpotY" format="float" />
+        <attr name="hotSpotY" format="dimension" />
     </declare-styleable>
 
     <declare-styleable name="Storage">
@@ -7352,9 +7434,6 @@
         <attr name="settingsActivity" />
     </declare-styleable>
 
-    <!-- @removed -->
-    <attr name="__removed1" format="reference" />
-
     <!-- Attributes that can be used with <code>rating-system-definition</code> tags inside of the
          XML resource that describes TV content rating of a {@link android.media.tv.TvInputService},
          which is referenced from its
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index e905a3a..10c2518e 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -939,7 +939,7 @@
          {@link android.content.Intent#FLAG_ACTIVITY_MULTIPLE_TASK
          Intent.FLAG_ACTIVITY_MULTIPLE_TASK}. If the value of
          documentLaunchModes is <code>never</code> then any use of
-.........{@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT
+         {@link android.content.Intent#FLAG_ACTIVITY_NEW_DOCUMENT
          Intent.FLAG_ACTIVITY_NEW_DOCUMENT} to launch this activity will be ignored. -->
     <attr name="documentLaunchMode">
         <!-- The default mode, which will create a new task only when
@@ -994,6 +994,15 @@
          TaskDescription to change labels, colors and icons in the recent task list. -->
     <attr name="relinquishTaskIdentity" format="boolean" />
 
+    <!-- Indicate that it is okay for this activity be resumed while the previous
+         activity is in the process of pausing, without waiting for the previous pause
+         to complete.  Use this with caution: your activity can not acquire any exclusive
+         resources (such as opening the camera or recording audio) when it launches, or it
+         may conflict with the previous activity and fail.
+
+         <p>The default value of this attribute is <code>false</code>. -->
+    <attr name="resumeWhilePausing" format="boolean" />
+
     <!-- The <code>manifest</code> tag is the root of an
          <code>AndroidManifest.xml</code> file,
          describing the contents of an Android package (.apk) file.  One
@@ -1678,6 +1687,7 @@
         <attr name="maxRecents" />
         <attr name="autoRemoveFromRecents" />
         <attr name="relinquishTaskIdentity" />
+        <attr name="resumeWhilePausing" />
     </declare-styleable>
     
     <!-- The <code>activity-alias</code> tag declares a new
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 4470fc3..c42683b 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -128,12 +128,13 @@
     <drawable name="notification_template_icon_bg">#3333B5E5</drawable>
     <drawable name="notification_template_icon_low_bg">#0cffffff</drawable>
     <drawable name="notification_template_divider">#29000000</drawable>
+    <drawable name="notification_template_divider_media">#29ffffff</drawable>
 
     <color name="notification_icon_bg_color">#ff9e9e9e</color>
     <color name="notification_action_color_filter">@color/secondary_text_material_light</color>
 
-    <color name="notification_media_action_bg">#00000000</color>
-    <color name="notification_media_progress">#FFFFFFFF</color>
+    <color name="notification_media_primary_color">@color/primary_text_material_dark</color>
+    <color name="notification_media_secondary_color">@color/secondary_text_material_dark</color>
 
     <!-- Keyguard colors -->
     <color name="keyguard_avatar_frame_color">#ffffffff</color>
diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml
index d8e14a0..939cbf1 100644
--- a/core/res/res/values/colors_material.xml
+++ b/core/res/res/values/colors_material.xml
@@ -19,8 +19,8 @@
     <color name="background_material_dark">#ff212121</color>
     <color name="background_material_light">#fffafafa</color>
 
-    <color name="ripple_material_light">#20444444</color>
-    <color name="ripple_material_dark">#20ffffff</color>
+    <color name="ripple_material_light">#40000000</color>
+    <color name="ripple_material_dark">#40ffffff</color>
 
     <color name="button_material_dark">#ff5a595b</color>
     <color name="button_material_light">#ffd6d7d7</color>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index af213ba..d67690a 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -351,6 +351,15 @@
          point on the move. A value of 0 means no periodic scans will be used in the framework. -->
     <integer translatable="false" name="config_wifi_framework_scan_interval">300000</integer>
 
+    <!-- Integer indicating associated scan interval in milliseconds -->
+    <integer translatable="false" name="config_wifi_framework_associated_scan_interval">10000</integer>
+
+    <!-- Boolean indicating associated scan are allowed -->
+    <bool translatable="false" name="config_wifi_framework_enable_associated_autojoin_scan">true</bool>
+
+    <!-- Boolean indicating associated network selection is allowed -->
+    <bool translatable="false" name="config_wifi_framework_enable_associated_network_selection">true</bool>
+
     <!-- Wifi driver stop delay, in milliseconds.
          Default value is 2 minutes. -->
     <integer translatable="false" name="config_wifi_driver_stop_delay">120000</integer>
@@ -374,7 +383,7 @@
     <bool name="config_useAttentionLight">false</bool>
 
     <!-- If this is true, the screen will fade off. -->
-    <bool name="config_animateScreenLights">true</bool>
+    <bool name="config_animateScreenLights">false</bool>
 
     <!-- If this is true, key chords can be used to take a screenshot on the device. -->
     <bool name="config_enableScreenshotChord">true</bool>
@@ -628,7 +637,7 @@
     <integer name="config_notificationsBatteryLedOff">2875</integer>
 
     <!-- Number of notifications to keep in the notification service historical archive -->
-    <integer name="config_notificationServiceArchiveSize">250</integer>
+    <integer name="config_notificationServiceArchiveSize">100</integer>
 
     <!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
     <bool name="config_disableMenuKeyInLockScreen">false</bool>
@@ -771,6 +780,9 @@
          specified -->
     <string name="default_wallpaper_component" translatable="false">@null</string>
 
+    <!-- Component name of the built in wallpaper used to display bitmap wallpapers. This must not be null. -->
+    <string name="image_wallpaper_component" translatable="false">com.android.systemui/com.android.systemui.ImageWallpaper</string>
+
     <!-- True if WallpaperService is enabled -->
     <bool name="config_enableWallpaperService">true</bool>
 
@@ -1456,6 +1468,10 @@
     <!-- Set to true if after a provisioning apn the radio should be restarted -->
     <bool name="config_restartRadioAfterProvisioning">false</bool>
 
+    <!-- Boolean indicating if RADIO POWER OFF is required on receiving SIM REFRESH with RESET.
+         This will be handled by modem if it is false. -->
+    <bool name="config_requireRadioPowerOffOnSimRefreshReset">false</bool>
+
     <!-- Vibrator pattern to be used as the default for notifications
          that specify DEFAULT_VIBRATE.
      -->
@@ -1533,6 +1549,7 @@
         <item>com.android.server.notification.ValidateNotificationPeople</item>
         <item>com.android.server.notification.PackagePriorityExtractor</item>
         <item>com.android.server.notification.NotificationIntrusivenessExtractor</item>
+        <item>com.android.server.notification.PackageVisibilityExtractor</item>
     </string-array>
 
     <!-- Flag indicating that this device does not rotate and will always remain in its default
@@ -1603,6 +1620,10 @@
     <!-- default window ShowCircularMask property -->
     <bool name="config_windowShowCircularMask">false</bool>
 
+    <!-- default value for whether circular emulators (ro.emulator.circular)
+         should show a display overlay on the screen -->
+    <bool name="config_windowEnableCircularEmulatorDisplayOverlay">false</bool>
+
     <!-- Defines the default set of global actions. Actions may still be disabled or hidden based
          on the current state of the device.
          Each item must be one of the following strings:
@@ -1666,10 +1687,13 @@
         be disabled) but individual Features can be disabled using ImsConfig.setFeatureValue() -->
     <bool name="imsServiceAllowTurnOff">true</bool>
 
-    <!-- Flag specifying whether VoLTE & VT should be allowed on device: independent of the
+    <!-- Flag specifying whether VoLTE & VT is availasble on device -->
+    <bool name="config_device_volte_vt_available">false</bool>
+
+    <!-- Flag specifying whether VoLTE & VT should be available for carrier: independent of
          carrier provisioning. If false: hard disabled. If true: then depends on carrier
          provisioning, availability etc -->
-    <bool name="config_mobile_allow_volte_vt">true</bool>
+    <bool name="config_carrier_volte_vt_available">false</bool>
 
     <bool name="config_networkSamplingWakesDevice">true</bool>
 
@@ -1690,9 +1714,36 @@
          and adds page info " x/y". This config is used to set which carrier doesn't
          support EMS and whether page info should be added at the beginning or the end.
          We use tag 'prefix' for position beginning and 'suffix' for position end.
-         Examples: <item>311480;prefix</item> <item>310260;suffix</item>
+         And use gid to distinguish different carriers which using same mcc and mnc.
+         Examples: <item>simOperatorNumber;position;gid(optional)</item>>
     -->
-    <string-array translatable="false" name="no_ems_support_sim_operators" />
+    <string-array translatable="false" name="no_ems_support_sim_operators">
+        <!-- VZW -->
+        <item>20404;suffix;BAE0000000000000</item>
+    </string-array>
 
     <bool name="config_auto_attach_data_on_creation">true</bool>
+
+    <!-- Values for GPS configuration -->
+    <string-array translatable="false" name="config_gpsParameters">
+        <item>SUPL_HOST=supl.google.com</item>
+        <item>SUPL_PORT=7275</item>
+        <item>NTP_SERVER=north-america.pool.ntp.org</item>
+        <item>SUPL_VER=0x20000</item>
+    </string-array>
+
+    <!-- If there is no preload VM number in the sim card, carriers such as
+         Verizon require to load a default vm number from the configurantion.
+         Define config_default_vm_number for this purpose. And there are two
+         optional formats for this configuration as below:
+         (1)<item>voicemail number</item>
+         (2)<item>voicemail number;gid</item>
+         The logic to pick up the correct voicemail number:
+         (1) If the config_default_vm_number array has no gid special item, the last one will be
+         picked
+         (2) If the config_default_vm_number array has gid special item and  it matches the current
+         sim's gid, it will be picked.
+         (3) If the config_default_vm_number array has gid special item but it doesn't match the
+         current sim's gid, the last one without gid will be picked -->
+    <string-array translatable="false" name="config_default_vm_number" />
 </resources>
diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml
index 5f7f0ed..275a5ec 100644
--- a/core/res/res/values/dimens_material.xml
+++ b/core/res/res/values/dimens_material.xml
@@ -77,5 +77,6 @@
     <!-- Default rounded corner for controls -->
     <dimen name="control_corner_material">2dp</dimen>
 
-    <dimen name="alert_dialog_padding_material">18dp</dimen>
+    <dimen name="alert_dialog_padding_material">24dp</dimen>
+    <dimen name="alert_dialog_padding_top_material">18dp</dimen>
 </resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 5e76a87..8bb3cdf 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2146,7 +2146,7 @@
   <public type="attr" name="windowExitTransition" />
   <public type="attr" name="windowSharedElementEnterTransition" />
   <public type="attr" name="windowSharedElementExitTransition" />
-  <public type="attr" name="windowAllowExitTransitionOverlap" />
+  <public type="attr" name="windowAllowReturnTransitionOverlap" />
   <public type="attr" name="windowAllowEnterTransitionOverlap" />
   <public type="attr" name="sessionService" />
   <public type="attr" name="stackViewStyle" />
@@ -2235,7 +2235,7 @@
   <public type="attr" name="launchTaskBehindTargetAnimation" />
   <public type="attr" name="launchTaskBehindSourceAnimation" />
   <public type="attr" name="restrictionType" />
-  <public type="attr" name="dayOfWeekBackgroundColor" />
+  <public type="attr" name="dayOfWeekBackground" />
   <public type="attr" name="dayOfWeekTextAppearance" />
   <public type="attr" name="headerMonthTextAppearance" />
   <public type="attr" name="headerDayOfMonthTextAppearance" />
@@ -2248,7 +2248,7 @@
   <public type="attr" name="timePickerDialogTheme" />
   <public type="attr" name="headerTimeTextAppearance" />
   <public type="attr" name="headerAmPmTextAppearance" />
-  <public type="attr" name="headerBackgroundColor" />
+  <public type="attr" name="__removed2" />
   <public type="attr" name="numbersTextColor" />
   <public type="attr" name="numbersBackgroundColor" />
   <public type="attr" name="numbersSelectorColor" />
@@ -2266,7 +2266,7 @@
   <public type="attr" name="windowReenterTransition" />
   <public type="attr" name="windowSharedElementReturnTransition" />
   <public type="attr" name="windowSharedElementReenterTransition" />
-  <public type="attr" name="__removed1" />
+  <public type="attr" name="resumeWhilePausing" />
   <public type="attr" name="datePickerMode"/>
   <public type="attr" name="timePickerMode"/>
   <public type="attr" name="inset" />
@@ -2282,6 +2282,15 @@
   <public type="attr" name="spotShadowAlpha" />
   <public type="attr" name="navigationIcon" />
   <public type="attr" name="navigationContentDescription" />
+  <public type="attr" name="fragmentExitTransition" />
+  <public type="attr" name="fragmentEnterTransition" />
+  <public type="attr" name="fragmentSharedElementEnterTransition" />
+  <public type="attr" name="fragmentReturnTransition" />
+  <public type="attr" name="fragmentSharedElementReturnTransition" />
+  <public type="attr" name="fragmentReenterTransition" />
+  <public type="attr" name="fragmentAllowEnterTransitionOverlap" />
+  <public type="attr" name="fragmentAllowReturnTransitionOverlap" />
+  <public type="attr" name="patternPathData" />
 
   <public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
 
@@ -2298,16 +2307,14 @@
   <public type="style" name="Widget.Toolbar" />
   <public type="style" name="Widget.Toolbar.Button.Navigation" />
 
-  <public type="style" name="Widget.Holo.FastScroll" />
-  <public type="style" name="Widget.Holo.StackView" />
-
-  <public type="style" name="Widget.Holo.Light.Button.Borderless" />
-  <public type="style" name="Widget.Holo.Light.FastScroll" />
-  <public type="style" name="Widget.Holo.Light.StackView" />
+  <public type="style" name="__removed3" />
+  <public type="style" name="__removed4" />
+  <public type="style" name="__removed5" />
+  <public type="style" name="__removed6" />
+  <public type="style" name="__removed7" />
 
   <public type="style" name="Widget.DeviceDefault.FastScroll" />
   <public type="style" name="Widget.DeviceDefault.StackView" />
-
   <public type="style" name="Widget.DeviceDefault.Light.FastScroll" />
   <public type="style" name="Widget.DeviceDefault.Light.StackView" />
 
@@ -2531,7 +2538,7 @@
 
   <public type="style" name="Theme.Leanback.FormWizard"/>
 
-  <public type="style" name="__removed" />
+  <public type="style" name="__removed1" />
   <public type="style" name="TextAppearance.Material.Notification" />
   <public type="style" name="TextAppearance.Material.Notification.Title" />
   <public type="style" name="TextAppearance.Material.Notification.Line2" />
@@ -2550,6 +2557,9 @@
   <public type="style" name="Theme.Material.Light.Dialog.Alert" />
   <public type="style" name="Theme.Material.Light.Dialog.Presentation" />
 
+  <public type="style" name="Widget.Material.SearchView" />
+  <public type="style" name="Widget.Material.Light.SearchView" />
+
   <public-padding type="string" name="l_resource_pad" end="0x01040030" />
 
   <public type="string" name="config_webSettingsDefaultTextEncoding" />
diff --git a/core/res/res/drawable/ic_cab_done_material.xml b/core/res/res/values/removed.xml
similarity index 68%
copy from core/res/res/drawable/ic_cab_done_material.xml
copy to core/res/res/values/removed.xml
index a370288..8eaca29 100644
--- a/core/res/res/drawable/ic_cab_done_material.xml
+++ b/core/res/res/values/removed.xml
@@ -14,6 +14,13 @@
      limitations under the License.
 -->
 
-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
-    android:src="@drawable/ic_cab_done_mtrl_alpha"
-    android:tint="?attr/colorControlNormal" />
+<!-- Placeholder resources to be removed before release. -->
+<resources>
+    <style name="__removed1" />
+    <attr name="__removed2" />
+    <style name="__removed3" />
+    <style name="__removed4" />
+    <style name="__removed5" />
+    <style name="__removed6" />
+    <style name="__removed7" />
+</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index f1ec5d2..50da1fa 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3443,6 +3443,9 @@
     <string name="whichHomeApplication">Select a home app</string>
     <!-- Option to always use the selected application resolution in the future. See the "Complete action using" dialog title-->
     <string name="alwaysUse">Use by default for this action.</string>
+    <!-- Title of the list of alternate options to complete an action shown when the
+         last used option is being displayed separately. -->
+    <string name="use_a_different_app">Use a different app</string>
     <!-- Text displayed when the user selects the check box for setting default application.  See the "Use by default for this action" check box. -->
     <string name="clearDefaultHintMsg">Clear default in System settings &gt; Apps &gt; Downloaded.</string>
     <!-- Default title for the activity chooser, when one is not given. Android allows multiple activities to perform an action.  for example, there may be many ringtone pickers installed.  A dialog is shown to the user allowing him to pick which activity should be used.  This is the title. -->
@@ -4874,4 +4877,19 @@
 
     <!-- [CHAR_LIMIT=NONE] Zen mode: Condition summary for built-in downtime condition, if active -->
     <string name="downtime_condition_summary">Until your downtime ends at <xliff:g id="formattedTime" example="10.00 PM">%1$s</xliff:g></string>
+
+    <!-- Zen mode condition: time duration in minutes. [CHAR LIMIT=NONE] -->
+    <plurals name="zen_mode_duration_minutes">
+        <item quantity="one">For one minute</item>
+        <item quantity="other">For %d minutes</item>
+    </plurals>
+
+    <!-- Zen mode condition: time duration in hours. [CHAR LIMIT=NONE] -->
+    <plurals name="zen_mode_duration_hours">
+        <item quantity="one">For one hour</item>
+        <item quantity="other">For %d hours</item>
+    </plurals>
+
+    <!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] -->
+    <string name="zen_mode_forever">Indefinitely</string>
 </resources>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 4aed037..c6d0b0b 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -62,6 +62,7 @@
         <item name="centerMedium">@drawable/popup_center_medium</item>
         <item name="progressLayout">@layout/progress_dialog</item>
         <item name="horizontalProgressLayout">@layout/alert_dialog_progress</item>
+        <item name="needsDefaultBackgrounds">false</item>
     </style>
 
     <style name="Widget.PreferenceFrameLayout">
diff --git a/core/res/res/values/styles_holo.xml b/core/res/res/values/styles_holo.xml
index 2a54ccf..c7d2db1 100644
--- a/core/res/res/values/styles_holo.xml
+++ b/core/res/res/values/styles_holo.xml
@@ -468,7 +468,7 @@
         <item name="internalLayout">@layout/time_picker_holo</item>
         <item name="headerTimeTextAppearance">@style/TextAppearance.Holo.TimePicker.TimeLabel</item>
         <item name="headerAmPmTextAppearance">@style/TextAppearance.Holo.TimePicker.AmPmLabel</item>
-        <item name="headerBackgroundColor">@color/timepicker_default_background_holo_dark</item>
+        <item name="headerBackground">@color/timepicker_default_background_holo_dark</item>
         <item name="headerSelectedTextColor">@color/holo_blue_light</item>
         <item name="numbersTextColor">@color/timepicker_default_text_color_holo_dark</item>
         <item name="numbersBackgroundColor">@color/timepicker_default_background_holo_dark</item>
@@ -484,9 +484,9 @@
         <item name="internalLayout">@layout/date_picker_holo</item>
         <item name="calendarViewShown">true</item>
         <!-- New-style date picker attributes. -->
-        <item name="dayOfWeekBackgroundColor">@color/datepicker_default_header_dayofweek_background_color_holo_dark</item>
+        <item name="dayOfWeekBackground">@color/datepicker_default_header_dayofweek_background_color_holo_dark</item>
         <item name="dayOfWeekTextAppearance">@style/TextAppearance.Holo.DatePicker.DayOfWeekLabel</item>
-        <item name="headerBackgroundColor">@color/datepicker_default_header_selector_background_holo_dark</item>
+        <item name="headerBackground">@color/datepicker_default_header_selector_background_holo_dark</item>
         <item name="headerMonthTextAppearance">@style/TextAppearance.Holo.DatePicker.Selector.MonthLabel</item>
         <item name="headerDayOfMonthTextAppearance">@style/TextAppearance.Holo.DatePicker.Selector.DayOfMonthLabel</item>
         <item name="headerYearTextAppearance">@style/TextAppearance.Holo.DatePicker.Selector.YearLabel</item>
@@ -892,7 +892,7 @@
         <item name="internalLayout">@layout/time_picker_holo</item>
         <item name="headerTimeTextAppearance">@style/TextAppearance.Holo.Light.TimePicker.TimeLabel</item>
         <item name="headerAmPmTextAppearance">@style/TextAppearance.Holo.Light.TimePicker.AmPmLabel</item>
-        <item name="headerBackgroundColor">@color/timepicker_default_background_holo_light</item>
+        <item name="headerBackground">@color/timepicker_default_background_holo_light</item>
         <item name="headerSelectedTextColor">@color/holo_blue_light</item>
         <item name="numbersTextColor">@color/timepicker_default_text_color_holo_light</item>
         <item name="numbersBackgroundColor">@color/timepicker_default_background_holo_light</item>
@@ -908,12 +908,12 @@
         <item name="internalLayout">@layout/date_picker_holo</item>
         <item name="calendarViewShown">true</item>
         <!-- New-style date picker attributes. -->
-        <item name="dayOfWeekBackgroundColor">@color/datepicker_default_header_dayofweek_background_color_holo_light</item>
+        <item name="dayOfWeekBackground">@color/datepicker_default_header_dayofweek_background_color_holo_light</item>
         <item name="dayOfWeekTextAppearance">@style/TextAppearance.Holo.Light.DatePicker.DayOfWeekLabel</item>
         <item name="headerMonthTextAppearance">@style/TextAppearance.Holo.Light.DatePicker.Selector.MonthLabel</item>
         <item name="headerDayOfMonthTextAppearance">@style/TextAppearance.Holo.Light.DatePicker.Selector.DayOfMonthLabel</item>
         <item name="headerYearTextAppearance">@style/TextAppearance.Holo.Light.DatePicker.Selector.YearLabel</item>
-        <item name="headerBackgroundColor">@color/datepicker_default_header_selector_background_holo_light</item>
+        <item name="headerBackground">@color/datepicker_default_header_selector_background_holo_light</item>
         <item name="headerSelectedTextColor">@color/holo_blue_light</item>
         <item name="yearListItemTextAppearance">@style/TextAppearance.Holo.Light.DatePicker.List.YearLabel</item>
         <item name="yearListSelectorColor">@color/datepicker_default_circle_background_color_holo_light</item>
diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml
index e783cd6..26c7d10 100644
--- a/core/res/res/values/styles_material.xml
+++ b/core/res/res/values/styles_material.xml
@@ -438,10 +438,6 @@
 
     <style name="Widget.Material.Notification.ProgressBar" parent="Widget.Material.Light.ProgressBar.Horizontal" />
 
-    <style name="Widget.Material.Notification.ProgressBar.Media">
-        <item name="progressDrawable">@drawable/notification_material_media_progress</item>
-    </style>
-
     <!-- Widget Styles -->
 
     <style name="Material"/>
@@ -478,6 +474,13 @@
         <item name="stateListAnimator">@anim/disabled_anim_material</item>
     </style>
 
+    <!-- Alert dialog button bar button -->
+    <style name="Widget.Material.Button.ButtonBar.AlertDialog" parent="Widget.Material.Button.Borderless.Colored">
+        <item name="minWidth">64dp</item>
+        <item name="maxLines">2</item>
+        <item name="minHeight">@dimen/alert_dialog_button_bar_height</item>
+    </style>
+
     <!-- Small borderless ink button -->
     <style name="Widget.Material.Button.Borderless.Small">
         <item name="minHeight">48dip</item>
@@ -500,7 +503,6 @@
 
     <style name="Widget.Material.ButtonBar.AlertDialog">
         <item name="background">@null</item>
-        <item name="minHeight">@dimen/alert_dialog_button_bar_height</item>
     </style>
 
     <style name="Widget.Material.SearchView">
@@ -623,7 +625,7 @@
         <item name="headerTimeTextAppearance">@style/TextAppearance.Material.TimePicker.TimeLabel</item>
         <item name="headerAmPmTextAppearance">@style/TextAppearance.Material.TimePicker.AmPmLabel</item>
         <item name="headerSelectedTextColor">?attr/textColorPrimaryInverse</item>
-        <item name="headerBackgroundColor">?attr/colorAccent</item>
+        <item name="headerBackground">@drawable/time_picker_header_material</item>
         <item name="numbersTextColor">?attr/textColorSecondary</item>
         <item name="numbersBackgroundColor">#10ffffff</item>
         <item name="amPmTextColor">?attr/textColorSecondary</item>
@@ -638,13 +640,13 @@
         <!-- Attributes for new-style DatePicker. -->
         <item name="internalLayout">@layout/date_picker_holo</item>
         <item name="calendarViewShown">true</item>
-        <item name="dayOfWeekBackgroundColor">#10000000</item>
+        <item name="dayOfWeekBackground">#10000000</item>
         <item name="dayOfWeekTextAppearance">@style/TextAppearance.Material.DatePicker.DayOfWeekLabel</item>
         <item name="headerMonthTextAppearance">@style/TextAppearance.Material.DatePicker.MonthLabel</item>
         <item name="headerDayOfMonthTextAppearance">@style/TextAppearance.Material.DatePicker.DayOfMonthLabel</item>
         <item name="headerYearTextAppearance">@style/TextAppearance.Material.DatePicker.YearLabel</item>
         <item name="headerSelectedTextColor">?attr/textColorPrimaryInverse</item>
-        <item name="headerBackgroundColor">?attr/colorAccent</item>
+        <item name="headerBackground">?attr/colorAccent</item>
         <item name="yearListItemTextAppearance">@style/TextAppearance.Material.DatePicker.List.YearLabel</item>
         <item name="yearListSelectorColor">?attr/colorControlActivated</item>
         <item name="calendarTextColor">?attr/textColorSecondary</item>
@@ -842,7 +844,7 @@
     </style>
 
     <style name="Widget.Material.ActionButton.CloseMode">
-        <item name="background">@drawable/btn_cab_done_material</item>
+        <item name="background">?attr/selectableItemBackgroundBorderless</item>
     </style>
 
     <style name="Widget.Material.ActionButton.Overflow">
@@ -905,6 +907,7 @@
     <style name="Widget.Material.ActionMode" parent="Widget.ActionMode">
         <item name="titleTextStyle">@style/TextAppearance.Material.Widget.ActionMode.Title</item>
         <item name="subtitleTextStyle">@style/TextAppearance.Material.Widget.ActionMode.Subtitle</item>
+        <item name="closeItemLayout">@layout/action_mode_close_item_material</item>
     </style>
 
     <style name="Widget.Material.FastScroll" parent="Widget.FastScroll">
@@ -939,6 +942,7 @@
     <style name="Widget.Material.Light.Button.Small" parent="Widget.Material.Button.Small"/>
     <style name="Widget.Material.Light.Button.Borderless" parent="Widget.Material.Button.Borderless"/>
     <style name="Widget.Material.Light.Button.Borderless.Colored" parent="Widget.Material.Button.Borderless.Colored"/>
+    <style name="Widget.Material.Light.Button.ButtonBar.AlertDialog" parent="Widget.Material.Button.ButtonBar.AlertDialog" />
     <style name="Widget.Material.Light.Button.Borderless.Small" parent="Widget.Material.Button.Borderless.Small"/>
     <style name="Widget.Material.Light.Button.Inset" parent="Widget.Material.Button.Inset"/>
     <style name="Widget.Material.Light.Button.Toggle" parent="Widget.Material.Button.Toggle" />
@@ -1072,16 +1076,16 @@
     <!-- Dialog styles -->
 
     <style name="AlertDialog.Material" parent="AlertDialog">
-        <item name="fullDark">@color/transparent</item>
-        <item name="topDark">@color/transparent</item>
-        <item name="centerDark">@color/transparent</item>
-        <item name="bottomDark">@color/transparent</item>
-        <item name="fullBright">@color/transparent</item>
-        <item name="topBright">@color/transparent</item>
-        <item name="centerBright">@color/transparent</item>
-        <item name="bottomBright">@color/transparent</item>
-        <item name="bottomMedium">@color/transparent</item>
-        <item name="centerMedium">@color/transparent</item>
+        <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_material</item>
         <item name="listLayout">@layout/select_dialog_material</item>
         <item name="progressLayout">@layout/progress_dialog_material</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 622a01a..221269d 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -283,6 +283,7 @@
   <java-symbol type="bool" name="config_camera_sound_forced" />
   <java-symbol type="bool" name="config_dontPreferApn" />
   <java-symbol type="bool" name="config_restartRadioAfterProvisioning" />
+  <java-symbol type="bool" name="config_requireRadioPowerOffOnSimRefreshReset" />
   <java-symbol type="bool" name="config_speed_up_audio_on_mt_calls" />
   <java-symbol type="bool" name="config_useFixedVolume" />
   <java-symbol type="bool" name="config_forceDefaultOrientation" />
@@ -292,6 +293,9 @@
   <java-symbol type="bool" name="config_windowIsRound" />
   <java-symbol type="bool" name="config_hasRecents" />
   <java-symbol type="bool" name="config_windowShowCircularMask" />
+  <java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" />
+  <java-symbol type="bool" name="config_wifi_framework_enable_associated_autojoin_scan" />
+  <java-symbol type="bool" name="config_wifi_framework_enable_associated_network_selection" />
 
   <java-symbol type="integer" name="config_bluetooth_max_advertisers" />
   <java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
@@ -311,6 +315,7 @@
   <java-symbol type="integer" name="config_shortPressOnPowerBehavior" />
   <java-symbol type="integer" name="config_toastDefaultGravity" />
   <java-symbol type="integer" name="config_wifi_framework_scan_interval" />
+  <java-symbol type="integer" name="config_wifi_framework_associated_scan_interval" />
   <java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
   <java-symbol type="integer" name="config_wifi_scan_interval_p2p_connected" />
   <java-symbol type="integer" name="db_connection_pool_size" />
@@ -1037,6 +1042,7 @@
   <java-symbol type="array" name="config_globalActionsList" />
   <java-symbol type="array" name="config_telephonyHardware" />
   <java-symbol type="array" name="config_keySystemUuidMapping" />
+  <java-symbol type="array" name="config_gpsParameters" />
 
   <java-symbol type="drawable" name="default_wallpaper" />
   <java-symbol type="drawable" name="indicator_input_error" />
@@ -1153,6 +1159,7 @@
   <java-symbol type="drawable" name="ic_corp_badge" />
   <java-symbol type="drawable" name="ic_corp_icon_badge" />
   <java-symbol type="drawable" name="ic_corp_icon" />
+  <java-symbol type="drawable" name="emulator_circular_window_overlay" />
 
   <java-symbol type="drawable" name="sim_light_blue" />
   <java-symbol type="drawable" name="sim_light_green" />
@@ -1632,6 +1639,7 @@
   <java-symbol type="string" name="hardware" />
   <java-symbol type="string" name="heavy_weight_notification" />
   <java-symbol type="string" name="heavy_weight_notification_detail" />
+  <java-symbol type="string" name="image_wallpaper_component" />
   <java-symbol type="string" name="input_method_binding_label" />
   <java-symbol type="string" name="launch_warning_original" />
   <java-symbol type="string" name="launch_warning_replace" />
@@ -1716,16 +1724,16 @@
   <java-symbol type="layout" name="notification_template_material_inbox" />
   <java-symbol type="layout" name="notification_template_material_media" />
   <java-symbol type="layout" name="notification_template_material_big_media" />
+  <java-symbol type="layout" name="notification_template_material_big_media_narrow" />
   <java-symbol type="layout" name="notification_template_material_big_text" />
   <java-symbol type="layout" name="notification_template_icon_group" />
   <java-symbol type="layout" name="notification_material_media_action" />
   <java-symbol type="color" name="notification_action_color_filter" />
   <java-symbol type="color" name="notification_icon_bg_color" />
   <java-symbol type="drawable" name="notification_icon_legacy_bg" />
-  <java-symbol type="drawable" name="notification_material_media_progress" />
-  <java-symbol type="color" name="notification_media_action_bg" />
-  <java-symbol type="color" name="notification_media_progress" />
-  <java-symbol type="id" name="media_action_area" />
+  <java-symbol type="color" name="notification_media_primary_color" />
+  <java-symbol type="color" name="notification_media_secondary_color" />
+  <java-symbol type="id" name="media_actions" />
 
     <!-- From SystemUI -->
   <java-symbol type="anim" name="push_down_in" />
@@ -1912,6 +1920,9 @@
   <java-symbol type="string" name="timepicker_transition_end_radius_multiplier" />
   <java-symbol type="string" name="battery_saver_description" />
   <java-symbol type="string" name="downtime_condition_summary" />
+  <java-symbol type="string" name="zen_mode_forever" />
+  <java-symbol type="plurals" name="zen_mode_duration_minutes" />
+  <java-symbol type="plurals" name="zen_mode_duration_hours" />
 
   <java-symbol type="string" name="item_is_selected" />
   <java-symbol type="string" name="day_of_week_label_typeface" />
@@ -1967,7 +1978,8 @@
   <java-symbol type="attr" name="preferenceFragmentStyle" />
   <java-symbol type="bool" name="skipHoldBeforeMerge" />
   <java-symbol type="bool" name="imsServiceAllowTurnOff" />
-  <java-symbol type="bool" name="config_mobile_allow_volte_vt" />
+  <java-symbol type="bool" name="config_device_volte_vt_available" />
+  <java-symbol type="bool" name="config_carrier_volte_vt_available" />
   <java-symbol type="bool" name="useImsAlwaysForEmergencyCall" />
   <java-symbol type="attr" name="touchscreenBlocksFocus" />
   <java-symbol type="layout" name="resolver_list_with_default" />
@@ -1999,4 +2011,7 @@
   <java-symbol type="id" name="parentMatrix" />
   <java-symbol type="bool" name="config_auto_attach_data_on_creation" />
   <java-symbol type="id" name="date_picker_month_day_year_layout" />
+  <java-symbol type="attr" name="closeItemLayout" />
+  <java-symbol type="layout" name="resolver_different_item_header" />
+  <java-symbol type="array" name="config_default_vm_number" />
 </resources>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 2296a12..485ea08 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -306,7 +306,7 @@
         <item name="actionOverflowMenuStyle">@style/Widget.Material.PopupMenu.Overflow</item>
         <item name="actionModeBackground">@drawable/cab_background_top_material</item>
         <item name="actionModeSplitBackground">@drawable/cab_background_bottom_material</item>
-        <item name="actionModeCloseDrawable">@drawable/ic_cab_done_material</item>
+        <item name="actionModeCloseDrawable">@drawable/ic_ab_back_material</item>
         <item name="actionBarTabStyle">@style/Widget.Material.ActionBar.TabView</item>
         <item name="actionBarTabBarStyle">@style/Widget.Material.ActionBar.TabBar</item>
         <item name="actionBarTabTextStyle">@style/Widget.Material.ActionBar.TabText</item>
@@ -333,7 +333,7 @@
         <item name="dividerVertical">?attr/listDivider</item>
         <item name="dividerHorizontal">?attr/listDivider</item>
         <item name="buttonBarStyle">@style/Widget.Material.ButtonBar</item>
-        <item name="buttonBarButtonStyle">@style/Widget.Material.Button.Borderless.Colored</item>
+        <item name="buttonBarButtonStyle">@style/Widget.Material.Button.ButtonBar.AlertDialog</item>
         <item name="segmentedButtonStyle">@style/Widget.Material.SegmentedButton</item>
 
         <!-- SearchView attributes -->
@@ -652,7 +652,7 @@
         <item name="actionOverflowMenuStyle">@style/Widget.Material.Light.PopupMenu.Overflow</item>
         <item name="actionModeBackground">@drawable/cab_background_top_material</item>
         <item name="actionModeSplitBackground">@drawable/cab_background_bottom_material</item>
-        <item name="actionModeCloseDrawable">@drawable/ic_cab_done_material</item>
+        <item name="actionModeCloseDrawable">@drawable/ic_ab_back_material</item>
         <item name="actionBarTabStyle">@style/Widget.Material.Light.ActionBar.TabView</item>
         <item name="actionBarTabBarStyle">@style/Widget.Material.Light.ActionBar.TabBar</item>
         <item name="actionBarTabTextStyle">@style/Widget.Material.Light.ActionBar.TabText</item>
@@ -679,7 +679,7 @@
         <item name="dividerVertical">?attr/listDivider</item>
         <item name="dividerHorizontal">?attr/listDivider</item>
         <item name="buttonBarStyle">@style/Widget.Material.Light.ButtonBar</item>
-        <item name="buttonBarButtonStyle">@style/Widget.Material.Light.Button.Borderless.Colored</item>
+        <item name="buttonBarButtonStyle">@style/Widget.Material.Light.Button.ButtonBar.AlertDialog</item>
         <item name="segmentedButtonStyle">@style/Widget.Material.Light.SegmentedButton</item>
 
         <!-- SearchView attributes -->
@@ -1256,7 +1256,4 @@
         <item name="colorPrimaryDark">@color/material_blue_grey_950</item>
         <item name="colorAccent">@color/material_deep_teal_500</item>
     </style>
-
-    <!-- TODO: Spacer to be removed from here and public.xml -->
-    <style name="__removed" />
 </resources>
diff --git a/core/tests/ConnectivityManagerTest/assets/accesspoints.xml b/core/tests/ConnectivityManagerTest/assets/accesspoints.xml
deleted file mode 100644
index ce6eebc..0000000
--- a/core/tests/ConnectivityManagerTest/assets/accesspoints.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-  <accesspoint>
-    <ssid>opennet</ssid>
-    <security>NONE</security>
-  </accesspoint>
-  <accesspoint>
-    <ssid>GoogleGuest</ssid>
-    <security>NONE</security>
-  </accesspoint>
-  <accesspoint>
-    <ssid>securenetdhcp</ssid>
-    <security>PSK</security>
-    <password>androidwifi</password>
-  </accesspoint>
-  <accesspoint>
-    <ssid>securenetstatic</ssid>
-    <security>PSK</security>
-    <password>androidwifi</password>
-    <ip>192.168.14.2</ip>
-    <gateway>192.168.14.1</gateway>
-    <networkprefixlength>24</networkprefixlength>
-    <dns1>192.168.14.1</dns1>
-    <dns2>192.168.1.9</dns2>
-  </accesspoint>
-<!-- TODO: This AP is outdated and only supports 2.4GHz.
-           Need to switch to a new dual-band AP.
-           Enable this test case again once the configuration is completed.
-     bug#: 9470594
-  <accesspoint>
-    <ssid>botnet</ssid>
-    <security>EAP</security>
-    <eap>PEAP</eap>
-    <phase2>MSCHAPV2</phase2>
-    <identity>donut</identity>
-    <password>android</password>
-  </accesspoint>
--->
-</resources>
-
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java
deleted file mode 100644
index 1222c8b..0000000
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright (C) 2010, 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.connectivitymanagertest;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import android.net.IpConfiguration.IpAssignment;
-import android.net.IpConfiguration.ProxySettings;
-import android.net.LinkAddress;
-import android.net.RouteInfo;
-import android.net.StaticIpConfiguration;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiConfiguration.AuthAlgorithm;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
-import android.net.wifi.WifiEnterpriseConfig;
-
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * Help class to process configurations of access points saved in an XML file.
- * The configurations of an access point is included in tag
- * <accesspoint></accesspoint>. The supported configuration includes: ssid,
- * security, eap, phase2, identity, password, anonymousidentity, cacert, usercert,
- * in which each is included in the corresponding tags. Static IP setting is also supported.
- * Tags that can be used include: ip, gateway, networkprefixlength, dns1, dns2. All access points
- * have to be enclosed in tags of <resources></resources>.
- *
- * The following is a sample configuration file for an access point using EAP-PEAP with MSCHAP2.
- * <resources>
- *   <accesspoint>
- *   <ssid>testnet</ssid>
- *   <security>EAP</security>
- *   <eap>PEAP</eap>
- *   <phase2>MSCHAP2</phase2>
- *   <identity>donut</identity</identity>
- *   <password>abcdefgh</password>
- *   </accesspoint>
- * </resources>
- *
- * Note:ssid and security have to be the first two tags
- *      for static ip setting, tag "ip" should be listed before other fields: dns, gateway,
- *      networkprefixlength.
- */
-public class AccessPointParserHelper {
-    static final int NONE = 0;
-    static final int WEP = 1;
-    static final int PSK = 2;
-    static final int EAP = 3;
-
-    List<WifiConfiguration> networks = new ArrayList<WifiConfiguration>();
-
-    private int getSecurityType (String security) {
-        if (security.equalsIgnoreCase("NONE")) {
-            return NONE;
-        } else if (security.equalsIgnoreCase("WEP")) {
-            return WEP;
-        } else if (security.equalsIgnoreCase("PSK")) {
-            return PSK;
-        } else if (security.equalsIgnoreCase("EAP")) {
-            return EAP;
-        } else {
-            return -1;
-        }
-    }
-
-    private boolean validateEapValue(String value) {
-        if (value.equalsIgnoreCase("PEAP") ||
-                value.equalsIgnoreCase("TLS") ||
-                value.equalsIgnoreCase("TTLS")) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    DefaultHandler mHandler = new DefaultHandler() {
-
-        boolean ssid = false;
-        boolean security = false;
-        boolean password = false;
-        boolean ip = false;
-        boolean gateway = false;
-        boolean networkprefix = false;
-        boolean dns1 = false;
-        boolean dns2 = false;
-        boolean eap = false;
-        boolean phase2 = false;
-        boolean identity = false;
-        boolean anonymousidentity = false;
-        boolean cacert = false;
-        boolean usercert = false;
-        WifiConfiguration config = null;
-        int securityType = NONE;
-        StaticIpConfiguration mStaticIpConfiguration = null;
-        InetAddress mInetAddr = null;
-
-        @Override
-        public void startElement(String uri, String localName, String tagName,
-                Attributes attributes) throws SAXException {
-            if (tagName.equalsIgnoreCase("accesspoint")) {
-                config = new WifiConfiguration();
-            }
-            if (tagName.equalsIgnoreCase("ssid")) {
-                ssid = true;
-            }
-            if (tagName.equalsIgnoreCase("security")) {
-                security = true;
-            }
-            if (tagName.equalsIgnoreCase("password")) {
-                password = true;
-            }
-            if (tagName.equalsIgnoreCase("eap")) {
-                eap = true;
-            }
-            if (tagName.equalsIgnoreCase("phase2")) {
-                phase2 = true;
-            }
-            if (tagName.equalsIgnoreCase("identity")) {
-                identity = true;
-            }
-            if (tagName.equalsIgnoreCase("anonymousidentity")) {
-                anonymousidentity = true;
-            }
-            if (tagName.equalsIgnoreCase("cacert")) {
-                cacert = true;
-            }
-            if (tagName.equalsIgnoreCase("usercert")) {
-                usercert = true;
-            }
-            if (tagName.equalsIgnoreCase("ip")) {
-                mStaticIpConfiguration = new StaticIpConfiguration();
-                ip = true;
-            }
-            if (tagName.equalsIgnoreCase("gateway")) {
-                gateway = true;
-            }
-            if (tagName.equalsIgnoreCase("networkprefixlength")) {
-                networkprefix = true;
-            }
-            if (tagName.equalsIgnoreCase("dns1")) {
-                dns1 = true;
-            }
-            if (tagName.equalsIgnoreCase("dns2")) {
-                dns2 = true;
-            }
-        }
-
-        @Override
-        public void endElement(String uri, String localName, String tagName) throws SAXException {
-            if (tagName.equalsIgnoreCase("accesspoint")) {
-                if (mStaticIpConfiguration != null) {
-                    config.setIpAssignment(IpAssignment.STATIC);
-                    config.setStaticIpConfiguration(mStaticIpConfiguration);
-                } else {
-                    config.setIpAssignment(IpAssignment.DHCP);
-                }
-                config.setProxySettings(ProxySettings.NONE);
-                networks.add(config);
-                mStaticIpConfiguration = null;
-            }
-        }
-
-        @Override
-        public void characters(char ch[], int start, int length) throws SAXException {
-            if (ssid) {
-                config.SSID = new String(ch, start, length);
-                ssid = false;
-            }
-            if (security) {
-                String securityStr = (new String(ch, start, length)).toUpperCase();
-                securityType = getSecurityType(securityStr);
-                switch (securityType) {
-                    case NONE:
-                        config.allowedKeyManagement.set(KeyMgmt.NONE);
-                        break;
-                    case WEP:
-                        config.allowedKeyManagement.set(KeyMgmt.NONE);
-                        config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
-                        config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED);
-                        break;
-                    case PSK:
-                        config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
-                        break;
-                    case EAP:
-                        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-                        config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
-                        // Initialize other fields.
-                        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE);
-                        config.enterpriseConfig.setCaCertificateAlias("");
-                        config.enterpriseConfig.setClientCertificateAlias("");
-                        config.enterpriseConfig.setIdentity("");
-                        config.enterpriseConfig.setAnonymousIdentity("");
-                        break;
-                    default:
-                        throw new SAXException();
-                }
-                security = false;
-            }
-            if (password) {
-                String passwordStr = new String(ch, start, length);
-                int len = passwordStr.length();
-                if (len == 0) {
-                    throw new SAXException();
-                }
-                if (securityType == WEP) {
-                    if ((len == 10 || len == 26 || len == 58) &&
-                            passwordStr.matches("[0-9A-Fa-f]*")) {
-                        config.wepKeys[0] = passwordStr;
-                    } else {
-                        config.wepKeys[0] = '"' + passwordStr + '"';
-                    }
-                } else if (securityType == PSK) {
-                    if (passwordStr.matches("[0-9A-Fa-f]{64}")) {
-                        config.preSharedKey = passwordStr;
-                    } else {
-                        config.preSharedKey = '"' + passwordStr + '"';
-                    }
-                } else if (securityType == EAP) {
-                    config.enterpriseConfig.setPassword(passwordStr);
-                } else {
-                    throw new SAXException();
-                }
-                password = false;
-            }
-            if (eap) {
-                String eapValue = new String(ch, start, length);
-                if (!validateEapValue(eapValue)) {
-                    throw new SAXException();
-                }
-                if (eapValue.equals("TLS")) {
-                    config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-                } else if (eapValue.equals("TTLS")) {
-                    config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TTLS);
-                } else if (eapValue.equals("PEAP")) {
-                    config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.PEAP);
-                }
-                eap = false;
-            }
-            if (phase2) {
-                String phase2Value = new String(ch, start, length);
-                if (phase2Value.equals("PAP")) {
-                    config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.PAP);
-                } else if (phase2Value.equals("MSCHAP")) {
-                    config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAP);
-                } else if (phase2Value.equals("MSCHAPV2")) {
-                    config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAPV2);
-                } else if (phase2Value.equals("GTC")) {
-                    config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-                }
-                phase2 = false;
-            }
-            if (identity) {
-                String identityValue = new String(ch, start, length);
-                config.enterpriseConfig.setIdentity(identityValue);
-                identity = false;
-            }
-            if (anonymousidentity) {
-                String anonyId = new String(ch, start, length);
-                config.enterpriseConfig.setAnonymousIdentity(anonyId);
-                anonymousidentity = false;
-            }
-            if (cacert) {
-                String cacertValue = new String(ch, start, length);
-                config.enterpriseConfig.setCaCertificateAlias(cacertValue);
-                cacert = false;
-            }
-            if (usercert) {
-                String usercertValue = new String(ch, start, length);
-                config.enterpriseConfig.setClientCertificateAlias(usercertValue);
-                usercert = false;
-            }
-            if (ip) {
-                try {
-                    String ipAddr = new String(ch, start, length);
-                    if (!InetAddress.isNumeric(ipAddr)) {
-                        throw new SAXException();
-                    }
-                    mInetAddr = InetAddress.getByName(ipAddr);
-                } catch (UnknownHostException e) {
-                    throw new SAXException();
-                }
-                ip = false;
-            }
-            if (gateway) {
-                try {
-                    String gwAddr = new String(ch, start, length);
-                    if (!InetAddress.isNumeric(gwAddr)) {
-                        throw new SAXException();
-                    }
-                    mStaticIpConfiguration.gateway = InetAddress.getByName(gwAddr);
-                } catch (UnknownHostException e) {
-                    throw new SAXException();
-                }
-                gateway = false;
-            }
-            if (networkprefix) {
-                try {
-                    int nwPrefixLength = Integer.parseInt(new String(ch, start, length));
-                    if ((nwPrefixLength < 0) || (nwPrefixLength > 32)) {
-                        throw new SAXException();
-                    }
-                    mStaticIpConfiguration.ipAddress = new LinkAddress(mInetAddr, nwPrefixLength);
-                } catch (NumberFormatException e) {
-                    throw new SAXException();
-                }
-                networkprefix = false;
-            }
-            if (dns1) {
-                try {
-                    String dnsAddr = new String(ch, start, length);
-                    if (!InetAddress.isNumeric(dnsAddr)) {
-                        throw new SAXException();
-                    }
-                    mStaticIpConfiguration.dnsServers.add(InetAddress.getByName(dnsAddr));
-                } catch (UnknownHostException e) {
-                    throw new SAXException();
-                }
-                dns1 = false;
-            }
-            if (dns2) {
-                try {
-                    String dnsAddr = new String(ch, start, length);
-                    if (!InetAddress.isNumeric(dnsAddr)) {
-                        throw new SAXException();
-                    }
-                    mStaticIpConfiguration.dnsServers.add(InetAddress.getByName(dnsAddr));
-                } catch (UnknownHostException e) {
-                    throw new SAXException();
-                }
-                dns2 = false;
-            }
-        }
-    };
-
-    /**
-     * Process the InputStream in
-     * @param in is the InputStream that can be used for XML parsing
-     * @throws Exception
-     */
-    public AccessPointParserHelper(InputStream in) throws Exception {
-        SAXParserFactory factory = SAXParserFactory.newInstance();
-        SAXParser saxParser = factory.newSAXParser();
-        saxParser.parse(in, mHandler);
-    }
-
-    public List<WifiConfiguration> getNetworkConfigurations() throws Exception {
-        return networks;
-    }
-}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java
index 0f9d8e9..80d5668 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestBase.java
@@ -26,7 +26,6 @@
 import android.net.NetworkInfo.State;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiManager;
 import android.os.PowerManager;
 import android.os.SystemClock;
@@ -35,10 +34,8 @@
 import android.view.KeyEvent;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.UnknownHostException;
 import java.util.List;
-import java.util.regex.Pattern;
 
 
 /**
@@ -52,14 +49,12 @@
  */
 public class ConnectivityManagerTestBase extends InstrumentationTestCase {
 
-    private static final String LOG_TAG = "ConnectivityManagerTestBase";
-    private static final String ACCESS_POINT_FILE = "accesspoints.xml";
     private static final String PING_IP_ADDR = "8.8.8.8";
 
     protected static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; //10 seconds
     protected static final int WIFI_SCAN_TIMEOUT = 50 * 1000; // 50 seconds
     protected static final int SHORT_TIMEOUT = 5 * 1000; // 5 seconds
-    protected static final long LONG_TIMEOUT = 50 * 1000;  // 50 seconds
+    protected static final long LONG_TIMEOUT = 2 * 60 * 1000;  // 2 minutes
     protected static final long WIFI_CONNECTION_TIMEOUT = 5 * 60 * 1000; // 5 minutes
     // 2 minutes timer between wifi stop and start
     protected static final long  WIFI_STOP_START_INTERVAL = 2 * 60 * 1000; // 2 minutes
@@ -69,9 +64,10 @@
     protected static final int FAILURE = 1;
     protected static final int INIT = -1;
 
+    protected final String mLogTag;
+
     private ConnectivityReceiver mConnectivityReceiver = null;
     private WifiReceiver mWifiReceiver = null;
-    private AccessPointParserHelper mParseHelper = null;
 
     private long mLastConnectivityChangeTime = -1;
     protected ConnectivityManager mCm;
@@ -82,6 +78,11 @@
     /* Control Wifi States */
     public WifiManager mWifiManager;
 
+    public ConnectivityManagerTestBase(String logTag) {
+        super();
+        mLogTag = logTag;
+    }
+
     protected long getLastConnectivityChangeTime() {
         return mLastConnectivityChangeTime;
     }
@@ -94,7 +95,7 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             mLastConnectivityChangeTime = SystemClock.uptimeMillis();
-            log("ConnectivityReceiver: " + intent);
+            logv("ConnectivityReceiver: " + intent);
             String action = intent.getAction();
             if (!action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
                 Log.v("ConnectivityReceiver", "onReceive() called with " + intent);
@@ -108,7 +109,7 @@
             String action = intent.getAction();
             Log.v("WifiReceiver", "onReceive() is calleld with " + intent);
             if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
-                log("scan results are available");
+                logv("scan results are available");
                 synchronized (mWifiScanResultLock) {
                     mLastScanResult = mWifiManager.getScanResults();
                     mWifiScanResultLock.notifyAll();
@@ -130,7 +131,7 @@
         if (mWifiManager.isWifiApEnabled()) {
             // if soft AP is enabled, disable it
             mWifiManager.setWifiApEnabled(null, false);
-            log("Disable soft ap");
+            logv("Disable soft ap");
         }
 
         // register a connectivity receiver for CONNECTIVITY_ACTION;
@@ -148,32 +149,25 @@
         mIntentFilter.addAction(ConnectivityManager.ACTION_TETHER_STATE_CHANGED);
         mContext.registerReceiver(mWifiReceiver, mIntentFilter);
 
-        log("Clear Wifi before we start the test.");
+        logv("Clear Wifi before we start the test.");
         removeConfiguredNetworksAndDisableWifi();
      }
 
-    protected List<WifiConfiguration> loadNetworkConfigurations() throws Exception {
-        InputStream in = mContext.getAssets().open(ACCESS_POINT_FILE);
-        mParseHelper = new AccessPointParserHelper(in);
-        return mParseHelper.getNetworkConfigurations();
-    }
-
     // wait for network connectivity state: CONNECTING, CONNECTED, SUSPENDED, DISCONNECTING,
     //                                      DISCONNECTED, UNKNOWN
     protected boolean waitForNetworkState(int networkType, State expectedState, long timeout) {
         long startTime = SystemClock.uptimeMillis();
         while (true) {
             NetworkInfo ni = mCm.getNetworkInfo(networkType);
-            String niString = ni == null ? "null" : ni.toString();
             if (ni != null && expectedState.equals(ni.getState())) {
-                log("waitForNetworkState success: " + niString);
+                logv("waitForNetworkState success: %s", ni);
                 return true;
             }
             if ((SystemClock.uptimeMillis() - startTime) > timeout) {
-                log("waitForNetworkState timeout: " + niString);
+                logv("waitForNetworkState timeout: %s", ni);
                 return false;
             }
-            log("waitForNetworkState interim: " + niString);
+            logv("waitForNetworkState interim: %s", ni);
             SystemClock.sleep(SHORT_TIMEOUT);
         }
     }
@@ -185,16 +179,14 @@
         while (true) {
             int state = mWifiManager.getWifiState();
             if (state == expectedState) {
-                log("waitForWifiState success: state=" + state);
+                logv("waitForWifiState success: state=" + state);
                 return true;
             }
             if ((SystemClock.uptimeMillis() - startTime) > timeout) {
-                log(String.format("waitForWifiState timeout: expected=%d, actual=%d",
-                        expectedState, state));
+                logv("waitForWifiState timeout: expected=%d, actual=%d", expectedState, state);
                 return false;
             }
-            log(String.format("waitForWifiState interim: expected=%d, actual=%d",
-                    expectedState, state));
+            logv("waitForWifiState interim: expected=%d, actual=%d", expectedState, state);
             SystemClock.sleep(SHORT_TIMEOUT);
         }
     }
@@ -206,15 +198,15 @@
         while (true) {
             int state = mWifiManager.getWifiApState();
             if (state == expectedState) {
-                log("waitForWifiAPState success: state=" + state);
+                logv("waitForWifiAPState success: state=" + state);
                 return true;
             }
             if ((SystemClock.uptimeMillis() - startTime) > timeout) {
-                log(String.format("waitForWifiAPState timeout: expected=%d, actual=%d",
+                logv(String.format("waitForWifiAPState timeout: expected=%d, actual=%d",
                         expectedState, state));
                 return false;
             }
-            log(String.format("waitForWifiAPState interim: expected=%d, actual=%d",
+            logv(String.format("waitForWifiAPState interim: expected=%d, actual=%d",
                     expectedState, state));
             SystemClock.sleep(SHORT_TIMEOUT);
         }
@@ -269,7 +261,7 @@
 
     // Turn screen off
     protected void turnScreenOff() {
-        log("Turn screen off");
+        logv("Turn screen off");
         PowerManager pm =
             (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
         pm.goToSleep(SystemClock.uptimeMillis());
@@ -277,7 +269,7 @@
 
     // Turn screen on
     protected void turnScreenOn() {
-        log("Turn screen on");
+        logv("Turn screen on");
         PowerManager pm =
                 (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
         pm.wakeUp(SystemClock.uptimeMillis());
@@ -305,7 +297,7 @@
                 // assume the chance that all servers are down is very small
                 for (int i = 0; i < hostList.length; i++ ) {
                     String host = hostList[i];
-                    log("Start ping test, ping " + host);
+                    logv("Start ping test, ping " + host);
                     Process p = Runtime.getRuntime().exec("ping -c 10 -w 100 " + host);
                     int status = p.waitFor();
                     if (status == 0) {
@@ -314,11 +306,11 @@
                     }
                 }
             } catch (UnknownHostException e) {
-                log("Ping test Fail: Unknown Host");
+                logv("Ping test Fail: Unknown Host");
             } catch (IOException e) {
-                log("Ping test Fail:  IOException");
+                logv("Ping test Fail:  IOException");
             } catch (InterruptedException e) {
-                log("Ping test Fail: InterruptedException");
+                logv("Ping test Fail: InterruptedException");
             }
         }
         // ping test timeout
@@ -330,30 +322,28 @@
      * If the device is already associated with a WiFi, disconnect and forget it,
      * We don't verify whether the connection is successful or not, leave this to the test
      */
-    protected boolean connectToWifi(String knownSSID) {
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = knownSSID;
-        config.allowedKeyManagement.set(KeyMgmt.NONE);
+    protected boolean connectToWifi(String ssid, String password) {
+        WifiConfiguration config;
+        if (password == null) {
+            config = WifiConfigurationHelper.createOpenConfig(ssid);
+        } else {
+            config = WifiConfigurationHelper.createPskConfig(ssid, password);
+        }
         return connectToWifiWithConfiguration(config);
     }
 
     /**
      * Connect to Wi-Fi with the given configuration. Note the SSID in the configuration
      * is pure string, we need to convert it to quoted string.
-     * @param config
-     * @return
      */
     protected boolean connectToWifiWithConfiguration(WifiConfiguration config) {
-        String ssid = config.SSID;
-        config.SSID = convertToQuotedString(ssid);
-
         // If Wifi is not enabled, enable it
         if (!mWifiManager.isWifiEnabled()) {
-            log("Wifi is not enabled, enable it");
+            logv("Wifi is not enabled, enable it");
             mWifiManager.setWifiEnabled(true);
             // wait for the wifi state change before start scanning.
             if (!waitForWifiState(WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)) {
-                log("wait for WIFI_STATE_ENABLED failed");
+                logv("wait for WIFI_STATE_ENABLED failed");
                 return false;
             }
         }
@@ -361,10 +351,13 @@
         // Save network configuration and connect to network without scanning
         mWifiManager.connect(config,
             new WifiManager.ActionListener() {
+                @Override
                 public void onSuccess() {
                 }
+
+                @Override
                 public void onFailure(int reason) {
-                    log("connect failure " + reason);
+                    logv("connect failure " + reason);
                 }
             });
         return true;
@@ -376,25 +369,28 @@
     protected boolean disconnectAP() {
         // remove saved networks
         if (!mWifiManager.isWifiEnabled()) {
-            log("Enabled wifi before remove configured networks");
+            logv("Enabled wifi before remove configured networks");
             mWifiManager.setWifiEnabled(true);
             SystemClock.sleep(SHORT_TIMEOUT);
         }
 
         List<WifiConfiguration> wifiConfigList = mWifiManager.getConfiguredNetworks();
         if (wifiConfigList == null) {
-            log("no configuration list is null");
+            logv("no configuration list is null");
             return true;
         }
-        log("size of wifiConfigList: " + wifiConfigList.size());
+        logv("size of wifiConfigList: " + wifiConfigList.size());
         for (WifiConfiguration wifiConfig: wifiConfigList) {
-            log("remove wifi configuration: " + wifiConfig.networkId);
+            logv("remove wifi configuration: " + wifiConfig.networkId);
             int netId = wifiConfig.networkId;
             mWifiManager.forget(netId, new WifiManager.ActionListener() {
+                    @Override
                     public void onSuccess() {
                     }
+
+                    @Override
                     public void onFailure(int reason) {
-                        log("Failed to forget " + reason);
+                        logv("Failed to forget " + reason);
                     }
                 });
         }
@@ -431,15 +427,14 @@
         long startTime = SystemClock.uptimeMillis();
         while (true) {
             NetworkInfo ni = mCm.getActiveNetworkInfo();
-            String niString = ni == null ? "null" : ni.toString();
             if (ni != null && ni.isConnected()) {
                 return true;
             }
             if ((SystemClock.uptimeMillis() - startTime) > timeout) {
-                log("waitForActiveNetworkConnection timeout: " + niString);
+                logv("waitForActiveNetworkConnection timeout: %s", ni);
                 return false;
             }
-            log("waitForActiveNetworkConnection interim: " + niString);
+            logv("waitForActiveNetworkConnection interim: %s", ni);
             SystemClock.sleep(SHORT_TIMEOUT);
         }
     }
@@ -451,12 +446,11 @@
             if (ni == null) {
                 return true;
             }
-            String niString = ni.toString();
             if ((SystemClock.uptimeMillis() - startTime) > timeout) {
-                log("waitForActiveNetworkConnection timeout: " + niString);
+                logv("waitForActiveNetworkConnection timeout: %s", ni);
                 return false;
             }
-            log("waitForActiveNetworkConnection interim: " + niString);
+            logv("waitForActiveNetworkConnection interim: %s", ni);
             SystemClock.sleep(SHORT_TIMEOUT);
         }
     }
@@ -467,12 +461,9 @@
         try {
             Process proc = Runtime.getRuntime().exec(new String[]{
                     "/system/bin/ping", "-W", "30", "-c", "1", PING_IP_ADDR});
-            int exitCode = proc.waitFor();
-            return exitCode == 0;
-        } catch (InterruptedException ie) {
-            Log.e(LOG_TAG, "InterruptedException while waiting for ping");
-        } catch (IOException ioe) {
-            Log.e(LOG_TAG, "IOException during ping", ioe);
+            return proc.waitFor() == 0;
+        } catch (InterruptedException | IOException e) {
+            Log.e(mLogTag, "Ping failed", e);
         }
         return false;
     }
@@ -489,8 +480,8 @@
         super.tearDown();
     }
 
-    private void log(String message) {
-        Log.v(LOG_TAG, message);
+    protected void logv(String format, Object... args) {
+        Log.v(mLogTag, String.format(format, args));
     }
 
     /**
@@ -506,22 +497,10 @@
         // step 2: verify Wifi state and network state;
         assertTrue("wifi state not connected with " + config.SSID,
                 waitForNetworkState(ConnectivityManager.TYPE_WIFI,
-                State.CONNECTED, LONG_TIMEOUT));
+                State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
 
         // step 3: verify the current connected network is the given SSID
         assertNotNull("no active wifi info", mWifiManager.getConnectionInfo());
         assertEquals("SSID mismatch", config.SSID, mWifiManager.getConnectionInfo().getSSID());
     }
-
-    /**
-     * checks if the input is a hexadecimal string of given length
-     *
-     * @param input string to be checked
-     * @param length required length of the string
-     * @return
-     */
-    protected static boolean isHex(String input, int length) {
-        Pattern p = Pattern.compile(String.format("[0-9A-Fa-f]{%d}", length));
-        return p.matcher(input).matches();
-    }
 }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
index b94306a..b6eb674 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ConnectivityManagerTestRunner.java
@@ -35,8 +35,9 @@
  */
 
 public class ConnectivityManagerTestRunner extends InstrumentationTestRunner {
-    public boolean mWifiOnlyFlag = false;
-    public String mTestSsid = null;
+    public boolean mWifiOnly = false;
+    public String mSsid = null;
+    public String mPassword = null;
 
     @Override
     public TestSuite getAllTests() {
@@ -54,13 +55,29 @@
     @Override
     public void onCreate(Bundle icicle) {
         super.onCreate(icicle);
-        String testSSID = (String) icicle.get("ssid");
-        if (testSSID != null) {
-            mTestSsid = testSSID;
+        String ssid = icicle.getString("ssid");
+        if (ssid != null) {
+            mSsid = ssid;
+        }
+        String password = (String) icicle.get("password");
+        if (password != null) {
+            mPassword = password;
         }
         String wifiOnlyFlag = (String) icicle.get("wifi-only");
         if (wifiOnlyFlag != null) {
-            mWifiOnlyFlag = true;
+            mWifiOnly = true;
         }
     }
+
+    public String getWifiSsid() {
+        return mSsid;
+    }
+
+    public String getWifiPassword() {
+        return mPassword;
+    }
+
+    public boolean isWifiOnly() {
+        return mWifiOnly;
+    }
 }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiConfigurationHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiConfigurationHelper.java
new file mode 100644
index 0000000..f0a8367
--- /dev/null
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/WifiConfigurationHelper.java
@@ -0,0 +1,364 @@
+/*
+ * Copyright (C) 2010, 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.connectivitymanagertest;
+
+import android.net.IpConfiguration.IpAssignment;
+import android.net.IpConfiguration.ProxySettings;
+import android.net.LinkAddress;
+import android.net.StaticIpConfiguration;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiConfiguration.AuthAlgorithm;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
+import android.net.wifi.WifiEnterpriseConfig;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Helper for dealing with creating {@link WifiConfiguration} objects.
+ */
+public class WifiConfigurationHelper {
+    private static final int NONE = 0;
+    private static final int WEP = 1;
+    private static final int PSK = 2;
+    private static final int EAP = 3;
+
+    /**
+     * Private constructor since this a static class.
+     */
+    private WifiConfigurationHelper() {}
+
+    /**
+     * Create a {@link WifiConfiguration} for an open network
+     *
+     * @param ssid The SSID of the wifi network
+     * @return The {@link WifiConfiguration}
+     */
+    public static WifiConfiguration createOpenConfig(String ssid) {
+        WifiConfiguration config = createGenericConfig(ssid);
+
+        config.allowedKeyManagement.set(KeyMgmt.NONE);
+        return config;
+    }
+
+    /**
+     * Create a {@link WifiConfiguration} for a WEP secured network
+     *
+     * @param ssid The SSID of the wifi network
+     * @param password Either a 10, 26, or 58 character hex string or the plain text password
+     * @return The {@link WifiConfiguration}
+     */
+    public static WifiConfiguration createWepConfig(String ssid, String password) {
+        WifiConfiguration config = createGenericConfig(ssid);
+
+        if (isHex(password, 10) || isHex(password, 26) || isHex(password, 58)) {
+            config.wepKeys[0] = password;
+        } else {
+            config.wepKeys[0] = quotedString(password);
+        }
+
+        config.allowedKeyManagement.set(KeyMgmt.NONE);
+        config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
+        config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED);
+        return config;
+    }
+
+    /**
+     * Create a {@link WifiConfiguration} for a PSK secured network
+     *
+     * @param ssid The SSID of the wifi network
+     * @param password Either a 64 character hex string or the plain text password
+     * @return The {@link WifiConfiguration}
+     */
+    public static WifiConfiguration createPskConfig(String ssid, String password) {
+        WifiConfiguration config = createGenericConfig(ssid);
+
+        if (isHex(password, 64)) {
+            config.preSharedKey = password;
+        } else {
+            config.preSharedKey = quotedString(password);
+        }
+        config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+        return config;
+    }
+
+    /**
+     * Create a {@link WifiConfiguration} for an EAP secured network
+     *
+     * @param ssid The SSID of the wifi network
+     * @param password The password
+     * @param eapMethod The EAP method
+     * @param phase2 The phase 2 method or null
+     * @param identity The identity or null
+     * @param anonymousIdentity The anonymous identity or null
+     * @param caCert The CA certificate or null
+     * @param clientCert The client certificate or null
+     * @return The {@link WifiConfiguration}
+     */
+    public static WifiConfiguration createEapConfig(String ssid, String password, int eapMethod,
+            Integer phase2, String identity, String anonymousIdentity, String caCert,
+            String clientCert) {
+        WifiConfiguration config = new WifiConfiguration();
+        config.SSID = quotedString(ssid);
+
+        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
+        config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
+
+        // Set defaults
+        if (phase2 == null) phase2 = WifiEnterpriseConfig.Phase2.NONE;
+        if (identity == null) identity = "";
+        if (anonymousIdentity == null) anonymousIdentity = "";
+        if (caCert == null) caCert = "";
+        if (clientCert == null) clientCert = "";
+
+        config.enterpriseConfig.setPassword(password);
+        config.enterpriseConfig.setEapMethod(eapMethod);
+        config.enterpriseConfig.setPhase2Method(phase2);
+        config.enterpriseConfig.setIdentity(identity);
+        config.enterpriseConfig.setAnonymousIdentity(anonymousIdentity);
+        config.enterpriseConfig.setCaCertificateAlias(caCert);
+        config.enterpriseConfig.setClientCertificateAlias(clientCert);
+        return config;
+    }
+
+    /**
+     * Create a generic {@link WifiConfiguration} used by the other create methods.
+     */
+    private static WifiConfiguration createGenericConfig(String ssid) {
+        WifiConfiguration config = new WifiConfiguration();
+        config.SSID = quotedString(ssid);
+        config.setIpAssignment(IpAssignment.DHCP);
+        config.setProxySettings(ProxySettings.NONE);
+        return config;
+    }
+
+    /**
+     * Parse a JSON string for WiFi configurations stored as a JSON string.
+     * <p>
+     * This json string should be a list of dictionaries, with each dictionary containing a single
+     * wifi configuration. The wifi configuration requires the fields "ssid" and "security" with
+     * security being one of NONE, WEP, PSK, or EAP. If WEP, PSK, or EAP are selected, the field
+     * "password" must also be provided.  If EAP is selected, then the fiels "eap", "phase2",
+     * "identity", "ananymous_identity", "ca_cert", and "client_cert" are also required. Lastly,
+     * static IP settings are also supported.  If the field "ip" is set, then the fields "gateway",
+     * "prefix_length", "dns1", and "dns2" are required.
+     * </p>
+     * @throws IllegalArgumentException if the input string was not valid JSON or if any mandatory
+     * fields are missing.
+     */
+    public static List<WifiConfiguration> parseJson(String in) {
+        try {
+            JSONArray jsonConfigs = new JSONArray(in);
+            List<WifiConfiguration> wifiConfigs = new ArrayList<>(jsonConfigs.length());
+
+            for (int i = 0; i < jsonConfigs.length(); i++) {
+                JSONObject jsonConfig = jsonConfigs.getJSONObject(i);
+
+                wifiConfigs.add(getWifiConfiguration(jsonConfig));
+            }
+            return wifiConfigs;
+        } catch (JSONException e) {
+            throw new IllegalArgumentException(e);
+        }
+    }
+
+    /**
+     * Parse a {@link JSONObject} and return the wifi configuration.
+     *
+     * @throws IllegalArgumentException if any mandatory fields are missing.
+     */
+    private static WifiConfiguration getWifiConfiguration(JSONObject jsonConfig)
+            throws JSONException {
+        String ssid = jsonConfig.getString("ssid");
+        String password = null;
+        WifiConfiguration config;
+
+        int securityType = getSecurityType(jsonConfig.getString("security"));
+        switch (securityType) {
+            case NONE:
+                config = createOpenConfig(ssid);
+                break;
+            case WEP:
+                password = jsonConfig.getString("password");
+                config = createWepConfig(ssid, password);
+                break;
+            case PSK:
+                password = jsonConfig.getString("password");
+                config = createPskConfig(ssid, password);
+                break;
+            case EAP:
+                password = jsonConfig.getString("password");
+                int eapMethod = getEapMethod(jsonConfig.getString("eap"));
+                Integer phase2 = null;
+                if (jsonConfig.has("phase2")) {
+                    phase2 = getPhase2(jsonConfig.getString("phase2"));
+                }
+                String identity = null;
+                if (jsonConfig.has("identity")) {
+                    identity = jsonConfig.getString("identity");
+                }
+                String anonymousIdentity = null;
+                if (jsonConfig.has("anonymous_identity")) {
+                    anonymousIdentity = jsonConfig.getString("anonymous_identity");
+                }
+                String caCert = null;
+                if (jsonConfig.has("ca_cert")) {
+                    caCert = (jsonConfig.getString("ca_cert"));
+                }
+                String clientCert = null;
+                if (jsonConfig.has("client_cert")) {
+                    clientCert = jsonConfig.getString("client_cert");
+                }
+                config = createEapConfig(ssid, password, eapMethod, phase2, identity,
+                        anonymousIdentity, caCert, clientCert);
+                break;
+            default:
+                // Should never reach here as getSecurityType will already throw an exception
+                throw new IllegalArgumentException();
+        }
+
+        if (jsonConfig.has("ip")) {
+            StaticIpConfiguration staticIpConfig = new StaticIpConfiguration();
+
+            InetAddress ipAddress = getInetAddress(jsonConfig.getString("ip"));
+            int prefixLength = getPrefixLength(jsonConfig.getInt("prefix_length"));
+            staticIpConfig.ipAddress = new LinkAddress(ipAddress, prefixLength);
+            staticIpConfig.gateway = getInetAddress(jsonConfig.getString("gateway"));
+            staticIpConfig.dnsServers.add(getInetAddress(jsonConfig.getString("dns1")));
+            staticIpConfig.dnsServers.add(getInetAddress(jsonConfig.getString("dns2")));
+
+            config.setIpAssignment(IpAssignment.STATIC);
+            config.setStaticIpConfiguration(staticIpConfig);
+        } else {
+            config.setIpAssignment(IpAssignment.DHCP);
+        }
+
+        config.setProxySettings(ProxySettings.NONE);
+        return config;
+    }
+
+    private static String quotedString(String s) {
+        return String.format("\"%s\"", s);
+    }
+
+    /**
+     * Get the security type from a string.
+     *
+     * @throws IllegalArgumentException if the string is not a supported security type.
+     */
+    private static int getSecurityType(String security) {
+        if ("NONE".equalsIgnoreCase(security)) {
+            return NONE;
+        }
+        if ("WEP".equalsIgnoreCase(security)) {
+            return WEP;
+        }
+        if ("PSK".equalsIgnoreCase(security)) {
+            return PSK;
+        }
+        if ("EAP".equalsIgnoreCase(security)) {
+            return EAP;
+        }
+        throw new IllegalArgumentException("Security type must be one of NONE, WEP, PSK, or EAP");
+    }
+
+    /**
+     * Get the EAP method from a string.
+     *
+     * @throws IllegalArgumentException if the string is not a supported EAP method.
+     */
+    private static int getEapMethod(String eapMethod) {
+        if ("TLS".equalsIgnoreCase(eapMethod)) {
+            return WifiEnterpriseConfig.Eap.TLS;
+        }
+        if ("TTLS".equalsIgnoreCase(eapMethod)) {
+            return WifiEnterpriseConfig.Eap.TTLS;
+        }
+        if ("PEAP".equalsIgnoreCase(eapMethod)) {
+            return WifiEnterpriseConfig.Eap.PEAP;
+        }
+        throw new IllegalArgumentException("EAP method must be one of TLS, TTLS, or PEAP");
+    }
+
+    /**
+     * Get the phase 2 method from a string.
+     *
+     * @throws IllegalArgumentException if the string is not a supported phase 2 method.
+     */
+    private static int getPhase2(String phase2) {
+        if ("PAP".equalsIgnoreCase(phase2)) {
+            return WifiEnterpriseConfig.Phase2.PAP;
+        }
+        if ("MSCHAP".equalsIgnoreCase(phase2)) {
+            return WifiEnterpriseConfig.Phase2.MSCHAP;
+        }
+        if ("MSCHAPV2".equalsIgnoreCase(phase2)) {
+            return WifiEnterpriseConfig.Phase2.MSCHAPV2;
+        }
+        if ("GTC".equalsIgnoreCase(phase2)) {
+            return WifiEnterpriseConfig.Phase2.GTC;
+        }
+        throw new IllegalArgumentException("Phase2 must be one of PAP, MSCHAP, MSCHAPV2, or GTC");
+    }
+
+    /**
+     * Get an {@link InetAddress} from a string
+     *
+     * @throws IllegalArgumentException if the string is not a valid IP address.
+     */
+    private static InetAddress getInetAddress(String ipAddress) {
+        if (!InetAddress.isNumeric(ipAddress)) {
+            throw new IllegalArgumentException(
+                    String.format("IP address %s is not numeric", ipAddress));
+        }
+
+        try {
+            return InetAddress.getByName(ipAddress);
+        } catch (UnknownHostException e) {
+            throw new IllegalArgumentException(
+                    String.format("IP address %s could not be resolved", ipAddress));
+        }
+    }
+
+    /**
+     * Get the prefix length from an int.
+     *
+     * @throws IllegalArgumentException if the prefix length is less than 0 or greater than 32.
+     */
+    private static int getPrefixLength(int prefixLength) {
+        if (prefixLength < 0 || prefixLength > 32) {
+            throw new IllegalArgumentException("Prefix length cannot be less than 0 or more than 32");
+        }
+        return prefixLength;
+    }
+
+    /**
+     * Utility method to check if a given string is a hexadecimal string of given length
+     */
+    public static boolean isHex(String input, int length) {
+        if (input == null || length < 0) {
+            return false;
+        }
+        return input.matches(String.format("[0-9A-Fa-f]{%d}", length));
+    }
+}
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
index 01995c7..d5051df 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ConnectivityManagerMobileTest.java
@@ -23,16 +23,18 @@
 import android.os.SystemClock;
 import android.provider.Settings;
 import android.test.suitebuilder.annotation.LargeTest;
-import android.util.Log;
 
 import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
 import com.android.connectivitymanagertest.ConnectivityManagerTestRunner;
 
-public class ConnectivityManagerMobileTest extends
-        ConnectivityManagerTestBase {
-    private static final String TAG = "ConnectivityManagerMobileTest";
+public class ConnectivityManagerMobileTest extends  ConnectivityManagerTestBase {
 
-    private String mTestAccessPoint;
+    public ConnectivityManagerMobileTest() {
+        super(ConnectivityManagerMobileTest.class.getSimpleName());
+    }
+
+    private String mSsid;
+    private String mPassword;
     private boolean mWifiOnlyFlag;
 
     @Override
@@ -40,13 +42,14 @@
         super.setUp();
         ConnectivityManagerTestRunner mRunner =
                 (ConnectivityManagerTestRunner)getInstrumentation();
-        mTestAccessPoint = mRunner.mTestSsid;
-        mWifiOnlyFlag = mRunner.mWifiOnlyFlag;
+        mSsid = mRunner.getWifiSsid();
+        mPassword = mRunner.getWifiPassword();
+        mWifiOnlyFlag = mRunner.isWifiOnly();
 
         // Each test case will start with cellular connection
         if (Settings.Global.getInt(getInstrumentation().getContext().getContentResolver(),
                 Settings.Global.AIRPLANE_MODE_ON) == 1) {
-            log("airplane is not disabled, disable it.");
+            logv("airplane is not disabled, disable it.");
             mCm.setAirplaneMode(false);
         }
 
@@ -77,16 +80,14 @@
         assertTrue("not connected to cellular network", extraNetInfo.isConnected());
     }
 
-    private void log(String message) {
-        Log.v(TAG, message);
-    }
+
 
     // Test case 1: Test enabling Wifi without associating with any AP, no broadcast on network
     //              event should be expected.
     @LargeTest
     public void test3GToWifiNotification() {
         if (mWifiOnlyFlag) {
-            Log.v(TAG, getName() + " is excluded for wifi-only test");
+            logv(getName() + " is excluded for wifi-only test");
             return;
         }
 
@@ -121,11 +122,10 @@
     // Test case 2: test connection to a given AP
     @LargeTest
     public void testConnectToWifi() {
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
 
         // assert that we are able to connect to the ap
-        assertTrue("failed to connect to " + mTestAccessPoint,
-                connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
         // assert that WifiManager reports correct state
         assertTrue("wifi not enabled", waitForWifiState(
                 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT));
@@ -145,14 +145,14 @@
     // Test case 3: connect & reconnect to Wifi with known AP
     @LargeTest
     public void testConnectToWifWithKnownAP() {
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
         // enable WiFi
         assertTrue("failed to enable wifi", enableWifi());
         // wait for wifi enable
         assertTrue("wifi not enabled", waitForWifiState(
                 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT));
         // Connect to AP
-        assertTrue("failed to connect to " + mTestAccessPoint, connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
         // verify wifi connected as reported by ConnectivityManager
         assertTrue("wifi not connected", waitForNetworkState(
                 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
@@ -192,7 +192,7 @@
     // Test case 4:  test disconnect and clear wifi settings
     @LargeTest
     public void testDisconnectWifi() {
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
 
         // enable WiFi
         assertTrue("failed to enable wifi", enableWifi());
@@ -200,8 +200,7 @@
         assertTrue("wifi not enabled", waitForWifiState(
                 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT));
         // connect to Wifi
-        assertTrue("failed to connect to " + mTestAccessPoint,
-                connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
 
         assertTrue("wifi not connected", waitForNetworkState(
                 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
@@ -225,7 +224,7 @@
     @LargeTest
     public void testDataConnectionWith3GToAmTo3G() {
         if (mWifiOnlyFlag) {
-            Log.v(TAG, getName() + " is excluded for wifi-only test");
+            logv(getName() + " is excluded for wifi-only test");
             return;
         }
         // disable wifi
@@ -258,7 +257,7 @@
     // Test case 6: test connectivity with airplane mode on but wifi enabled
     @LargeTest
     public void testDataConnectionOverAMWithWifi() {
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
         // enable airplane mode
         mCm.setAirplaneMode(true);
         // assert there is active network connection after airplane mode disabled
@@ -266,8 +265,7 @@
                 waitUntilNoActiveNetworkConnection(LONG_TIMEOUT));
 
         // connect to Wifi
-        assertTrue("failed to connect to " + mTestAccessPoint,
-                connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
         assertTrue("wifi not connected", waitForNetworkState(
                 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
         // verify that connection actually works
@@ -281,15 +279,14 @@
     @LargeTest
     public void testDataConnectionWithWifiToAMToWifi () {
         // connect to mTestAccessPoint
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
         // enable WiFi
         assertTrue("failed to enable wifi", enableWifi());
         // wait for wifi enable
         assertTrue("wifi not enabled", waitForWifiState(
                 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT));
         // connect to Wifi
-        assertTrue("failed to connect to " + mTestAccessPoint,
-                connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
         assertTrue("wifi not connected", waitForNetworkState(
                 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
 
@@ -314,15 +311,14 @@
     // Test case 8: test wifi state change while connecting/disconnecting to/from an AP
     @LargeTest
     public void testWifiStateChange () {
-        assertNotNull("SSID is null", mTestAccessPoint);
+        assertNotNull("SSID is null", mSsid);
         // enable WiFi
         assertTrue("failed to enable wifi", enableWifi());
         // wait for wifi enable
         assertTrue("wifi not enabled", waitForWifiState(
                 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT));
         // connect to Wifi
-        assertTrue("failed to connect to " + mTestAccessPoint,
-                connectToWifi(mTestAccessPoint));
+        assertTrue("failed to connect to " + mSsid, connectToWifi(mSsid, mPassword));
         assertTrue("wifi not connected", waitForNetworkState(
                 ConnectivityManager.TYPE_WIFI, State.CONNECTED, WIFI_CONNECTION_TIMEOUT));
         assertNotNull("not associated with any AP", mWifiManager.getConnectionInfo().getBSSID());
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
index eb75b0d..c2b80dc 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiAssociationTest.java
@@ -21,16 +21,15 @@
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.AuthAlgorithm;
 import android.net.wifi.WifiConfiguration.GroupCipher;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiConfiguration.PairwiseCipher;
 import android.net.wifi.WifiConfiguration.Protocol;
 import android.net.wifi.WifiInfo;
 import android.os.Bundle;
 import android.test.suitebuilder.annotation.LargeTest;
-import android.util.Log;
 
 import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
 import com.android.connectivitymanagertest.WifiAssociationTestRunner;
+import com.android.connectivitymanagertest.WifiConfigurationHelper;
 
 /**
  * Test Wi-Fi connection with different configuration
@@ -40,7 +39,6 @@
  * -w com.android.connectivitymanagertest/.WifiAssociationTestRunner"
  */
 public class WifiAssociationTest extends ConnectivityManagerTestBase {
-    private static final String TAG = "WifiAssociationTest";
     private String mSsid = null;
     private String mPassword = null;
     private String mSecurityType = null;
@@ -51,6 +49,10 @@
         OPEN, WEP64, WEP128, WPA_TKIP, WPA2_AES
     }
 
+    public WifiAssociationTest() {
+        super(WifiAssociationTest.class.getSimpleName());
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -77,90 +79,58 @@
     private void validateFrequencyBand() {
         if (mFrequencyBand != null) {
             int currentFreq = mWifiManager.getFrequencyBand();
-            Log.v(TAG, "read frequency band: " + currentFreq);
+            logv("read frequency band: " + currentFreq);
             assertEquals("specified frequency band does not match operational band of WifiManager",
                     currentFreq, mBand);
          }
     }
 
-    private void log(String message) {
-        Log.v(TAG, message);
-    }
-
     @LargeTest
     public void testWifiAssociation() {
         assertNotNull("no test ssid", mSsid);
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = mSsid;
+        WifiConfiguration config = null;
         SECURITY_TYPE security = SECURITY_TYPE.valueOf(mSecurityType);
-        log("Security type is " + security.toString());
+        logv("Security type is " + security.toString());
         switch (security) {
             // set network configurations
             case OPEN:
-                config.allowedKeyManagement.set(KeyMgmt.NONE);
+                config = WifiConfigurationHelper.createOpenConfig(mSsid);
                 break;
             case WEP64:
                 assertNotNull("password is empty", mPassword);
-                config.allowedKeyManagement.set(KeyMgmt.NONE);
-                config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
-                config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED);
+                // always use hex pair for WEP-40
+                assertTrue(WifiConfigurationHelper.isHex(mPassword, 10));
+                config = WifiConfigurationHelper.createWepConfig(mSsid, mPassword);
                 config.allowedGroupCiphers.set(GroupCipher.WEP40);
-                if (mPassword != null) {
-                    // always use hex pair for WEP-40
-                    if (isHex(mPassword, 10)) {
-                        config.wepKeys[0] = mPassword;
-                    } else {
-                        fail("password should be 10-character hex");
-                    }
-                }
                 break;
             case WEP128:
                 assertNotNull("password is empty", mPassword);
-                config.allowedKeyManagement.set(KeyMgmt.NONE);
-                config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
-                config.allowedAuthAlgorithms.set(AuthAlgorithm.SHARED);
+                // always use hex pair for WEP-104
+                assertTrue(WifiConfigurationHelper.isHex(mPassword, 26));
+                config = WifiConfigurationHelper.createWepConfig(mSsid, mPassword);
                 config.allowedGroupCiphers.set(GroupCipher.WEP104);
-                if (mPassword != null) {
-                    // always use hex pair for WEP-104
-                    if (isHex(mPassword, 26)) {
-                        config.wepKeys[0] = mPassword;
-                    } else {
-                        fail("password should be 26-character hex");
-                    }
-                }
                 break;
             case WPA_TKIP:
                 assertNotNull("password is empty", mPassword);
-                config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+                config = WifiConfigurationHelper.createPskConfig(mSsid, mPassword);
                 config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
                 config.allowedProtocols.set(Protocol.WPA);
                 config.allowedPairwiseCiphers.set(PairwiseCipher.TKIP);
                 config.allowedGroupCiphers.set(GroupCipher.TKIP);
-                if (isHex(mPassword, 64)) {
-                    config.preSharedKey = mPassword;
-                } else {
-                    config.preSharedKey = '"' + mPassword + '"';
-                }
                 break;
             case WPA2_AES:
                 assertNotNull("password is empty", mPassword);
-                config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
+                config = WifiConfigurationHelper.createPskConfig(mSsid, mPassword);
                 config.allowedAuthAlgorithms.set(AuthAlgorithm.OPEN);
                 config.allowedProtocols.set(Protocol.RSN);
                 config.allowedPairwiseCiphers.set(PairwiseCipher.CCMP);
                 config.allowedGroupCiphers.set(GroupCipher.CCMP);
-                config.allowedProtocols.set(Protocol.RSN);
-                if (isHex(mPassword, 64)) {
-                    config.preSharedKey = mPassword;
-                } else {
-                    config.preSharedKey = '"' + mPassword + '"';
-                }
                 break;
             default:
                 fail("Not a valid security type: " + mSecurityType);
                 break;
         }
-        Log.v(TAG, "network config: " + config.toString());
+        logv("network config: %s", config.toString());
         connectToWifi(config);
         // verify that connection actually works
         assertTrue("no network connectivity at end of test", checkNetworkConnectivity());
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
index 740ffb8..b37daa3 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/WifiConnectionTest.java
@@ -16,54 +16,38 @@
 
 package com.android.connectivitymanagertest.functional;
 
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo.State;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
+import android.os.SystemClock;
 import android.test.suitebuilder.annotation.LargeTest;
-import android.util.Log;
 
 import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
+import com.android.connectivitymanagertest.WifiConfigurationHelper;
 
-import java.util.ArrayList;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
 import java.util.List;
 
 /**
  * Test Wi-Fi connection with different configuration
  * To run this tests:
- *     adb shell am instrument -e class
- *          com.android.connectivitymanagertest.functional.WifiConnectionTest
- *          -w com.android.connectivitymanagertest/.ConnectivityManagerTestRunner
+ *     adb shell am instrument \
+ *         -e class com.android.connectivitymanagertest.functional.WifiConnectionTest \
+ *         -w com.android.connectivitymanagertest/.ConnectivityManagerTestRunner
  */
-public class WifiConnectionTest
-    extends ConnectivityManagerTestBase {
-    private static final String TAG = "WifiConnectionTest";
-    private static final boolean DEBUG = false;
-    private List<WifiConfiguration> mNetworks = new ArrayList<WifiConfiguration>();
+public class WifiConnectionTest extends ConnectivityManagerTestBase {
+    private static final String WIFI_CONFIG_FILE = "/data/wifi_configs.json";
+    private static final long PAUSE_DURATION_MS = 60 * 1000;
+
+    public WifiConnectionTest() {
+        super(WifiConnectionTest.class.getSimpleName());
+    }
 
     @Override
     public void setUp() throws Exception {
         super.setUp();
-        mNetworks = loadNetworkConfigurations();
-        if (DEBUG) {
-            printNetworkConfigurations();
-        }
-
-        // enable wifi and verify wpa_supplicant is started
-        assertTrue("enable Wifi failed", enableWifi());
-        assertTrue("wifi not connected", waitForNetworkState(
-                ConnectivityManager.TYPE_WIFI, State.CONNECTED, LONG_TIMEOUT));
-        WifiInfo wi = mWifiManager.getConnectionInfo();
-        assertNotNull("no active wifi info", wi);
-        assertTrue("failed to ping wpa_supplicant ", mWifiManager.pingSupplicant());
-    }
-
-    private void printNetworkConfigurations() {
-        log("==== print network configurations parsed from XML file ====");
-        log("number of access points: " + mNetworks.size());
-        for (WifiConfiguration config : mNetworks) {
-            log(config.toString());
-        }
+        assertTrue("Failed to enable wifi", enableWifi());
     }
 
     @Override
@@ -72,25 +56,67 @@
         super.tearDown();
     }
 
-    private void log(String message) {
-        Log.v(TAG, message);
-    }
-
     @LargeTest
     public void testWifiConnections() {
-        for (int i = 0; i < mNetworks.size(); i++) {
-            String ssid = mNetworks.get(i).SSID;
-            log("-- START Wi-Fi connection test to : " + ssid + " --");
-            connectToWifi(mNetworks.get(i));
-            // verify that connection actually works
-            assertTrue("no network connectivity at end of test", checkNetworkConnectivity());
-            log("-- END Wi-Fi connection test to " + ssid + " -- ");
-            log("pausing for 1 minute");
-            try {
-                Thread.sleep(60 * 1000);
-            } catch (InterruptedException e) {
-                // ignore
+        List<WifiConfiguration> wifiConfigs = loadConfigurations();
+
+        printWifiConfigurations(wifiConfigs);
+
+        assertFalse("No configurations to test against", wifiConfigs.isEmpty());
+
+        boolean shouldPause = false;
+        for (WifiConfiguration config : wifiConfigs) {
+            if (shouldPause) {
+                logv("Pausing for %d seconds", PAUSE_DURATION_MS / 1000);
+                SystemClock.sleep(PAUSE_DURATION_MS);
             }
+            logv("Start wifi connection test to: %s", config.SSID);
+            connectToWifi(config);
+
+            // verify that connection actually works
+            assertTrue("No connectivity at end of test", checkNetworkConnectivity());
+
+            // Disconnect and remove the network
+            assertTrue("Unable to remove network", disconnectAP());
+            logv("End wifi connection test to: %s", config.SSID);
+
+            shouldPause = true;
+        }
+    }
+
+    /**
+     * Load the configuration file from the root of the data partition
+     */
+    private List<WifiConfiguration> loadConfigurations() {
+        BufferedReader reader = null;
+        try {
+            reader = new BufferedReader(new FileReader(new File(WIFI_CONFIG_FILE)));
+            StringBuffer jsonBuffer = new StringBuffer();
+            String line;
+            while ((line = reader.readLine()) != null) {
+                jsonBuffer.append(line);
+            }
+            return WifiConfigurationHelper.parseJson(jsonBuffer.toString());
+        } catch (IllegalArgumentException | IOException e) {
+            throw new AssertionError("Error parsing file", e);
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e) {
+                    // Ignore
+                }
+            }
+        }
+    }
+
+    /**
+     * Print the wifi configurations to test against.
+     */
+    private void printWifiConfigurations(List<WifiConfiguration> wifiConfigs) {
+        logv("Wifi configurations to be tested");
+        for (WifiConfiguration config : wifiConfigs) {
+            logv(config.toString());
         }
     }
 }
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java
index aead65b..41f01e6 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiApStress.java
@@ -17,16 +17,15 @@
 package com.android.connectivitymanagertest.stress;
 
 
-import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner;
-import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
-
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiConfiguration.AuthAlgorithm;
+import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiManager;
 import android.os.Environment;
 import android.test.suitebuilder.annotation.LargeTest;
-import android.util.Log;
+
+import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner;
+import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
 
 import java.io.BufferedWriter;
 import java.io.File;
@@ -35,9 +34,7 @@
 /**
  * Stress test setting up device as wifi hotspot
  */
-public class WifiApStress
-    extends ConnectivityManagerTestBase {
-    private final static String TAG = "WifiApStress";
+public class WifiApStress extends ConnectivityManagerTestBase {
     private static String NETWORK_ID = "AndroidAPTest";
     private static String PASSWD = "androidwifi";
     private final static String OUTPUT_FILE = "WifiStressTestOutput.txt";
@@ -46,6 +43,10 @@
     private int mLastIteration = 0;
     private boolean mWifiOnlyFlag;
 
+    public WifiApStress() {
+        super(WifiApStress.class.getSimpleName());
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -71,7 +72,7 @@
     @LargeTest
     public void testWifiHotSpot() {
         if (mWifiOnlyFlag) {
-            Log.v(TAG, this.getName() + " is excluded for wi-fi only test");
+            logv(getName() + " is excluded for wi-fi only test");
             return;
         }
         WifiConfiguration config = new WifiConfiguration();
@@ -95,7 +96,7 @@
         }
         int i;
         for (i = 0; i < mTotalIterations; i++) {
-            Log.v(TAG, "iteration: " + i);
+            logv("iteration: " + i);
             mLastIteration = i;
             // enable Wifi tethering
             assertTrue("failed to enable wifi hotspot",
diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
index 6ef4f06..fbd4669 100644
--- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
+++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/WifiStressTest.java
@@ -19,13 +19,10 @@
 import android.app.Activity;
 import android.content.Context;
 import android.net.ConnectivityManager;
-import android.net.IpConfiguration.IpAssignment;
-import android.net.IpConfiguration.ProxySettings;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo.State;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;
 import android.os.Environment;
@@ -37,6 +34,7 @@
 
 import com.android.connectivitymanagertest.ConnectivityManagerStressTestRunner;
 import com.android.connectivitymanagertest.ConnectivityManagerTestBase;
+import com.android.connectivitymanagertest.WifiConfigurationHelper;
 
 import java.io.BufferedWriter;
 import java.io.File;
@@ -52,8 +50,6 @@
  *                  -w com.android.connectivitymanagertest/.ConnectivityManagerStressTestRunner
  */
 public class WifiStressTest extends ConnectivityManagerTestBase {
-    private final static String TAG = "WifiStressTest";
-
     private final static long SCREEN_OFF_TIMER = 500; //500ms
     /**
      * Wi-Fi idle time for default sleep policy
@@ -78,6 +74,10 @@
     private BufferedWriter mOutputWriter = null;
     private boolean mWifiOnlyFlag;
 
+    public WifiStressTest() {
+        super(WifiStressTest.class.getSimpleName());
+    }
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
@@ -89,14 +89,14 @@
         mScanIterations = mRunner.getScanIterations();
         mWifiSleepTime = mRunner.getSleepTime();
         mWifiOnlyFlag = mRunner.isWifiOnly();
-        log(String.format("mReconnectIterations(%d), mSsid(%s), mPassword(%s),"
+        logv(String.format("mReconnectIterations(%d), mSsid(%s), mPassword(%s),"
             + "mScanIterations(%d), mWifiSleepTime(%d)", mReconnectIterations, mSsid,
             mPassword, mScanIterations, mWifiSleepTime));
         mOutputWriter = new BufferedWriter(new FileWriter(new File(
                 Environment.getExternalStorageDirectory(), OUTPUT_FILE), true));
         turnScreenOn();
         if (!mWifiManager.isWifiEnabled()) {
-            log("Enable wi-fi before stress tests.");
+            logv("Enable wi-fi before stress tests.");
             if (!enableWifi()) {
                 tearDown();
                 fail("enable wifi failed.");
@@ -107,7 +107,7 @@
 
     @Override
     protected void tearDown() throws Exception {
-        log("tearDown()");
+        logv("tearDown()");
         if (mOutputWriter != null) {
             mOutputWriter.close();
         }
@@ -115,23 +115,19 @@
     }
 
     private void writeOutput(String s) {
-        log("write message: " + s);
+        logv("write message: " + s);
         if (mOutputWriter == null) {
-            log("no writer attached to file " + OUTPUT_FILE);
+            logv("no writer attached to file " + OUTPUT_FILE);
             return;
         }
         try {
             mOutputWriter.write(s + "\n");
             mOutputWriter.flush();
         } catch (IOException e) {
-            log("failed to write output.");
+            logv("failed to write output.");
         }
     }
 
-    public void log(String message) {
-        Log.v(TAG, message);
-    }
-
     private void sleep(long sometime, String errorMsg) {
         try {
             Thread.sleep(sometime);
@@ -149,7 +145,7 @@
         long scanTimeSum = 0, i, averageScanTime = -1;
         int ssidAppearInScanResultsCount = 0; // count times of given ssid appear in scan results.
         for (i = 1; i <= mScanIterations; i++) {
-            log("testWifiScanning: iteration: " + i);
+            logv("testWifiScanning: iteration: " + i);
             averageScanTime = scanTimeSum / i;
             writeOutput(String.format("iteration %d out of %d", i, mScanIterations));
             writeOutput(String.format("average scanning time is %d", averageScanTime));
@@ -173,9 +169,9 @@
             if (scanResultLocal == null || scanResultLocal.isEmpty()) {
                 fail("Scan results are empty ");
             }
-            log("size of scan result list: " + scanResultLocal.size());
+            logv("size of scan result list: " + scanResultLocal.size());
             for (ScanResult sr : scanResultLocal) {
-                log(String.format("scan result: " + sr.toString()));
+                logv(String.format("scan result: " + sr.toString()));
                 if (mSsid.equals(sr.SSID)) {
                     ssidAppearInScanResultsCount += 1;
                     break;
@@ -208,21 +204,12 @@
         Settings.Global.putLong(mRunner.getContext().getContentResolver(),
                 Settings.Global.WIFI_IDLE_MS, WIFI_IDLE_MS);
 
-        // Connect to a Wi-Fi network
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = mSsid;
-        if (mPassword != null) {
-            config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
-            if (isHex(mPassword, 64)) {
-                config.preSharedKey = mPassword;
-            } else {
-                config.preSharedKey = '"' + mPassword + '"';
-            }
+        WifiConfiguration config;
+        if (mPassword == null) {
+            config = WifiConfigurationHelper.createOpenConfig(mSsid);
         } else {
-            config.allowedKeyManagement.set(KeyMgmt.NONE);
+            config = WifiConfigurationHelper.createPskConfig(mSsid, mPassword);
         }
-        config.setIpAssignment(IpAssignment.DHCP);
-        config.setProxySettings(ProxySettings.NONE);
 
         assertTrue("Failed to connect to Wi-Fi network: " + mSsid,
                 connectToWifiWithConfiguration(config));
@@ -240,7 +227,7 @@
             // 5. Wake up the device, verify Wi-Fi is enabled and connected.
             writeOutput(String.format("iteration %d out of %d",
                     i, mReconnectIterations));
-            log("iteration: " + i);
+            logv("iteration: " + i);
             turnScreenOff();
             // Use clock time since boot for intervals.
             long start = SystemClock.uptimeMillis();
@@ -271,7 +258,7 @@
             if (mWifiOnlyFlag) {
                 NetworkInfo ni = mCm.getActiveNetworkInfo();
                 if (ni != null) {
-                    Log.e(TAG, "has active network while in wifi sleep: " + ni.toString());
+                    Log.e(mLogTag, "has active network while in wifi sleep: " + ni.toString());
                     fail("active network detected");
                 }
             } else {
@@ -292,7 +279,7 @@
             long connectionTime = SystemClock.uptimeMillis() - startTime;
             sum += connectionTime;
             avgReconnectTime = sum / i;
-            log("average reconnection time is: " + avgReconnectTime);
+            logv("average reconnection time is: " + avgReconnectTime);
 
             assertTrue("Reconnect to Wi-Fi network, but no data connection.", pingTest(null));
         }
diff --git a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestApp.java b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestApp.java
index bcf2e45..db547e2 100644
--- a/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestApp.java
+++ b/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/DownloadManagerTestApp.java
@@ -60,10 +60,10 @@
         super.setUp();
         DownloadManagerTestRunner mRunner = (DownloadManagerTestRunner)getInstrumentation();
         externalDownloadUriValue = normalizeUri(mRunner.externalDownloadUriValue);
-        assertNotNull(externalDownloadUriValue);
+        assertNotNull("download url is null", externalDownloadUriValue);
 
         externalLargeDownloadUriValue = normalizeUri(mRunner.externalDownloadUriValue);
-        assertNotNull(externalLargeDownloadUriValue);
+        assertNotNull("large download url is null", externalLargeDownloadUriValue);
     }
 
     /**
@@ -140,7 +140,7 @@
 
             dlRequest = mDownloadManager.enqueue(request);
             waitForDownloadToStart(dlRequest);
-            assertTrue(dlRequest != -1);
+            assertTrue("request id is -1 from download manager", dlRequest != -1);
 
             // Store ID of download for later retrieval
             outputFile = new DataOutputStream(fileOutput);
@@ -183,7 +183,7 @@
             mContext.deleteFile(DOWNLOAD_STARTED_FLAG);
         }
 
-        assertTrue(dlRequest != -1);
+        assertTrue("request id is -1 from download manager", dlRequest != -1);
         Cursor cursor = getCursor(dlRequest);
         ParcelFileDescriptor pfd = null;
         try {
@@ -193,7 +193,7 @@
             int status = cursor.getInt(columnIndex);
             int currentWaitTime = 0;
 
-            assertTrue(waitForDownload(dlRequest, 15 * 60 * 1000));
+            assertTrue("download not finished", waitForDownload(dlRequest, 15 * 60 * 1000));
 
             Log.i(LOG_TAG, "Verifying download information...");
             // Verify specific info about the file (size, name, etc)...
@@ -233,7 +233,7 @@
         dlRequest = mDownloadManager.enqueue(request);
 
         // Rather large file, so wait up to 15 mins...
-        assertTrue(waitForDownload(dlRequest, 15 * 60 * 1000));
+        assertTrue("download not finished", waitForDownload(dlRequest, 15 * 60 * 1000));
 
         Cursor cursor = getCursor(dlRequest);
         ParcelFileDescriptor pfd = null;
@@ -317,7 +317,7 @@
             Log.i(LOG_TAG, "Turning on WiFi...");
             setWiFiStateOn(true);
             Log.i(LOG_TAG, "Waiting up to 10 minutes for download to complete...");
-            assertTrue(waitForDownload(dlRequest, 10 * 60 * 1000));
+            assertTrue("download not finished", waitForDownload(dlRequest, 10 * 60 * 1000));
             ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
             verifyFileSize(pfd, filesize);
         } finally {
@@ -385,7 +385,7 @@
             setWiFiStateOn(true);
 
             Log.i(LOG_TAG, "Waiting up to 10 minutes for download to complete...");
-            assertTrue(waitForDownload(dlRequest, 10 * 60 * 1000));
+            assertTrue("download not finished", waitForDownload(dlRequest, 10 * 60 * 1000));
             ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
             verifyFileSize(pfd, filesize);
         } finally {
@@ -456,7 +456,7 @@
             setAirplaneModeOn(false);
 
             Log.i(LOG_TAG, "Waiting up to 10 minutes for donwload to complete...");
-            assertTrue(waitForDownload(dlRequest, 10 * 60 * 1000)); // wait up to 10 mins
+            assertTrue("download not finished", waitForDownload(dlRequest, 10 * 60 * 1000)); // wait up to 10 mins
             ParcelFileDescriptor pfd = mDownloadManager.openDownloadedFile(dlRequest);
             verifyFileSize(pfd, filesize);
         } finally {
@@ -489,11 +489,11 @@
                 Request request = new Request(remoteUri);
                 request.setTitle(filename);
                 dlRequest = mDownloadManager.enqueue(request);
-                assertTrue(dlRequest != -1);
+                assertTrue("request id is -1 from download manager", dlRequest != -1);
                 downloadIds.add(dlRequest);
             }
 
-            assertTrue(waitForMultipleDownloads(downloadIds, 15 * 60 * 2000));  // wait 15 mins max
+            assertTrue("download not finished", waitForMultipleDownloads(downloadIds, 15 * 60 * 2000));  // wait 15 mins max
         } finally {
             removeAllCurrentDownloads();
         }
diff --git a/core/tests/inputmethodtests/run_core_inputmethod_test.sh b/core/tests/inputmethodtests/run_core_inputmethod_test.sh
index ed8b7f7..a11e49b 100755
--- a/core/tests/inputmethodtests/run_core_inputmethod_test.sh
+++ b/core/tests/inputmethodtests/run_core_inputmethod_test.sh
@@ -15,7 +15,7 @@
 
 if [[ $rebuild == true ]]; then
   make -j4 FrameworksCoreInputMethodTests
-  TESTAPP=${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreInputMethodTests.apk
+  TESTAPP=${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreInputMethodTests/FrameworksCoreInputMethodTests.apk
   COMMAND="adb install -r $TESTAPP"
   echo $COMMAND
   $COMMAND
diff --git a/core/tests/inputmethodtests/src/android/os/CursorAnchorInfoTest.java b/core/tests/inputmethodtests/src/android/os/CursorAnchorInfoTest.java
index cc4a7c4..d4244ba 100644
--- a/core/tests/inputmethodtests/src/android/os/CursorAnchorInfoTest.java
+++ b/core/tests/inputmethodtests/src/android/os/CursorAnchorInfoTest.java
@@ -26,14 +26,12 @@
 
 import java.util.Objects;
 
-import static android.view.inputmethod.CursorAnchorInfo.CHARACTER_RECT_TYPE_FULLY_VISIBLE;
-import static android.view.inputmethod.CursorAnchorInfo.CHARACTER_RECT_TYPE_INVISIBLE;
-import static android.view.inputmethod.CursorAnchorInfo.CHARACTER_RECT_TYPE_NOT_FEASIBLE;
-import static android.view.inputmethod.CursorAnchorInfo.CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE;
-import static android.view.inputmethod.CursorAnchorInfo.CHARACTER_RECT_TYPE_UNSPECIFIED;
+import static android.view.inputmethod.CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
+import static android.view.inputmethod.CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
+import static android.view.inputmethod.CursorAnchorInfo.FLAG_IS_RTL;
 
 public class CursorAnchorInfoTest extends InstrumentationTestCase {
-    private static final RectF[] MANY_RECTS = new RectF[] {
+    private static final RectF[] MANY_BOUNDS = new RectF[] {
             new RectF(101.0f, 201.0f, 301.0f, 401.0f),
             new RectF(102.0f, 202.0f, 302.0f, 402.0f),
             new RectF(103.0f, 203.0f, 303.0f, 403.0f),
@@ -55,25 +53,25 @@
             new RectF(119.0f, 219.0f, 319.0f, 419.0f),
     };
     private static final int[] MANY_FLAGS_ARRAY = new int[] {
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_INVISIBLE,
-        CHARACTER_RECT_TYPE_PARTIALLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_NOT_FEASIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_FULLY_VISIBLE,
-        CHARACTER_RECT_TYPE_NOT_FEASIBLE,
-        CHARACTER_RECT_TYPE_NOT_FEASIBLE,
+        FLAG_HAS_INVISIBLE_REGION,
+        FLAG_HAS_INVISIBLE_REGION | FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_INVISIBLE_REGION | FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_INVISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_VISIBLE_REGION | FLAG_IS_RTL,
+        FLAG_HAS_VISIBLE_REGION,
+        FLAG_HAS_INVISIBLE_REGION,
+        FLAG_HAS_INVISIBLE_REGION | FLAG_IS_RTL,
     };
 
     @SmallTest
@@ -82,11 +80,13 @@
         final int SELECTION_END = 40;
         final int COMPOSING_TEXT_START = 32;
         final String COMPOSING_TEXT = "test";
-        final boolean INSERTION_MARKER_CLIPPED = true;
+        final int INSERTION_MARKER_FLAGS =
+                FLAG_HAS_VISIBLE_REGION | FLAG_HAS_INVISIBLE_REGION | FLAG_IS_RTL;
         final float INSERTION_MARKER_HORIZONTAL = 10.5f;
         final float INSERTION_MARKER_TOP = 100.1f;
         final float INSERTION_MARKER_BASELINE = 110.4f;
         final float INSERTION_MARKER_BOTOM = 111.0f;
+
         Matrix TRANSFORM_MATRIX = new Matrix(Matrix.IDENTITY_MATRIX);
         TRANSFORM_MATRIX.setScale(10.0f, 20.0f);
 
@@ -94,13 +94,13 @@
         builder.setSelectionRange(SELECTION_START, SELECTION_END)
                 .setComposingText(COMPOSING_TEXT_START, COMPOSING_TEXT)
                 .setInsertionMarkerLocation(INSERTION_MARKER_HORIZONTAL, INSERTION_MARKER_TOP,
-                        INSERTION_MARKER_BASELINE, INSERTION_MARKER_BOTOM,
-                        INSERTION_MARKER_CLIPPED)
+                        INSERTION_MARKER_BASELINE, INSERTION_MARKER_BOTOM, INSERTION_MARKER_FLAGS)
                 .setMatrix(TRANSFORM_MATRIX);
-        for (int i = 0; i < MANY_RECTS.length; i++) {
-            final RectF rect = MANY_RECTS[i];
+        for (int i = 0; i < MANY_BOUNDS.length; i++) {
+            final RectF bounds = MANY_BOUNDS[i];
             final int flags = MANY_FLAGS_ARRAY[i];
-            builder.addCharacterRect(i, rect.left, rect.top, rect.right, rect.bottom, flags);
+            builder.addCharacterBounds(i, bounds.left, bounds.top, bounds.right, bounds.bottom,
+                    flags);
         }
 
         final CursorAnchorInfo info = builder.build();
@@ -108,26 +108,24 @@
         assertEquals(SELECTION_END, info.getSelectionEnd());
         assertEquals(COMPOSING_TEXT_START, info.getComposingTextStart());
         assertTrue(TextUtils.equals(COMPOSING_TEXT, info.getComposingText()));
-        assertTrue(info.isInsertionMarkerClipped());
+        assertEquals(INSERTION_MARKER_FLAGS, info.getInsertionMarkerFlags());
         assertEquals(INSERTION_MARKER_HORIZONTAL, info.getInsertionMarkerHorizontal());
         assertEquals(INSERTION_MARKER_TOP, info.getInsertionMarkerTop());
         assertEquals(INSERTION_MARKER_BASELINE, info.getInsertionMarkerBaseline());
         assertEquals(INSERTION_MARKER_BOTOM, info.getInsertionMarkerBottom());
         assertEquals(TRANSFORM_MATRIX, info.getMatrix());
-        for (int i = 0; i < MANY_RECTS.length; i++) {
-            final RectF expectedRect = MANY_RECTS[i];
-            assertEquals(expectedRect, info.getCharacterRect(i));
+        for (int i = 0; i < MANY_BOUNDS.length; i++) {
+            final RectF expectedBounds = MANY_BOUNDS[i];
+            assertEquals(expectedBounds, info.getCharacterBounds(i));
         }
-        assertNull(info.getCharacterRect(-1));
-        assertNull(info.getCharacterRect(MANY_RECTS.length + 1));
+        assertNull(info.getCharacterBounds(-1));
+        assertNull(info.getCharacterBounds(MANY_BOUNDS.length + 1));
         for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
             final int expectedFlags = MANY_FLAGS_ARRAY[i];
-            assertEquals(expectedFlags, info.getCharacterRectFlags(i));
+            assertEquals(expectedFlags, info.getCharacterBoundsFlags(i));
         }
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED,
-                info.getCharacterRectFlags(-1));
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED,
-                info.getCharacterRectFlags(MANY_RECTS.length + 1));
+        assertEquals(0, info.getCharacterBoundsFlags(-1));
+        assertEquals(0, info.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));
 
         // Make sure that the builder can reproduce the same object.
         final CursorAnchorInfo info2 = builder.build();
@@ -135,25 +133,24 @@
         assertEquals(SELECTION_END, info2.getSelectionEnd());
         assertEquals(COMPOSING_TEXT_START, info2.getComposingTextStart());
         assertTrue(TextUtils.equals(COMPOSING_TEXT, info2.getComposingText()));
-        assertTrue(info2.isInsertionMarkerClipped());
+        assertEquals(INSERTION_MARKER_FLAGS, info2.getInsertionMarkerFlags());
         assertEquals(INSERTION_MARKER_HORIZONTAL, info2.getInsertionMarkerHorizontal());
         assertEquals(INSERTION_MARKER_TOP, info2.getInsertionMarkerTop());
         assertEquals(INSERTION_MARKER_BASELINE, info2.getInsertionMarkerBaseline());
         assertEquals(INSERTION_MARKER_BOTOM, info2.getInsertionMarkerBottom());
         assertEquals(TRANSFORM_MATRIX, info2.getMatrix());
-        for (int i = 0; i < MANY_RECTS.length; i++) {
-            final RectF expectedRect = MANY_RECTS[i];
-            assertEquals(expectedRect, info2.getCharacterRect(i));
+        for (int i = 0; i < MANY_BOUNDS.length; i++) {
+            final RectF expectedBounds = MANY_BOUNDS[i];
+            assertEquals(expectedBounds, info2.getCharacterBounds(i));
         }
-        assertNull(info2.getCharacterRect(-1));
-        assertNull(info2.getCharacterRect(MANY_RECTS.length + 1));
+        assertNull(info2.getCharacterBounds(-1));
+        assertNull(info2.getCharacterBounds(MANY_BOUNDS.length + 1));
         for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
             final int expectedFlags = MANY_FLAGS_ARRAY[i];
-            assertEquals(expectedFlags, info2.getCharacterRectFlags(i));
+            assertEquals(expectedFlags, info2.getCharacterBoundsFlags(i));
         }
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED, info2.getCharacterRectFlags(-1));
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED,
-                info2.getCharacterRectFlags(MANY_RECTS.length + 1));
+        assertEquals(0, info2.getCharacterBoundsFlags(-1));
+        assertEquals(0, info2.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));
         assertEquals(info, info2);
         assertEquals(info.hashCode(), info2.hashCode());
 
@@ -163,25 +160,24 @@
         assertEquals(SELECTION_END, info3.getSelectionEnd());
         assertEquals(COMPOSING_TEXT_START, info3.getComposingTextStart());
         assertTrue(TextUtils.equals(COMPOSING_TEXT, info3.getComposingText()));
-        assertTrue(info3.isInsertionMarkerClipped());
+        assertEquals(INSERTION_MARKER_FLAGS, info3.getInsertionMarkerFlags());
         assertEquals(INSERTION_MARKER_HORIZONTAL, info3.getInsertionMarkerHorizontal());
         assertEquals(INSERTION_MARKER_TOP, info3.getInsertionMarkerTop());
         assertEquals(INSERTION_MARKER_BASELINE, info3.getInsertionMarkerBaseline());
         assertEquals(INSERTION_MARKER_BOTOM, info3.getInsertionMarkerBottom());
         assertEquals(TRANSFORM_MATRIX, info3.getMatrix());
-        for (int i = 0; i < MANY_RECTS.length; i++) {
-            final RectF expectedRect = MANY_RECTS[i];
-            assertEquals(expectedRect, info3.getCharacterRect(i));
+        for (int i = 0; i < MANY_BOUNDS.length; i++) {
+            final RectF expectedBounds = MANY_BOUNDS[i];
+            assertEquals(expectedBounds, info3.getCharacterBounds(i));
         }
-        assertNull(info3.getCharacterRect(-1));
-        assertNull(info3.getCharacterRect(MANY_RECTS.length + 1));
+        assertNull(info3.getCharacterBounds(-1));
+        assertNull(info3.getCharacterBounds(MANY_BOUNDS.length + 1));
         for (int i = 0; i < MANY_FLAGS_ARRAY.length; i++) {
             final int expectedFlags = MANY_FLAGS_ARRAY[i];
-            assertEquals(expectedFlags, info3.getCharacterRectFlags(i));
+            assertEquals(expectedFlags, info3.getCharacterBoundsFlags(i));
         }
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED, info3.getCharacterRectFlags(-1));
-        assertEquals(CHARACTER_RECT_TYPE_UNSPECIFIED,
-                info3.getCharacterRectFlags(MANY_RECTS.length + 1));
+        assertEquals(0, info3.getCharacterBoundsFlags(-1));
+        assertEquals(0, info3.getCharacterBoundsFlags(MANY_BOUNDS.length + 1));
         assertEquals(info.hashCode(), info3.hashCode());
 
         builder.reset();
@@ -190,7 +186,7 @@
         assertEquals(-1, uninitializedInfo.getSelectionEnd());
         assertEquals(-1, uninitializedInfo.getComposingTextStart());
         assertNull(uninitializedInfo.getComposingText());
-        assertFalse(uninitializedInfo.isInsertionMarkerClipped());
+        assertEquals(0, uninitializedInfo.getInsertionMarkerFlags());
         assertEquals(Float.NaN, uninitializedInfo.getInsertionMarkerHorizontal());
         assertEquals(Float.NaN, uninitializedInfo.getInsertionMarkerTop());
         assertEquals(Float.NaN, uninitializedInfo.getInsertionMarkerBaseline());
@@ -218,7 +214,7 @@
         final int SELECTION_END1 = 7;
         final String COMPOSING_TEXT1 = "0123456789";
         final int COMPOSING_TEXT_START1 = 0;
-        final boolean INSERTION_MARKER_CLIPPED1 = true;
+        final int INSERTION_MARKER_FLAGS1 = FLAG_HAS_VISIBLE_REGION;
         final float INSERTION_MARKER_HORIZONTAL1 = 10.5f;
         final float INSERTION_MARKER_TOP1 = 100.1f;
         final float INSERTION_MARKER_BASELINE1 = 110.4f;
@@ -227,7 +223,8 @@
         final int SELECTION_END2 = 8;
         final String COMPOSING_TEXT2 = "9876543210";
         final int COMPOSING_TEXT_START2 = 3;
-        final boolean INSERTION_MARKER_CLIPPED2 = false;
+        final int INSERTION_MARKER_FLAGS2 =
+                FLAG_HAS_VISIBLE_REGION | FLAG_HAS_INVISIBLE_REGION | FLAG_IS_RTL;
         final float INSERTION_MARKER_HORIZONTAL2 = 14.5f;
         final float INSERTION_MARKER_TOP2 = 200.1f;
         final float INSERTION_MARKER_BASELINE2 = 210.4f;
@@ -265,10 +262,10 @@
         assertEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         Float.NaN, Float.NaN, Float.NaN, Float.NaN,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         Float.NaN, Float.NaN, Float.NaN, Float.NaN,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
 
         // Check Matrix.
         assertEquals(
@@ -290,74 +287,74 @@
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         Float.NaN, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL2, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP2,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE2, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL2, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM2,
-                        INSERTION_MARKER_CLIPPED1).build());
+                        INSERTION_MARKER_FLAGS1).build());
         assertNotEquals(
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED1).build(),
+                        INSERTION_MARKER_FLAGS1).build(),
                 new Builder().setMatrix(MATRIX1).setInsertionMarkerLocation(
                         INSERTION_MARKER_HORIZONTAL1, INSERTION_MARKER_TOP1,
                         INSERTION_MARKER_BASELINE1, INSERTION_MARKER_BOTOM1,
-                        INSERTION_MARKER_CLIPPED2).build());
+                        INSERTION_MARKER_FLAGS2).build());
     }
 
     @SmallTest
@@ -394,7 +391,7 @@
         final int SELECTION_END = 40;
         final int COMPOSING_TEXT_START = 32;
         final String COMPOSING_TEXT = "test";
-        final boolean INSERTION_MARKER_CLIPPED = true;
+        final int INSERTION_MARKER_FLAGS = FLAG_HAS_VISIBLE_REGION;
         final float INSERTION_MARKER_HORIZONTAL = 10.5f;
         final float INSERTION_MARKER_TOP = 100.1f;
         final float INSERTION_MARKER_BASELINE = 110.4f;
@@ -416,7 +413,7 @@
             }
 
             builder.setInsertionMarkerLocation(INSERTION_MARKER_HORIZONTAL, INSERTION_MARKER_TOP,
-                    INSERTION_MARKER_BASELINE, INSERTION_MARKER_BOTOM, INSERTION_MARKER_CLIPPED);
+                    INSERTION_MARKER_BASELINE, INSERTION_MARKER_BOTOM, INSERTION_MARKER_FLAGS);
             try {
                 // Coordinate transformation matrix is required if no positional information is
                 // specified.
@@ -438,19 +435,10 @@
     }
 
     @SmallTest
-    public void testBuilderAddCharacterRect() throws Exception {
+    public void testBuilderAddCharacterBounds() throws Exception {
         // A negative index should be rejected.
         try {
-            new Builder().addCharacterRect(-1, 0.0f, 0.0f, 0.0f, 0.0f,
-                    CHARACTER_RECT_TYPE_FULLY_VISIBLE);
-            assertTrue(false);
-        } catch (IllegalArgumentException ex) {
-        }
-
-        // CHARACTER_RECT_TYPE_UNSPECIFIED is not allowed.
-        try {
-            new Builder().addCharacterRect(0, 0.0f, 0.0f, 0.0f, 0.0f,
-                    CHARACTER_RECT_TYPE_UNSPECIFIED);
+            new Builder().addCharacterBounds(-1, 0.0f, 0.0f, 0.0f, 0.0f, FLAG_HAS_VISIBLE_REGION);
             assertTrue(false);
         } catch (IllegalArgumentException ex) {
         }
diff --git a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
index fa1bd8f..5958c3a 100644
--- a/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
+++ b/core/tests/inputmethodtests/src/android/os/InputMethodTest.java
@@ -26,6 +26,7 @@
 import android.test.suitebuilder.annotation.SmallTest;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype;
+import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -159,8 +160,15 @@
 
     private static InputMethodSubtype createDummyInputMethodSubtype(String locale, String mode,
             boolean isAuxiliary, boolean overridesImplicitlyEnabledSubtype) {
-        return new InputMethodSubtype(0, 0, locale, mode, "", isAuxiliary,
-                overridesImplicitlyEnabledSubtype);
+        return new InputMethodSubtypeBuilder()
+                .setSubtypeNameResId(0)
+                .setSubtypeIconResId(0)
+                .setSubtypeLocale(locale)
+                .setSubtypeMode(mode)
+                .setSubtypeExtraValue("")
+                .setIsAuxiliary(isAuxiliary)
+                .setOverridesImplicitlyEnabledSubtype(overridesImplicitlyEnabledSubtype)
+                .build();
     }
 
     private static InputMethodInfo createDefaultAutoDummyVoiceIme() {
diff --git a/data/keyboards/Generic.kl b/data/keyboards/Generic.kl
index cfc1484..f10ba96 100644
--- a/data/keyboards/Generic.kl
+++ b/data/keyboards/Generic.kl
@@ -405,6 +405,7 @@
 # key 504 KEY_BRL_DOT8
 
 key 580   APP_SWITCH
+key 582   VOICE_ASSIST
 
 # Keys defined by HID usages
 key usage 0x0c006F BRIGHTNESS_UP
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index 1e5fc4d..808f04a 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -64,7 +64,7 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on September 9, 2014.
 <br/>Any versions with less than 0.1% distribution are not shown.</em>
 </p>
 
@@ -95,7 +95,8 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on September 9, 2014.
+
 <br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p>
 
 
@@ -114,7 +115,7 @@
 
 
 <img alt="" style="float:right"
-src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A0.1%2C80.2%2C19.7&chf=bg%2Cs%2C00000000&chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
+src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A77.5%2C22.5&chf=bg%2Cs%2C00000000&chl=GL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
 
 <p>To declare which version of OpenGL ES your application requires, you should use the {@code
 android:glEsVersion} attribute of the <a
@@ -131,22 +132,18 @@
 <th scope="col">Distribution</th>
 </tr>
 <tr>
-<td>1.1 only</th>
-<td>0.1%</td>
+<td>2.0</td>
+<td>77.5%</td>
 </tr>
 <tr>
-<td>2.0</th>
-<td>80.2%</td>
-</tr>
-<tr>
-<td>3.0</th>
-<td>19.7%</td>
+<td>3.0</td>
+<td>22.5%</td>
 </tr>
 </table>
 
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on August 12, 2014</em></p>
+<p style="clear:both"><em>Data collected during a 7-day period ending on September 9, 2014</em></p>
 
 
 
@@ -164,7 +161,7 @@
 var VERSION_DATA =
 [
   {
-    "chart": "//chart.googleapis.com/chart?cht=p&chs=500x250&chl=Froyo%7CGingerbread%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chd=t%3A0.7%2C13.6%2C10.6%2C54.2%2C20.9&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c",
+    "chart": "//chart.googleapis.com/chart?chco=c4df9b%2C6fad0c&cht=p&chs=500x250&chl=Froyo%7CGingerbread%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chd=t%3A0.7%2C11.4%2C9.6%2C53.8%2C24.5&chf=bg%2Cs%2C00000000",
     "data": [
       {
         "api": 8,
@@ -174,41 +171,38 @@
       {
         "api": 10,
         "name": "Gingerbread",
-        "perc": "13.6"
+        "perc": "11.4"
       },
       {
         "api": 15,
         "name": "Ice Cream Sandwich",
-        "perc": "10.6"
+        "perc": "9.6"
       },
       {
         "api": 16,
         "name": "Jelly Bean",
-        "perc": "26.5"
+        "perc": "25.1"
       },
       {
         "api": 17,
         "name": "Jelly Bean",
-        "perc": "19.8"
+        "perc": "20.7"
       },
       {
         "api": 18,
         "name": "Jelly Bean",
-        "perc": "7.9"
+        "perc": "8.0"
       },
       {
         "api": 19,
         "name": "KitKat",
-        "perc": "20.9"
+        "perc": "24.5"
       }
     ]
   }
 ];
 
 
-
-
-
 var SCREEN_DATA =
 [
   {
@@ -216,27 +210,27 @@
       "Large": {
         "hdpi": "0.6",
         "ldpi": "0.5",
-        "mdpi": "4.2",
-        "tvdpi": "1.6",
-        "xhdpi": "0.5"
+        "mdpi": "4.3",
+        "tvdpi": "1.7",
+        "xhdpi": "0.6"
       },
       "Normal": {
-        "hdpi": "35.5",
-        "mdpi": "11.8",
-        "xhdpi": "18.4",
-        "xxhdpi": "15.2"
+        "hdpi": "35.7",
+        "mdpi": "10.6",
+        "xhdpi": "19.2",
+        "xxhdpi": "16.2"
       },
       "Small": {
-        "ldpi": "7.4"
+        "ldpi": "6.2"
       },
       "Xlarge": {
         "hdpi": "0.3",
-        "mdpi": "3.6",
+        "mdpi": "3.7",
         "xhdpi": "0.4"
       }
     },
-    "densitychart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chd=t%3A7.9%2C19.6%2C1.6%2C36.4%2C19.3%2C15.2&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c",
-    "layoutchart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chl=Xlarge%7CLarge%7CNormal%7CSmall&chd=t%3A4.3%2C7.4%2C80.9%2C7.4&chf=bg%2Cs%2C00000000&chco=c4df9b%2C6fad0c"
+    "densitychart": "//chart.googleapis.com/chart?chco=c4df9b%2C6fad0c&cht=p&chs=400x250&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chd=t%3A6.7%2C18.6%2C1.7%2C36.6%2C20.2%2C16.2&chf=bg%2Cs%2C00000000",
+    "layoutchart": "//chart.googleapis.com/chart?chco=c4df9b%2C6fad0c&cht=p&chs=400x250&chl=Xlarge%7CLarge%7CNormal%7CSmall&chd=t%3A4.4%2C7.7%2C81.7%2C6.2&chf=bg%2Cs%2C00000000"
   }
 ];
 
diff --git a/docs/html/design/style/iconography.jd b/docs/html/design/style/iconography.jd
index d8d8c76..e5161f4 100644
--- a/docs/html/design/style/iconography.jd
+++ b/docs/html/design/style/iconography.jd
@@ -29,7 +29,7 @@
 scaling ratio</strong> between the five primary densities (medium, high, x-high, xx-high, and
 xxx-high respectively). For example, consider that the size for a launcher icon is specified to be
 48x48 dp. This means the baseline (MDPI) asset is 48x48 px, and the
-high density (HDPI) asset should be 1.5x the baseline at 72x72 px, and the x-high
+high-density(HDPI) asset should be 1.5x the baseline at 72x72 px, and the x-high
 density (XHDPI) asset should be 2x the baseline at 96x96 px, and so on.</p>
 
 <p class="note"><strong>Note:</strong> Android also supports low-density (LDPI) screens,
@@ -489,11 +489,12 @@
     xhdpi/...
         _pre_production/...
             <em>working_file</em>.psd
-        <em>finished_asset</em>.png</pre>
+        <em>finished_asset</em>.png
     xxhdpi/...
         _pre_production/...
             <em>working_file</em>.psd
-        <em>finished_asset</em>.png</pre>
+        <em>finished_asset</em>.png
+</pre>
 
 <p>Because the structure in your working space is similar to that of the application, you
 can quickly determine which assets should be copied to each
@@ -513,6 +514,8 @@
         <em>finished_asset</em>.png
     drawable-xhdpi/...
         <em>finished_asset</em>.png
+    drawable-xxhdpi/...
+        <em>finished_asset</em>.png
 </pre>
 
 <p>For more information about how to save resources in the application project,
@@ -520,6 +523,21 @@
 </p>
 
 
+<h3 id="xxxhdpi-launcher">Provide an xxx-high-density launcher icon</h3>
+
+<p>Some devices scale-up the launcher icon by as much as 25%. For example, if your highest density 
+launcher icon image is already extra-extra-high density, the scaling process will make it appear
+less crisp. So you should provide a higher density launcher icon in the <code>drawable-xxxhdpi
+</code> directory, which the system uses instead of scaling up a smaller version of the icon.</p>
+
+<p class="note"><strong>Note:</strong> the <code>drawable-xxxhdpi</code> qualifier is necessary only
+to provide a launcher icon that can appear larger than usual on an xxhdpi device. You do not need to
+provide xxxhdpi assets for all your app's images.</p>
+
+<p>See <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a> for
+more information.</p>
+
+
 <h3>Remove unnecessary metadata from final assets</h3>
 
 <p>Although the Android SDK tools will automatically compress PNGs when packaging
diff --git a/docs/html/google/play/billing/api.jd b/docs/html/google/play/billing/api.jd
index 3d46715..bc710f9 100644
--- a/docs/html/google/play/billing/api.jd
+++ b/docs/html/google/play/billing/api.jd
@@ -1,6 +1,7 @@
-page.title=In-app Billing Version 3
+page.title=In-app Billing API
 parent.title=In-app Billing
 parent.link=index.html
+page.tags="billing, inapp, iap"
 @jd:body
 
 <div id="qv-wrapper">
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index dba43cd..052cf75 100644
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -1,6 +1,7 @@
-page.title=Implementing In-app Billing <span style="font-size:16px;">(IAB Version 3)</span>
+page.title=Implementing In-app Billing
 parent.title=In-app Billing
 parent.link=index.html
+page.tags="inapp, billing, iap"
 @jd:body
 
 <div id="qv-wrapper">
@@ -141,15 +142,17 @@
 };
 </pre>
 
-<p>In your activity’s {@link android.app.Activity#onCreate onCreate} method, perform the binding by calling the {@link android.content.Context#bindService bindService} method. Pass the method an {@link android.content.Intent} that references the In-app Billing service and an instance of the {@link android.content.ServiceConnection} that you created.</p>
-<pre>
-&#64;Override
-public void onCreate(Bundle savedInstanceState) {    
-    super.onCreate(savedInstanceState);
-    setContentView(R.layout.activity_main);        
-    bindService(new 
-        Intent("com.android.vending.billing.InAppBillingService.BIND"),
-                mServiceConn, Context.BIND_AUTO_CREATE);
+<p>In your activity’s {@link android.app.Activity#onCreate onCreate} method, perform the binding by calling the {@link android.content.Context#bindService bindService} method. Pass the method an {@link android.content.Intent} that references the In-app Billing service and an instance of the {@link android.content.ServiceConnection} that you created, and explicitly set the Intent's target package name to <code>com.android.vending</code> &mdash; the package name of Google Play app.</p>
+
+<p class="caution"><strong>Caution:</strong> To protect the security of billing transactions, always make sure to explicitly set the intent's target package name to <code>com.android.vending</code>, using {@link android.content.Intent#setPackage(java.lang.String) setPackage()} as shown in the example below. Setting the package name explicitly ensures that <em>only</em> the Google Play app can handle billing requests from your app, preventing other apps from intercepting those requests.</p>
+
+<pre>&#64;Override
+public void onCreate(Bundle savedInstanceState) {
+  super.onCreate(savedInstanceState);
+  setContentView(R.layout.activity_main);
+  Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
+  serviceIntent.setPackage("com.android.vending");
+  bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
 </pre>
 <p>You can now use the mService reference to communicate with the Google Play service.</p>
 <p class="note"><strong>Important:</strong> Remember to unbind from the In-app Billing service when you are done with your {@link android.app.Activity}. If you don’t unbind, the open service connection could cause your device’s performance to degrade. This example shows how to perform the unbind operation on a service connection to In-app Billing called {@code mServiceConn} by overriding the activity’s {@link android.app.Activity#onDestroy onDestroy} method.</p>
@@ -269,7 +272,7 @@
    }
 }
 </pre>
-<p class="note"><strong>Security Recommendation:</strong> When you send a purchase request, create a String token that uniquely identifies this purchase request and include this token in the {@code developerPayload}.You can use a randomly generated string as the token. When you receive the purchase response from Google Play, make sure to check the returned data signature, the {@code orderId}, and the {@code developerPayload} String. For added security, you should perform the checking on your own secure server. Make sure to verify that the {@code orderId} is a unique value that you have not previously processed, and the {@code developerPayload} String matches the token that you sent previously with the purchase request.</p>
+<p class="note"><strong>Security Recommendation:</strong>  When you send a purchase request, create a String token that uniquely identifies this purchase request and include this token in the {@code developerPayload}.You can use a randomly generated string as the token. When you receive the purchase response from Google Play, make sure to check the returned data signature, the {@code orderId}, and the {@code developerPayload} String. For added security, you should perform the checking on your own secure server. Make sure to verify that the {@code orderId} is a unique value that you have not previously processed, and the {@code developerPayload} String matches the token that you sent previously with the purchase request.</p>
 
 <h3 id="QueryPurchases">Querying for Purchased Items</h3>
 <p>To retrieve information about purchases made by a user from your app, call the {@code getPurchases} method on the In-app Billing Version 3 service. Pass in to the method the In-app Billing API version (“3”), the package name of your calling app, and the purchase type (“inapp” or "subs").</p>
diff --git a/docs/html/google/play/billing/billing_reference.jd b/docs/html/google/play/billing/billing_reference.jd
index 4f5e65c..4d80964 100644
--- a/docs/html/google/play/billing/billing_reference.jd
+++ b/docs/html/google/play/billing/billing_reference.jd
@@ -1,4 +1,4 @@
-page.title=In-app Billing Reference <span style="font-size:16px;">(IAB Version 3)</span>
+page.title=In-app Billing Reference
 parent.title=In-app Billing
 parent.link=index.html
 @jd:body
diff --git a/docs/html/google/play/billing/billing_subscriptions.jd b/docs/html/google/play/billing/billing_subscriptions.jd
index 3c72da1..2b78ab3 100644
--- a/docs/html/google/play/billing/billing_subscriptions.jd
+++ b/docs/html/google/play/billing/billing_subscriptions.jd
@@ -1,9 +1,9 @@
-page.title=Google Play In-App Subscriptions
+page.title=In-App Subscriptions
 parent.title=In-app Billing
 parent.link=index.html
 page.metaDescription=Subscriptions let you sell content or features in your app with automated, recurring billing.
 page.image=/images/play_dev.jpg
-page.tags="inapp, iap, billing"
+page.tags="subscriptions, billing, inapp, iap"
 meta.tags="monetization, inappbilling, subscriptions"
 @jd:body
 
diff --git a/docs/html/google/play/billing/billing_testing.jd b/docs/html/google/play/billing/billing_testing.jd
index 8a49433..10f5326 100644
--- a/docs/html/google/play/billing/billing_testing.jd
+++ b/docs/html/google/play/billing/billing_testing.jd
@@ -1,6 +1,7 @@
 page.title=Testing In-app Billing
 parent.title=In-app Billing
 parent.link=index.html
+page.tags="inapp, billing, iap"
 @jd:body
 
 <div id="qv-wrapper">
diff --git a/docs/html/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd
index 18b1523..875271fe 100644
--- a/docs/html/google/play/billing/index.jd
+++ b/docs/html/google/play/billing/index.jd
@@ -2,7 +2,7 @@
 page.metaDescription=In-app Billing lets you sell digital content as one-time purchases or subscriptions.
 page.image=/images/play_dev.jpg
 meta.tags="monetizing, inappbilling, subscriptions"
-page.tags="inapp, iap, subscriptions"
+page.tags="billing, inapp, iap"
 @jd:body
 
 <p>In-app Billing is a Google Play service that lets you sell digital content from inside
diff --git a/docs/html/google/play/billing/versions.jd b/docs/html/google/play/billing/versions.jd
index 1271a15..dbe3ea3 100644
--- a/docs/html/google/play/billing/versions.jd
+++ b/docs/html/google/play/billing/versions.jd
@@ -1,3 +1,4 @@
+excludeFromSuggestions=true
 page.title=In-app Billing Version Notes
 @jd:body
 
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index dbe6c1a..7ebda53 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -111,15 +111,15 @@
   <dd>Actual physical size, measured as the screen's diagonal.
 
   <p>For simplicity, Android groups all actual screen sizes into four generalized sizes: small,
-normal, large, and extra large.</p></dd>
+normal, large, and extra-large.</p></dd>
 
 <dt><em>Screen density</em></dt>
   <dd>The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots
 per inch). For example, a "low" density screen has fewer pixels within a given physical area,
 compared to a "normal" or "high" density screen.</p>
 
-  <p>For simplicity, Android groups all actual screen densities into four generalized densities:
-low, medium, high, and extra high.</p></dd>
+  <p>For simplicity, Android groups all actual screen densities into six generalized densities:
+low, medium, high, extra-high, extra-extra-high, and extra-extra-extra-high.</p></dd>
 
 <dt><em>Orientation</em></dt>
   <dd>The orientation of the screen from the user's point of view. This is either landscape or
@@ -168,9 +168,15 @@
 href="#DeclaringTabletLayouts">Declaring Tablet Layouts for Android 3.2</a> for more
 information.</p>
 </li>
-<li>A set of four generalized <strong>densities</strong>: <em>ldpi</em> (low), <em>mdpi</em>
-(medium),
-<em>hdpi</em> (high), and <em>xhdpi</em> (extra high)
+<li>A set of six generalized <strong>densities</strong>:
+  <ul>
+    <li><em>ldpi</em> (low) ~120dpi</li>
+    <li><em>mdpi</em> (medium) ~160dpi</li>
+    <li><em>hdpi</em> (high) ~240dpi</li>
+    <li><em>xhdpi</em> (extra-high) ~320dpi</li>
+    <li><em>xxhdpi</em> (extra-extra-high) ~480dpi</li>
+    <li><em>xxxhdpi</em> (extra-extra-extra-high) ~640dpi</li>
+  </ul>
 </li>
 </ul>
 
@@ -243,14 +249,14 @@
 densities.</p>
 
 <p>Maintaining density independence is important because, without it, a UI element (such as a
-button) appears physically larger on a low density screen and smaller on a high density screen. Such
+button) appears physically larger on a low-density screen and smaller on a high-density screen. Such
 density-related size changes can cause problems in your application layout and usability. Figures 2
 and 3 show the difference between an application when it does not provide density independence and
 when it does, respectively.</p>
 
 <img src="{@docRoot}images/screens_support/density-test-bad.png" alt=""  />
 <p class="img-caption"><strong>Figure 2.</strong> Example application without support for
-different densities, as shown on low, medium, and high density screens.</p>
+different densities, as shown on low, medium, and high-density screens.</p>
 
 <img src="{@docRoot}images/screens_support/density-test-good.png" alt="" />
 <p class="img-caption"><strong>Figure 3.</strong> Example application with good support for
@@ -266,8 +272,8 @@
 </ul>
 
 <p>In figure 2, the text view and bitmap drawable have dimensions specified in pixels ({@code px}
-units), so the views are physically larger on a low density screen and smaller on a high density
-screen. This is because although the actual screen sizes may be the same, the high density screen
+units), so the views are physically larger on a low-density screen and smaller on a high-density
+screen. This is because although the actual screen sizes may be the same, the high-density screen
 has more pixels per inch (the same amount of pixels fit in a smaller area). In figure 3, the layout
 dimensions are specified in density-independent pixels ({@code dp} units). Because the baseline for
 density-independent pixels is a medium-density screen, the device with a medium-density screen looks
@@ -311,7 +317,7 @@
 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code
 &lt;supports-screens&gt;}</a> element in your manifest file.</p>
   </li>
-  
+
   <li><strong>Provide different layouts for different screen sizes</strong>
     <p>By default, Android resizes your application layout to fit the current device screen. In most
 cases, this works fine. In other cases, your UI might not look as good and might need adjustments
@@ -320,7 +326,7 @@
 you might need to adjust sizes so that everything can fit on the screen.</p>
     <p>The configuration qualifiers you can use to provide size-specific resources are
 <code>small</code>, <code>normal</code>, <code>large</code>, and <code>xlarge</code>. For
-example, layouts for an extra large screen should go in {@code layout-xlarge/}.</p>
+example, layouts for an extra-large screen should go in {@code layout-xlarge/}.</p>
     <p>Beginning with Android 3.2 (API level 13), the above size groups are deprecated and you
 should instead use the {@code sw&lt;N&gt;dp} configuration qualifier to define the smallest
 available width required by your layout resources. For example, if your multi-pane tablet layout
@@ -328,7 +334,7 @@
 new techniques for declaring layout resources is discussed further in the section about <a
 href="#DeclaringTabletLayouts">Declaring Tablet Layouts for Android 3.2</a>.</p>
   </li>
-  
+
   <li><strong>Provide different bitmap drawables for different screen densities</strong>
     <p>By default, Android scales your bitmap drawables ({@code .png}, {@code .jpg}, and {@code
 .gif} files) and Nine-Patch drawables ({@code .9.png} files) so that they render at the appropriate
@@ -337,10 +343,22 @@
 screen, and scales them down when on a low-density screen. This scaling can cause artifacts in the
 bitmaps. To ensure your bitmaps look their best, you should include alternative versions at
 different resolutions for different screen densities.</p>
-    <p>The configuration qualifiers you can use for density-specific resources are
-<code>ldpi</code> (low), <code>mdpi</code> (medium), <code>hdpi</code> (high), and
-<code>xhdpi</code> (extra high). For example, bitmaps for high-density screens should go in
-{@code drawable-hdpi/}.</p>
+    <p>The <a href="#qualifiers">configuration qualifiers</a> (described in detail below) that you
+can use for density-specific resources are <code>ldpi</code> (low), <code>mdpi</code> (medium),
+<code>hdpi</code> (high), <code>xhdpi</code> extra-high), <code>xxhdpi</code>
+(extra-extra-high), and <code>xxxhdpi</code> (extra-extra-extra-high). For example, bitmaps
+for high-density screens should go in {@code drawable-hdpi/}.</p>
+    <p class="note" id="xxxhdpi-note"><strong>Note:</strong>  the <code>drawable-xxxhdpi</code>
+qualifier is necessary only to provide a launcher icon that can appear larger than usual on an
+xxhdpi device. You do not need to provide xxxhdpi assets for all your app's images.</p>
+    <p>Some devices scale-up the launcher icon by as much as 25%. For example, if your highest
+density launcher icon image is already extra-extra-high-density, the scaling process will make it
+appear less crisp. So you should provide a higher density launcher icon in the
+<code>drawable-xxxhdpi</code> directory, which the system uses instead of scaling up a smaller
+version of the icon.</p>
+    <p>See <a href="{@docRoot}design/style/iconography.html#xxxhdpi-launcher">Provide an
+xxx-high-density launcher icon</a> for more information. You should not use the
+<code>xxxhdpi</code> qualifier for UI elements other than the launcher icon.</p>
   </li>
 </ul>
 
@@ -371,14 +389,14 @@
   <p>The "default" resources are those that are not tagged with a configuration qualifier. For
 example, the resources in {@code drawable/} are the default drawable resources. The system
 assumes that default resources are designed for the baseline screen size and density, which is a
-normal screen size and a medium density. As such, the system scales default density
+normal screen size and a medium-density. As such, the system scales default density
 resources up for high-density screens and down for low-density screens, as appropriate.</p>
   <p>However, when the system is looking for a density-specific resource and does not find it in
 the density-specific directory, it won't always use the default resources. The system may
 instead use one of the other density-specific resources in order to provide better results
 when scaling. For example, when looking for a low-density resource and it is not available, the
 system prefers to scale-down the high-density version of the resource, because the
-system can easily scale a high-density resource down to low-density by a factor of 0.5, with 
+system can easily scale a high-density resource down to low-density by a factor of 0.5, with
 fewer artifacts, compared to scaling a medium-density resource by a factor of 0.75.</p>
 </li>
 </ol>
@@ -416,9 +434,9 @@
 files must be named exactly the same as the default resource files.</li>
 </ol>
 
-<p>For example, {@code xlarge} is a configuration qualifier for extra large screens. When you append
+<p>For example, {@code xlarge} is a configuration qualifier for extra-large screens. When you append
 this string to a resource directory name (such as {@code layout-xlarge}), it indicates to the
-system that these resources are to be used on devices that have an extra large screen.</p>
+system that these resources are to be used on devices that have an extra-large screen.</p>
 
 <p class="table-caption"><strong>Table 1.</strong> Configuration qualifiers that allow you to
 provide special resources for different screen configurations.</p>
@@ -445,11 +463,11 @@
 </tr>
 <tr>
 <td><code>xlarge</code></td>
-<td>Resources for <em>extra large</em> size screens.</td>
+<td>Resources for <em>extra-large</em> size screens.</td>
 </tr>
 
 <tr>
-<td rowspan="6">Density</td>
+<td rowspan="8">Density</td>
 <td><code>ldpi</code></td>
 <td>Resources for low-density (<em>ldpi</em>) screens (~120dpi).</td>
 </tr>
@@ -464,7 +482,14 @@
 </tr>
 <tr>
 <td><code>xhdpi</code></td>
-<td>Resources for extra high-density (<em>xhdpi</em>) screens (~320dpi).</td>
+<td>Resources for extra-high-density (<em>xhdpi</em>) screens (~320dpi).</td>
+</tr>
+<td><code>xxhdpi</code></td>
+<td>Resources for extra-extra-high-density (<em>xxhdpi</em>) screens (~480dpi).</td>
+</tr>
+<td><code>xxxhdpi</code></td>
+<td>Resources for extra-extra-extra-high-density (<em>xxxhdpi</em>) uses (~640dpi). Use this for the
+  launcher icon only, see <a href="#xxxhdpi-note">note</a> above.</td>
 </tr>
 <tr>
 <td><code>nodpi</code></td>
@@ -515,18 +540,18 @@
 
 <p>For example, the following is a list of resource directories in an application that
 provides different layout designs for different screen sizes and different bitmap drawables
-for medium, high, and extra high density screens.</p>
+for medium, high, and extra-high-density screens.</p>
 
 <pre class="classic">
-res/layout/my_layout.xml             // layout for normal screen size ("default")
-res/layout-small/my_layout.xml       // layout for small screen size
-res/layout-large/my_layout.xml       // layout for large screen size
-res/layout-xlarge/my_layout.xml      // layout for extra large screen size
-res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation
+res/layout/my_layout.xml              // layout for normal screen size ("default")
+res/layout-large/my_layout.xml        // layout for large screen size
+res/layout-xlarge/my_layout.xml       // layout for extra-large screen size
+res/layout-xlarge-land/my_layout.xml  // layout for extra-large in landscape orientation
 
-res/drawable-mdpi/my_icon.png        // bitmap for medium density
-res/drawable-hdpi/my_icon.png        // bitmap for high density
-res/drawable-xhdpi/my_icon.png       // bitmap for extra high density
+res/drawable-mdpi/my_icon.png         // bitmap for medium-density
+res/drawable-hdpi/my_icon.png         // bitmap for high-density
+res/drawable-xhdpi/my_icon.png        // bitmap for extra-high-density
+res/drawable-xxhdpi/my_icon.png       // bitmap for extra-extra-high-density
 </pre>
 
 <p>For more information about how to use alternative resources and a complete list of
@@ -575,10 +600,10 @@
 screen. For example, a row of buttons might not fit within the width of the screen on a small screen
 device. In this case you should provide an alternative layout for small screens that adjusts the
 size or position of the buttons.</li>
-  <li>When testing on an extra large screen, you might realize that your layout doesn't make
+  <li>When testing on an extra-large screen, you might realize that your layout doesn't make
 efficient use of the big screen and is obviously stretched to fill it.
-In this case, you should provide an alternative layout for extra large screens that provides a
-redesigned UI that is optimized for bigger screens such as tablets. 
+In this case, you should provide an alternative layout for extra-large screens that provides a
+redesigned UI that is optimized for bigger screens such as tablets.
     <p>Although your application should work fine without an alternative layout on big screens, it's
 quite important to users that your application looks as though it's designed specifically for their
 devices. If the UI is obviously stretched, users are more likely to be unsatisfied with the
@@ -598,7 +623,7 @@
 <p>If your UI uses bitmaps that need to fit the size of a view even after the system scales
 the layout (such as the background image for a button), you should use <a
 href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">Nine-Patch</a> bitmap files. A
-Nine-Patch file is basically a PNG file in which you specific two-dimensional regions that are
+Nine-Patch file is basically a PNG file in which you specify two-dimensional regions that are
 stretchable. When the system needs to scale the view in which the bitmap is used, the system
 stretches the Nine-Patch bitmap, but stretches only the specified regions. As such, you don't
 need to provide different drawables for different screen sizes, because the Nine-Patch bitmap can
@@ -621,21 +646,24 @@
 each one, for different densities.</p>
 
 <p class="note"><strong>Note:</strong> You only need to provide density-specific drawables for
-bitmap files ({@code .png}, {@code .jpg}, or {@code .gif}) and Nine-Path files ({@code
+bitmap files ({@code .png}, {@code .jpg}, or {@code .gif}) and Nine-Patch files ({@code
 .9.png}). If you use XML files to define shapes, colors, or other <a
 href="{@docRoot}guide/topics/resources/drawable-resource.html">drawable resources</a>, you should
 put one copy in the default drawable directory ({@code drawable/}).</p>
 
 <p>To create alternative bitmap drawables for different densities, you should follow the
-<b>3:4:6:8 scaling ratio</b> between the four generalized densities. For example, if you have
-a bitmap drawable that's 48x48 pixels for medium-density screen (the size for a launcher icon),
-all the different sizes should be:</p>
+<b>3:4:6:8:12:16 scaling ratio</b> between the six generalized densities. For example, if you have
+a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
+</p>
 
 <ul>
-  <li>36x36 for low-density</li>
-  <li>48x48 for medium-density</li>
-  <li>72x72 for high-density</li>
-  <li>96x96 for extra high-density</li>
+  <li>36x36 (0.75x) for low-density</li>
+  <li>48x48 (1.0x baseline) for medium-density</li>
+  <li>72x72 (1.5x) for high-density</li>
+  <li>96x96 (2.0x) for extra-high-density</li>
+  <li>180x180 (3.0x) for extra-extra-high-density</li>
+  <li>192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see
+    <a href="#xxxhdpi-note">note</a> above)</li>
 </ul>
 
 <p>For more information about designing icons, see the <a
@@ -715,7 +743,7 @@
 screen area. Specifically, the device's smallestWidth is the shortest of the screen's available
 height and width (you may also think of it as the "smallest possible width" for the screen). You can
 use this qualifier to ensure that, regardless of the screen's current orientation, your
-application's has at least {@code &lt;N&gt;} dps of width available for it UI.</p>
+application's has at least {@code &lt;N&gt;} dps of width available for its UI.</p>
         <p>For example, if your layout requires that its smallest dimension of screen area be at
 least 600 dp at all times, then you can use this qualifer to create the layout resources, {@code
 res/layout-sw600dp/}. The system will use these resources only when the smallest dimension of
@@ -1011,8 +1039,8 @@
 <p>If you need to control exactly how your application will look on various
 screen configurations, adjust your layouts and bitmap drawables in configuration-specific
 resource directories. For example, consider an icon that you want to display on
-medium and high density screens. Simply create your icon at two different sizes
-(for instance 100x100 for medium density and 150x150 for high density) and put
+medium and high-density screens. Simply create your icon at two different sizes
+(for instance 100x100 for medium-density and 150x150 for high-density) and put
 the two variations in the appropriate directories, using the proper
 qualifiers:</p>
 
@@ -1115,9 +1143,7 @@
 <div class="figure" style="width:300px">
 <img src="{@docRoot}images/screens_support/scale-test.png" alt="" />
 <p class="img-caption"><strong>Figure 5.</strong> Comparison of pre-scaled and auto-scaled
-bitmaps, from <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/DensityActivity.html">
-ApiDemos</a>.
+bitmaps.
 </p>
 </div>
 
@@ -1153,10 +1179,7 @@
 (120), medium (160) and high (240) density bitmaps on a high-density screen. The differences are
 subtle, because all of the bitmaps are being scaled to match the current screen density, however the
 scaled bitmaps have slightly different appearances depending on whether they are pre-scaled or
-auto-scaled at draw time. You can find the source code for this sample application, which
-demonstrates using pre-scaled and auto-scaled bitmaps, in <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/graphics/DensityActivity.html">
-ApiDemos</a>.</p>
+auto-scaled at draw time.</p>
 
 <p class="note"><strong>Note:</strong> In Android 3.0 and above, there should be no perceivable
 difference between pre-scaled and auto-scaled bitmaps, due to improvements in the graphics
@@ -1172,9 +1195,9 @@
 pixels. Imagine an application in which a scroll or fling gesture is recognized after the user's
 finger has moved by at least 16 pixels. On a baseline screen, a user's must move by {@code 16 pixels
 / 160 dpi}, which equals 1/10th of an inch (or 2.5 mm) before the gesture is recognized. On a device
-with a high density display (240dpi), the user's must move by {@code 16 pixels / 240 dpi}, which
+with a high-density display (240dpi), the user's must move by {@code 16 pixels / 240 dpi}, which
 equals 1/15th of an inch (or 1.7 mm). The distance is much shorter and the application thus appears
-more sensitive to the user.</p> 
+more sensitive to the user.</p>
 
 <p>To fix this issue, the gesture threshold must be expressed in code in <code>dp</code> and then
 converted to actual pixels. For example:</p>
@@ -1194,7 +1217,7 @@
 <p>The {@link android.util.DisplayMetrics#density DisplayMetrics.density} field specifies the scale
 factor you must use to convert {@code dp} units to pixels, according to the current screen density.
 On a medium-density screen, {@link android.util.DisplayMetrics#density DisplayMetrics.density}
-equals 1.0; on a high-density screen it equals 1.5; on an extra high-density screen, it equals 2.0;
+equals 1.0; on a high-density screen it equals 1.5; on an extra-high-density screen, it equals 2.0;
 and on a low-density screen, it equals 0.75. This figure is the factor by which you should multiply
 the {@code dp} units on order to get the actual pixel count for the current screen. (Then add {@code
 0.5f} to round the figure up to the nearest whole number, when converting to an integer.) For more
@@ -1277,7 +1300,7 @@
         <nobr>High density (240), <em>hdpi</em><nobr>
       </th>
       <th>
-        <nobr>Extra high density (320), <em>xhdpi</em><nobr>
+        <nobr>Extra-high-density (320), <em>xhdpi</em><nobr>
       </th>
     </tr>
     <tr>
@@ -1315,7 +1338,7 @@
     </tr>
     <tr>
       <th>
-        <em>Extra Large</em> screen
+        <em>Extra-Large</em> screen
       </th>
       <td>1024x600</td>
       <td><strong>WXGA (1280x800)</strong><sup>&dagger;</sup><br>
@@ -1369,4 +1392,4 @@
 
 <p>For more information about creating AVDs from the command line, see <a
 href="{@docRoot}tools/devices/managing-avds-cmdline.html">Managing AVDs from the
-Command Line</a></p>
+Command Line</a>.</p>
\ No newline at end of file
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index bf16630..6d9527f 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -389,7 +389,7 @@
             <ul>
               <li>240x320 ldpi (QVGA handset)</li>
               <li>320x480 mdpi (handset)</li>
-              <li>480x800 hdpi (high density handset)</li>
+              <li>480x800 hdpi (high-density handset)</li>
             </ul>
           </li>
           <li>480, for screens such as 480x800 mdpi (tablet/handset).</li>
@@ -483,20 +483,20 @@
         <ul class="nolist">
         <li>{@code small}: Screens that are of similar size to a
         low-density QVGA screen. The minimum layout size for a small screen
-        is approximately 320x426 dp units.  Examples are QVGA low density and VGA high
+        is approximately 320x426 dp units.  Examples are QVGA low-density and VGA high
         density.</li>
         <li>{@code normal}: Screens that are of similar size to a
         medium-density HVGA screen. The minimum
         layout size for a normal screen is approximately 320x470 dp units.  Examples
-        of such screens a WQVGA low density, HVGA medium density, WVGA
-        high density.</li>
+        of such screens a WQVGA low-density, HVGA medium-density, WVGA
+        high-density.</li>
         <li>{@code large}: Screens that are of similar size to a
         medium-density VGA screen.
         The minimum layout size for a large screen is approximately 480x640 dp units.
-        Examples are VGA and WVGA medium density screens.</li>
+        Examples are VGA and WVGA medium-density screens.</li>
         <li>{@code xlarge}: Screens that are considerably larger than the traditional
         medium-density HVGA screen. The minimum layout size for an xlarge screen
-        is approximately 720x960 dp units.  In most cases, devices with extra large
+        is approximately 720x960 dp units.  In most cases, devices with extra-large
         screens would be too large to carry in a pocket and would most likely
         be tablet-style devices. <em>Added in API level 9.</em></li>
         </ul>
@@ -613,6 +613,8 @@
         <code>mdpi</code><br/>
         <code>hdpi</code><br/>
         <code>xhdpi</code><br/>
+        <code>xxhdpi</code><br/>
+        <code>xxxhdpi</code><br/>
         <code>nodpi</code><br/>
         <code>tvdpi</code>
       </td>
@@ -622,8 +624,14 @@
           <li>{@code mdpi}: Medium-density (on traditional HVGA) screens; approximately
 160dpi.</li>
           <li>{@code hdpi}: High-density screens; approximately 240dpi.</li>
-          <li>{@code xhdpi}: Extra high-density screens; approximately 320dpi. <em>Added in API
+          <li>{@code xhdpi}: Extra-high-density screens; approximately 320dpi. <em>Added in API
 Level 8</em></li>
+          <li>{@code xxhdpi}: Extra-extra-high-density screens; approximately 480dpi. <em>Added in API
+Level 16</em></li>
+          <li>{@code xxxhdpi}: Extra-extra-extra-high-density uses (launcher icon only, see the 
+            <a href="{@docRoot}guide/practices/screens_support.html#xxxhdpi-note">note</a> 
+            in <em>Supporting Multiple Screens</em>); approximately 640dpi. <em>Added in API
+Level 18</em></li>
           <li>{@code nodpi}: This can be used for bitmap resources that you do not want to be scaled
 to match the device density.</li>
           <li>{@code tvdpi}: Screens somewhere between mdpi and hdpi; approximately 213dpi. This is
@@ -631,8 +639,9 @@
 apps shouldn't need it&mdash;providing mdpi and hdpi resources is sufficient for most apps and
 the system will scale them as appropriate. This qualifier was introduced with API level 13.</li>
         </ul>
-        <p>There is a 3:4:6:8 scaling ratio between the four primary densities (ignoring the
-tvdpi density). So, a 9x9 bitmap in ldpi is 12x12 in mdpi, 18x18 in hdpi and 24x24 in xhdpi.</p>
+        <p>There is a 3:4:6:8:12:16 scaling ratio between the six primary densities (ignoring the
+tvdpi density). So, a 9x9 bitmap in ldpi is 12x12 in mdpi, 18x18 in hdpi, 24x24 in xhdpi and so on.
+</p>
         <p>If you decide that your image resources don't look good enough on a television or
 other certain devices and want to try tvdpi resources, the scaling factor is 1.33*mdpi. For
 example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi.</p>
diff --git a/docs/html/guide/topics/ui/accessibility/services.jd b/docs/html/guide/topics/ui/accessibility/services.jd
index c868080..d69af9f 100644
--- a/docs/html/guide/topics/ui/accessibility/services.jd
+++ b/docs/html/guide/topics/ui/accessibility/services.jd
@@ -71,24 +71,30 @@
 
 <h3 id="service-declaration">Accessibility service declaration</h3>
 
-<p>In order to be treated as an accessibility service, your application must include the
+<p>In order to be treated as an accessibility service, you must include a
 {@code service} element (rather than the {@code activity} element) within the {@code application}
-element in its manifest. In addition, within the {@code service} element, you must also include an
+element in your manifest. In addition, within the {@code service} element, you must also include an
 accessibility service intent filter. For compatiblity with Android 4.1 and higher, the manifest
 must also request the {@link android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE} permission
 as shown in the following sample:</p>
 
 <pre>
-&lt;application&gt;
-  &lt;service android:name=&quot;.MyAccessibilityService&quot;
-      android:label=&quot;@string/accessibility_service_label&quot;
-      android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
-    &lt;intent-filter&gt;
-      &lt;action android:name=&quot;android.accessibilityservice.AccessibilityService&quot; /&gt;
-    &lt;/intent-filter&gt;
-  &lt;/service&gt;
-  &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
-&lt;/application&gt;
+&lt;manifest&gt;
+  ...
+  &lt;uses-permission ... /&gt;
+  ...
+  &lt;application&gt;
+    ...
+    &lt;service android:name=&quot;.MyAccessibilityService&quot;
+        android:label=&quot;@string/accessibility_service_label&quot;
+        android:permission=&quot;android.permission.BIND_ACCESSIBILITY_SERVICE&quot&gt;
+      &lt;intent-filter&gt;
+        &lt;action android:name=&quot;android.accessibilityservice.AccessibilityService&quot; /&gt;
+      &lt;/intent-filter&gt;
+    &lt;/service&gt;
+    &lt;uses-permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE" /&gt;
+  &lt;/application&gt;
+&lt;/manifest&gt;
 </pre>
 
 <p>These declarations are required for all accessibility services deployed on Android 1.6 (API Level
diff --git a/docs/html/images/tools/projectview01.png b/docs/html/images/tools/projectview01.png
new file mode 100644
index 0000000..90589fb
--- /dev/null
+++ b/docs/html/images/tools/projectview01.png
Binary files differ
diff --git a/docs/html/images/tools/projectview03.png b/docs/html/images/tools/projectview03.png
new file mode 100644
index 0000000..f527ff1
--- /dev/null
+++ b/docs/html/images/tools/projectview03.png
Binary files differ
diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh.html b/docs/html/reference/renderscript/rs__matrix_8rsh.html
index 69cc373..3b8e047 100644
--- a/docs/html/reference/renderscript/rs__matrix_8rsh.html
+++ b/docs/html/reference/renderscript/rs__matrix_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_matrix.rsh File Reference</title>
+<title>frameworks/rs/scriptc/rs_matrix.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,18 +27,18 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_matrix.rsh File Reference</div>  </div>
+<div class="title">frameworks/rs/scriptc/rs_matrix.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
 <tr><td colspan="2"><h2><a name="func-members"></a>
 Functions</h2></td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad6ea242218e0f1a031f754df0317e6e7">rsMatrixSet</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, float v)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ab69543f85a673f23fbb5f893e5824395">rsMatrixSet</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, float v)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a0a85c8d3607f1b75019f6991c5b19fca">rsMatrixSet</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, float v)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a22e983b67d3089c5cb97032e249ca335">rsMatrixGet</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad485084684991796cffdd8a008557569">rsMatrixGet</a> (const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aaa86b029d5c5c15fead5338bba02e4c3">rsMatrixGet</a> (const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aca88832ed720e301780152c60884393e">rsMatrixSet</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a08a247cdf2e70e78310bf04f9ecd5144">rsMatrixSet</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#af9707d7be5945bf55ed53683624176ff">rsMatrixSet</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, float v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#af26fdbf8b8f0ed5d1b53f62b2aef5110">rsMatrixGet</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#acfebfc7b97e7282b78cd9c65b791932a">rsMatrixGet</a> (const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a683b4537b98103c50cc66780dfe8cd69">rsMatrixGet</a> (const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a5b31e83553efa947db2198674d5db043">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad2954a5ac11d2370227296be89e92471">rsMatrixLoadIdentity</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m)</td></tr>
@@ -65,9 +65,9 @@
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a4c59884a0e534dbbcdc5655842732d43">rsMatrixLoadOrtho</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float left, float right, float bottom, float top, float near, float far)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rsMatrixLoadFrustum</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float left, float right, float bottom, float top, float near, float far)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#aa404c34d7478f2921f7415d2da95d02b">rsMatrixLoadPerspective</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, float fovy, float aspect, float near, float far)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a2f11c3d7cc34ddce90ba785b93af8da2">rsMatrixMultiply</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a88ae2ed203769cb4a7917f84f6c1a2e2">rsMatrixMultiply</a> (const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a8d81a7143d5d45f60f7e91f955579bab">rsMatrixMultiply</a> (const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a47b6abbf32ffaf77bb13d96c3f05779f">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a716bc2d29b80eb25388aba3ba8845aef">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *m, <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m, <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rsMatrixInverse</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rsMatrixInverseTranspose</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a> (<a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *m)</td></tr>
@@ -75,16 +75,30 @@
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a49164dd4d4e85b212196028b1fd89dc1">rsMatrixTranspose</a> (<a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *m)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Matrix routines. </p>
+<div class="textblock"><p>Matrix functions. </p>
+<p>These functions let you manipulate square matrices of rank 2x2, 3x3, and 4x4. They are particularly useful for graphical transformations and are compatible with OpenGL.</p>
+<p>A few general notes:</p>
+<ul>
+<li>We use a zero-based index for rows and columns. E.g. the last element of a <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> is found at (3, 3).</li>
+</ul>
+<ul>
+<li>RenderScript uses column-based vectors. Transforming a vector is done by postmultiplying the vector, e.g. <em>(matrix * vector)</em>, as provided by <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</li>
+</ul>
+<ul>
+<li>To create a transformation matrix that performs two transformations at once, multiply the two source matrices, with the first transformation as the right argument. E.g. to create a transformation matrix that applies the transformation <em>s1</em> followed by <em>s2</em>, call rsMatrixLoadMultiply(&amp;combined, &amp;s2, &amp;s1). This derives from <em>s2 * (s1 * v)</em>, which is <em>(s2 * s1) * v</em>.</li>
+</ul>
+<ul>
+<li>We have two style of functions to create transformation matrices: rsMatrixLoad<em>Transformation</em> and rsMatrix<em>Transformation</em>. The former style simply stores the transformation matrix in the first argument. The latter modifies a pre-existing transformation matrix so that the new transformation happens first. E.g. if you call <a class="el" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rsMatrixTranslate</a> on a matrix that already does a scaling, the resulting matrix when applied to a vector will first do the translation then the scaling. </li>
+</ul>
 
 <p>Definition in file <a class="el" href="rs__matrix_8rsh_source.html">rs_matrix.rsh</a>.</p>
 </div><hr/><h2>Function Documentation</h2>
-<a class="anchor" id="a22e983b67d3089c5cb97032e249ca335"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="a22e983b67d3089c5cb97032e249ca335" args="(const rs_matrix4x4 *m, uint32_t row, uint32_t col)" -->
+<a class="anchor" id="af26fdbf8b8f0ed5d1b53f62b2aef5110"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="af26fdbf8b8f0ed5d1b53f62b2aef5110" args="(const rs_matrix4x4 *m, uint32_t col, uint32_t row)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">float rsMatrixGet </td>
+          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
           <td>(</td>
           <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -93,13 +107,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>&#160;</td>
+          <td class="paramname"><em>row</em>&#160;</td>
         </tr>
         <tr>
           <td></td>
@@ -109,25 +123,26 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Get one element of a matrix.</p>
+<p>Returns one element of a matrix.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td>The matrix to read from </td></tr>
-    <tr><td class="paramname">row</td><td></td></tr>
-    <tr><td class="paramname">col</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to extract the element from. </td></tr>
+    <tr><td class="paramname">col</td><td>The zero-based column of the element to be extracted. </td></tr>
+    <tr><td class="paramname">row</td><td>The zero-based row of the element to extracted.</td></tr>
   </table>
   </dd>
 </dl>
+<dl class="warning"><dt><b>Warning:</b></dt><dd>The order of the column and row parameters may be unexpected.</dd></dl>
 <dl class="return"><dt><b>Returns:</b></dt><dd>float </dd></dl>
 
 </div>
 </div>
-<a class="anchor" id="ad485084684991796cffdd8a008557569"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="ad485084684991796cffdd8a008557569" args="(const rs_matrix3x3 *m, uint32_t row, uint32_t col)" -->
+<a class="anchor" id="acfebfc7b97e7282b78cd9c65b791932a"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="acfebfc7b97e7282b78cd9c65b791932a" args="(const rs_matrix3x3 *m, uint32_t col, uint32_t row)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">float rsMatrixGet </td>
+          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
           <td>(</td>
           <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -136,13 +151,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>&#160;</td>
+          <td class="paramname"><em>row</em>&#160;</td>
         </tr>
         <tr>
           <td></td>
@@ -156,12 +171,12 @@
 
 </div>
 </div>
-<a class="anchor" id="aaa86b029d5c5c15fead5338bba02e4c3"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="aaa86b029d5c5c15fead5338bba02e4c3" args="(const rs_matrix2x2 *m, uint32_t row, uint32_t col)" -->
+<a class="anchor" id="a683b4537b98103c50cc66780dfe8cd69"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="a683b4537b98103c50cc66780dfe8cd69" args="(const rs_matrix2x2 *m, uint32_t col, uint32_t row)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">float rsMatrixGet </td>
+          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
           <td>(</td>
           <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -170,13 +185,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>&#160;</td>
+          <td class="paramname"><em>row</em>&#160;</td>
         </tr>
         <tr>
           <td></td>
@@ -204,10 +219,11 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Returns true if the matrix was successfully inversed</p>
+<p>Inverts a matrix in place.</p>
+<p>Returns true if the matrix was successfully inversed.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to invert. </td></tr>
   </table>
   </dd>
 </dl>
@@ -228,10 +244,11 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Returns true if the matrix was successfully inversed and transposed.</p>
+<p>Inverts and transpose a matrix in place.</p>
+<p>The matrix is first inverted then transposed. Returns true if the matrix was successfully inverted.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr>
   </table>
   </dd>
 </dl>
@@ -263,9 +280,11 @@
 </div>
 <div class="memdoc">
 <p>Set the elements of a matrix from an array of floats.</p>
+<p>The array of floats should be in row-major order, i.e. the element a <em>row 0, column 0</em> should be first, followed by the element at <em>row 0, column 1</em>, etc.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">v</td><td>The array of values to set the matrix to. These arrays should be 4, 9, or 16 floats long, depending on the matrix size. </td></tr>
   </table>
   </dd>
 </dl>
@@ -352,7 +371,20 @@
       </table>
 </div>
 <div class="memdoc">
-<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
+<p>Set the elements of a matrix from another matrix.</p>
+<p>If the source matrix is smaller than the destination, the rest of the destination is filled with elements of the identity matrix. E.g. loading a <a class="el" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> into a <a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> will give:</p>
+ <table>
+ <tr><td>m00</td><td>m01</td><td>0.0</td><td>0.0</td></tr>
+ <tr><td>m10</td><td>m11</td><td>0.0</td><td>0.0</td></tr>
+ <tr><td>0.0</td><td>0.0</td><td>1.0</td><td>0.0</td></tr>
+ <tr><td>0.0</td><td>0.0</td><td>0.0</td><td>1.0</td></tr>
+ </table><dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">v</td><td>The source matrix. </td></tr>
+  </table>
+  </dd>
+</dl>
 
 </div>
 </div>
@@ -408,13 +440,7 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Set the elements of a matrix from another matrix.</p>
-<dl><dt><b>Parameters:</b></dt><dd>
-  <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-  </table>
-  </dd>
-</dl>
+<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
 
 </div>
 </div>
@@ -528,10 +554,13 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Load an Frustum projection matrix constructed from the 6 planes</p>
+<p>Load a frustum projection matrix.</p>
+<p>Constructs a frustum projection matrix, transforming the box identified by the six clipping planes <em>left, right, bottom, top, near, far</em>.</p>
+<p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
+<p>See <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
     <tr><td class="paramname">left</td><td></td></tr>
     <tr><td class="paramname">right</td><td></td></tr>
     <tr><td class="paramname">bottom</td><td></td></tr>
@@ -561,7 +590,7 @@
 <p>Set the elements of a matrix to the identity matrix.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
   </table>
   </dd>
 </dl>
@@ -634,12 +663,15 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiply two matrix (lhs, rhs) and place the result in m.</p>
+<p>Multiply two matrices.</p>
+<p>Sets <em>m</em> to the matrix product of <em>lhs * rhs</em>.</p>
+<p>To combine two 4x4 transformaton matrices, multiply the second transformation matrix by the first transformation matrix. E.g. to create a transformation matrix that applies the transformation <em>s1</em> followed by <em>s2</em>, call rsMatrixLoadMultiply(&amp;combined, &amp;s2, &amp;s1).</p>
+<dl class="warning"><dt><b>Warning:</b></dt><dd>As of version 21, storing the result back into right matrix is not supported and will result in undefined behavior. Use rsMatrixMulitply instead. E.g. instead of doing rsMatrixLoadMultiply (&amp;m2r, &amp;m2r, &amp;m2l), use rsMatrixMultiply (&amp;m2r, &amp;m2l). rsMatrixLoadMultiply (&amp;m2l, &amp;m2r, &amp;m2l) works as expected.</dd></dl>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">lhs</td><td></td></tr>
-    <tr><td class="paramname">rhs</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">lhs</td><td>The left matrix of the product. </td></tr>
+    <tr><td class="paramname">rhs</td><td>The right matrix of the product. </td></tr>
   </table>
   </dd>
 </dl>
@@ -768,10 +800,13 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Load an Ortho projection matrix constructed from the 6 planes</p>
+<p>Load an orthographic projection matrix.</p>
+<p>Constructs an orthographic projection matrix, transforming the box identified by the six clipping planes <em>left, right, bottom, top, near, far</em> into a unit cube with a corner at <em>(-1, -1, -1)</em> and the opposite at <em>(1, 1, 1)</em>.</p>
+<p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
+<p>See <a href="https://en.wikipedia.org/wiki/Orthographic_projection">https://en.wikipedia.org/wiki/Orthographic_projection</a> and <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
     <tr><td class="paramname">left</td><td></td></tr>
     <tr><td class="paramname">right</td><td></td></tr>
     <tr><td class="paramname">bottom</td><td></td></tr>
@@ -826,14 +861,17 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Load an perspective projection matrix constructed from the 6 planes</p>
+<p>Load a perspective projection matrix.</p>
+<p>Constructs a perspective projection matrix, assuming a symmetrical field of view.</p>
+<p>To apply this projection to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
+<p>See <a href="https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf">https://www.opengl.org/documentation/specs/version2.0/glspec20.pdf</a></p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
     <tr><td class="paramname">fovy</td><td>Field of view, in degrees along the Y axis. </td></tr>
     <tr><td class="paramname">aspect</td><td>Ratio of x / y. </td></tr>
-    <tr><td class="paramname">near</td><td></td></tr>
-    <tr><td class="paramname">far</td><td></td></tr>
+    <tr><td class="paramname">near</td><td>The near clipping plane. </td></tr>
+    <tr><td class="paramname">far</td><td>The far clipping plane. </td></tr>
   </table>
   </dd>
 </dl>
@@ -883,13 +921,16 @@
 </div>
 <div class="memdoc">
 <p>Load a rotation matrix.</p>
+<p>This function creates a rotation matrix. The axis of rotation is the <em>(x, y, z)</em> vector.</p>
+<p>To rotate a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
+<p>See <a href="http://en.wikipedia.org/wiki/Rotation_matrix">http://en.wikipedia.org/wiki/Rotation_matrix</a> .</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">rot</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">rot</td><td>How much rotation to do, in degrees. </td></tr>
+    <tr><td class="paramname">x</td><td>The x component of the vector that is the axis of rotation. </td></tr>
+    <tr><td class="paramname">y</td><td>The y component of the vector that is the axis of rotation. </td></tr>
+    <tr><td class="paramname">z</td><td>The z component of the vector that is the axis of rotation. </td></tr>
   </table>
   </dd>
 </dl>
@@ -933,12 +974,14 @@
 </div>
 <div class="memdoc">
 <p>Load a scale matrix.</p>
+<p>This function creates a scaling matrix, where each component of a vector is multiplied by a number. This number can be negative.</p>
+<p>To scale a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">x</td><td>The multiple to scale the x components by. </td></tr>
+    <tr><td class="paramname">y</td><td>The multiple to scale the y components by. </td></tr>
+    <tr><td class="paramname">z</td><td>The multiple to scale the z components by. </td></tr>
   </table>
   </dd>
 </dl>
@@ -982,12 +1025,14 @@
 </div>
 <div class="memdoc">
 <p>Load a translation matrix.</p>
+<p>This function creates a translation matrix, where a number is added to each element of a vector.</p>
+<p>To translate a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to set. </td></tr>
+    <tr><td class="paramname">x</td><td>The number to add to each x component. </td></tr>
+    <tr><td class="paramname">y</td><td>The number to add to each y component. </td></tr>
+    <tr><td class="paramname">z</td><td>The number to add to each z component. </td></tr>
   </table>
   </dd>
 </dl>
@@ -1018,11 +1063,13 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiply the matrix m by rhs and place the result back into m.</p>
+<p>Multiply a matrix into another one.</p>
+<p>Sets <em>m</em> to the matrix product <em>m * rhs</em>.</p>
+<p>When combining two 4x4 transformation matrices using this function, the resulting matrix will correspond to performing the <em>rhs</em> transformation first followed by the original <em>m</em> transformation.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td>(lhs) </td></tr>
-    <tr><td class="paramname">rhs</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The left matrix of the product and the matrix to be set. </td></tr>
+    <tr><td class="paramname">rhs</td><td>The right matrix of the product. </td></tr>
   </table>
   </dd>
 </dl>
@@ -1085,14 +1132,14 @@
 
 </div>
 </div>
-<a class="anchor" id="a2f11c3d7cc34ddce90ba785b93af8da2"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a2f11c3d7cc34ddce90ba785b93af8da2" args="(const rs_matrix4x4 *m, float4 in)" -->
+<a class="anchor" id="a47b6abbf32ffaf77bb13d96c3f05779f"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a47b6abbf32ffaf77bb13d96c3f05779f" args="(rs_matrix4x4 *m, float4 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsMatrixMultiply </td>
+          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
+          <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1109,19 +1156,24 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiply a vector by a matrix and return the result vector. API version 14+</p>
+<p>Multiply a vector by a matrix.</p>
+<p>Returns the post-multiplication of the vector by the matrix, ie. <em>m * in</em>.</p>
+<p>When multiplying a <em>float3</em> to a <em><a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a></em>, the vector is expanded with (1).</p>
+<p>When multiplying a <em>float2</em> to a <em><a class="el" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a></em>, the vector is expanded with (0, 1).</p>
+<p>When multiplying a <em>float2</em> to a <em><a class="el" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a></em>, the vector is expanded with (0).</p>
+<p>This function is available in API version 10-13. Starting with API 14, the function takes a const matrix as the first argument.</p>
 <p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
 
 </div>
 </div>
-<a class="anchor" id="a88ae2ed203769cb4a7917f84f6c1a2e2"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a88ae2ed203769cb4a7917f84f6c1a2e2" args="(const rs_matrix3x3 *m, float3 in)" -->
+<a class="anchor" id="a716bc2d29b80eb25388aba3ba8845aef"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a716bc2d29b80eb25388aba3ba8845aef" args="(rs_matrix3x3 *m, float3 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rsMatrixMultiply </td>
+          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
+          <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1142,14 +1194,14 @@
 
 </div>
 </div>
-<a class="anchor" id="a8d81a7143d5d45f60f7e91f955579bab"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a8d81a7143d5d45f60f7e91f955579bab" args="(const rs_matrix2x2 *m, float2 in)" -->
+<a class="anchor" id="a4d9a8bb7c3f5d67b14fa349bdd531d13"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a4d9a8bb7c3f5d67b14fa349bdd531d13" args="(rs_matrix2x2 *m, float2 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname"><a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> rsMatrixMultiply </td>
+          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
+          <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1212,14 +1264,16 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiple matrix m with a rotation matrix</p>
+<p>Multiply the matrix <em>m</em> with a rotation matrix.</p>
+<p>This function modifies a transformation matrix to first do a rotation. The axis of rotation is the <em>(x, y, z)</em> vector.</p>
+<p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">rot</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr>
+    <tr><td class="paramname">rot</td><td>How much rotation to do, in degrees. </td></tr>
+    <tr><td class="paramname">x</td><td>The x component of the vector that is the axis of rotation. </td></tr>
+    <tr><td class="paramname">y</td><td>The y component of the vector that is the axis of rotation. </td></tr>
+    <tr><td class="paramname">z</td><td>The z component of the vector that is the axis of rotation. </td></tr>
   </table>
   </dd>
 </dl>
@@ -1262,25 +1316,27 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiple matrix m with a scale matrix</p>
+<p>Multiply the matrix <em>m</em> with a scaling matrix.</p>
+<p>This function modifies a transformation matrix to first do a scaling. When scaling, each component of a vector is multiplied by a number. This number can be negative.</p>
+<p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr>
+    <tr><td class="paramname">x</td><td>The multiple to scale the x components by. </td></tr>
+    <tr><td class="paramname">y</td><td>The multiple to scale the y components by. </td></tr>
+    <tr><td class="paramname">z</td><td>The multiple to scale the z components by. </td></tr>
   </table>
   </dd>
 </dl>
 
 </div>
 </div>
-<a class="anchor" id="ad6ea242218e0f1a031f754df0317e6e7"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="ad6ea242218e0f1a031f754df0317e6e7" args="(rs_matrix4x4 *m, uint32_t row, uint32_t col, float v)" -->
+<a class="anchor" id="aca88832ed720e301780152c60884393e"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="aca88832ed720e301780152c60884393e" args="(rs_matrix4x4 *m, uint32_t col, uint32_t row, float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void rsMatrixSet </td>
+          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -1289,13 +1345,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>, </td>
+          <td class="paramname"><em>row</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -1311,26 +1367,27 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Set one element of a matrix.</p>
+<p>Set an element of a matrix.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td>The matrix to be set </td></tr>
-    <tr><td class="paramname">row</td><td></td></tr>
-    <tr><td class="paramname">col</td><td></td></tr>
-    <tr><td class="paramname">v</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix that will be modified. </td></tr>
+    <tr><td class="paramname">col</td><td>The zero-based column of the element to be set. </td></tr>
+    <tr><td class="paramname">row</td><td>The zero-based row of the element to be set. </td></tr>
+    <tr><td class="paramname">v</td><td>The value to set.</td></tr>
   </table>
   </dd>
 </dl>
+<dl class="warning"><dt><b>Warning:</b></dt><dd>The order of the column and row parameters may be unexpected.</dd></dl>
 <dl class="return"><dt><b>Returns:</b></dt><dd>void </dd></dl>
 
 </div>
 </div>
-<a class="anchor" id="ab69543f85a673f23fbb5f893e5824395"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="ab69543f85a673f23fbb5f893e5824395" args="(rs_matrix3x3 *m, uint32_t row, uint32_t col, float v)" -->
+<a class="anchor" id="a08a247cdf2e70e78310bf04f9ecd5144"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="a08a247cdf2e70e78310bf04f9ecd5144" args="(rs_matrix3x3 *m, uint32_t col, uint32_t row, float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void rsMatrixSet </td>
+          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -1339,13 +1396,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>, </td>
+          <td class="paramname"><em>row</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -1365,12 +1422,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a0a85c8d3607f1b75019f6991c5b19fca"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="a0a85c8d3607f1b75019f6991c5b19fca" args="(rs_matrix2x2 *m, uint32_t row, uint32_t col, float v)" -->
+<a class="anchor" id="af9707d7be5945bf55ed53683624176ff"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="af9707d7be5945bf55ed53683624176ff" args="(rs_matrix2x2 *m, uint32_t col, uint32_t row, float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">void rsMatrixSet </td>
+          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
@@ -1379,13 +1436,13 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>row</em>, </td>
+          <td class="paramname"><em>col</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td>
-          <td class="paramname"><em>col</em>, </td>
+          <td class="paramname"><em>row</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -1441,13 +1498,15 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiple matrix m with a translation matrix</p>
+<p>Multiply the matrix <em>m</em> with a translation matrix.</p>
+<p>This function modifies a transformation matrix to first do a translation. When translating, a number is added to each component of a vector.</p>
+<p>To apply this combined transformation to a vector, multiply the vector by the created matrix using <a class="el" href="rs__matrix_8rsh.html#a4d9a8bb7c3f5d67b14fa349bdd531d13">rsMatrixMultiply</a>.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
-    <tr><td class="paramname">x</td><td></td></tr>
-    <tr><td class="paramname">y</td><td></td></tr>
-    <tr><td class="paramname">z</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to modify. </td></tr>
+    <tr><td class="paramname">x</td><td>The number to add to each x component. </td></tr>
+    <tr><td class="paramname">y</td><td>The number to add to each y component. </td></tr>
+    <tr><td class="paramname">z</td><td>The number to add to each z component. </td></tr>
   </table>
   </dd>
 </dl>
@@ -1468,10 +1527,10 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Transpose the matrix m.</p>
+<p>Transpose the matrix m in place.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
-    <tr><td class="paramname">m</td><td></td></tr>
+    <tr><td class="paramname">m</td><td>The matrix to transpose. </td></tr>
   </table>
   </dd>
 </dl>
diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html
index c1aaeb2..77144bd 100644
--- a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_matrix.rsh Source File</title>
+<title>frameworks/rs/scriptc/rs_matrix.rsh Source File</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,7 +24,7 @@
   </div>
 <div class="header">
   <div class="headertitle">
-<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_matrix.rsh</div>  </div>
+<div class="title">frameworks/rs/scriptc/rs_matrix.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__matrix_8rsh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
@@ -43,129 +43,128 @@
 <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span>
 <a name="l00015"></a>00015 <span class="comment"> */</span>
 <a name="l00016"></a>00016 
-<a name="l00023"></a>00023 <span class="preprocessor">#ifndef __RS_MATRIX_RSH__</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __RS_MATRIX_RSH__</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00036"></a>00036 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00037"></a>00037 <a class="code" href="rs__matrix_8rsh.html#ad6ea242218e0f1a031f754df0317e6e7">rsMatrixSet</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <span class="keywordtype">float</span> v);
-<a name="l00041"></a>00041 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00042"></a>00042 <a class="code" href="rs__matrix_8rsh.html#ad6ea242218e0f1a031f754df0317e6e7">rsMatrixSet</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <span class="keywordtype">float</span> v);
-<a name="l00046"></a>00046 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00047"></a>00047 <a class="code" href="rs__matrix_8rsh.html#ad6ea242218e0f1a031f754df0317e6e7">rsMatrixSet</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <span class="keywordtype">float</span> v);
-<a name="l00048"></a>00048 
-<a name="l00058"></a>00058 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
-<a name="l00059"></a>00059 <a class="code" href="rs__matrix_8rsh.html#a22e983b67d3089c5cb97032e249ca335">rsMatrixGet</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col);
-<a name="l00063"></a>00063 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
-<a name="l00064"></a>00064 <a class="code" href="rs__matrix_8rsh.html#a22e983b67d3089c5cb97032e249ca335">rsMatrixGet</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col);
-<a name="l00068"></a>00068 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
-<a name="l00069"></a>00069 <a class="code" href="rs__matrix_8rsh.html#a22e983b67d3089c5cb97032e249ca335">rsMatrixGet</a>(const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col);
-<a name="l00070"></a>00070 
-<a name="l00076"></a>00076 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
-<a name="l00080"></a>00080 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m);
-<a name="l00084"></a>00084 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m);
-<a name="l00085"></a>00085 
-<a name="l00091"></a>00091 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <span class="keywordtype">float</span> *v);
-<a name="l00095"></a>00095 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <span class="keywordtype">float</span> *v);
-<a name="l00099"></a>00099 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <span class="keywordtype">float</span> *v);
-<a name="l00103"></a>00103 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *v);
-<a name="l00107"></a>00107 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *v);
-<a name="l00108"></a>00108 
-<a name="l00114"></a>00114 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *v);
-<a name="l00118"></a>00118 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *v);
-<a name="l00122"></a>00122 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *v);
-<a name="l00123"></a>00123 
-<a name="l00133"></a>00133 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00134"></a>00134 <a class="code" href="rs__matrix_8rsh.html#a268032f3ac6d766b1d7fe72a6cb50464">rsMatrixLoadRotate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> rot, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00135"></a>00135 
-<a name="l00144"></a>00144 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00145"></a>00145 <a class="code" href="rs__matrix_8rsh.html#acaf51d1f9ad5041ce01fbf8b7c5923fd">rsMatrixLoadScale</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00146"></a>00146 
-<a name="l00155"></a>00155 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00156"></a>00156 <a class="code" href="rs__matrix_8rsh.html#a1b521c8a3d1260fa732cbf0a71af0e74">rsMatrixLoadTranslate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00157"></a>00157 
-<a name="l00165"></a>00165 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00166"></a>00166 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *lhs, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *rhs);
-<a name="l00170"></a>00170 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00171"></a>00171 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *lhs, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *rhs);
-<a name="l00175"></a>00175 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00176"></a>00176 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *lhs, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *rhs);
-<a name="l00177"></a>00177 
-<a name="l00184"></a>00184 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00185"></a>00185 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *rhs);
-<a name="l00189"></a>00189 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00190"></a>00190 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *rhs);
-<a name="l00194"></a>00194 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00195"></a>00195 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *rhs);
-<a name="l00196"></a>00196 
-<a name="l00206"></a>00206 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00207"></a>00207 <a class="code" href="rs__matrix_8rsh.html#ad5ed05ca4880397fb29615e3c6798de1">rsMatrixRotate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> rot, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00208"></a>00208 
-<a name="l00217"></a>00217 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00218"></a>00218 <a class="code" href="rs__matrix_8rsh.html#a94cc6b22bd1a6c07a9a1c1d21afb392c">rsMatrixScale</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00219"></a>00219 
-<a name="l00228"></a>00228 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00229"></a>00229 <a class="code" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rsMatrixTranslate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
-<a name="l00230"></a>00230 
-<a name="l00242"></a>00242 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00243"></a>00243 <a class="code" href="rs__matrix_8rsh.html#a4c59884a0e534dbbcdc5655842732d43">rsMatrixLoadOrtho</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
-<a name="l00244"></a>00244 
-<a name="l00256"></a>00256 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00257"></a>00257 <a class="code" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rsMatrixLoadFrustum</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
-<a name="l00258"></a>00258 
-<a name="l00268"></a>00268 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00269"></a>00269 <a class="code" href="rs__matrix_8rsh.html#aa404c34d7478f2921f7415d2da95d02b">rsMatrixLoadPerspective</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a>* m, <span class="keywordtype">float</span> fovy, <span class="keywordtype">float</span> aspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271 <span class="preprocessor">#if !defined(RS_VERSION) || (RS_VERSION &lt; 14)</span>
-<a name="l00272"></a>00272 <span class="preprocessor"></span>
-<a name="l00276"></a>00276 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00277"></a>00277 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in);
-<a name="l00278"></a>00278 
-<a name="l00282"></a>00282 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00283"></a>00283 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
+<a name="l00050"></a>00050 <span class="preprocessor">#ifndef __RS_MATRIX_RSH__</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define __RS_MATRIX_RSH__</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span>
+<a name="l00066"></a>00066 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00067"></a>00067 <a class="code" href="rs__matrix_8rsh.html#aca88832ed720e301780152c60884393e">rsMatrixSet</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <span class="keywordtype">float</span> v);
+<a name="l00071"></a>00071 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00072"></a>00072 <a class="code" href="rs__matrix_8rsh.html#aca88832ed720e301780152c60884393e">rsMatrixSet</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <span class="keywordtype">float</span> v);
+<a name="l00076"></a>00076 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00077"></a>00077 <a class="code" href="rs__matrix_8rsh.html#aca88832ed720e301780152c60884393e">rsMatrixSet</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row, <span class="keywordtype">float</span> v);
+<a name="l00078"></a>00078 
+<a name="l00091"></a>00091 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
+<a name="l00092"></a>00092 <a class="code" href="rs__matrix_8rsh.html#af26fdbf8b8f0ed5d1b53f62b2aef5110">rsMatrixGet</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row);
+<a name="l00096"></a>00096 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
+<a name="l00097"></a>00097 <a class="code" href="rs__matrix_8rsh.html#af26fdbf8b8f0ed5d1b53f62b2aef5110">rsMatrixGet</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row);
+<a name="l00101"></a>00101 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable))
+<a name="l00102"></a>00102 <a class="code" href="rs__matrix_8rsh.html#af26fdbf8b8f0ed5d1b53f62b2aef5110">rsMatrixGet</a>(const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> col, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> row);
+<a name="l00103"></a>00103 
+<a name="l00109"></a>00109 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
+<a name="l00113"></a>00113 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m);
+<a name="l00117"></a>00117 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rsMatrixLoadIdentity</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m);
+<a name="l00118"></a>00118 
+<a name="l00130"></a>00130 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <span class="keywordtype">float</span> *v);
+<a name="l00134"></a>00134 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <span class="keywordtype">float</span> *v);
+<a name="l00138"></a>00138 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <span class="keywordtype">float</span> *v);
+<a name="l00156"></a>00156 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *v);
+<a name="l00160"></a>00160 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *v);
+<a name="l00164"></a>00164 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *v);
+<a name="l00168"></a>00168 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *v);
+<a name="l00172"></a>00172 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rsMatrixLoad</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *v);
+<a name="l00173"></a>00173 
+<a name="l00191"></a>00191 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00192"></a>00192 <a class="code" href="rs__matrix_8rsh.html#a268032f3ac6d766b1d7fe72a6cb50464">rsMatrixLoadRotate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> rot, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
+<a name="l00193"></a>00193 
+<a name="l00208"></a>00208 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00209"></a>00209 <a class="code" href="rs__matrix_8rsh.html#acaf51d1f9ad5041ce01fbf8b7c5923fd">rsMatrixLoadScale</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
+<a name="l00210"></a>00210 
+<a name="l00225"></a>00225 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00226"></a>00226 <a class="code" href="rs__matrix_8rsh.html#a1b521c8a3d1260fa732cbf0a71af0e74">rsMatrixLoadTranslate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
+<a name="l00227"></a>00227 
+<a name="l00247"></a>00247 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00248"></a>00248 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *lhs, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *rhs);
+<a name="l00252"></a>00252 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00253"></a>00253 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *lhs, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *rhs);
+<a name="l00257"></a>00257 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00258"></a>00258 <a class="code" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rsMatrixLoadMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *lhs, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *rhs);
+<a name="l00259"></a>00259 
+<a name="l00272"></a>00272 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00273"></a>00273 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *rhs);
+<a name="l00277"></a>00277 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00278"></a>00278 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *rhs);
+<a name="l00282"></a>00282 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00283"></a>00283 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *rhs);
 <a name="l00284"></a>00284 
-<a name="l00288"></a>00288 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00289"></a>00289 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
-<a name="l00290"></a>00290 
-<a name="l00294"></a>00294 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
-<a name="l00295"></a>00295 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
-<a name="l00296"></a>00296 
-<a name="l00300"></a>00300 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
-<a name="l00301"></a>00301 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00300"></a>00300 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00301"></a>00301 <a class="code" href="rs__matrix_8rsh.html#ad5ed05ca4880397fb29615e3c6798de1">rsMatrixRotate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> rot, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
 <a name="l00302"></a>00302 
-<a name="l00306"></a>00306 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable))
-<a name="l00307"></a>00307 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
-<a name="l00308"></a>00308 <span class="preprocessor">#else</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span>
-<a name="l00313"></a>00313 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00314"></a>00314 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in);
-<a name="l00315"></a>00315 
-<a name="l00319"></a>00319 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00320"></a>00320 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
-<a name="l00321"></a>00321 
-<a name="l00325"></a>00325 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00326"></a>00326 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
-<a name="l00327"></a>00327 
-<a name="l00331"></a>00331 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
-<a name="l00332"></a>00332 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
-<a name="l00333"></a>00333 
-<a name="l00337"></a>00337 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
-<a name="l00338"></a>00338 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
-<a name="l00339"></a>00339 
-<a name="l00343"></a>00343 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable))
-<a name="l00344"></a>00344 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
-<a name="l00345"></a>00345 <span class="preprocessor">#endif</span>
-<a name="l00346"></a>00346 <span class="preprocessor"></span>
-<a name="l00347"></a>00347 
-<a name="l00353"></a>00353 <span class="keyword">extern</span> <span class="keywordtype">bool</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rsMatrixInverse</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
-<a name="l00354"></a>00354 
-<a name="l00360"></a>00360 extern <span class="keywordtype">bool</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rsMatrixInverseTranspose</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
-<a name="l00361"></a>00361 
-<a name="l00367"></a>00367 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
-<a name="l00371"></a>00371 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m);
-<a name="l00375"></a>00375 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m);
-<a name="l00376"></a>00376 
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378 <span class="preprocessor">#endif</span>
+<a name="l00318"></a>00318 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00319"></a>00319 <a class="code" href="rs__matrix_8rsh.html#a94cc6b22bd1a6c07a9a1c1d21afb392c">rsMatrixScale</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
+<a name="l00320"></a>00320 
+<a name="l00336"></a>00336 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00337"></a>00337 <a class="code" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rsMatrixTranslate</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> z);
+<a name="l00338"></a>00338 
+<a name="l00361"></a>00361 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00362"></a>00362 <a class="code" href="rs__matrix_8rsh.html#a4c59884a0e534dbbcdc5655842732d43">rsMatrixLoadOrtho</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
+<a name="l00363"></a>00363 
+<a name="l00384"></a>00384 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00385"></a>00385 <a class="code" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rsMatrixLoadFrustum</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <span class="keywordtype">float</span> left, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
+<a name="l00386"></a>00386 
+<a name="l00403"></a>00403 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00404"></a>00404 <a class="code" href="rs__matrix_8rsh.html#aa404c34d7478f2921f7415d2da95d02b">rsMatrixLoadPerspective</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a>* m, <span class="keywordtype">float</span> fovy, <span class="keywordtype">float</span> aspect, <span class="keywordtype">float</span> near, <span class="keywordtype">float</span> far);
+<a name="l00405"></a>00405 
+<a name="l00406"></a>00406 <span class="preprocessor">#if !defined(RS_VERSION) || (RS_VERSION &lt; 14)</span>
+<a name="l00407"></a>00407 <span class="preprocessor"></span>
+<a name="l00421"></a>00421 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00422"></a>00422 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in);
+<a name="l00423"></a>00423 
+<a name="l00427"></a>00427 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00428"></a>00428 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
+<a name="l00429"></a>00429 
+<a name="l00433"></a>00433 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00434"></a>00434 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00435"></a>00435 
+<a name="l00439"></a>00439 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
+<a name="l00440"></a>00440 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
+<a name="l00441"></a>00441 
+<a name="l00445"></a>00445 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
+<a name="l00446"></a>00446 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00447"></a>00447 
+<a name="l00451"></a>00451 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable))
+<a name="l00452"></a>00452 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00453"></a>00453 <span class="preprocessor">#else</span>
+<a name="l00454"></a>00454 <span class="preprocessor"></span>
+<a name="l00467"></a>00467 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00468"></a>00468 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> in);
+<a name="l00469"></a>00469 
+<a name="l00473"></a>00473 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00474"></a>00474 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
+<a name="l00475"></a>00475 
+<a name="l00479"></a>00479 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00480"></a>00480 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00481"></a>00481 
+<a name="l00485"></a>00485 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
+<a name="l00486"></a>00486 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> in);
+<a name="l00487"></a>00487 
+<a name="l00491"></a>00491 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable))
+<a name="l00492"></a>00492 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00493"></a>00493 
+<a name="l00497"></a>00497 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable))
+<a name="l00498"></a>00498 <a class="code" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rsMatrixMultiply</a>(const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> in);
+<a name="l00499"></a>00499 <span class="preprocessor">#endif</span>
+<a name="l00500"></a>00500 <span class="preprocessor"></span>
+<a name="l00501"></a>00501 
+<a name="l00509"></a>00509 <span class="keyword">extern</span> <span class="keywordtype">bool</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rsMatrixInverse</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
+<a name="l00510"></a>00510 
+<a name="l00519"></a>00519 extern <span class="keywordtype">bool</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rsMatrixInverseTranspose</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
+<a name="l00520"></a>00520 
+<a name="l00526"></a>00526 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *m);
+<a name="l00530"></a>00530 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *m);
+<a name="l00534"></a>00534 extern <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rsMatrixTranspose</a>(<a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *m);
+<a name="l00535"></a>00535 
+<a name="l00536"></a>00536 
+<a name="l00537"></a>00537 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/sdk/installing/studio-androidview.jd b/docs/html/sdk/installing/studio-androidview.jd
new file mode 100644
index 0000000..09aeaba
--- /dev/null
+++ b/docs/html/sdk/installing/studio-androidview.jd
@@ -0,0 +1,55 @@
+page.title=Using the Android Project View
+
+@jd:body
+
+
+<p>The Android project view in Android Studio shows a flattened version of your project's structure
+that provides quick access to the key source files of Android projects and helps you work with
+the new <a href="{@docRoot}sdk/installing/studio-build.html">Gradle-based build system</a>. The
+Android project view:</p>
+
+<ul>
+<li>Groups the build files for all modules at the top level of the project hierarchy.</li>
+<li>Shows the most important source directories at the top level of the module hierarchy.</li>
+<li>Groups all the manifest files for each module.</li>
+<li>Shows resource files from all Gradle source sets.</li>
+<li>Groups resource files for different locales, orientations, and screen types in a single group
+per resource type.</li>
+</ul>
+
+<div style="float:right;margin-left:30px;width:240px">
+<img src="{@docRoot}images/tools/projectview01.png" alt="" width="220" height="264"/>
+<p class="img-caption"><strong>Figure 1:</strong> Show the Android project view.</p>
+</div>
+
+
+<h2 id="enable-view">Enable the Android Project View</h2>
+
+<p>The Android project view is not yet enabled by default. To show the Android project view,
+click <strong>Project</strong> and select <strong>Android</strong>, as shown in Figure 1.</p>
+
+
+<h2 id="project-view">Use the Android Project View</h2>
+
+<p>The Android project view shows all the build files at the top level of the project hierarchy
+under <strong>Gradle Scripts</strong>. Each project module appears as a folder at the top
+level of the project hierarchy and contains these three elements at the top level:</p>
+
+<ul>
+<li><code>java/</code> - Source files for the module.</li>
+<li><code>manifests/</code> - Manifest files for the module.</li>
+<li><code>res/</code> - Resource files for the module.</li>
+</ul>
+
+<p>Figure 2 shows how the Android project view groups all the instances of the
+<code>ic_launcher.png</code> resource for different screen densities under the same element.</p>
+
+<p class="note"><strong>Note:</strong> The Android project view shows a hierarchy that helps you
+work with Android projects by providing a flattened structure that highlights the most commonly
+used files while developing Android applications. However, the project structure on disk differs
+from this representation.</p>
+
+<img src="{@docRoot}images/tools/projectview03.png" alt=""
+     style="margin-top:10px" width="650" height="508"/>
+<p class="img-caption"><strong>Figure 2:</strong> The traditional project view (left) and the
+Android project view (right).</p>
\ No newline at end of file
diff --git a/docs/html/tools/building/index.jd b/docs/html/tools/building/index.jd
index c64942f..c1f3019 100644
--- a/docs/html/tools/building/index.jd
+++ b/docs/html/tools/building/index.jd
@@ -79,3 +79,14 @@
     running on a device.</li>
   </ul>
 
+<p class="note"><b>Note:</b> Apps are limited to a 64K method reference limit. If your app reaches
+this limit, the build process outputs the following error message:
+
+<pre>Unable to execute dex: method ID not in [0, 0xffff]: 65536.</pre>
+
+To avoid this, you can
+<a href="http://android-developers.blogspot.com.es/2011/07/custom-class-loading-in-dalvik.html">load
+secondary dex files at runtime</a> and use
+<a href="http://developer.android.com/tools/help/proguard.html">ProGuard</a> to strip out unnecessary
+class references (Proguard only works when building in release mode).
+</p>
\ No newline at end of file
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index 71b15d5..e75f451 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -2,59 +2,59 @@
 page.template=sdk
 
 
-ndk.mac64_download=android-ndk32-r10-darwin-x86_64.tar.bz2
-ndk.mac64_bytes=411610468
-ndk.mac64_checksum=3ce1fa3dbe7a188f5d2640fd2f7ca944
+ndk.mac64_download=android-ndk32-r10b-darwin-x86_64.tar.bz2
+ndk.mac64_bytes=413652124
+ndk.mac64_checksum=7ca4a84e9c56c38acdafb007e7cd33c5
 
-ndk.mac32_download=android-ndk32-r10-darwin-x86.tar.bz2
-ndk.mac32_bytes=404768263
-ndk.mac32_checksum=1824eec1f6749b6cb7bb306a3b924c33
+ndk.mac32_download=android-ndk32-r10b-darwin-x86.tar.bz2
+ndk.mac32_bytes=406998070
+ndk.mac32_checksum=db3626b2c5f3245d90e2724f7bcf4c3e
 
-ndk.linux64_download=android-ndk32-r10-linux-x86_64.tar.bz2
-ndk.linux64_bytes=420671390
-ndk.linux64_checksum=e3ff629d212a8106a43415862fa39baf
+ndk.linux64_download=android-ndk32-r10b-linux-x86_64.tar.bz2
+ndk.linux64_bytes=422237011
+ndk.linux64_checksum=5c0f301aa789a1a747d5d2aeb8c69ef3
 
-ndk.linux32_download=android-ndk32-r10-linux-x86.tar.bz2
-ndk.linux32_bytes=420078216
-ndk.linux32_checksum=8d9a5faa6e77b43bfae0f169079b21c4
+ndk.linux32_download=android-ndk32-r10b-linux-x86.tar.bz2
+ndk.linux32_bytes=421052081
+ndk.linux32_checksum=e8f55daa5c9de7ab79aaaf5d7d751b69
 
-ndk.win64_download=android-ndk32-r10-windows-x86_64.zip
-ndk.win64_bytes=529850429
-ndk.win64_checksum=b11f9239344f7c377ed5b627f0fb236e
+ndk.win64_download=android-ndk32-r10b-windows-x86_64.zip
+ndk.win64_bytes=531912027
+ndk.win64_checksum=e4dd2e0c6f38e3ad936c366bdf6b1d4e
 
-ndk.win32_download=android-ndk32-r10-windows-x86.zip
-ndk.win32_bytes=500135685
-ndk.win32_checksum=0a3c01147abba945cc4ef5837519ec97
+ndk.win32_download=android-ndk32-r10b-windows-x86.zip
+ndk.win32_bytes=502720425
+ndk.win32_checksum=9fa4f19bca7edd6eefa63fe788737987
 
 
 
-ndk.mac64_64_download=android-ndk64-r10-darwin-x86_64.tar.bz2
-ndk.mac64_64_bytes=327740247
-ndk.mac64_64_checksum=72561b27acc6192a2e81b345ea128a20
+ndk.mac64_64_download=android-ndk64-r10b-darwin-x86_64.tar.bz2
+ndk.mac64_64_bytes=346423776
+ndk.mac64_64_checksum=5bae7feed20ebf0762c0baefe6b84b6d
 
-ndk.mac32_64_download=android-ndk64-r10-darwin-x86.tar.bz2
-ndk.mac32_64_bytes=323736411
-ndk.mac32_64_checksum=5bbaf9d8051ba5d2c0fff74cfd87c374
+ndk.mac32_64_download=android-ndk64-r10b-darwin-x86.tar.bz2
+ndk.mac32_64_bytes=344052876
+ndk.mac32_64_checksum=4447049ac2b5877176b9b6b1cf3bcdb2
 
-ndk.linux64_64_download=android-ndk64-r10-linux-x86_64.tar.bz2
-ndk.linux64_64_bytes=339708042
-ndk.linux64_64_checksum=737290195583268b7fbff4aa56465ab6
+ndk.linux64_64_download=android-ndk64-r10b-linux-x86_64.tar.bz2
+ndk.linux64_64_bytes=358835298
+ndk.linux64_64_checksum=2aa12a0d9a70bcab83e42d010a685136
 
-ndk.linux32_64_download=android-ndk64-r10-linux-x86.tar.bz2
-ndk.linux32_64_bytes=338544906
-ndk.linux32_64_checksum=bea5d027baeb948cbff6af840d26b80d
+ndk.linux32_64_download=android-ndk64-r10b-linux-x86.tar.bz2
+ndk.linux32_64_bytes=358060577
+ndk.linux32_64_checksum=b77eb583626d8c7f5c11e49181fd5eac
 
-ndk.win64_64_download=android-ndk64-r10-windows-x86_64.zip
-ndk.win64_64_bytes=417411195
-ndk.win64_64_checksum=91879ec85539b45313a21b9526b911a8
+ndk.win64_64_download=android-ndk64-r10b-windows-x86_64.zip
+ndk.win64_64_bytes=437152652
+ndk.win64_64_checksum=df39185e6c5a4d72eb9fca3f9aaabc46
 
-ndk.win32_64_download=android-ndk64-r10-windows-x86.zip
-ndk.win32_64_bytes=396751892
-ndk.win32_64_checksum=f79070ace2cde9ebf6a2e2be4a61ac7a
+ndk.win32_64_download=android-ndk64-r10b-windows-x86.zip
+ndk.win32_64_bytes=417290468
+ndk.win32_64_checksum=0f0324cb11f04e8b2641e5422ee39c81
 
-ndk.debug_info_download=android-ndk-r10-cxx-stl-libs-with-debug-info.zip
-ndk.debug_info_bytes=253198908
-ndk.debug_info_checksum=c2a90c43d17dbb5f0609cc8237491788
+ndk.debug_info_download=android-ndk-r10b-cxx-stl-libs-with-debug-info.zip
+ndk.debug_info_bytes=227302317
+ndk.debug_info_checksum=bed1bb855a41bdb572a804dbf6d45aa6
 
 
 page.title=Android NDK
@@ -357,15 +357,6 @@
 </div>
 </div>
 
-
-
-
-
-
-
-
-
-
  <div id="qv-wrapper">
     <div id="qv">
       <h2>In this document</h2>
@@ -418,7 +409,7 @@
 
 
 <p>With NDK revision 9 and higher, the release packages have been split to reduce download size.
-  The first download for each platform contains the default NDK toolchain. The second download
+  The first download for each platform contains the default NDK toolchain. The additional download
   contains legacy NDK toolchains for that platform, which is only required if you are not using
   the current, recommended toolchain for your NDK builds.</p>
 
@@ -426,10 +417,91 @@
 
 <p>The following sections provide information about releases of the NDK.</p>
 
+
 <div class="toggle-content opened">
  <p>
    <a href="#" onclick="return toggleContent(this)"> <img
      src="/assets/images/triangle-opened.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">
+ <p>
+   <a href="#" onclick="return toggleContent(this)"> <img
+     src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
    >Android NDK, Revision 10</a> <em>(July 2014)</em>
  </p>
  <div class="toggle-content-toggleme">
@@ -442,7 +514,7 @@
            <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 API level L is the first level with 64-bit support.  Note that this API
+           <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>
@@ -479,7 +551,7 @@
            <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
+           <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
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index 93e5976..8eb9cbf 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -24,6 +24,8 @@
           Creating a Project</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">
           Tips and Tricks</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/installing/studio-androidview.html">
+          Using the Android Project View</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-layout.html">
           Using the Layout Editor</a></li>
       <li><a href="<?cs var:toroot ?>sdk/installing/studio-build.html">
diff --git a/docs/html/wear/images/partners/sony.png b/docs/html/wear/images/partners/sony.png
new file mode 100644
index 0000000..e097fbb
--- /dev/null
+++ b/docs/html/wear/images/partners/sony.png
Binary files differ
diff --git a/docs/html/wear/index.jd b/docs/html/wear/index.jd
index 5dd7690..c372395 100644
--- a/docs/html/wear/index.jd
+++ b/docs/html/wear/index.jd
@@ -228,6 +228,9 @@
             <div class="col-4">
               <img src="/wear/images/partners/samsung.png" alt="Samsung">
             </div>
+            <div class="col-4">
+              <img src="/wear/images/partners/sony.png" alt="Sony">
+            </div>
           </div>
         </div> <!-- end .wrap -->
       </div>
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index f18694b..0927ffd 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -203,7 +203,7 @@
      */
     public void setBitmap(@Nullable Bitmap bitmap) {
         if (isHardwareAccelerated()) {
-            throw new RuntimeException("Can't set a bitmap device on a GL canvas");
+            throw new RuntimeException("Can't set a bitmap device on a HW accelerated canvas");
         }
 
         if (bitmap == null) {
diff --git a/graphics/java/android/graphics/Picture.java b/graphics/java/android/graphics/Picture.java
index 5aa7c6a..d28c3d5 100644
--- a/graphics/java/android/graphics/Picture.java
+++ b/graphics/java/android/graphics/Picture.java
@@ -122,6 +122,11 @@
      * @param canvas  The picture is drawn to this canvas
      */
     public void draw(Canvas canvas) {
+        if (canvas.isHardwareAccelerated()) {
+            throw new IllegalArgumentException(
+                    "Picture playback is only supported on software canvas.");
+        }
+
         if (mRecordingCanvas != null) {
             endRecording();
         }
diff --git a/graphics/java/android/graphics/PorterDuffColorFilter.java b/graphics/java/android/graphics/PorterDuffColorFilter.java
index c078c1c..705f5e6 100644
--- a/graphics/java/android/graphics/PorterDuffColorFilter.java
+++ b/graphics/java/android/graphics/PorterDuffColorFilter.java
@@ -60,6 +60,8 @@
      * @see Color
      * @see #getColor()
      * @see #getMode()
+     *
+     * @hide
      */
     public void setColor(int color) {
         mColor = color;
@@ -84,6 +86,8 @@
      * @see PorterDuff
      * @see #getMode()
      * @see #getColor()
+     *
+     * @hide
      */
     public void setMode(PorterDuff.Mode mode) {
         mMode = mode;
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index ba22550..49e8b9d 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -27,6 +27,7 @@
 import android.graphics.Outline;
 import android.graphics.PorterDuff;
 import android.graphics.Rect;
+import android.util.ArrayMap;
 import android.util.AttributeSet;
 import android.util.Log;
 
@@ -131,7 +132,9 @@
 
     private static final boolean DBG_ANIMATION_VECTOR_DRAWABLE = false;
 
-    private final AnimatedVectorDrawableState mAnimatedVectorState;
+    private AnimatedVectorDrawableState mAnimatedVectorState;
+
+    private boolean mMutated;
 
     public AnimatedVectorDrawable() {
         mAnimatedVectorState = new AnimatedVectorDrawableState(
@@ -140,7 +143,6 @@
 
     private AnimatedVectorDrawable(AnimatedVectorDrawableState state, Resources res,
             Theme theme) {
-        // TODO: Correctly handle the constant state for AVD.
         mAnimatedVectorState = new AnimatedVectorDrawableState(state);
         if (theme != null && canApplyTheme()) {
             applyTheme(theme);
@@ -148,8 +150,17 @@
     }
 
     @Override
+    public Drawable mutate() {
+        if (!mMutated && super.mutate() == this) {
+            mAnimatedVectorState = new AnimatedVectorDrawableState(mAnimatedVectorState);
+            mMutated = true;
+        }
+        return this;
+    }
+
+    @Override
     public ConstantState getConstantState() {
-        return null;
+        return mAnimatedVectorState;
     }
 
     @Override
@@ -252,6 +263,7 @@
             throws XmlPullParserException, IOException {
 
         int eventType = parser.getEventType();
+        float pathErrorScale = 1;
         while (eventType != XmlPullParser.END_DOCUMENT) {
             if (eventType == XmlPullParser.START_TAG) {
                 final String tagName = parser.getName();
@@ -261,9 +273,11 @@
                     int drawableRes = a.getResourceId(
                             R.styleable.AnimatedVectorDrawable_drawable, 0);
                     if (drawableRes != 0) {
-                        mAnimatedVectorState.mVectorDrawable = (VectorDrawable) res.getDrawable(
+                        VectorDrawable vectorDrawable = (VectorDrawable) res.getDrawable(
                                 drawableRes, theme).mutate();
-                        mAnimatedVectorState.mVectorDrawable.setAllowCaching(false);
+                        vectorDrawable.setAllowCaching(false);
+                        pathErrorScale = vectorDrawable.getPixelSize();
+                        mAnimatedVectorState.mVectorDrawable = vectorDrawable;
                     }
                     a.recycle();
                 } else if (TARGET.equals(tagName)) {
@@ -275,7 +289,8 @@
                     int id = a.getResourceId(
                             R.styleable.AnimatedVectorDrawableTarget_animation, 0);
                     if (id != 0) {
-                        Animator objectAnimator = AnimatorInflater.loadAnimator(res, theme, id);
+                        Animator objectAnimator = AnimatorInflater.loadAnimator(res, theme, id,
+                                pathErrorScale);
                         setupAnimatorsForTarget(target, objectAnimator);
                     }
                     a.recycle();
@@ -307,14 +322,31 @@
         int mChangingConfigurations;
         VectorDrawable mVectorDrawable;
         ArrayList<Animator> mAnimators;
+        ArrayMap<Animator, String> mTargetNameMap;
 
         public AnimatedVectorDrawableState(AnimatedVectorDrawableState copy) {
             if (copy != null) {
                 mChangingConfigurations = copy.mChangingConfigurations;
-                // TODO: Make sure the constant state are handled correctly.
-                mVectorDrawable = new VectorDrawable();
-                mVectorDrawable.setAllowCaching(false);
-                mAnimators = new ArrayList<Animator>();
+                if (copy.mVectorDrawable != null) {
+                    mVectorDrawable = (VectorDrawable) copy.mVectorDrawable.getConstantState().newDrawable();
+                    mVectorDrawable.mutate();
+                    mVectorDrawable.setAllowCaching(false);
+                    mVectorDrawable.setBounds(copy.mVectorDrawable.getBounds());
+                }
+                if (copy.mAnimators != null) {
+                    final int numAnimators = copy.mAnimators.size();
+                    mAnimators = new ArrayList<Animator>(numAnimators);
+                    mTargetNameMap = new ArrayMap<Animator, String>(numAnimators);
+                    for (int i = 0; i < numAnimators; ++i) {
+                        Animator anim = copy.mAnimators.get(i);
+                        Animator animClone = anim.clone();
+                        String targetName = copy.mTargetNameMap.get(anim);
+                        Object targetObject = mVectorDrawable.getTargetByName(targetName);
+                        animClone.setTarget(targetObject);
+                        mAnimators.add(animClone);
+                        mTargetNameMap.put(animClone, targetName);
+                    }
+                }
             }
         }
 
@@ -342,7 +374,12 @@
     private void setupAnimatorsForTarget(String name, Animator animator) {
         Object target = mAnimatedVectorState.mVectorDrawable.getTargetByName(name);
         animator.setTarget(target);
+        if (mAnimatedVectorState.mAnimators == null) {
+            mAnimatedVectorState.mAnimators = new ArrayList<Animator>();
+            mAnimatedVectorState.mTargetNameMap = new ArrayMap<Animator, String>();
+        }
         mAnimatedVectorState.mAnimators.add(animator);
+        mAnimatedVectorState.mTargetNameMap.put(animator, name);
         if (DBG_ANIMATION_VECTOR_DRAWABLE) {
             Log.v(LOGTAG, "add animator  for target " + name + " " + animator);
         }
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java
index 5a3e3a3..3cb5210 100644
--- a/graphics/java/android/graphics/drawable/Drawable.java
+++ b/graphics/java/android/graphics/drawable/Drawable.java
@@ -470,19 +470,6 @@
     }
 
     /**
-     * Specifies a tint and blending mode for this drawable.
-     * <p>
-     * Setting a color filter via {@link #setColorFilter(ColorFilter)} overrides
-     * tint.
-     *
-     * @param tint Color state list to use for tinting this drawable, or null to
-     *            clear the tint
-     * @param tintMode A Porter-Duff blending mode
-     * @hide TODO: Was in L-preview, remove this API for release
-     */
-    public void setTint(ColorStateList tint, PorterDuff.Mode tintMode) {}
-
-    /**
      * Specifies a tint for this drawable.
      * <p>
      * Setting a color filter via {@link #setColorFilter(ColorFilter)} overrides
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 2c8611e..e1c88cb 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -1552,6 +1552,7 @@
             mUseLevel = state.mUseLevel;
             mUseLevelForShape = state.mUseLevelForShape;
             mOpaqueOverBounds = state.mOpaqueOverBounds;
+            mOpaqueOverShape = state.mOpaqueOverShape;
             mThemeAttrs = state.mThemeAttrs;
             mAttrSize = state.mAttrSize;
             mAttrGradient = state.mAttrGradient;
diff --git a/graphics/java/android/graphics/drawable/InsetDrawable.java b/graphics/java/android/graphics/drawable/InsetDrawable.java
index a20b6d8..384226f 100644
--- a/graphics/java/android/graphics/drawable/InsetDrawable.java
+++ b/graphics/java/android/graphics/drawable/InsetDrawable.java
@@ -86,6 +86,8 @@
             throws XmlPullParserException, IOException {
         final TypedArray a = r.obtainAttributes(attrs, R.styleable.InsetDrawable);
         super.inflateWithAttributes(r, parser, a, R.styleable.InsetDrawable_visible);
+
+        mInsetState.mDrawable = null;
         updateStateFromTypedArray(a);
 
         // Load inner XML elements.
diff --git a/graphics/java/android/graphics/drawable/Ripple.java b/graphics/java/android/graphics/drawable/Ripple.java
index cd919a6..6f95f91 100644
--- a/graphics/java/android/graphics/drawable/Ripple.java
+++ b/graphics/java/android/graphics/drawable/Ripple.java
@@ -22,6 +22,7 @@
 import android.animation.TimeInterpolator;
 import android.graphics.Canvas;
 import android.graphics.CanvasProperty;
+import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Paint.Style;
 import android.graphics.Rect;
@@ -58,7 +59,7 @@
     private final Rect mBounds;
 
     /** Full-opacity color for drawing this ripple. */
-    private int mColor;
+    private int mColorOpaque;
 
     /** Maximum ripple radius. */
     private float mOuterRadius;
@@ -120,7 +121,7 @@
     }
 
     public void setup(int maxRadius, int color, float density) {
-        mColor = color | 0xFF000000;
+        mColorOpaque = color | 0xFF000000;
 
         if (maxRadius != RippleDrawable.RADIUS_AUTO) {
             mHasMaxRadius = true;
@@ -236,6 +237,9 @@
         if (N > 0) {
             cancelHardwareAnimations(false);
 
+            // We canceled old animations, but we're about to run new ones.
+            mHardwareAnimating = true;
+
             for (int i = 0; i < N; i++) {
                 pendingAnimations.get(i).setTarget(c);
                 pendingAnimations.get(i).start();
@@ -253,9 +257,8 @@
     private boolean drawSoftware(Canvas c, Paint p) {
         boolean hasContent = false;
 
-        // Cache the paint alpha so we can restore it later.
-        final int paintAlpha = p.getAlpha();
-        final int alpha = (int) (paintAlpha * mOpacity + 0.5f);
+        p.setColor(mColorOpaque);
+        final int alpha = (int) (255 * mOpacity + 0.5f);
         final float radius = MathUtils.lerp(0, mOuterRadius, mTweenRadius);
         if (alpha > 0 && radius > 0) {
             final float x = MathUtils.lerp(
@@ -268,8 +271,6 @@
             hasContent = true;
         }
 
-        p.setAlpha(paintAlpha);
-
         return hasContent;
     }
 
@@ -369,7 +370,7 @@
         final float startRadius = MathUtils.lerp(0, mOuterRadius, mTweenRadius);
         final Paint paint = getTempPaint();
         paint.setAntiAlias(true);
-        paint.setColor(mColor);
+        paint.setColor(mColorOpaque);
         paint.setAlpha((int) (255 * mOpacity + 0.5f));
         paint.setStyle(Style.FILL);
         mPropPaint = CanvasProperty.createPaint(paint);
@@ -402,6 +403,12 @@
 
         mHardwareAnimating = true;
 
+        // Set up the software values to match the hardware end values.
+        mOpacity = 0;
+        mTweenX = 1;
+        mTweenY = 1;
+        mTweenRadius = 1;
+
         invalidateSelf();
     }
 
@@ -412,46 +419,32 @@
     public void jump() {
         mCanceled = true;
         endSoftwareAnimations();
-        endHardwareAnimations();
+        cancelHardwareAnimations(true);
         mCanceled = false;
     }
 
     private void endSoftwareAnimations() {
         if (mAnimRadius != null) {
             mAnimRadius.end();
+            mAnimRadius = null;
         }
 
         if (mAnimOpacity != null) {
             mAnimOpacity.end();
+            mAnimOpacity = null;
         }
 
         if (mAnimX != null) {
             mAnimX.end();
+            mAnimX = null;
         }
 
         if (mAnimY != null) {
             mAnimY.end();
+            mAnimY = null;
         }
     }
 
-    private void endHardwareAnimations() {
-        final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
-        final int N = runningAnimations.size();
-        for (int i = 0; i < N; i++) {
-            runningAnimations.get(i).end();
-        }
-        runningAnimations.clear();
-
-        // Abort any pending animations. Since we always have a completion
-        // listener on a pending animation, we also need to remove ourselves.
-        if (!mPendingAnimations.isEmpty()) {
-            mPendingAnimations.clear();
-            removeSelf();
-        }
-
-        mHardwareAnimating = false;
-    }
-
     private Paint getTempPaint() {
         if (mTempPaint == null) {
             mTempPaint = new Paint();
@@ -506,18 +499,22 @@
     private void cancelSoftwareAnimations() {
         if (mAnimRadius != null) {
             mAnimRadius.cancel();
+            mAnimRadius = null;
         }
 
         if (mAnimOpacity != null) {
             mAnimOpacity.cancel();
+            mAnimOpacity = null;
         }
 
         if (mAnimX != null) {
             mAnimX.cancel();
+            mAnimX = null;
         }
 
         if (mAnimY != null) {
             mAnimY.cancel();
+            mAnimY = null;
         }
     }
 
diff --git a/graphics/java/android/graphics/drawable/RippleBackground.java b/graphics/java/android/graphics/drawable/RippleBackground.java
index 40a5e18..bc6f5fb 100644
--- a/graphics/java/android/graphics/drawable/RippleBackground.java
+++ b/graphics/java/android/graphics/drawable/RippleBackground.java
@@ -22,6 +22,7 @@
 import android.animation.TimeInterpolator;
 import android.graphics.Canvas;
 import android.graphics.CanvasProperty;
+import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Paint.Style;
 import android.graphics.Rect;
@@ -37,10 +38,8 @@
  */
 class RippleBackground {
     private static final TimeInterpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
-    private static final TimeInterpolator DECEL_INTERPOLATOR = new LogInterpolator();
 
     private static final float GLOBAL_SPEED = 1.0f;
-    private static final float WAVE_TOUCH_DOWN_ACCELERATION = 1024.0f * GLOBAL_SPEED;
     private static final float WAVE_OPACITY_DECAY_VELOCITY = 3.0f / GLOBAL_SPEED;
     private static final float WAVE_OUTER_OPACITY_EXIT_VELOCITY_MAX = 4.5f * GLOBAL_SPEED;
     private static final float WAVE_OUTER_OPACITY_EXIT_VELOCITY_MIN = 1.5f * GLOBAL_SPEED;
@@ -48,8 +47,6 @@
     private static final float WAVE_OUTER_SIZE_INFLUENCE_MAX = 200f;
     private static final float WAVE_OUTER_SIZE_INFLUENCE_MIN = 40f;
 
-    private static final long RIPPLE_ENTER_DELAY = 80;
-
     // Hardware animators.
     private final ArrayList<RenderNodeAnimator> mRunningAnimations =
             new ArrayList<RenderNodeAnimator>();
@@ -62,7 +59,10 @@
     private final Rect mBounds;
 
     /** Full-opacity color for drawing this ripple. */
-    private int mColor;
+    private int mColorOpaque;
+
+    /** Maximum alpha value for drawing this ripple. */
+    private int mColorAlpha;
 
     /** Maximum ripple radius. */
     private float mOuterRadius;
@@ -70,11 +70,6 @@
     /** Screen density used to adjust pixel-based velocities. */
     private float mDensity;
 
-    private float mStartingX;
-    private float mStartingY;
-    private float mClampedStartingX;
-    private float mClampedStartingY;
-
     // Hardware rendering properties.
     private CanvasProperty<Paint> mPropOuterPaint;
     private CanvasProperty<Float> mPropOuterRadius;
@@ -83,8 +78,6 @@
 
     // Software animators.
     private ObjectAnimator mAnimOuterOpacity;
-    private ObjectAnimator mAnimX;
-    private ObjectAnimator mAnimY;
 
     // Temporary paint used for creating canvas properties.
     private Paint mTempPaint;
@@ -94,10 +87,6 @@
     private float mOuterX;
     private float mOuterY;
 
-    // Values used to tween between the start and end positions.
-    private float mTweenX = 0;
-    private float mTweenY = 0;
-
     /** Whether we should be drawing hardware animations. */
     private boolean mHardwareAnimating;
 
@@ -107,22 +96,17 @@
     /** Whether we have an explicit maximum radius. */
     private boolean mHasMaxRadius;
 
-    /** Whether we were canceled externally and should avoid self-removal. */
-    private boolean mCanceled;
-
     /**
      * Creates a new ripple.
      */
-    public RippleBackground(RippleDrawable owner, Rect bounds, float startingX, float startingY) {
+    public RippleBackground(RippleDrawable owner, Rect bounds) {
         mOwner = owner;
         mBounds = bounds;
-
-        mStartingX = startingX;
-        mStartingY = startingY;
     }
 
     public void setup(int maxRadius, int color, float density) {
-        mColor = color | 0xFF000000;
+        mColorOpaque = color | 0xFF000000;
+        mColorAlpha = Color.alpha(color);
 
         if (maxRadius != RippleDrawable.RADIUS_AUTO) {
             mHasMaxRadius = true;
@@ -136,25 +120,6 @@
         mOuterX = 0;
         mOuterY = 0;
         mDensity = density;
-
-        clampStartingPosition();
-    }
-
-    private void clampStartingPosition() {
-        final float cX = mBounds.exactCenterX();
-        final float cY = mBounds.exactCenterY();
-        final float dX = mStartingX - cX;
-        final float dY = mStartingY - cY;
-        final float r = mOuterRadius;
-        if (dX * dX + dY * dY > r * r) {
-            // Point is outside the circle, clamp to the circumference.
-            final double angle = Math.atan2(dY, dX);
-            mClampedStartingX = cX + (float) (Math.cos(angle) * r);
-            mClampedStartingY = cY + (float) (Math.sin(angle) * r);
-        } else {
-            mClampedStartingX = mStartingX;
-            mClampedStartingY = mStartingY;
-        }
     }
 
     public void onHotspotBoundsChanged() {
@@ -162,8 +127,6 @@
             final float halfWidth = mBounds.width() / 2.0f;
             final float halfHeight = mBounds.height() / 2.0f;
             mOuterRadius = (float) Math.sqrt(halfWidth * halfWidth + halfHeight * halfHeight);
-
-            clampStartingPosition();
         }
     }
 
@@ -178,28 +141,6 @@
         return mOuterOpacity;
     }
 
-    @SuppressWarnings("unused")
-    public void setXGravity(float x) {
-        mTweenX = x;
-        invalidateSelf();
-    }
-
-    @SuppressWarnings("unused")
-    public float getXGravity() {
-        return mTweenX;
-    }
-
-    @SuppressWarnings("unused")
-    public void setYGravity(float y) {
-        mTweenY = y;
-        invalidateSelf();
-    }
-
-    @SuppressWarnings("unused")
-    public float getYGravity() {
-        return mTweenY;
-    }
-
     /**
      * Draws the ripple centered at (0,0) using the specified paint.
      */
@@ -221,6 +162,11 @@
         return hasContent;
     }
 
+    public boolean shouldDraw() {
+        final int outerAlpha = (int) (mColorAlpha * mOuterOpacity + 0.5f);
+        return mCanUseHardware && mHardwareAnimating || outerAlpha > 0 && mOuterRadius > 0;
+    }
+
     private boolean drawHardware(HardwareCanvas c) {
         // If we have any pending hardware animations, cancel any running
         // animations and start those now.
@@ -229,6 +175,9 @@
         if (N > 0) {
             cancelHardwareAnimations(false);
 
+            // We canceled old animations, but we're about to run new ones.
+            mHardwareAnimating = true;
+
             for (int i = 0; i < N; i++) {
                 pendingAnimations.get(i).setTarget(c);
                 pendingAnimations.get(i).start();
@@ -246,10 +195,8 @@
     private boolean drawSoftware(Canvas c, Paint p) {
         boolean hasContent = false;
 
-        // Cache the paint alpha so we can restore it later.
-        final int paintAlpha = p.getAlpha();
-
-        final int outerAlpha = (int) (paintAlpha * mOuterOpacity + 0.5f);
+        p.setColor(mColorOpaque);
+        final int outerAlpha = (int) (mColorAlpha * mOuterOpacity + 0.5f);
         if (outerAlpha > 0 && mOuterRadius > 0) {
             p.setAlpha(outerAlpha);
             p.setStyle(Style.FILL);
@@ -257,8 +204,6 @@
             hasContent = true;
         }
 
-        p.setAlpha(paintAlpha);
-
         return hasContent;
     }
 
@@ -273,53 +218,23 @@
     }
 
     /**
-     * Specifies the starting position relative to the drawable bounds. No-op if
-     * the ripple has already entered.
-     */
-    public void move(float x, float y) {
-        mStartingX = x;
-        mStartingY = y;
-
-        clampStartingPosition();
-    }
-
-    /**
      * Starts the enter animation.
      */
     public void enter() {
         cancel();
 
-        final int radiusDuration = (int)
-                (1000 * Math.sqrt(mOuterRadius / WAVE_TOUCH_DOWN_ACCELERATION * mDensity) + 0.5);
         final int outerDuration = (int) (1000 * 1.0f / WAVE_OUTER_OPACITY_ENTER_VELOCITY);
-
-        final ObjectAnimator cX = ObjectAnimator.ofFloat(this, "xGravity", 1);
-        cX.setAutoCancel(true);
-        cX.setDuration(radiusDuration);
-        cX.setInterpolator(LINEAR_INTERPOLATOR);
-        cX.setStartDelay(RIPPLE_ENTER_DELAY);
-
-        final ObjectAnimator cY = ObjectAnimator.ofFloat(this, "yGravity", 1);
-        cY.setAutoCancel(true);
-        cY.setDuration(radiusDuration);
-        cY.setInterpolator(LINEAR_INTERPOLATOR);
-        cY.setStartDelay(RIPPLE_ENTER_DELAY);
-
         final ObjectAnimator outer = ObjectAnimator.ofFloat(this, "outerOpacity", 0, 1);
         outer.setAutoCancel(true);
         outer.setDuration(outerDuration);
         outer.setInterpolator(LINEAR_INTERPOLATOR);
 
         mAnimOuterOpacity = outer;
-        mAnimX = cX;
-        mAnimY = cY;
 
         // Enter animations always run on the UI thread, since it's unlikely
         // that anything interesting is happening until the user lifts their
         // finger.
         outer.start();
-        cX.start();
-        cY.start();
     }
 
     /**
@@ -340,31 +255,25 @@
         // Determine at what time the inner and outer opacity intersect.
         // inner(t) = mOpacity - t * WAVE_OPACITY_DECAY_VELOCITY / 1000
         // outer(t) = mOuterOpacity + t * WAVE_OUTER_OPACITY_VELOCITY / 1000
-        final int outerInflection = Math.max(0, (int) (1000 * (1 - mOuterOpacity)
+        final int inflectionDuration = Math.max(0, (int) (1000 * (1 - mOuterOpacity)
                 / (WAVE_OPACITY_DECAY_VELOCITY + outerOpacityVelocity) + 0.5f));
-        final int inflectionOpacity = (int) (255 * (mOuterOpacity + outerInflection
-                * outerOpacityVelocity * outerSizeInfluence / 1000) + 0.5f);
+        final int inflectionOpacity = (int) (mColorAlpha * (mOuterOpacity
+                + inflectionDuration * outerOpacityVelocity * outerSizeInfluence / 1000) + 0.5f);
 
         if (mCanUseHardware) {
-            exitHardware(opacityDuration, outerInflection, inflectionOpacity);
+            exitHardware(opacityDuration, inflectionDuration, inflectionOpacity);
         } else {
-            exitSoftware(opacityDuration, outerInflection, inflectionOpacity);
+            exitSoftware(opacityDuration, inflectionDuration, inflectionOpacity);
         }
     }
 
-    private void exitHardware(int opacityDuration, int outerInflection, int inflectionOpacity) {
+    private void exitHardware(int opacityDuration, int inflectionDuration, int inflectionOpacity) {
         mPendingAnimations.clear();
 
-        // TODO: Adjust background by starting position.
-        final float startX = MathUtils.lerp(
-                mClampedStartingX - mBounds.exactCenterX(), mOuterX, mTweenX);
-        final float startY = MathUtils.lerp(
-                mClampedStartingY - mBounds.exactCenterY(), mOuterY, mTweenY);
-
         final Paint outerPaint = getTempPaint();
         outerPaint.setAntiAlias(true);
-        outerPaint.setColor(mColor);
-        outerPaint.setAlpha((int) (255 * mOuterOpacity + 0.5f));
+        outerPaint.setColor(mColorOpaque);
+        outerPaint.setAlpha((int) (mColorAlpha * mOuterOpacity + 0.5f));
         outerPaint.setStyle(Style.FILL);
         mPropOuterPaint = CanvasProperty.createPaint(outerPaint);
         mPropOuterRadius = CanvasProperty.createFloat(mOuterRadius);
@@ -372,21 +281,21 @@
         mPropOuterY = CanvasProperty.createFloat(mOuterY);
 
         final RenderNodeAnimator outerOpacityAnim;
-        if (outerInflection > 0) {
+        if (inflectionDuration > 0) {
             // Outer opacity continues to increase for a bit.
-            outerOpacityAnim = new RenderNodeAnimator(
-                    mPropOuterPaint, RenderNodeAnimator.PAINT_ALPHA, inflectionOpacity);
-            outerOpacityAnim.setDuration(outerInflection);
+            outerOpacityAnim = new RenderNodeAnimator(mPropOuterPaint,
+                    RenderNodeAnimator.PAINT_ALPHA, inflectionOpacity);
+            outerOpacityAnim.setDuration(inflectionDuration);
             outerOpacityAnim.setInterpolator(LINEAR_INTERPOLATOR);
 
             // Chain the outer opacity exit animation.
-            final int outerDuration = opacityDuration - outerInflection;
+            final int outerDuration = opacityDuration - inflectionDuration;
             if (outerDuration > 0) {
                 final RenderNodeAnimator outerFadeOutAnim = new RenderNodeAnimator(
                         mPropOuterPaint, RenderNodeAnimator.PAINT_ALPHA, 0);
                 outerFadeOutAnim.setDuration(outerDuration);
                 outerFadeOutAnim.setInterpolator(LINEAR_INTERPOLATOR);
-                outerFadeOutAnim.setStartDelay(outerInflection);
+                outerFadeOutAnim.setStartDelay(inflectionDuration);
                 outerFadeOutAnim.setStartValue(inflectionOpacity);
                 outerFadeOutAnim.addListener(mAnimationListener);
 
@@ -406,6 +315,9 @@
 
         mHardwareAnimating = true;
 
+        // Set up the software values to match the hardware end values.
+        mOuterOpacity = 0;
+
         invalidateSelf();
     }
 
@@ -414,42 +326,15 @@
      * removing the ripple from the list of animating ripples.
      */
     public void jump() {
-        mCanceled = true;
         endSoftwareAnimations();
-        endHardwareAnimations();
-        mCanceled = false;
+        cancelHardwareAnimations(true);
     }
 
     private void endSoftwareAnimations() {
         if (mAnimOuterOpacity != null) {
             mAnimOuterOpacity.end();
+            mAnimOuterOpacity = null;
         }
-
-        if (mAnimX != null) {
-            mAnimX.end();
-        }
-
-        if (mAnimY != null) {
-            mAnimY.end();
-        }
-    }
-
-    private void endHardwareAnimations() {
-        final ArrayList<RenderNodeAnimator> runningAnimations = mRunningAnimations;
-        final int N = runningAnimations.size();
-        for (int i = 0; i < N; i++) {
-            runningAnimations.get(i).end();
-        }
-        runningAnimations.clear();
-
-        // Abort any pending animations. Since we always have a completion
-        // listener on a pending animation, we also need to remove ourselves.
-        if (!mPendingAnimations.isEmpty()) {
-            mPendingAnimations.clear();
-            removeSelf();
-        }
-
-        mHardwareAnimating = false;
     }
 
     private Paint getTempPaint() {
@@ -459,28 +344,18 @@
         return mTempPaint;
     }
 
-    private void exitSoftware(int opacityDuration, int outerInflection, int inflectionOpacity) {
-        final ObjectAnimator xAnim = ObjectAnimator.ofFloat(this, "xGravity", 1);
-        xAnim.setAutoCancel(true);
-        xAnim.setDuration(opacityDuration);
-        xAnim.setInterpolator(DECEL_INTERPOLATOR);
-
-        final ObjectAnimator yAnim = ObjectAnimator.ofFloat(this, "yGravity", 1);
-        yAnim.setAutoCancel(true);
-        yAnim.setDuration(opacityDuration);
-        yAnim.setInterpolator(DECEL_INTERPOLATOR);
-
+    private void exitSoftware(int opacityDuration, int inflectionDuration, int inflectionOpacity) {
         final ObjectAnimator outerOpacityAnim;
-        if (outerInflection > 0) {
+        if (inflectionDuration > 0) {
             // Outer opacity continues to increase for a bit.
             outerOpacityAnim = ObjectAnimator.ofFloat(this,
                     "outerOpacity", inflectionOpacity / 255.0f);
             outerOpacityAnim.setAutoCancel(true);
-            outerOpacityAnim.setDuration(outerInflection);
+            outerOpacityAnim.setDuration(inflectionDuration);
             outerOpacityAnim.setInterpolator(LINEAR_INTERPOLATOR);
 
             // Chain the outer opacity exit animation.
-            final int outerDuration = opacityDuration - outerInflection;
+            final int outerDuration = opacityDuration - inflectionDuration;
             if (outerDuration > 0) {
                 outerOpacityAnim.addListener(new AnimatorListenerAdapter() {
                     @Override
@@ -513,12 +388,8 @@
         }
 
         mAnimOuterOpacity = outerOpacityAnim;
-        mAnimX = xAnim;
-        mAnimY = yAnim;
 
         outerOpacityAnim.start();
-        xAnim.start();
-        yAnim.start();
     }
 
     /**
@@ -526,23 +397,14 @@
      * the ripple from the list of animating ripples.
      */
     public void cancel() {
-        mCanceled = true;
         cancelSoftwareAnimations();
         cancelHardwareAnimations(true);
-        mCanceled = false;
     }
 
     private void cancelSoftwareAnimations() {
         if (mAnimOuterOpacity != null) {
             mAnimOuterOpacity.cancel();
-        }
-
-        if (mAnimX != null) {
-            mAnimX.cancel();
-        }
-
-        if (mAnimY != null) {
-            mAnimY.cancel();
+            mAnimOuterOpacity = null;
         }
     }
 
@@ -555,7 +417,6 @@
         for (int i = 0; i < N; i++) {
             runningAnimations.get(i).cancel();
         }
-
         runningAnimations.clear();
 
         if (cancelPending && !mPendingAnimations.isEmpty()) {
@@ -565,13 +426,6 @@
         mHardwareAnimating = false;
     }
 
-    private void removeSelf() {
-        // The owner will invalidate itself.
-        if (!mCanceled) {
-            mOwner.removeBackground(this);
-        }
-    }
-
     private void invalidateSelf() {
         mOwner.invalidateSelf();
     }
@@ -579,17 +433,7 @@
     private final AnimatorListenerAdapter mAnimationListener = new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
-            removeSelf();
+            mHardwareAnimating = false;
         }
     };
-
-    /**
-    * Interpolator with a smooth log deceleration
-    */
-    private static final class LogInterpolator implements TimeInterpolator {
-        @Override
-        public float getInterpolation(float input) {
-            return 1 - (float) Math.pow(400, -input * 1.4);
-        }
-    }
 }
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java
index b90fd81..b13669b 100644
--- a/graphics/java/android/graphics/drawable/RippleDrawable.java
+++ b/graphics/java/android/graphics/drawable/RippleDrawable.java
@@ -156,6 +156,13 @@
     private boolean mOverrideBounds;
 
     /**
+     * Whether the next draw MUST draw something to canvas. Used to work around
+     * a bug in hardware invalidation following a render thread-accelerated
+     * animation.
+     */
+    private boolean mNeedsDraw;
+
+    /**
      * Constructor used for drawable inflation.
      */
     RippleDrawable() {
@@ -204,6 +211,8 @@
         }
 
         cancelExitingRipples();
+
+        mNeedsDraw = true;
         invalidateSelf();
     }
 
@@ -242,21 +251,20 @@
 
     @Override
     protected boolean onStateChange(int[] stateSet) {
-        super.onStateChange(stateSet);
+        final boolean changed = super.onStateChange(stateSet);
 
         boolean enabled = false;
         boolean pressed = false;
         boolean focused = false;
 
-        final int N = stateSet.length;
-        for (int i = 0; i < N; i++) {
-            if (stateSet[i] == R.attr.state_enabled) {
+        for (int state : stateSet) {
+            if (state == R.attr.state_enabled) {
                 enabled = true;
             }
-            if (stateSet[i] == R.attr.state_focused) {
+            if (state == R.attr.state_focused) {
                 focused = true;
             }
-            if (stateSet[i] == R.attr.state_pressed) {
+            if (state == R.attr.state_pressed) {
                 pressed = true;
             }
         }
@@ -264,19 +272,7 @@
         setRippleActive(enabled && pressed);
         setBackgroundActive(focused || (enabled && pressed));
 
-        // Update the paint color. Only applicable when animated in software.
-        if (mRipplePaint != null && mState.mColor != null) {
-            final ColorStateList stateList = mState.mColor;
-            final int newColor = stateList.getColorForState(stateSet, 0);
-            final int oldColor = mRipplePaint.getColor();
-            if (oldColor != newColor) {
-                mRipplePaint.setColor(newColor);
-                invalidateSelf();
-                return true;
-            }
-        }
-
-        return false;
+        return changed;
     }
 
     private void setRippleActive(boolean active) {
@@ -478,10 +474,6 @@
         if (mRipple != null) {
             mRipple.move(x, y);
         }
-
-        if (mBackground != null) {
-            mBackground.move(x, y);
-        }
     }
 
     /**
@@ -489,17 +481,7 @@
      */
     private void tryBackgroundEnter() {
         if (mBackground == null) {
-            final float x;
-            final float y;
-            if (mHasPending) {
-                mHasPending = false;
-                x = mPendingX;
-                y = mPendingY;
-            } else {
-                x = mHotspotBounds.exactCenterX();
-                y = mHotspotBounds.exactCenterY();
-            }
-            mBackground = new RippleBackground(this, mHotspotBounds, x, y);
+            mBackground = new RippleBackground(this, mHotspotBounds);
         }
 
         final int color = mState.mColor.getColorForState(getState(), Color.TRANSPARENT);
@@ -575,6 +557,8 @@
         }
 
         cancelExitingRipples();
+
+        mNeedsDraw = true;
         invalidateSelf();
     }
 
@@ -602,6 +586,10 @@
             ripples[i].onHotspotBoundsChanged();
         }
 
+        if (mRipple != null) {
+            mRipple.onHotspotBoundsChanged();
+        }
+
         if (mBackground != null) {
             mBackground.onHotspotBoundsChanged();
         }
@@ -628,22 +616,27 @@
 
     @Override
     public void draw(@NonNull Canvas canvas) {
-        final boolean isProjected = isProjected();
         final boolean hasMask = mMask != null;
         final boolean drawNonMaskContent = mLayerState.mNum > (hasMask ? 1 : 0);
         final boolean drawMask = hasMask && mMask.getOpacity() != PixelFormat.OPAQUE;
-        final Rect bounds = isProjected ? getDirtyBounds() : getBounds();
+        final Rect bounds = getDirtyBounds();
+        final int saveCount = canvas.save(Canvas.CLIP_SAVE_FLAG);
+        canvas.clipRect(bounds);
 
         // If we have content, draw it into a layer first.
-        final int contentLayer = drawNonMaskContent ?
-                drawContentLayer(canvas, bounds, SRC_OVER) : -1;
+        final int contentLayer;
+        if (drawNonMaskContent) {
+            contentLayer = drawContentLayer(canvas, bounds, SRC_OVER);
+        } else {
+            contentLayer = -1;
+        }
 
         // Next, try to draw the ripples (into a layer if necessary). If we need
         // to mask against the underlying content, set the xfermode to SRC_ATOP.
         final PorterDuffXfermode xfermode = (hasMask || !drawNonMaskContent) ? SRC_OVER : SRC_ATOP;
 
         // If we have a background and a non-opaque mask, draw the masking layer.
-        final int backgroundLayer = drawBackgroundLayer(canvas, bounds, xfermode);
+        final int backgroundLayer = drawBackgroundLayer(canvas, bounds, xfermode, drawMask);
         if (backgroundLayer >= 0) {
             if (drawMask) {
                 drawMaskingLayer(canvas, bounds, DST_IN);
@@ -660,10 +653,14 @@
             canvas.restoreToCount(rippleLayer);
         }
 
-        // Composite the layers if needed.
-        if (contentLayer >= 0) {
-            canvas.restoreToCount(contentLayer);
+        // If we failed to draw anything and we just canceled animations, at
+        // least draw a color so that hardware invalidation works correctly.
+        if (contentLayer < 0 && backgroundLayer < 0 && rippleLayer < 0 && mNeedsDraw) {
+            canvas.drawColor(Color.TRANSPARENT);
         }
+        mNeedsDraw = false;
+
+        canvas.restoreToCount(saveCount);
     }
 
     /**
@@ -685,13 +682,6 @@
         }
     }
 
-    void removeBackground(RippleBackground background) {
-        if (mBackground == background) {
-            mBackground = null;
-            invalidateSelf();
-        }
-    }
-
     private int getRippleIndex(Ripple ripple) {
         final Ripple[] ripples = mExitingRipples;
         final int count = mExitingRipplesCount;
@@ -734,81 +724,29 @@
         return restoreToCount;
     }
 
-    private int drawBackgroundLayer(Canvas canvas, Rect bounds, PorterDuffXfermode mode) {
-        // Separate the ripple color and alpha channel. The alpha will be
-        // applied when we merge the ripples down to the canvas.
-        final int rippleARGB;
-        if (mState.mColor != null) {
-            rippleARGB = mState.mColor.getColorForState(getState(), Color.TRANSPARENT);
-        } else {
-            rippleARGB = Color.TRANSPARENT;
+    private int drawBackgroundLayer(
+            Canvas canvas, Rect bounds, PorterDuffXfermode mode, boolean drawMask) {
+        int saveCount = -1;
+
+        if (mBackground != null && mBackground.shouldDraw()) {
+            // TODO: We can avoid saveLayer here if we push the xfermode into
+            // the background's render thread animator at exit() time.
+            if (drawMask || mode != SRC_OVER) {
+                saveCount = canvas.saveLayer(bounds.left, bounds.top, bounds.right,
+                        bounds.bottom, getMaskingPaint(mode));
+            }
+
+            final float x = mHotspotBounds.exactCenterX();
+            final float y = mHotspotBounds.exactCenterY();
+            canvas.translate(x, y);
+            mBackground.draw(canvas, getRipplePaint());
+            canvas.translate(-x, -y);
         }
 
-        if (mRipplePaint == null) {
-            mRipplePaint = new Paint();
-            mRipplePaint.setAntiAlias(true);
-        }
-
-        final int rippleAlpha = Color.alpha(rippleARGB);
-        final Paint ripplePaint = mRipplePaint;
-        ripplePaint.setColor(rippleARGB);
-        ripplePaint.setAlpha(0xFF);
-
-        boolean drewRipples = false;
-        int restoreToCount = -1;
-        int restoreTranslate = -1;
-
-        // Draw background.
-        final RippleBackground background = mBackground;
-        if (background != null) {
-            // If we're masking the ripple layer, make sure we have a layer
-            // first. This will merge SRC_OVER (directly) onto the canvas.
-            final Paint maskingPaint = getMaskingPaint(mode);
-            maskingPaint.setAlpha(rippleAlpha);
-            restoreToCount = canvas.saveLayer(bounds.left, bounds.top,
-                    bounds.right, bounds.bottom, maskingPaint);
-
-            restoreTranslate = canvas.save();
-            // Translate the canvas to the current hotspot bounds.
-            canvas.translate(mHotspotBounds.exactCenterX(), mHotspotBounds.exactCenterY());
-
-            drewRipples = background.draw(canvas, ripplePaint);
-        }
-
-        // Always restore the translation.
-        if (restoreTranslate >= 0) {
-            canvas.restoreToCount(restoreTranslate);
-        }
-
-        // If we created a layer with no content, merge it immediately.
-        if (restoreToCount >= 0 && !drewRipples) {
-            canvas.restoreToCount(restoreToCount);
-            restoreToCount = -1;
-        }
-
-        return restoreToCount;
+        return saveCount;
     }
 
     private int drawRippleLayer(Canvas canvas, Rect bounds, PorterDuffXfermode mode) {
-        // Separate the ripple color and alpha channel. The alpha will be
-        // applied when we merge the ripples down to the canvas.
-        final int rippleARGB;
-        if (mState.mColor != null) {
-            rippleARGB = mState.mColor.getColorForState(getState(), Color.TRANSPARENT);
-        } else {
-            rippleARGB = Color.TRANSPARENT;
-        }
-
-        if (mRipplePaint == null) {
-            mRipplePaint = new Paint();
-            mRipplePaint.setAntiAlias(true);
-        }
-
-        final int rippleAlpha = Color.alpha(rippleARGB);
-        final Paint ripplePaint = mRipplePaint;
-        ripplePaint.setColor(rippleARGB);
-        ripplePaint.setAlpha(0xFF);
-
         boolean drewRipples = false;
         int restoreToCount = -1;
         int restoreTranslate = -1;
@@ -830,16 +768,21 @@
             // first. This will merge SRC_OVER (directly) onto the canvas.
             if (restoreToCount < 0) {
                 final Paint maskingPaint = getMaskingPaint(mode);
-                maskingPaint.setAlpha(rippleAlpha);
+                final int color = mState.mColor.getColorForState(getState(), Color.TRANSPARENT);
+                final int alpha = Color.alpha(color);
+                maskingPaint.setAlpha(alpha / 2);
+
+                // TODO: We can avoid saveLayer here if we're only drawing one
+                // ripple and we don't have content or a translucent mask.
                 restoreToCount = canvas.saveLayer(bounds.left, bounds.top,
                         bounds.right, bounds.bottom, maskingPaint);
 
-                restoreTranslate = canvas.save();
                 // Translate the canvas to the current hotspot bounds.
+                restoreTranslate = canvas.save();
                 canvas.translate(mHotspotBounds.exactCenterX(), mHotspotBounds.exactCenterY());
             }
 
-            drewRipples |= ripple.draw(canvas, ripplePaint);
+            drewRipples |= ripple.draw(canvas, getRipplePaint());
         }
 
         // Always restore the translation.
@@ -868,6 +811,14 @@
         return restoreToCount;
     }
 
+    private Paint getRipplePaint() {
+        if (mRipplePaint == null) {
+            mRipplePaint = new Paint();
+            mRipplePaint.setAntiAlias(true);
+        }
+        return mRipplePaint;
+    }
+
     private Paint getMaskingPaint(PorterDuffXfermode xfermode) {
         if (mMaskingPaint == null) {
             mMaskingPaint = new Paint();
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 042da5b..65ab454 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -368,6 +368,29 @@
         }
     }
 
+    /**
+     * The size of a pixel when scaled from the intrinsic dimension to the viewport dimension.
+     * This is used to calculate the path animation accuracy.
+     *
+     * @hide
+     */
+    public float getPixelSize() {
+        if (mVectorState == null && mVectorState.mVPathRenderer == null ||
+                mVectorState.mVPathRenderer.mBaseWidth == 0 ||
+                mVectorState.mVPathRenderer.mBaseHeight == 0 ||
+                mVectorState.mVPathRenderer.mViewportHeight == 0 ||
+                mVectorState.mVPathRenderer.mViewportWidth == 0) {
+            return 1; // fall back to 1:1 pixel mapping.
+        }
+        float intrinsicWidth = mVectorState.mVPathRenderer.mBaseWidth;
+        float intrinsicHeight = mVectorState.mVPathRenderer.mBaseHeight;
+        float viewportWidth = mVectorState.mVPathRenderer.mViewportWidth;
+        float viewportHeight = mVectorState.mVPathRenderer.mViewportHeight;
+        float scaleX = viewportWidth / intrinsicWidth;
+        float scaleY = viewportHeight / intrinsicHeight;
+        return Math.min(scaleX, scaleY);
+    }
+
     /** @hide */
     public static VectorDrawable create(Resources resources, int rid) {
         try {
@@ -606,6 +629,15 @@
                 mThemeAttrs = copy.mThemeAttrs;
                 mChangingConfigurations = copy.mChangingConfigurations;
                 mVPathRenderer = new VPathRenderer(copy.mVPathRenderer);
+                if (copy.mVPathRenderer.mFillPaint != null) {
+                    mVPathRenderer.mFillPaint = new Paint(copy.mVPathRenderer.mFillPaint);
+                }
+                if (copy.mVPathRenderer.mStrokePaint != null) {
+                    mVPathRenderer.mStrokePaint = new Paint(copy.mVPathRenderer.mStrokePaint);
+                }
+                if (copy.mVPathRenderer.mColorFilter != null) {
+                    mVPathRenderer.mColorFilter = copy.mVPathRenderer.mColorFilter;
+                }
                 mTint = copy.mTint;
                 mTintMode = copy.mTintMode;
                 mAutoMirrored = copy.mAutoMirrored;
@@ -677,8 +709,8 @@
          */
         // Variables that only used temporarily inside the draw() call, so there
         // is no need for deep copying.
-        private final Path mPath = new Path();
-        private final Path mRenderPath = new Path();
+        private final Path mPath;
+        private final Path mRenderPath;
         private static final Matrix IDENTITY_MATRIX = new Matrix();
         private final Matrix mFinalPathMatrix = new Matrix();
 
@@ -701,6 +733,8 @@
 
         public VPathRenderer() {
             mRootGroup = new VGroup();
+            mPath = new Path();
+            mRenderPath = new Path();
         }
 
         public void setRootAlpha(int alpha) {
@@ -713,6 +747,8 @@
 
         public VPathRenderer(VPathRenderer copy) {
             mRootGroup = new VGroup(copy.mRootGroup, mVGTargetsMap);
+            mPath = new Path(copy.mPath);
+            mRenderPath = new Path(copy.mRenderPath);
             mBaseWidth = copy.mBaseWidth;
             mBaseHeight = copy.mBaseHeight;
             mViewportWidth = copy.mViewportWidth;
diff --git a/graphics/java/android/graphics/pdf/PdfEditor.java b/graphics/java/android/graphics/pdf/PdfEditor.java
new file mode 100644
index 0000000..9837139
--- /dev/null
+++ b/graphics/java/android/graphics/pdf/PdfEditor.java
@@ -0,0 +1,162 @@
+/*
+ * 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 android.graphics.pdf;
+
+import android.annotation.NonNull;
+import android.os.ParcelFileDescriptor;
+import android.system.ErrnoException;
+import android.system.OsConstants;
+import dalvik.system.CloseGuard;
+import libcore.io.IoUtils;
+import libcore.io.Libcore;
+
+import java.io.IOException;
+
+/**
+ * Class for editing PDF files.
+ *
+ * @hide
+ */
+public final class PdfEditor {
+
+    private final CloseGuard mCloseGuard = CloseGuard.get();
+
+    private final long mNativeDocument;
+
+    private int mPageCount;
+
+    private ParcelFileDescriptor mInput;
+
+    /**
+     * Creates a new instance.
+     * <p>
+     * <strong>Note:</strong> The provided file descriptor must be <strong>seekable</strong>,
+     * i.e. its data being randomly accessed, e.g. pointing to a file. After finishing
+     * with this class you must call {@link #close()}.
+     * </p>
+     * <p>
+     * <strong>Note:</strong> This class takes ownership of the passed in file descriptor
+     * and is responsible for closing it when the editor is closed.
+     * </p>
+     *
+     * @param input Seekable file descriptor to read from.
+     *
+     * @see #close()
+     */
+    public PdfEditor(@NonNull ParcelFileDescriptor input) throws IOException {
+        if (input == null) {
+            throw new NullPointerException("input cannot be null");
+        }
+
+        final long size;
+        try {
+            Libcore.os.lseek(input.getFileDescriptor(), 0, OsConstants.SEEK_SET);
+            size = Libcore.os.fstat(input.getFileDescriptor()).st_size;
+        } catch (ErrnoException ee) {
+            throw new IllegalArgumentException("file descriptor not seekable");
+        }
+
+        mInput = input;
+        mNativeDocument = nativeOpen(mInput.getFd(), size);
+        mPageCount = nativeGetPageCount(mNativeDocument);
+        mCloseGuard.open("close");
+    }
+
+    /**
+     * Gets the number of pages in the document.
+     *
+     * @return The page count.
+     */
+    public int getPageCount() {
+        throwIfClosed();
+        return mPageCount;
+    }
+
+    /**
+     * Removes the page with a given index.
+     *
+     * @param pageIndex The page to remove.
+     */
+    public void removePage(int pageIndex) {
+        throwIfClosed();
+        throwIfPageNotInDocument(pageIndex);
+        mPageCount = nativeRemovePage(mNativeDocument, pageIndex);
+    }
+
+    /**
+     * Writes the PDF file to the provided destination.
+     * <p>
+     * <strong>Note:</strong> This method takes ownership of the passed in file
+     * descriptor and is responsible for closing it when writing completes.
+     * </p>
+     * @param output The destination.
+     */
+    public void write(ParcelFileDescriptor output) throws IOException {
+        try {
+            throwIfClosed();
+            nativeWrite(mNativeDocument, output.getFd());
+        } finally {
+            IoUtils.closeQuietly(output);
+        }
+    }
+
+    /**
+     * Closes this editor. You should not use this instance
+     * after this method is called.
+     */
+    public void close() {
+        throwIfClosed();
+        doClose();
+    }
+
+    @Override
+    protected void finalize() throws Throwable {
+        try {
+            mCloseGuard.warnIfOpen();
+            if (mInput != null) {
+                doClose();
+            }
+        } finally {
+            super.finalize();
+        }
+    }
+
+    private void doClose() {
+        nativeClose(mNativeDocument);
+        IoUtils.closeQuietly(mInput);
+        mInput = null;
+        mCloseGuard.close();
+    }
+
+    private void throwIfClosed() {
+        if (mInput == null) {
+            throw new IllegalStateException("Already closed");
+        }
+    }
+
+    private void throwIfPageNotInDocument(int pageIndex) {
+        if (pageIndex < 0 || pageIndex >= mPageCount) {
+            throw new IllegalArgumentException("Invalid page index");
+        }
+    }
+
+    private static native long nativeOpen(int fd, long size);
+    private static native void nativeClose(long documentPtr);
+    private static native int nativeGetPageCount(long documentPtr);
+    private static native int nativeRemovePage(long documentPtr, int pageIndex);
+    private static native void nativeWrite(long documentPtr, int fd);
+}
diff --git a/graphics/java/android/graphics/pdf/PdfRenderer.java b/graphics/java/android/graphics/pdf/PdfRenderer.java
index b5d9729..359c294 100644
--- a/graphics/java/android/graphics/pdf/PdfRenderer.java
+++ b/graphics/java/android/graphics/pdf/PdfRenderer.java
@@ -195,6 +195,7 @@
     public Page openPage(int index) {
         throwIfClosed();
         throwIfPageOpened();
+        throwIfPageNotInDocument(index);
         mCurrentPage = new Page(index);
         return mCurrentPage;
     }
@@ -237,6 +238,12 @@
         }
     }
 
+    private void throwIfPageNotInDocument(int pageIndex) {
+        if (pageIndex < 0 || pageIndex >= mPageCount) {
+            throw new IllegalArgumentException("Invalid page index");
+        }
+    }
+
     /**
      * This class represents a PDF document page for rendering.
      */
diff --git a/keystore/java/android/security/IKeyChainService.aidl b/keystore/java/android/security/IKeyChainService.aidl
index 60fd7f7..a93891a 100644
--- a/keystore/java/android/security/IKeyChainService.aidl
+++ b/keystore/java/android/security/IKeyChainService.aidl
@@ -15,6 +15,8 @@
  */
 package android.security;
 
+import android.content.pm.ParceledListSlice;
+
 /**
  * Caller is required to ensure that {@link KeyStore#unlock
  * KeyStore.unlock} was successful.
@@ -32,6 +34,11 @@
     // APIs used by Settings
     boolean deleteCaCertificate(String alias);
     boolean reset();
+    ParceledListSlice getUserCaAliases();
+    ParceledListSlice getSystemCaAliases();
+    boolean containsCaAlias(String alias);
+    byte[] getEncodedCaCertificate(String alias, boolean includeDeletedSystem);
+    List<String> getCaCertificateChainAliases(String rootAlias, boolean includeDeletedSystem);
 
     // APIs used by KeyChainActivity
     void setGrant(int uid, String alias, boolean value);
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java
index 0da2b99..131e689 100644
--- a/keystore/java/android/security/KeyChain.java
+++ b/keystore/java/android/security/KeyChain.java
@@ -397,7 +397,8 @@
         return KeyStore.getInstance().isHardwareBacked(algorithm);
     }
 
-    private static X509Certificate toCertificate(byte[] bytes) {
+    /** @hide */
+    public static X509Certificate toCertificate(byte[] bytes) {
         if (bytes == null) {
             throw new IllegalArgumentException("bytes == null");
         }
diff --git a/libs/hwui/AmbientShadow.cpp b/libs/hwui/AmbientShadow.cpp
index 7834ef8..4873479 100644
--- a/libs/hwui/AmbientShadow.cpp
+++ b/libs/hwui/AmbientShadow.cpp
@@ -93,6 +93,10 @@
 
 inline int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
         float divisor) {
+    // When there is no distance difference, there is no need for extra vertices.
+    if (vector1.lengthSquared() == 0 || vector2.lengthSquared() == 0) {
+        return 0;
+    }
     // The formula is :
     // extraNumber = floor(acos(dot(n1, n2)) / (M_PI / EXTRA_VERTEX_PER_PI))
     // The value ranges for each step are:
diff --git a/libs/hwui/AnimationContext.cpp b/libs/hwui/AnimationContext.cpp
index d7d9743..a20bdae 100644
--- a/libs/hwui/AnimationContext.cpp
+++ b/libs/hwui/AnimationContext.cpp
@@ -17,7 +17,6 @@
 
 #include "Animator.h"
 #include "RenderNode.h"
-#include "TreeInfo.h"
 #include "renderthread/TimeLord.h"
 
 namespace android {
@@ -31,11 +30,14 @@
 }
 
 AnimationContext::~AnimationContext() {
-    startFrame();
+}
+
+void AnimationContext::destroy() {
+    startFrame(TreeInfo::MODE_RT_ONLY);
     while (mCurrentFrameAnimations.mNextHandle) {
         AnimationHandle* current = mCurrentFrameAnimations.mNextHandle;
         AnimatorManager& animators = current->mRenderNode->animators();
-        animators.endAllAnimators();
+        animators.endAllActiveAnimators();
         LOG_ALWAYS_FATAL_IF(mCurrentFrameAnimations.mNextHandle == current,
                 "endAllAnimators failed to remove from current frame list!");
     }
@@ -52,7 +54,7 @@
     handle->insertAfter(&mNextFrameAnimations);
 }
 
-void AnimationContext::startFrame() {
+void AnimationContext::startFrame(TreeInfo::TraversalMode mode) {
     LOG_ALWAYS_FATAL_IF(mCurrentFrameAnimations.mNextHandle,
             "Missed running animations last frame!");
     AnimationHandle* head = mNextFrameAnimations.mNextHandle;
diff --git a/libs/hwui/AnimationContext.h b/libs/hwui/AnimationContext.h
index 900d953..909ed36 100644
--- a/libs/hwui/AnimationContext.h
+++ b/libs/hwui/AnimationContext.h
@@ -20,6 +20,7 @@
 #include <utils/RefBase.h>
 #include <utils/StrongPointer.h>
 
+#include "TreeInfo.h"
 #include "renderthread/TimeLord.h"
 #include "utils/Macros.h"
 
@@ -30,7 +31,6 @@
 class AnimationListener;
 class BaseRenderNodeAnimator;
 class RenderNode;
-class TreeInfo;
 
 /*
  * AnimationHandle is several classes merged into one.
@@ -90,7 +90,7 @@
 
     // Marks the start of a frame, which will update the frame time and move all
     // next frame animations into the current frame
-    ANDROID_API virtual void startFrame();
+    ANDROID_API virtual void startFrame(TreeInfo::TraversalMode mode);
 
     // Runs any animations still left in mCurrentFrameAnimations that were not run
     // as part of the standard RenderNode:prepareTree pass.
@@ -98,6 +98,8 @@
 
     ANDROID_API virtual void callOnFinished(BaseRenderNodeAnimator* animator, AnimationListener* listener);
 
+    ANDROID_API virtual void destroy();
+
 private:
     friend class AnimationHandle;
     void addAnimationHandle(AnimationHandle* handle);
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index da65f38..4f3a573 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -161,6 +161,13 @@
     return false;
 }
 
+void BaseRenderNodeAnimator::forceEndNow(AnimationContext& context) {
+    if (mPlayState < FINISHED) {
+        mPlayState = FINISHED;
+        callOnFinishedListener(context);
+    }
+}
+
 void BaseRenderNodeAnimator::callOnFinishedListener(AnimationContext& context) {
     if (mListener.get()) {
         context.callOnFinished(this, mListener.get());
diff --git a/libs/hwui/Animator.h b/libs/hwui/Animator.h
index c52a93f..35a4a09 100644
--- a/libs/hwui/Animator.h
+++ b/libs/hwui/Animator.h
@@ -53,6 +53,10 @@
         mListener = listener;
     }
     AnimationListener* listener() { return mListener.get(); }
+    ANDROID_API void setAllowRunningAsync(bool mayRunAsync) {
+        mMayRunAsync = mayRunAsync;
+    }
+    bool mayRunAsync() { return mMayRunAsync; }
     ANDROID_API void start() { mStagingPlayState = RUNNING; onStagingPlayStateChanged(); }
     ANDROID_API void end() { mStagingPlayState = FINISHED; onStagingPlayStateChanged(); }
 
@@ -68,6 +72,8 @@
 
     ANDROID_API virtual uint32_t dirtyMask() = 0;
 
+    void forceEndNow(AnimationContext& context);
+
 protected:
     BaseRenderNodeAnimator(float finalValue);
     virtual ~BaseRenderNodeAnimator();
@@ -99,6 +105,7 @@
     nsecs_t mStartTime;
     nsecs_t mDuration;
     nsecs_t mStartDelay;
+    bool mMayRunAsync;
 
     sp<AnimationListener> mListener;
 
diff --git a/libs/hwui/AnimatorManager.cpp b/libs/hwui/AnimatorManager.cpp
index 678b1ee..c28fb88 100644
--- a/libs/hwui/AnimatorManager.cpp
+++ b/libs/hwui/AnimatorManager.cpp
@@ -49,6 +49,9 @@
 void AnimatorManager::setAnimationHandle(AnimationHandle* handle) {
     LOG_ALWAYS_FATAL_IF(mAnimationHandle && handle, "Already have an AnimationHandle!");
     mAnimationHandle = handle;
+    LOG_ALWAYS_FATAL_IF(!mAnimationHandle && mAnimators.size(),
+            "Lost animation handle on %p (%s) with outstanding animators!",
+            &mParent, mParent.getName());
 }
 
 template<typename T>
@@ -62,6 +65,9 @@
 
 void AnimatorManager::pushStaging() {
     if (mNewAnimators.size()) {
+        LOG_ALWAYS_FATAL_IF(!mAnimationHandle,
+                "Trying to start new animators on %p (%s) without an animation handle!",
+                &mParent, mParent.getName());
         // Since this is a straight move, we don't need to inc/dec the ref count
         move_all(mNewAnimators, mAnimators);
     }
@@ -84,6 +90,9 @@
             if (animator->isRunning()) {
                 mInfo.out.hasAnimations = true;
             }
+            if (CC_UNLIKELY(!animator->mayRunAsync())) {
+                mInfo.out.requiresUiRedraw = true;
+            }
         }
         return remove;
     }
@@ -128,22 +137,7 @@
     return functor.dirtyMask;
 }
 
-class EndAnimatorsFunctor {
-public:
-    EndAnimatorsFunctor(AnimationContext& context) : mContext(context) {}
-
-    void operator() (BaseRenderNodeAnimator* animator) {
-        animator->end();
-        animator->pushStaging(mContext);
-        animator->animate(mContext);
-        animator->decStrong(0);
-    }
-
-private:
-    AnimationContext& mContext;
-};
-
-static void endAnimatorsHard(BaseRenderNodeAnimator* animator) {
+static void endStagingAnimator(BaseRenderNodeAnimator* animator) {
     animator->end();
     if (animator->listener()) {
         animator->listener()->onAnimationFinished(animator);
@@ -151,24 +145,34 @@
     animator->decStrong(0);
 }
 
-void AnimatorManager::endAllAnimators() {
-    if (mNewAnimators.size()) {
-        // Since this is a straight move, we don't need to inc/dec the ref count
-        move_all(mNewAnimators, mAnimators);
+void AnimatorManager::endAllStagingAnimators() {
+    ALOGD("endAllStagingAnimators on %p (%s)", &mParent, mParent.getName());
+    // This works because this state can only happen on the UI thread,
+    // which means we're already on the right thread to invoke listeners
+    for_each(mNewAnimators.begin(), mNewAnimators.end(), endStagingAnimator);
+    mNewAnimators.clear();
+}
+
+class EndActiveAnimatorsFunctor {
+public:
+    EndActiveAnimatorsFunctor(AnimationContext& context) : mContext(context) {}
+
+    void operator() (BaseRenderNodeAnimator* animator) {
+        animator->forceEndNow(mContext);
+        animator->decStrong(0);
     }
-    // First try gracefully ending them
-    if (mAnimationHandle) {
-        EndAnimatorsFunctor functor(mAnimationHandle->context());
-        for_each(mAnimators.begin(), mAnimators.end(), functor);
-        mAnimators.clear();
-        mAnimationHandle->release();
-    } else {
-        // We have no context, so bust out the sledgehammer
-        // This works because this state can only happen on the UI thread,
-        // which means we're already on the right thread to invoke listeners
-        for_each(mAnimators.begin(), mAnimators.end(), endAnimatorsHard);
-        mAnimators.clear();
-    }
+
+private:
+    AnimationContext& mContext;
+};
+
+void AnimatorManager::endAllActiveAnimators() {
+    ALOGD("endAllStagingAnimators on %p (%s) with handle %p",
+            &mParent, mParent.getName(), mAnimationHandle);
+    EndActiveAnimatorsFunctor functor(mAnimationHandle->context());
+    for_each(mAnimators.begin(), mAnimators.end(), functor);
+    mAnimators.clear();
+    mAnimationHandle->release();
 }
 
 } /* namespace uirenderer */
diff --git a/libs/hwui/AnimatorManager.h b/libs/hwui/AnimatorManager.h
index d5f56ed..d03d427 100644
--- a/libs/hwui/AnimatorManager.h
+++ b/libs/hwui/AnimatorManager.h
@@ -50,8 +50,12 @@
 
     void animateNoDamage(TreeInfo& info);
 
-    // Hard-ends all animators. Used for cleanup if the root is being destroyed.
-    ANDROID_API void endAllAnimators();
+    // Hard-ends all animators. May only be called on the UI thread.
+    ANDROID_API void endAllStagingAnimators();
+
+    // Hard-ends all animators that have been pushed. Used for cleanup if
+    // the ActivityContext is being destroyed
+    void endAllActiveAnimators();
 
     bool hasAnimators() { return mAnimators.size(); }
 
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 5689e17..9b0025f 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -24,6 +24,7 @@
 #include "Properties.h"
 #include "LayerRenderer.h"
 #include "ShadowTessellator.h"
+#include "RenderState.h"
 
 namespace android {
 
@@ -49,7 +50,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 Caches::Caches(): Singleton<Caches>(),
-        mExtensions(Extensions::getInstance()), mInitialized(false) {
+        mExtensions(Extensions::getInstance()), mInitialized(false), mRenderState(NULL) {
     init();
     initFont();
     initConstraints();
@@ -267,8 +268,11 @@
     log.appendFormat("Current memory usage / total memory usage (bytes):\n");
     log.appendFormat("  TextureCache         %8d / %8d\n",
             textureCache.getSize(), textureCache.getMaxSize());
-    log.appendFormat("  LayerCache           %8d / %8d\n",
-            layerCache.getSize(), layerCache.getMaxSize());
+    log.appendFormat("  LayerCache           %8d / %8d (numLayers = %zu)\n",
+            layerCache.getSize(), layerCache.getMaxSize(), layerCache.getCount());
+    log.appendFormat("  Garbage layers       %8zu\n", mLayerGarbage.size());
+    log.appendFormat("  Active layers        %8zu\n",
+            mRenderState ? mRenderState->mActiveLayers.size() : 0);
     log.appendFormat("  RenderBufferCache    %8d / %8d\n",
             renderBufferCache.getSize(), renderBufferCache.getMaxSize());
     log.appendFormat("  GradientCache        %8d / %8d\n",
@@ -338,6 +342,7 @@
 
 void Caches::deleteLayerDeferred(Layer* layer) {
     Mutex::Autolock _l(mGarbageLock);
+    layer->state = Layer::kState_InGarbageList;
     mLayerGarbage.push(layer);
 }
 
@@ -547,9 +552,13 @@
 }
 
 void Caches::bindTexture(GLenum target, GLuint texture) {
-    if (mBoundTextures[mTextureUnit] != texture) {
+    if (target == GL_TEXTURE_2D) {
+        bindTexture(texture);
+    } else {
+        // GLConsumer directly calls glBindTexture() with
+        // target=GL_TEXTURE_EXTERNAL_OES, don't cache this target
+        // since the cached state could be stale
         glBindTexture(target, texture);
-        mBoundTextures[mTextureUnit] = texture;
     }
 }
 
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index 0482430..7aa628c 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -107,6 +107,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 class RenderNode;
+class RenderState;
 
 class ANDROID_API Caches: public Singleton<Caches> {
     Caches();
@@ -132,6 +133,8 @@
      */
     bool initProperties();
 
+    void setRenderState(RenderState* renderState) { mRenderState = renderState; }
+
     /**
      * Flush the cache.
      *
@@ -428,9 +431,12 @@
 
     uint32_t mFunctorsCount;
 
+    // Caches texture bindings for the GL_TEXTURE_2D target
     GLuint mBoundTextures[REQUIRED_TEXTURE_UNITS_COUNT];
 
     OverdrawColorSet mOverdrawDebugColorSet;
+
+    RenderState* mRenderState;
 }; // class Caches
 
 }; // namespace uirenderer
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index e6bc4db..b5089aa 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -29,15 +29,16 @@
 namespace android {
 namespace uirenderer {
 
-Layer::Layer(RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight)
-        : caches(Caches::getInstance())
+Layer::Layer(Type layerType, RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight)
+        : state(kState_Uncached)
+        , caches(Caches::getInstance())
         , renderState(renderState)
-        , texture(caches) {
+        , texture(caches)
+        , type(layerType) {
     mesh = NULL;
     meshElementCount = 0;
     cacheable = true;
     dirty = false;
-    textureLayer = false;
     renderTarget = GL_TEXTURE_2D;
     texture.width = layerWidth;
     texture.height = layerHeight;
@@ -54,11 +55,18 @@
     convexMask = NULL;
     caches.resourceCache.incrementRefcount(this);
     rendererLightPosDirty = true;
-    renderState.registerLayer(this);
+    wasBuildLayered = false;
+    if (!isTextureLayer()) {
+        // track only non-texture layer lifecycles in renderstate,
+        // because texture layers are destroyed via finalizer
+        renderState.registerLayer(this);
+    }
 }
 
 Layer::~Layer() {
-    renderState.unregisterLayer(this);
+    if (!isTextureLayer()) {
+        renderState.unregisterLayer(this);
+    }
     SkSafeUnref(colorFilter);
     removeFbo();
     deleteTexture();
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 38c29c7..a8e1c26 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -54,7 +54,23 @@
  */
 class Layer {
 public:
-    Layer(RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight);
+    enum Type {
+        kType_Texture,
+        kType_DisplayList,
+    };
+
+    // layer lifecycle, controlled from outside
+    enum State {
+        kState_Uncached = 0,
+        kState_InCache = 1,
+        kState_FailedToCache = 2,
+        kState_RemovedFromCache = 3,
+        kState_DeletedFromCache = 4,
+        kState_InGarbageList = 5,
+    };
+    State state; // public for logging/debugging purposes
+
+    Layer(Type type, RenderState& renderState, const uint32_t layerWidth, const uint32_t layerHeight);
     ~Layer();
 
     static uint32_t computeIdealWidth(uint32_t layerWidth);
@@ -219,11 +235,7 @@
     }
 
     inline bool isTextureLayer() const {
-        return textureLayer;
-    }
-
-    inline void setTextureLayer(bool textureLayer) {
-        this->textureLayer = textureLayer;
+        return type == kType_Texture;
     }
 
     inline SkColorFilter* getColorFilter() const {
@@ -306,6 +318,7 @@
     Rect dirtyRect;
     bool debugDrawUpdate;
     bool hasDrawnSinceUpdate;
+    bool wasBuildLayered;
 
 private:
     void requireRenderer();
@@ -342,10 +355,9 @@
     bool cacheable;
 
     /**
-     * When set to true, this layer must be treated as a texture
-     * layer.
+     * Denotes whether the layer is a DisplayList, or Texture layer.
      */
-    bool textureLayer;
+    const Type type;
 
     /**
      * When set to true, this layer is dirty and should be cleared
diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp
index 13869aa..833f64b 100644
--- a/libs/hwui/LayerCache.cpp
+++ b/libs/hwui/LayerCache.cpp
@@ -49,6 +49,10 @@
 // Size management
 ///////////////////////////////////////////////////////////////////////////////
 
+size_t LayerCache::getCount() {
+    return mCache.size();
+}
+
 uint32_t LayerCache::getSize() {
     return mSize;
 }
@@ -79,6 +83,7 @@
         LAYER_LOGD("Destroying layer %dx%d, fbo %d", layer->getWidth(), layer->getHeight(),
                 layer->getFbo());
         mSize -= layer->getWidth() * layer->getHeight() * 4;
+        layer->state = Layer::kState_DeletedFromCache;
         Caches::getInstance().resourceCache.decrementRefcount(layer);
     }
 }
@@ -102,13 +107,14 @@
         mCache.removeAt(index);
 
         layer = entry.mLayer;
+        layer->state = Layer::kState_RemovedFromCache;
         mSize -= layer->getWidth() * layer->getHeight() * 4;
 
         LAYER_LOGD("Reusing layer %dx%d", layer->getWidth(), layer->getHeight());
     } else {
         LAYER_LOGD("Creating new layer %dx%d", entry.mWidth, entry.mHeight);
 
-        layer = new Layer(renderState, entry.mWidth, entry.mHeight);
+        layer = new Layer(Layer::kType_DisplayList, renderState, entry.mWidth, entry.mHeight);
         layer->setBlend(true);
         layer->setEmpty(true);
         layer->setFbo(0);
@@ -162,8 +168,11 @@
         mCache.add(entry);
         mSize += size;
 
+        layer->state = Layer::kState_InCache;
         return true;
     }
+
+    layer->state = Layer::kState_FailedToCache;
     return false;
 }
 
diff --git a/libs/hwui/LayerCache.h b/libs/hwui/LayerCache.h
index 1b0fc2c..6b93e8f 100644
--- a/libs/hwui/LayerCache.h
+++ b/libs/hwui/LayerCache.h
@@ -87,6 +87,8 @@
      */
     uint32_t getSize();
 
+    size_t getCount();
+
     /**
      * Prints out the content of the cache.
      */
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index e3b0daf..103c843 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -272,9 +272,8 @@
 Layer* LayerRenderer::createTextureLayer(RenderState& renderState) {
     LAYER_RENDERER_LOGD("Creating new texture layer");
 
-    Layer* layer = new Layer(renderState, 0, 0);
+    Layer* layer = new Layer(Layer::kType_Texture, renderState, 0, 0);
     layer->setCacheable(false);
-    layer->setTextureLayer(true);
     layer->setEmpty(true);
     layer->setFbo(0);
     layer->setAlpha(255, SkXfermode::kSrcOver_Mode);
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 0f36c06..dbd273d 100755
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -605,6 +605,12 @@
     AutoFence fence;
 }
 
+void OpenGLRenderer::markLayersAsBuildLayers() {
+    for (size_t i = 0; i < mLayerUpdates.size(); i++) {
+        mLayerUpdates[i]->wasBuildLayered = true;
+    }
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 // State management
 ///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index e9ca5d9..e295b1a 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -150,6 +150,7 @@
     void cancelLayerUpdate(Layer* layer);
     void clearLayerUpdates();
     void flushLayerUpdates();
+    void markLayersAsBuildLayers();
 
     virtual int saveLayer(float left, float top, float right, float bottom,
             const SkPaint* paint, int flags) {
diff --git a/libs/hwui/PathTessellator.cpp b/libs/hwui/PathTessellator.cpp
index e30ac19..281ca02 100644
--- a/libs/hwui/PathTessellator.cpp
+++ b/libs/hwui/PathTessellator.cpp
@@ -162,14 +162,21 @@
     }
 
     /**
-     * Outset the bounds of point data (for line endpoints or points) to account for AA stroke
+     * Outset the bounds of point data (for line endpoints or points) to account for stroke
      * geometry.
+     *
+     * bounds are in pre-scaled space.
      */
     void expandBoundsForStroke(Rect* bounds) const {
-        float outset = halfStrokeWidth;
-        if (outset == 0) outset = 0.5f;
-        bounds->outset(outset * inverseScaleX + Vertex::GeometryFudgeFactor(),
-                outset * inverseScaleY + Vertex::GeometryFudgeFactor());
+        if (halfStrokeWidth == 0) {
+            // hairline, outset by (0.5f + fudge factor) in post-scaling space
+            bounds->outset(fabs(inverseScaleX) * (0.5f + Vertex::GeometryFudgeFactor()),
+                    fabs(inverseScaleY) * (0.5f + Vertex::GeometryFudgeFactor()));
+        } else {
+            // non hairline, outset by half stroke width pre-scaled, and fudge factor post scaled
+            bounds->outset(halfStrokeWidth + fabs(inverseScaleX) * Vertex::GeometryFudgeFactor(),
+                    halfStrokeWidth + fabs(inverseScaleY) * Vertex::GeometryFudgeFactor());
+        }
     }
 };
 
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index c802b18..a8b8b16 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -88,7 +88,7 @@
         "varying vec2 ditherTexCoords;\n",
 };
 const char* gVS_Header_Varyings_HasRoundRectClip =
-        "varying vec2 roundRectPos;\n";
+        "varying highp vec2 roundRectPos;\n";
 const char* gVS_Main =
         "\nvoid main(void) {\n";
 const char* gVS_Main_OutTexCoords =
@@ -328,8 +328,7 @@
         "",
         // Matrix
         "    fragColor *= colorMatrix;\n"
-        "    fragColor += colorMatrixVector;\n"
-        "    fragColor.rgb *= fragColor.a;\n",
+        "    fragColor += colorMatrixVector;\n",
         // PorterDuff
         "    fragColor = blendColors(colorBlend, fragColor);\n"
 };
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 6a92a6e..254492f 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -58,6 +58,19 @@
     fflush(file);
 }
 
+void RenderNode::debugDumpLayers(const char* prefix) {
+    if (mLayer) {
+        ALOGD("%sNode %p (%s) has layer %p (fbo = %u, wasBuildLayered = %s)",
+                prefix, this, getName(), mLayer, mLayer->getFbo(),
+                mLayer->wasBuildLayered ? "true" : "false");
+    }
+    if (mDisplayListData) {
+        for (size_t i = 0; i < mDisplayListData->children().size(); i++) {
+            mDisplayListData->children()[i]->mRenderNode->debugDumpLayers(prefix);
+        }
+    }
+}
+
 RenderNode::RenderNode()
         : mDirtyPropertyFields(0)
         , mNeedsDisplayListDataSync(false)
@@ -413,7 +426,7 @@
         handler(op, PROPERTY_SAVECOUNT, properties().getClipToBounds());
     }
 
-    // TODO: support both reveal clip and outline clip simultaneously
+    // TODO: support nesting round rect clips
     if (mProperties.getRevealClip().willClip()) {
         Rect bounds;
         mProperties.getRevealClip().getBounds(&bounds);
@@ -421,7 +434,6 @@
     } else if (mProperties.getOutline().willClip()) {
         renderer.setClippingOutline(handler.allocator(), &(mProperties.getOutline()));
     }
-
 }
 
 /**
@@ -860,6 +872,8 @@
             handler(new (alloc) DrawLayerOp(mLayer, 0, 0),
                     renderer.getSaveCount() - 1, properties().getClipToBounds());
         } else {
+            const int saveCountOffset = renderer.getSaveCount() - 1;
+            const int projectionReceiveIndex = mDisplayListData->projectionReceiveIndex;
             DisplayListLogBuffer& logBuffer = DisplayListLogBuffer::getInstance();
             for (size_t chunkIndex = 0; chunkIndex < mDisplayListData->getChunks().size(); chunkIndex++) {
                 const DisplayListData::Chunk& chunk = mDisplayListData->getChunks()[chunkIndex];
@@ -870,8 +884,6 @@
                 issueOperationsOf3dChildren(kNegativeZChildren,
                         initialTransform, zTranslatedNodes, renderer, handler);
 
-                const int saveCountOffset = renderer.getSaveCount() - 1;
-                const int projectionReceiveIndex = mDisplayListData->projectionReceiveIndex;
 
                 for (int opIndex = chunk.beginOpIndex; opIndex < chunk.endOpIndex; opIndex++) {
                     DisplayListOp *op = mDisplayListData->displayListOps[opIndex];
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index d897997..f329283 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -102,6 +102,7 @@
     };
 
     ANDROID_API static void outputLogBuffer(int fd);
+    void debugDumpLayers(const char* prefix);
 
     ANDROID_API void setStagingDisplayList(DisplayListData* newData);
 
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index 0c8d07f..46eeb6a 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -569,6 +569,10 @@
         return getClipToBounds() && (getZ() <= 0 || getOutline().isEmpty());
     }
 
+    bool hasShadow() const {
+        return getZ() >= 0.0f && getOutline().getPath() != NULL;
+    }
+
 private:
     // Rendering properties
     struct PrimitiveFields {
diff --git a/libs/hwui/RenderState.cpp b/libs/hwui/RenderState.cpp
index 50b8f39..54af528 100644
--- a/libs/hwui/RenderState.cpp
+++ b/libs/hwui/RenderState.cpp
@@ -15,6 +15,8 @@
  */
 #include "RenderState.h"
 
+#include "renderthread/CanvasContext.h"
+
 namespace android {
 namespace uirenderer {
 
@@ -32,10 +34,40 @@
     // This is delayed because the first access of Caches makes GL calls
     mCaches = &Caches::getInstance();
     mCaches->init();
+    mCaches->setRenderState(this);
 }
 
 void RenderState::onGLContextDestroyed() {
-    LOG_ALWAYS_FATAL_IF(!mActiveLayers.empty(), "layers have survived gl context destruction");
+    AutoMutex _lock(mLayerLock);
+    size_t size = mActiveLayers.size();
+    if (CC_UNLIKELY(size != 0)) {
+        ALOGE("Crashing, have %d contexts and %d layers at context destruction. isempty %d",
+                mRegisteredContexts.size(), size, mActiveLayers.empty());
+        mCaches->dumpMemoryUsage();
+        for (std::set<renderthread::CanvasContext*>::iterator cit = mRegisteredContexts.begin();
+                cit != mRegisteredContexts.end(); cit++) {
+            renderthread::CanvasContext* context = *cit;
+            ALOGE("Context: %p (root = %p)", context, context->mRootRenderNode.get());
+            ALOGE("  Prefeteched layers: %zu", context->mPrefetechedLayers.size());
+            for (std::set<RenderNode*>::iterator pit = context->mPrefetechedLayers.begin();
+                    pit != context->mPrefetechedLayers.end(); pit++) {
+                (*pit)->debugDumpLayers("    ");
+            }
+            context->mRootRenderNode->debugDumpLayers("  ");
+        }
+
+
+        if (mActiveLayers.begin() == mActiveLayers.end()) {
+            ALOGE("set has become empty. wat.");
+        }
+        for (std::set<const Layer*>::iterator lit = mActiveLayers.begin();
+             lit != mActiveLayers.end(); lit++) {
+            const Layer* layer = *(lit);
+            ALOGE("Layer %p, state %d, texlayer %d, fbo %d, buildlayered %d",
+                    layer, layer->state, layer->isTextureLayer(), layer->getFbo(), layer->wasBuildLayered);
+        }
+        LOG_ALWAYS_FATAL("%d layers have survived gl context destruction", size);
+    }
 }
 
 void RenderState::setViewport(GLsizei width, GLsizei height) {
diff --git a/libs/hwui/RenderState.h b/libs/hwui/RenderState.h
index cd71c73..74bafca 100644
--- a/libs/hwui/RenderState.h
+++ b/libs/hwui/RenderState.h
@@ -19,6 +19,7 @@
 #include <set>
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
+#include <utils/Mutex.h>
 
 #include <private/hwui/DrawGlInfo.h>
 
@@ -29,6 +30,7 @@
 namespace uirenderer {
 
 namespace renderthread {
+class CanvasContext;
 class RenderThread;
 }
 
@@ -51,14 +53,25 @@
     void debugOverdraw(bool enable, bool clear);
 
     void registerLayer(const Layer* layer) {
+        AutoMutex _lock(mLayerLock);
         mActiveLayers.insert(layer);
     }
     void unregisterLayer(const Layer* layer) {
+        AutoMutex _lock(mLayerLock);
         mActiveLayers.erase(layer);
     }
 
+    void registerCanvasContext(renderthread::CanvasContext* context) {
+        mRegisteredContexts.insert(context);
+    }
+
+    void unregisterCanvasContext(renderthread::CanvasContext* context) {
+        mRegisteredContexts.erase(context);
+    }
+
 private:
     friend class renderthread::RenderThread;
+    friend class Caches;
 
     void interruptForFunctorInvoke();
     void resumeFromFunctorInvoke();
@@ -68,10 +81,12 @@
 
     Caches* mCaches;
     std::set<const Layer*> mActiveLayers;
+    std::set<renderthread::CanvasContext*> mRegisteredContexts;
 
     GLsizei mViewportWidth;
     GLsizei mViewportHeight;
     GLuint mFramebuffer;
+    Mutex mLayerLock;
 };
 
 } /* namespace uirenderer */
diff --git a/libs/hwui/Snapshot.cpp b/libs/hwui/Snapshot.cpp
index ecc47d2..cf8229fd 100644
--- a/libs/hwui/Snapshot.cpp
+++ b/libs/hwui/Snapshot.cpp
@@ -216,14 +216,22 @@
 // Clipping round rect
 ///////////////////////////////////////////////////////////////////////////////
 
-void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds, float radius) {
+void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds,
+        float radius, bool highPriority) {
     if (bounds.isEmpty()) {
         clipRect->setEmpty();
         return;
     }
 
+    if (roundRectClipState && roundRectClipState->highPriority) {
+        // ignore, don't replace, already have a high priority clip
+        return;
+    }
+
     RoundRectClipState* state = new (allocator) RoundRectClipState;
 
+    state->highPriority = highPriority;
+
     // store the inverse drawing matrix
     Matrix4 roundRectDrawingMatrix;
     roundRectDrawingMatrix.load(getOrthoMatrix());
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h
index ad4ee9d..549de9b 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -55,6 +55,7 @@
                 || rect.intersects(dangerRects[3]);
     }
 
+    bool highPriority;
     Matrix4 matrix;
     Rect dangerRects[4];
     Rect innerRect;
@@ -166,8 +167,11 @@
 
     /**
      * Sets (and replaces) the current clipping outline
+     *
+     * If the current round rect clip is high priority, the incoming clip is ignored.
      */
-    void setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds, float radius);
+    void setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds,
+            float radius, bool highPriority);
 
     /**
      * Indicates whether this snapshot should be ignored. A snapshot
diff --git a/libs/hwui/StatefulBaseRenderer.cpp b/libs/hwui/StatefulBaseRenderer.cpp
index 3e1aed3..12b8c8d 100644
--- a/libs/hwui/StatefulBaseRenderer.cpp
+++ b/libs/hwui/StatefulBaseRenderer.cpp
@@ -198,13 +198,13 @@
         clipRect(bounds.left, bounds.top, bounds.right, bounds.bottom, SkRegion::kIntersect_Op);
     }
     if (outlineIsRounded) {
-        setClippingRoundRect(allocator, bounds, radius);
+        setClippingRoundRect(allocator, bounds, radius, false);
     }
 }
 
 void StatefulBaseRenderer::setClippingRoundRect(LinearAllocator& allocator,
-        const Rect& rect, float radius) {
-    mSnapshot->setClippingRoundRect(allocator, rect, radius);
+        const Rect& rect, float radius, bool highPriority) {
+    mSnapshot->setClippingRoundRect(allocator, rect, radius, highPriority);
 }
 
 
diff --git a/libs/hwui/StatefulBaseRenderer.h b/libs/hwui/StatefulBaseRenderer.h
index c6974b4..745e48a 100644
--- a/libs/hwui/StatefulBaseRenderer.h
+++ b/libs/hwui/StatefulBaseRenderer.h
@@ -97,7 +97,7 @@
      */
     void setClippingOutline(LinearAllocator& allocator, const Outline* outline);
     void setClippingRoundRect(LinearAllocator& allocator,
-            const Rect& rect, float radius);
+            const Rect& rect, float radius, bool highPriority = true);
 
     inline const mat4* currentTransform() const {
         return mSnapshot->transform;
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 491a295..5e6796c 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -48,16 +48,20 @@
         , mHaveNewSurface(false)
         , mRootRenderNode(rootRenderNode) {
     mAnimationContext = contextFactory->createAnimationContext(mRenderThread.timeLord());
+    mRenderThread.renderState().registerCanvasContext(this);
 }
 
 CanvasContext::~CanvasContext() {
-    destroyCanvasAndSurface();
-    mRenderThread.removeFrameCallback(this);
+    destroy();
     delete mAnimationContext;
-    freePrefetechedLayers();
+    mRenderThread.renderState().unregisterCanvasContext(this);
 }
 
-void CanvasContext::destroyCanvasAndSurface() {
+void CanvasContext::destroy() {
+    stopDrawing();
+    freePrefetechedLayers();
+    destroyHardwareResources();
+    mAnimationContext->destroy();
     if (mCanvas) {
         delete mCanvas;
         mCanvas = 0;
@@ -110,8 +114,7 @@
 }
 
 void CanvasContext::pauseSurface(ANativeWindow* window) {
-    // TODO: For now we just need a fence, in the future suspend any animations
-    // and such to prevent from trying to render into this surface
+    stopDrawing();
 }
 
 void CanvasContext::setup(int width, int height, const Vector3& lightCenter, float lightRadius,
@@ -147,7 +150,7 @@
     if (mPrefetechedLayers.size() && info.mode == TreeInfo::MODE_FULL) {
         info.canvasContext = this;
     }
-    mAnimationContext->startFrame();
+    mAnimationContext->startFrame(info.mode);
     mRootRenderNode->prepareTree(info);
     mAnimationContext->runRemainingAnimations(info);
 
@@ -298,6 +301,7 @@
     // purposes when the frame is actually drawn
     node->setPropertyFieldsDirty(RenderNode::GENERIC);
 
+    mCanvas->markLayersAsBuildLayers();
     mCanvas->flushLayerUpdates();
 
     node->incStrong(0);
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 7c27190..2460f6b8 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -42,6 +42,7 @@
 class OpenGLRenderer;
 class Rect;
 class Layer;
+class RenderState;
 
 namespace renderthread {
 
@@ -66,7 +67,7 @@
     void processLayerUpdate(DeferredLayerUpdater* layerUpdater);
     void prepareTree(TreeInfo& info);
     void draw();
-    void destroyCanvasAndSurface();
+    void destroy();
 
     // IFrameCallback, Chroreographer-driven frame callback entry point
     virtual void doFrame();
@@ -95,6 +96,9 @@
 
 private:
     friend class RegisterFrameCallbackTask;
+    // TODO: Replace with something better for layer & other GL object
+    // lifecycle tracking
+    friend class android::uirenderer::RenderState;
 
     void setSurface(ANativeWindow* window);
     void swapBuffers();
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 3d04316..9528874 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -194,13 +194,13 @@
     return mDrawFrameTask.drawFrame(frameTimeNanos, recordDurationNanos);
 }
 
-CREATE_BRIDGE1(destroyCanvasAndSurface, CanvasContext* context) {
-    args->context->destroyCanvasAndSurface();
+CREATE_BRIDGE1(destroy, CanvasContext* context) {
+    args->context->destroy();
     return NULL;
 }
 
-void RenderProxy::destroyCanvasAndSurface() {
-    SETUP_TASK(destroyCanvasAndSurface);
+void RenderProxy::destroy() {
+    SETUP_TASK(destroy);
     args->context = mContext;
     // destroyCanvasAndSurface() needs a fence as when it returns the
     // underlying BufferQueue is going to be released from under
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index 9e6bcf5..8b8d99c 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -73,7 +73,7 @@
     ANDROID_API void setOpaque(bool opaque);
     ANDROID_API int syncAndDrawFrame(nsecs_t frameTimeNanos, nsecs_t recordDurationNanos,
             float density);
-    ANDROID_API void destroyCanvasAndSurface();
+    ANDROID_API void destroy();
 
     ANDROID_API static void invokeFunctor(Functor* functor, bool waitForCompletion);
 
diff --git a/libs/hwui/renderthread/RenderThread.h b/libs/hwui/renderthread/RenderThread.h
index 0b91e9d..c461f3a 100644
--- a/libs/hwui/renderthread/RenderThread.h
+++ b/libs/hwui/renderthread/RenderThread.h
@@ -40,6 +40,7 @@
 
 namespace renderthread {
 
+class CanvasContext;
 class DispatchFrameCallbacks;
 class EglManager;
 class RenderProxy;
diff --git a/location/java/android/location/GpsMeasurement.java b/location/java/android/location/GpsMeasurement.java
index 591a6ca..1550dc2 100644
--- a/location/java/android/location/GpsMeasurement.java
+++ b/location/java/android/location/GpsMeasurement.java
@@ -49,7 +49,7 @@
     private double mCarrierPhase;
     private double mCarrierPhaseUncertainty;
     private byte mLossOfLock;
-    private short mBitNumber;
+    private int mBitNumber;
     private short mTimeFromLastBitInMs;
     private double mDopplerShiftInHz;
     private double mDopplerShiftUncertaintyInHz;
@@ -784,14 +784,14 @@
      *
      * The value is only available if {@link #hasBitNumber()} is true.
      */
-    public short getBitNumber() {
+    public int getBitNumber() {
         return mBitNumber;
     }
 
     /**
      * Sets the bit number within the broadcast frame.
      */
-    public void setBitNumber(short bitNumber) {
+    public void setBitNumber(int bitNumber) {
         setFlag(HAS_BIT_NUMBER);
         mBitNumber = bitNumber;
     }
@@ -801,7 +801,7 @@
      */
     public void resetBitNumber() {
         resetFlag(HAS_BIT_NUMBER);
-        mBitNumber = Short.MIN_VALUE;
+        mBitNumber = Integer.MIN_VALUE;
     }
 
     /**
@@ -1161,7 +1161,7 @@
             gpsMeasurement.mCarrierPhase = parcel.readDouble();
             gpsMeasurement.mCarrierPhaseUncertainty = parcel.readDouble();
             gpsMeasurement.mLossOfLock = parcel.readByte();
-            gpsMeasurement.mBitNumber = (short) parcel.readInt();
+            gpsMeasurement.mBitNumber = parcel.readInt();
             gpsMeasurement.mTimeFromLastBitInMs = (short) parcel.readInt();
             gpsMeasurement.mDopplerShiftInHz = parcel.readDouble();
             gpsMeasurement.mDopplerShiftUncertaintyInHz = parcel.readDouble();
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index bdd1195..fcf222b 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -16,6 +16,7 @@
 
 package android.location;
 
+import android.annotation.SystemApi;
 import android.os.Bundle;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -771,6 +772,7 @@
      * @see #makeComplete
      * @hide
      */
+    @SystemApi
     public boolean isComplete() {
         if (mProvider == null) return false;
         if (!mHasAccuracy) return false;
@@ -788,6 +790,7 @@
      * @see #isComplete
      * @hide
      */
+    @SystemApi
     public void makeComplete() {
         if (mProvider == null) mProvider = "?";
         if (!mHasAccuracy) {
@@ -957,6 +960,7 @@
      * @param isFromMockProvider true if this Location came from a mock provider, false otherwise
      * @hide
      */
+    @SystemApi
     public void setIsFromMockProvider(boolean isFromMockProvider) {
         mIsFromMockProvider = isFromMockProvider;
     }
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 082a158..2c805bb 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -1109,9 +1109,9 @@
      * {@link #requestLocationUpdates(String, long, float, LocationListener)}.
      *
      * <p>
-     * Before API version 20, this method would throw {@link SecurityException}
-     * if the location permissions were not sufficient to use the specified
-     * provider.
+     * Before API version {@link android.os.Build.VERSION_CODES#L}, this
+     * method would throw {@link SecurityException} if the location permissions
+     * were not sufficient to use the specified provider.
      *
      * @param provider the name of the provider
      * @return true if the provider exists and is enabled
@@ -1119,7 +1119,6 @@
      * @throws IllegalArgumentException if provider is null
      */
     public boolean isProviderEnabled(String provider) {
-        // STOPSHIP: finalize API version number in javadoc
         checkProvider(provider);
 
         try {
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index c9162fe..271f2bb 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -16,6 +16,7 @@
 
 package android.location;
 
+import android.annotation.SystemApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.SystemClock;
@@ -84,6 +85,7 @@
  *
  * @hide
  */
+@SystemApi
 public final class LocationRequest implements Parcelable {
     /**
      * Used with {@link #setQuality} to request the most accurate locations available.
@@ -166,6 +168,7 @@
     }
 
     /** @hide */
+    @SystemApi
     public static LocationRequest createFromDeprecatedProvider(String provider, long minTime,
             float minDistance, boolean singleShot) {
         if (minTime < 0) minTime = 0;
@@ -191,6 +194,7 @@
     }
 
     /** @hide */
+    @SystemApi
     public static LocationRequest createFromDeprecatedCriteria(Criteria criteria, long minTime,
             float minDistance, boolean singleShot) {
         if (minTime < 0) minTime = 0;
@@ -475,6 +479,7 @@
 
 
     /** @hide */
+    @SystemApi
     public LocationRequest setProvider(String provider) {
         checkProvider(provider);
         mProvider = provider;
@@ -482,11 +487,13 @@
     }
 
     /** @hide */
+    @SystemApi
     public String getProvider() {
         return mProvider;
     }
 
     /** @hide */
+    @SystemApi
     public LocationRequest setSmallestDisplacement(float meters) {
         checkDisplacement(meters);
         mSmallestDisplacement = meters;
@@ -494,6 +501,7 @@
     }
 
     /** @hide */
+    @SystemApi
     public float getSmallestDisplacement() {
         return mSmallestDisplacement;
     }
@@ -508,11 +516,13 @@
      * @param workSource WorkSource defining power blame for this location request.
      * @hide
      */
+    @SystemApi
     public void setWorkSource(WorkSource workSource) {
         mWorkSource = workSource;
     }
 
     /** @hide */
+    @SystemApi
     public WorkSource getWorkSource() {
         return mWorkSource;
     }
@@ -531,11 +541,13 @@
      * @see android.app.AppOpsManager
      * @hide
      */
+    @SystemApi
     public void setHideFromAppOps(boolean hideFromAppOps) {
         mHideFromAppOps = hideFromAppOps;
     }
 
     /** @hide */
+    @SystemApi
     public boolean getHideFromAppOps() {
         return mHideFromAppOps;
     }
diff --git a/location/java/android/location/SettingInjectorService.java b/location/java/android/location/SettingInjectorService.java
index 98c7864..fcd2cde 100644
--- a/location/java/android/location/SettingInjectorService.java
+++ b/location/java/android/location/SettingInjectorService.java
@@ -196,10 +196,7 @@
      * @deprecated not called any more
      */
     @Deprecated
-    protected String onGetSummary() {
-        // Do not delete until no callers have @Override annotations for this method
-        return null;
-    }
+    protected abstract String onGetSummary();
 
     /**
      * Returns the {@link android.preference.Preference#isEnabled()} value. Should not perform
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
index 5a286ee..e0901d0 100644
--- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
+++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
@@ -21,15 +21,24 @@
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
+import android.content.IntentFilter;
 import android.location.LocationManager;
+import android.location.INetInitiatedListener;
+import android.telephony.TelephonyManager;
+import android.telephony.PhoneNumberUtils;
+import android.telephony.PhoneStateListener;
 import android.os.Bundle;
+import android.os.RemoteException;
 import android.os.UserHandle;
+import android.os.SystemProperties;
 import android.util.Log;
 
 import com.android.internal.R;
 import com.android.internal.telephony.GsmAlphabet;
+import com.android.internal.telephony.TelephonyProperties;
 
 /**
  * A GPS Network-initiated Handler class used by LocationManager.
@@ -45,55 +54,67 @@
 
     // NI verify activity for bringing up UI (not used yet)
     public static final String ACTION_NI_VERIFY = "android.intent.action.NETWORK_INITIATED_VERIFY";
-    
+
     // string constants for defining data fields in NI Intent
     public static final String NI_INTENT_KEY_NOTIF_ID = "notif_id";
     public static final String NI_INTENT_KEY_TITLE = "title";
     public static final String NI_INTENT_KEY_MESSAGE = "message";
     public static final String NI_INTENT_KEY_TIMEOUT = "timeout";
     public static final String NI_INTENT_KEY_DEFAULT_RESPONSE = "default_resp";
-    
+
     // the extra command to send NI response to GpsLocationProvider
     public static final String NI_RESPONSE_EXTRA_CMD = "send_ni_response";
-    
+
     // the extra command parameter names in the Bundle
     public static final String NI_EXTRA_CMD_NOTIF_ID = "notif_id";
     public static final String NI_EXTRA_CMD_RESPONSE = "response";
-    
+
     // these need to match GpsNiType constants in gps_ni.h
     public static final int GPS_NI_TYPE_VOICE = 1;
     public static final int GPS_NI_TYPE_UMTS_SUPL = 2;
     public static final int GPS_NI_TYPE_UMTS_CTRL_PLANE = 3;
-    
-    // these need to match GpsUserResponseType constants in gps_ni.h    
+    public static final int GPS_NI_TYPE_EMERGENCY_SUPL = 4;
+
+    // these need to match GpsUserResponseType constants in gps_ni.h
     public static final int GPS_NI_RESPONSE_ACCEPT = 1;
     public static final int GPS_NI_RESPONSE_DENY = 2;
-    public static final int GPS_NI_RESPONSE_NORESP = 3;    
-    
+    public static final int GPS_NI_RESPONSE_NORESP = 3;
+    public static final int GPS_NI_RESPONSE_IGNORE = 4;
+
     // these need to match GpsNiNotifyFlags constants in gps_ni.h
     public static final int GPS_NI_NEED_NOTIFY = 0x0001;
     public static final int GPS_NI_NEED_VERIFY = 0x0002;
     public static final int GPS_NI_PRIVACY_OVERRIDE = 0x0004;
-    
+
     // these need to match GpsNiEncodingType in gps_ni.h
     public static final int GPS_ENC_NONE = 0;
     public static final int GPS_ENC_SUPL_GSM_DEFAULT = 1;
     public static final int GPS_ENC_SUPL_UTF8 = 2;
     public static final int GPS_ENC_SUPL_UCS2 = 3;
     public static final int GPS_ENC_UNKNOWN = -1;
-    
+
     private final Context mContext;
-    
+    private final TelephonyManager mTelephonyManager;
+    private final PhoneStateListener mPhoneStateListener;
+
     // parent gps location provider
     private final LocationManager mLocationManager;
-    
+
     // configuration of notificaiton behavior
     private boolean mPlaySounds = false;
     private boolean mPopupImmediately = true;
-    
-    // Set to true if string from HAL is encoded as Hex, e.g., "3F0039"    
+
+    // read the SUPL_ES form gps.conf
+    private volatile boolean mIsSuplEsEnabled;
+
+    // Set to true if the phone is having emergency call.
+    private volatile boolean mIsInEmergency;
+
+    private final INetInitiatedListener mNetInitiatedListener;
+
+    // Set to true if string from HAL is encoded as Hex, e.g., "3F0039"
     static private boolean mIsHexInput = true;
-        
+
     public static class GpsNiNotification
     {
         public int notificationId;
@@ -109,58 +130,95 @@
         public int textEncoding;
         public Bundle extras;
     };
-    
+
     public static class GpsNiResponse {
         /* User reponse, one of the values in GpsUserResponseType */
         int userResponse;
         /* Optional extra data to pass with the user response */
         Bundle extras;
     };
-    
+
+    private final BroadcastReceiver mBroadcastReciever = new BroadcastReceiver() {
+
+        @Override public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_NEW_OUTGOING_CALL)) {
+                String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
+                /*
+                   Emergency Mode is when during emergency call or in emergency call back mode.
+                   For checking if it is during emergency call:
+                       mIsInEmergency records if the phone is in emergency call or not. It will
+                       be set to true when the phone is having emergency call, and then will
+                       be set to false by mPhoneStateListener when the emergency call ends.
+                   For checking if it is in emergency call back mode:
+                       Emergency call back mode will be checked by reading system properties
+                       when necessary: SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)
+                */
+                mIsInEmergency |= PhoneNumberUtils.isEmergencyNumber(phoneNumber);
+                if (DEBUG) Log.v(TAG, "ACTION_NEW_OUTGOING_CALL - " + mIsInEmergency);
+            }
+        }
+    };
+
     /**
      * The notification that is shown when a network-initiated notification
-     * (and verification) event is received. 
+     * (and verification) event is received.
      * <p>
      * This is lazily created, so use {@link #setNINotification()}.
      */
     private Notification mNiNotification;
-    
-    public GpsNetInitiatedHandler(Context context) {
+
+    public GpsNetInitiatedHandler(Context context,
+                                  INetInitiatedListener netInitiatedListener,
+                                  boolean isSuplEsEnabled) {
         mContext = context;
+
+        if (netInitiatedListener == null) {
+            throw new IllegalArgumentException("netInitiatedListener is null");
+        } else {
+            mNetInitiatedListener = netInitiatedListener;
+        }
+
+        mIsSuplEsEnabled = isSuplEsEnabled;
         mLocationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
+        mTelephonyManager =
+            (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
+
+        mPhoneStateListener = new PhoneStateListener() {
+            @Override
+            public void onCallStateChanged(int state, String incomingNumber) {
+                if (DEBUG) Log.d(TAG, "onCallStateChanged(): state is "+ state);
+                // listening for emergency call ends
+                if (state == TelephonyManager.CALL_STATE_IDLE) {
+                    mIsInEmergency = false;
+                }
+            }
+        };
+        mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);
+
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
+        mContext.registerReceiver(mBroadcastReciever, intentFilter);
     }
-    
+
+    public void setSuplEsEnablement(boolean isEnabled)
+    {
+        mIsSuplEsEnabled = isEnabled;
+    }
+
     // Handles NI events from HAL
     public void handleNiNotification(GpsNiNotification notif)
     {
-        if (DEBUG) Log.d(TAG, "handleNiNotification" + " notificationId: " + notif.notificationId
-                + " requestorId: " + notif.requestorId + " text: " + notif.text);
+        if (DEBUG) Log.d(TAG, "in handleNiNotification () :"
+                        + " notificationId: " + notif.notificationId
+                        + " requestorId: " + notif.requestorId
+                        + " text: " + notif.text
+                        + " mIsSuplEsEnabled" + mIsSuplEsEnabled);
 
-        // Notify and verify with immediate pop-up
-        if (notif.needNotify && notif.needVerify && mPopupImmediately)
-        {
-            // Popup the dialog box now
-            openNiDialog(notif);
-        }
-
-        // Notify only, or delayed pop-up (change mPopupImmediately to FALSE)
-        if (notif.needNotify && !notif.needVerify ||
-            notif.needNotify && notif.needVerify && !mPopupImmediately)
-        {
-            // Show the notification
-
-            // if mPopupImmediately == FALSE and needVerify == TRUE, a dialog will be opened
-            // when the user opens the notification message
-
-            setNiNotification(notif);
-        }
-
-        // ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify; 3. privacy override.
-        if ( notif.needNotify && !notif.needVerify ||
-            !notif.needNotify && !notif.needVerify ||
-             notif.privacyOverride)
-        {
-            mLocationManager.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_ACCEPT);
+        if (mIsSuplEsEnabled == false) {
+            handleNi(notif);
+        } else {
+            handleNiInEs(notif);
         }
 
         //////////////////////////////////////////////////////////////////////////
@@ -176,6 +234,72 @@
         //
     }
 
+    // handle NI form HAL when SUPL_ES is disabled.
+    private void handleNi(GpsNiNotification notif) {
+        if (DEBUG) Log.d(TAG, "in handleNi () :"
+                        + " needNotify: " + notif.needNotify
+                        + " needVerify: " + notif.needVerify
+                        + " privacyOverride: " + notif.privacyOverride
+                        + " mPopupImmediately: " + mPopupImmediately);
+
+        // legacy behaviour
+        if (notif.needNotify) {
+        // If NI does not need verify or the dialog is not requested
+        // to pop up immediately, the dialog box will not pop up.
+            if (notif.needVerify && mPopupImmediately) {
+                // Popup the dialog box now
+                openNiDialog(notif);
+            } else {
+                // Show the notification
+                setNiNotification(notif);
+            }
+        }
+        // ACCEPT cases: 1. Notify, no verify; 2. no notify, no verify;
+        // 3. privacy override.
+        if (!notif.needVerify || notif.privacyOverride) {
+            try {
+                mNetInitiatedListener.sendNiResponse(notif.notificationId,
+                                                     GPS_NI_RESPONSE_ACCEPT);
+            } catch (RemoteException e) {
+                Log.e(TAG, "RemoteException in sendNiResponse");
+            }
+        }
+    }
+
+    // handle NI from HAL when the SUPL_ES is enabled
+    private void handleNiInEs(GpsNiNotification notif) {
+
+        if (DEBUG) Log.d(TAG, "in handleNiInEs () :"
+                    + " niType: " + notif.niType
+                    + " notificationId: " + notif.notificationId);
+
+        // UE is in emergency mode when in emergency call mode or in emergency call back mode
+        boolean isUEInEmergencyMode = mIsInEmergency ||
+            Boolean.parseBoolean(SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE));
+
+        /*
+           1. When SUPL ES bit is off and UE is not in emergency mode:
+                  Call handleNi() to do legacy behaviour.
+           2. When SUPL ES bit is on and UE is in emergency mode:
+                  Call handleNi() to do acceptance behaviour.
+           3. When SUPL ES bit is off but UE is in emergency mode:
+                  Ignore the emergency SUPL INIT.
+           4. When SUPL ES bit is on but UE is not in emergency mode:
+                  Ignore the emergency SUPL INIT.
+        */
+        boolean isNiTypeES = (notif.niType == GPS_NI_TYPE_EMERGENCY_SUPL);
+        if (isNiTypeES != isUEInEmergencyMode) {
+            try {
+                mNetInitiatedListener.sendNiResponse(notif.notificationId,
+                                                     GPS_NI_RESPONSE_IGNORE);
+            } catch (RemoteException e) {
+                Log.e(TAG, "RemoteException in sendNiResponse");
+            }
+        } else {
+            handleNi(notif);
+        }
+    }
+
     // Sets the NI notification.
     private synchronized void setNiNotification(GpsNiNotification notif) {
         NotificationManager notificationManager = (NotificationManager) mContext
@@ -202,7 +326,7 @@
             mNiNotification.defaults |= Notification.DEFAULT_SOUND;
         } else {
             mNiNotification.defaults &= ~Notification.DEFAULT_SOUND;
-        }        
+        }
 
         mNiNotification.flags = Notification.FLAG_ONGOING_EVENT | Notification.FLAG_AUTO_CANCEL;
         mNiNotification.tickerText = getNotifTicker(notif, mContext);
@@ -230,7 +354,7 @@
         mContext.startActivity(intent);
     }
 
-    // Construct the intent for bringing up the dialog activity, which shows the 
+    // Construct the intent for bringing up the dialog activity, which shows the
     // notification and takes user input
     private Intent getDlgIntent(GpsNiNotification notif)
     {
@@ -239,7 +363,7 @@
         String message = getDialogMessage(notif, mContext);
 
         // directly bring up the NI activity
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
         intent.setClass(mContext, com.android.internal.app.NetInitiatedActivity.class);
 
         // put data in the intent
@@ -409,7 +533,7 @@
                 decodeString(notif.requestorId, mIsHexInput, notif.requestorIdEncoding),
                 decodeString(notif.text, mIsHexInput, notif.textEncoding));
         return message;
-    }       
+    }
 
     // change this to configure dialog display (for verification)
     static public String getDialogTitle(GpsNiNotification notif, Context context)
diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java
index 308f783..d7ede34 100644
--- a/media/java/android/media/AudioAttributes.java
+++ b/media/java/android/media/AudioAttributes.java
@@ -162,16 +162,13 @@
     public final static int FLAG_BEACON = 0x1 << 3;
 
     /**
-     * @hide
-     * CANDIDATE FOR PUBLIC API
      * Flag requesting the use of an output stream supporting hardware A/V synchronization.
      */
-    // TODO  add in FLAG_ALL_PUBLIC when in public API
     public final static int FLAG_HW_AV_SYNC = 0x1 << 4;
 
     private final static int FLAG_ALL = FLAG_AUDIBILITY_ENFORCED | FLAG_SECURE | FLAG_SCO |
             FLAG_BEACON | FLAG_HW_AV_SYNC;
-    private final static int FLAG_ALL_PUBLIC = FLAG_AUDIBILITY_ENFORCED;
+    private final static int FLAG_ALL_PUBLIC = FLAG_AUDIBILITY_ENFORCED | FLAG_HW_AV_SYNC;
 
     private int mUsage = USAGE_UNKNOWN;
     private int mContentType = CONTENT_TYPE_UNKNOWN;
@@ -530,7 +527,6 @@
         }
     }
 
-    /** @hide */
     public static final Parcelable.Creator<AudioAttributes> CREATOR
             = new Parcelable.Creator<AudioAttributes>() {
         /**
diff --git a/media/java/android/media/AudioDevice.java b/media/java/android/media/AudioDevice.java
index e078354..df4d60d 100644
--- a/media/java/android/media/AudioDevice.java
+++ b/media/java/android/media/AudioDevice.java
@@ -20,90 +20,91 @@
 
 /**
  * Class to provide information about the audio devices.
+ * @hide
  */
 public class AudioDevice {
 
     /**
      * A device type associated with an unknown or uninitialized device.
      */
-    public static final int DEVICE_TYPE_UNKNOWN          = 0;
+    public static final int TYPE_UNKNOWN          = 0;
     /**
      * A device type describing the attached earphone speaker.
      */
-    public static final int DEVICE_TYPE_BUILTIN_EARPIECE = 1;
+    public static final int TYPE_BUILTIN_EARPIECE = 1;
     /**
      * A device type describing the speaker system (i.e. a mono speaker or stereo speakers) built
      * in a device.
      */
-    public static final int DEVICE_TYPE_BUILTIN_SPEAKER  = 2;
+    public static final int TYPE_BUILTIN_SPEAKER  = 2;
     /**
      * A device type describing a headset, which is the combination of a headphones and microphone.
      */
-    public static final int DEVICE_TYPE_WIRED_HEADSET    = 3;
+    public static final int TYPE_WIRED_HEADSET    = 3;
     /**
      * A device type describing a pair of wired headphones .
      */
-    public static final int DEVICE_TYPE_WIRED_HEADPHONES = 4;
+    public static final int TYPE_WIRED_HEADPHONES = 4;
     /**
      * A device type describing an analog line-level connection.
      */
-    public static final int DEVICE_TYPE_LINE_ANALOG      = 5;
+    public static final int TYPE_LINE_ANALOG      = 5;
     /**
      * A device type describing a digital line connection (e.g. SPDIF).
      */
-    public static final int DEVICE_TYPE_LINE_DIGITAL     = 6;
+    public static final int TYPE_LINE_DIGITAL     = 6;
     /**
      * A device type describing a Bluetooth device typically used for telephony .
      */
-    public static final int DEVICE_TYPE_BLUETOOTH_SCO    = 7;
+    public static final int TYPE_BLUETOOTH_SCO    = 7;
     /**
      * A device type describing a Bluetooth device supporting the A2DP profile.
      */
-    public static final int DEVICE_TYPE_BLUETOOTH_A2DP   = 8;
+    public static final int TYPE_BLUETOOTH_A2DP   = 8;
     /**
      * A device type describing an HDMI connection .
      */
-    public static final int DEVICE_TYPE_HDMI             = 9;
+    public static final int TYPE_HDMI             = 9;
     /**
      * A device type describing the Audio Return Channel of an HDMI connection.
      */
-    public static final int DEVICE_TYPE_HDMI_ARC         = 10;
+    public static final int TYPE_HDMI_ARC         = 10;
     /**
      * A device type describing a USB audio device.
      */
-    public static final int DEVICE_TYPE_USB_DEVICE       = 11;
+    public static final int TYPE_USB_DEVICE       = 11;
     /**
      * A device type describing a USB audio device in accessory mode.
      */
-    public static final int DEVICE_TYPE_USB_ACCESSORY    = 12;
+    public static final int TYPE_USB_ACCESSORY    = 12;
     /**
      * A device type describing the audio device associated with a dock.
      */
-    public static final int DEVICE_TYPE_DOCK             = 13;
+    public static final int TYPE_DOCK             = 13;
     /**
      * A device type associated with the transmission of audio signals over FM.
      */
-    public static final int DEVICE_TYPE_FM               = 14;
+    public static final int TYPE_FM               = 14;
     /**
      * A device type describing the microphone(s) built in a device.
      */
-    public static final int DEVICE_TYPE_BUILTIN_MIC      = 15;
+    public static final int TYPE_BUILTIN_MIC      = 15;
     /**
      * A device type for accessing the audio content transmitted over FM.
      */
-    public static final int DEVICE_TYPE_FM_TUNER         = 16;
+    public static final int TYPE_FM_TUNER         = 16;
     /**
      * A device type for accessing the audio content transmitted over the TV tuner system.
      */
-    public static final int DEVICE_TYPE_TV_TUNER         = 17;
+    public static final int TYPE_TV_TUNER         = 17;
     /**
      * A device type describing the transmission of audio signals over the telephony network.
      */
-    public static final int DEVICE_TYPE_TELEPHONY        = 18;
+    public static final int TYPE_TELEPHONY        = 18;
     /**
      * A device type describing the auxiliary line-level connectors.
      */
-    public static final int DEVICE_TYPE_AUX_LINE         = 19;
+    public static final int TYPE_AUX_LINE         = 19;
 
     AudioDevicePortConfig mConfig;
 
@@ -135,7 +136,7 @@
      * @return
      */
     public int getDeviceType() {
-        return INT_TO_EXT_DEVICE_MAPPING.get(mConfig.port().type(), DEVICE_TYPE_UNKNOWN);
+        return INT_TO_EXT_DEVICE_MAPPING.get(mConfig.port().type(), TYPE_UNKNOWN);
     }
 
     /**
@@ -154,7 +155,7 @@
 
     /** @hide */
     public static int convertInternalDeviceToDeviceType(int intDevice) {
-        return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, DEVICE_TYPE_UNKNOWN);
+        return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, TYPE_UNKNOWN);
     }
 
     private static final SparseIntArray INT_TO_EXT_DEVICE_MAPPING;
@@ -163,43 +164,43 @@
 
     static {
         INT_TO_EXT_DEVICE_MAPPING = new SparseIntArray();
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, DEVICE_TYPE_BUILTIN_EARPIECE);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, DEVICE_TYPE_BUILTIN_SPEAKER);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, DEVICE_TYPE_WIRED_HEADSET);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, DEVICE_TYPE_WIRED_HEADPHONES);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, DEVICE_TYPE_BLUETOOTH_SCO);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, DEVICE_TYPE_BLUETOOTH_SCO);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, DEVICE_TYPE_BLUETOOTH_SCO);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, DEVICE_TYPE_BLUETOOTH_A2DP);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, DEVICE_TYPE_BLUETOOTH_A2DP);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, DEVICE_TYPE_BLUETOOTH_A2DP);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, DEVICE_TYPE_HDMI);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, DEVICE_TYPE_DOCK);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, DEVICE_TYPE_DOCK);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, DEVICE_TYPE_USB_ACCESSORY);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, DEVICE_TYPE_USB_DEVICE);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, DEVICE_TYPE_TELEPHONY);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, DEVICE_TYPE_LINE_ANALOG);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, DEVICE_TYPE_HDMI_ARC);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, DEVICE_TYPE_LINE_DIGITAL);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_FM, DEVICE_TYPE_FM);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_AUX_LINE, DEVICE_TYPE_AUX_LINE);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPEAKER, TYPE_BUILTIN_SPEAKER);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADSET, TYPE_WIRED_HEADSET);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE, TYPE_WIRED_HEADPHONES);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, TYPE_BLUETOOTH_SCO);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT, TYPE_BLUETOOTH_SCO);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, TYPE_BLUETOOTH_A2DP);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, TYPE_BLUETOOTH_A2DP);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI, TYPE_HDMI);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, TYPE_DOCK);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, TYPE_DOCK);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_ACCESSORY, TYPE_USB_ACCESSORY);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_USB_DEVICE, TYPE_USB_DEVICE);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_TELEPHONY_TX, TYPE_TELEPHONY);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_LINE, TYPE_LINE_ANALOG);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_HDMI_ARC, TYPE_HDMI_ARC);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_SPDIF, TYPE_LINE_DIGITAL);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_FM, TYPE_FM);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_AUX_LINE, TYPE_AUX_LINE);
 
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, DEVICE_TYPE_BUILTIN_MIC);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, DEVICE_TYPE_BLUETOOTH_SCO);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, DEVICE_TYPE_WIRED_HEADSET);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, DEVICE_TYPE_HDMI);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, DEVICE_TYPE_TELEPHONY);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, DEVICE_TYPE_BUILTIN_MIC);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, DEVICE_TYPE_DOCK);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, DEVICE_TYPE_DOCK);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, DEVICE_TYPE_USB_ACCESSORY);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, DEVICE_TYPE_USB_DEVICE);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, DEVICE_TYPE_FM_TUNER);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, DEVICE_TYPE_TV_TUNER);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, DEVICE_TYPE_LINE_ANALOG);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_SPDIF, DEVICE_TYPE_LINE_DIGITAL);
-        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, DEVICE_TYPE_BLUETOOTH_A2DP);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BUILTIN_MIC, TYPE_BUILTIN_MIC);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET, TYPE_BLUETOOTH_SCO);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_WIRED_HEADSET, TYPE_WIRED_HEADSET);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_HDMI, TYPE_HDMI);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TELEPHONY_RX, TYPE_TELEPHONY);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BACK_MIC, TYPE_BUILTIN_MIC);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET, TYPE_DOCK);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_DGTL_DOCK_HEADSET, TYPE_DOCK);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_ACCESSORY, TYPE_USB_ACCESSORY);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_USB_DEVICE, TYPE_USB_DEVICE);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_FM_TUNER, TYPE_FM_TUNER);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_TV_TUNER, TYPE_TV_TUNER);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_LINE, TYPE_LINE_ANALOG);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_SPDIF, TYPE_LINE_DIGITAL);
+        INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, TYPE_BLUETOOTH_A2DP);
 
         // not covered here, legacy
         //AudioSystem.DEVICE_OUT_REMOTE_SUBMIX
@@ -207,25 +208,25 @@
 
         // privileges mapping to output device
         EXT_TO_INT_DEVICE_MAPPING = new SparseIntArray();
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_FM, AudioSystem.DEVICE_OUT_FM);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_TELEPHONY, AudioSystem.DEVICE_OUT_TELEPHONY_TX);
-        EXT_TO_INT_DEVICE_MAPPING.put(DEVICE_TYPE_AUX_LINE, AudioSystem.DEVICE_OUT_AUX_LINE);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_EARPIECE, AudioSystem.DEVICE_OUT_EARPIECE);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_SPEAKER, AudioSystem.DEVICE_OUT_SPEAKER);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADSET, AudioSystem.DEVICE_OUT_WIRED_HEADSET);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_WIRED_HEADPHONES, AudioSystem.DEVICE_OUT_WIRED_HEADPHONE);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_OUT_LINE);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_OUT_SPDIF);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_OUT_BLUETOOTH_SCO);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_OUT_HDMI);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_HDMI_ARC, AudioSystem.DEVICE_OUT_HDMI_ARC);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_OUT_USB_DEVICE);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_USB_ACCESSORY, AudioSystem.DEVICE_OUT_USB_ACCESSORY);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM, AudioSystem.DEVICE_OUT_FM);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_OUT_TELEPHONY_TX);
+        EXT_TO_INT_DEVICE_MAPPING.put(TYPE_AUX_LINE, AudioSystem.DEVICE_OUT_AUX_LINE);
     }
 }
 
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index a0a070a..559c247 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -37,6 +37,7 @@
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
+import android.os.Process;
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.ServiceManager;
@@ -207,6 +208,125 @@
     public static final String EXTRA_MASTER_VOLUME_MUTED =
         "android.media.EXTRA_MASTER_VOLUME_MUTED";
 
+    /**
+     * Broadcast Action: Wired Headset plugged in or unplugged.
+     *
+     * You <em>cannot</em> receive this through components declared
+     * in manifests, only by explicitly registering for it with
+     * {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)
+     * Context.registerReceiver()}.
+     *
+     * <p>The intent will have the following extra values:
+     * <ul>
+     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+     *   <li><em>name</em> - Headset type, human readable string </li>
+     *   <li><em>microphone</em> - 1 if headset has a microphone, 0 otherwise </li>
+     * </ul>
+     * </ul>
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_HEADSET_PLUG =
+            "android.intent.action.HEADSET_PLUG";
+
+    /**
+     * Broadcast Action: A sticky broadcast indicating an HMDI cable was plugged or unplugged
+     *
+     * The intent will have the following extra values: {@link #EXTRA_AUDIO_PLUG_STATE},
+     * {@link #EXTRA_MAX_CHANNEL_COUNT}, {@link #EXTRA_ENCODINGS}.
+     * <p>It can only be received by explicitly registering for it with
+     * {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)}.
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_HDMI_AUDIO_PLUG =
+            "android.media.action.HDMI_AUDIO_PLUG";
+
+    /**
+     * Extra used in {@link #ACTION_HDMI_AUDIO_PLUG} to communicate whether HDMI is plugged in
+     * or unplugged.
+     * An integer value of 1 indicates a plugged-in state, 0 is unplugged.
+     */
+    public static final String EXTRA_AUDIO_PLUG_STATE = "android.media.extra.AUDIO_PLUG_STATE";
+
+    /**
+     * Extra used in {@link #ACTION_HDMI_AUDIO_PLUG} to define the maximum number of channels
+     * supported by the HDMI device.
+     * The corresponding integer value is only available when the device is plugged in (as expressed
+     * by {@link #EXTRA_AUDIO_PLUG_STATE}).
+     */
+    public static final String EXTRA_MAX_CHANNEL_COUNT = "android.media.extra.MAX_CHANNEL_COUNT";
+
+    /**
+     * Extra used in {@link #ACTION_HDMI_AUDIO_PLUG} to define the audio encodings supported by
+     * the connected HDMI device.
+     * The corresponding array of encoding values is only available when the device is plugged in
+     * (as expressed by {@link #EXTRA_AUDIO_PLUG_STATE}). Encoding values are defined in
+     * {@link AudioFormat} (for instance see {@link AudioFormat#ENCODING_PCM_16BIT}). Use
+     * {@link android.content.Intent#getIntArrayExtra(String)} to retrieve the encoding values.
+     */
+    public static final String EXTRA_ENCODINGS = "android.media.extra.ENCODINGS";
+
+    /**
+     * Broadcast Action: An analog audio speaker/headset plugged in or unplugged.
+     *
+     * <p>The intent will have the following extra values:
+     * <ul>
+     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+     *   <li><em>name</em> - Headset type, human readable string </li>
+     * </ul>
+     * </ul>
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_ANALOG_AUDIO_DOCK_PLUG =
+            "android.media.action.ANALOG_AUDIO_DOCK_PLUG";
+
+    /**
+     * Broadcast Action: A digital audio speaker/headset plugged in or unplugged.
+     *
+     * <p>The intent will have the following extra values:
+     * <ul>
+     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+     *   <li><em>name</em> - Headset type, human readable string </li>
+     * </ul>
+     * </ul>
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_DIGITAL_AUDIO_DOCK_PLUG =
+            "android.media.action.DIGITAL_AUDIO_DOCK_PLUG";
+
+    /**
+     * Broadcast Action: A USB audio accessory was plugged in or unplugged.
+     *
+     * <p>The intent will have the following extra values:
+     * <ul>
+     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+     *   <li><em>card</em> - ALSA card number (integer) </li>
+     *   <li><em>device</em> - ALSA device number (integer) </li>
+     * </ul>
+     * </ul>
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_USB_AUDIO_ACCESSORY_PLUG =
+            "android.media.action.USB_AUDIO_ACCESSORY_PLUG";
+
+    /**
+     * Broadcast Action: A USB audio device was plugged in or unplugged.
+     *
+     * <p>The intent will have the following extra values:
+     * <ul>
+     *   <li><em>state</em> - 0 for unplugged, 1 for plugged. </li>
+     *   <li><em>card</em> - ALSA card number (integer) </li>
+     *   <li><em>device</em> - ALSA device number (integer) </li>
+     * </ul>
+     * </ul>
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_USB_AUDIO_DEVICE_PLUG =
+            "android.media.action.USB_AUDIO_DEVICE_PLUG";
+
     /** The audio stream for phone calls */
     public static final int STREAM_VOICE_CALL = AudioSystem.STREAM_VOICE_CALL;
     /** The audio stream for system sounds */
@@ -1841,7 +1961,42 @@
             return;
         }
 
-        if (!querySoundEffectsEnabled()) {
+        if (!querySoundEffectsEnabled(Process.myUserHandle().getIdentifier())) {
+            return;
+        }
+
+        IAudioService service = getService();
+        try {
+            service.playSoundEffect(effectType);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Dead object in playSoundEffect"+e);
+        }
+    }
+
+    /**
+     * Plays a sound effect (Key clicks, lid open/close...)
+     * @param effectType The type of sound effect. One of
+     *            {@link #FX_KEY_CLICK},
+     *            {@link #FX_FOCUS_NAVIGATION_UP},
+     *            {@link #FX_FOCUS_NAVIGATION_DOWN},
+     *            {@link #FX_FOCUS_NAVIGATION_LEFT},
+     *            {@link #FX_FOCUS_NAVIGATION_RIGHT},
+     *            {@link #FX_KEYPRESS_STANDARD},
+     *            {@link #FX_KEYPRESS_SPACEBAR},
+     *            {@link #FX_KEYPRESS_DELETE},
+     *            {@link #FX_KEYPRESS_RETURN},
+     *            {@link #FX_KEYPRESS_INVALID},
+     * @param userId The current user to pull sound settings from
+     * NOTE: This version uses the UI settings to determine
+     * whether sounds are heard or not.
+     * @hide
+     */
+    public void  playSoundEffect(int effectType, int userId) {
+        if (effectType < 0 || effectType >= NUM_SOUND_EFFECTS) {
+            return;
+        }
+
+        if (!querySoundEffectsEnabled(userId)) {
             return;
         }
 
@@ -1888,8 +2043,9 @@
     /**
      * Settings has an in memory cache, so this is fast.
      */
-    private boolean querySoundEffectsEnabled() {
-        return Settings.System.getInt(mContext.getContentResolver(), Settings.System.SOUND_EFFECTS_ENABLED, 0) != 0;
+    private boolean querySoundEffectsEnabled(int user) {
+        return Settings.System.getIntForUser(mContext.getContentResolver(),
+                Settings.System.SOUND_EFFECTS_ENABLED, 0, user) != 0;
     }
 
 
diff --git a/media/java/android/media/AudioManagerInternal.java b/media/java/android/media/AudioManagerInternal.java
index 6f1bdef..7c0d758 100644
--- a/media/java/android/media/AudioManagerInternal.java
+++ b/media/java/android/media/AudioManagerInternal.java
@@ -26,6 +26,10 @@
  */
 public abstract class AudioManagerInternal {
 
+    public abstract void adjustSuggestedStreamVolumeForUid(int streamType, int direction,
+            int flags,
+            String callingPackage, int uid);
+
     public abstract void adjustStreamVolumeForUid(int streamType, int direction, int flags,
             String callingPackage, int uid);
 
diff --git a/media/java/android/media/AudioPortEventHandler.java b/media/java/android/media/AudioPortEventHandler.java
index 8d2c172..9db4994 100644
--- a/media/java/android/media/AudioPortEventHandler.java
+++ b/media/java/android/media/AudioPortEventHandler.java
@@ -47,10 +47,7 @@
         mListeners = new ArrayList<AudioManager.OnAudioPortUpdateListener>();
 
         // find the looper for our new event handler
-        Looper looper = Looper.myLooper();
-        if (looper == null) {
-            looper = Looper.getMainLooper();
-        }
+        Looper looper = Looper.getMainLooper();
 
         if (looper != null) {
             mHandler = new Handler(looper) {
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 8d321cc..91a8468 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -544,6 +544,9 @@
         MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = SystemProperties.getInt(
             "ro.config.vc_call_vol_steps",
            MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]);
+        MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = SystemProperties.getInt(
+            "ro.config.media_vol_steps",
+           MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]);
 
         sSoundEffectVolumeDb = context.getResources().getInteger(
                 com.android.internal.R.integer.config_soundEffectVolumeDb);
@@ -599,8 +602,8 @@
                 new IntentFilter(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED);
         intentFilter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
         intentFilter.addAction(Intent.ACTION_DOCK_EVENT);
-        intentFilter.addAction(Intent.ACTION_USB_AUDIO_ACCESSORY_PLUG);
-        intentFilter.addAction(Intent.ACTION_USB_AUDIO_DEVICE_PLUG);
+        intentFilter.addAction(AudioManager.ACTION_USB_AUDIO_ACCESSORY_PLUG);
+        intentFilter.addAction(AudioManager.ACTION_USB_AUDIO_DEVICE_PLUG);
         intentFilter.addAction(Intent.ACTION_SCREEN_ON);
         intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
         intentFilter.addAction(Intent.ACTION_USER_SWITCHED);
@@ -901,6 +904,12 @@
     /** @see AudioManager#adjustVolume(int, int) */
     public void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
             String callingPackage) {
+        adjustSuggestedStreamVolume(direction, suggestedStreamType, flags, callingPackage,
+                Binder.getCallingUid());
+    }
+
+    private void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags,
+            String callingPackage, int uid) {
         if (DEBUG_VOL) Log.d(TAG, "adjustSuggestedStreamVolume() stream="+suggestedStreamType
                 + ", flags=" + flags);
         int streamType;
@@ -925,7 +934,7 @@
             if (DEBUG_VOL) Log.d(TAG, "Volume controller suppressed adjustment");
         }
 
-        adjustStreamVolume(streamType, direction, flags, callingPackage);
+        adjustStreamVolume(streamType, direction, flags, callingPackage, uid);
     }
 
     /** @see AudioManager#adjustStreamVolume(int, int, int) */
@@ -1564,6 +1573,9 @@
                 callingPackage) != AppOpsManager.MODE_ALLOWED) {
             return;
         }
+        if (!checkAudioSettingsPermission("setMicrophoneMute()")) {
+            return;
+        }
 
         AudioSystem.muteMicrophone(on);
         // Post a persist microphone msg.
@@ -1771,6 +1783,15 @@
             return;
         }
 
+        if ( (mode == AudioSystem.MODE_IN_CALL) &&
+                (mContext.checkCallingOrSelfPermission(
+                        android.Manifest.permission.MODIFY_PHONE_STATE)
+                            != PackageManager.PERMISSION_GRANTED)) {
+            Log.w(TAG, "MODIFY_PHONE_STATE Permission Denial: setMode(MODE_IN_CALL) from pid="
+                    + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid());
+            return;
+        }
+
         if (mode < AudioSystem.MODE_CURRENT || mode >= AudioSystem.NUM_MODES) {
             return;
         }
@@ -1792,7 +1813,7 @@
     // must be called synchronized on mSetModeDeathHandlers
     // setModeInt() returns a valid PID if the audio mode was successfully set to
     // any mode other than NORMAL.
-    int setModeInt(int mode, IBinder cb, int pid) {
+    private int setModeInt(int mode, IBinder cb, int pid) {
         if (DEBUG_MODE) { Log.v(TAG, "setModeInt(mode=" + mode + ", pid=" + pid + ")"); }
         int newModeOwnerPid = 0;
         if (cb == null) {
@@ -3052,7 +3073,7 @@
     }
 
     boolean checkAudioSettingsPermission(String method) {
-        if (mContext.checkCallingOrSelfPermission("android.permission.MODIFY_AUDIO_SETTINGS")
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS)
                 == PackageManager.PERMISSION_GRANTED) {
             return true;
         }
@@ -4363,10 +4384,10 @@
             intent.putExtra("microphone", 0);
         } else if (device == AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET) {
             connType = AudioRoutesInfo.MAIN_DOCK_SPEAKERS;
-            intent.setAction(Intent.ACTION_ANALOG_AUDIO_DOCK_PLUG);
+            intent.setAction(AudioManager.ACTION_ANALOG_AUDIO_DOCK_PLUG);
         } else if (device == AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET) {
             connType = AudioRoutesInfo.MAIN_DOCK_SPEAKERS;
-            intent.setAction(Intent.ACTION_DIGITAL_AUDIO_DOCK_PLUG);
+            intent.setAction(AudioManager.ACTION_DIGITAL_AUDIO_DOCK_PLUG);
         } else if (device == AudioSystem.DEVICE_OUT_HDMI) {
             connType = AudioRoutesInfo.MAIN_HDMI;
             configureHdmiPlugIntent(intent, state);
@@ -4452,7 +4473,8 @@
     }
 
     private void configureHdmiPlugIntent(Intent intent, int state) {
-        intent.setAction(Intent.ACTION_HDMI_AUDIO_PLUG);
+        intent.setAction(AudioManager.ACTION_HDMI_AUDIO_PLUG);
+        intent.putExtra(AudioManager.EXTRA_AUDIO_PLUG_STATE, state);
         if (state == 1) {
             ArrayList<AudioPort> ports = new ArrayList<AudioPort>();
             int[] portGeneration = new int[1];
@@ -4476,7 +4498,7 @@
                                 for (int i = 0 ; i < encodingArray.length ; i++) {
                                     encodingArray[i] = encodingList.get(i);
                                 }
-                                intent.putExtra("encodings", encodingArray);
+                                intent.putExtra(AudioManager.EXTRA_ENCODINGS, encodingArray);
                             }
                             // find the maximum supported number of channels
                             int maxChannels = 0;
@@ -4486,7 +4508,7 @@
                                     maxChannels = channelCount;
                                 }
                             }
-                            intent.putExtra("maxChannelCount", maxChannels);
+                            intent.putExtra(AudioManager.EXTRA_MAX_CHANNEL_COUNT, maxChannels);
                         }
                     }
                 }
@@ -4580,7 +4602,7 @@
                         }
                     }
                 }
-            } else if (action.equals(Intent.ACTION_USB_AUDIO_ACCESSORY_PLUG)) {
+            } else if (action.equals(AudioManager.ACTION_USB_AUDIO_ACCESSORY_PLUG)) {
                 state = intent.getIntExtra("state", 0);
 
                 int alsaCard = intent.getIntExtra("card", -1);
@@ -4592,7 +4614,7 @@
                 // Playback Device
                 outDevice = AudioSystem.DEVICE_OUT_USB_ACCESSORY;
                 setWiredDeviceConnectionState(outDevice, state, params);
-            } else if (action.equals(Intent.ACTION_USB_AUDIO_DEVICE_PLUG)) {
+            } else if (action.equals(AudioManager.ACTION_USB_AUDIO_DEVICE_PLUG)) {
                 // FIXME Does not yet handle the case where the setting is changed
                 // after device connection.  Ideally we should handle the settings change
                 // in SettingsObserver. Here we should log that a USB device is connected
@@ -5337,6 +5359,15 @@
      * LocalServices.
      */
     final class AudioServiceInternal extends AudioManagerInternal {
+
+        @Override
+        public void adjustSuggestedStreamVolumeForUid(int streamType, int direction, int flags,
+                String callingPackage, int uid) {
+            // direction and stream type swap here because the public
+            // adjustSuggested has a different order than the other methods.
+            adjustSuggestedStreamVolume(direction, streamType, flags, callingPackage, uid);
+        }
+
         @Override
         public void adjustStreamVolumeForUid(int streamType, int direction, int flags,
                 String callingPackage, int uid) {
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 1861bd7..f37cbe5 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -1286,7 +1286,7 @@
 
     public int write(short[] audioData, int offsetInShorts, int sizeInShorts) {
 
-        if (mState == STATE_UNINITIALIZED || mAudioFormat != AudioFormat.ENCODING_PCM_16BIT) {
+        if (mState == STATE_UNINITIALIZED || mAudioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
             return ERROR_INVALID_OPERATION;
         }
 
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index 8883d28..5651fc9 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -177,9 +177,15 @@
      */
     public static final int QUALITY_HIGH_SPEED_1080P = 2004;
 
+    /**
+     * High speed ( >= 100fps) quality level corresponding to the 2160p (3840 x 2160)
+     * resolution.
+     */
+    public static final int QUALITY_HIGH_SPEED_2160P = 2005;
+
     // Start and end of high speed quality list
     private static final int QUALITY_HIGH_SPEED_LIST_START = QUALITY_HIGH_SPEED_LOW;
-    private static final int QUALITY_HIGH_SPEED_LIST_END = QUALITY_HIGH_SPEED_1080P;
+    private static final int QUALITY_HIGH_SPEED_LIST_END = QUALITY_HIGH_SPEED_2160P;
 
     /**
      * Default recording duration in seconds before the session is terminated.
@@ -313,6 +319,7 @@
      * @see #QUALITY_HIGH_SPEED_480P
      * @see #QUALITY_HIGH_SPEED_720P
      * @see #QUALITY_HIGH_SPEED_1080P
+     * @see #QUALITY_HIGH_SPEED_2160P
     */
     public static CamcorderProfile get(int cameraId, int quality) {
         if (!((quality >= QUALITY_LIST_START &&
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 3e8ee93..b4fef36 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -672,6 +672,11 @@
             super(detailMessage);
             mErrorCode = errorCode;
             mActionCode = actionCode;
+
+            // TODO get this from codec
+            final String sign = errorCode < 0 ? "neg_" : "";
+            mDiagnosticInfo =
+                "android.media.MediaCodec.error_" + sign + Math.abs(errorCode);
         }
 
         /**
@@ -696,15 +701,28 @@
          * Retrieve the error code associated with a CodecException.
          * This is opaque diagnostic information and may depend on
          * hardware or API level.
+         *
+         * @hide
          */
         public int getErrorCode() {
             return mErrorCode;
         }
 
+        /**
+         * Retrieve a human readable diagnostic information string
+         * associated with the exception. DO NOT SHOW THIS TO END-USERS!
+         * This string will not be localized or generally comprehensible
+         * to end-users.
+         */
+        public String getDiagnosticInfo() {
+            return mDiagnosticInfo;
+        }
+
         /* Must be in sync with android_media_MediaCodec.cpp */
         private final static int ACTION_TRANSIENT = 1;
         private final static int ACTION_RECOVERABLE = 2;
 
+        private final String mDiagnosticInfo;
         private final int mErrorCode;
         private final int mActionCode;
     }
@@ -737,6 +755,13 @@
         public static final int ERROR_RESOURCE_BUSY = 3;
 
         /**
+         * This indicates that the output protection levels supported by the
+         * device are not sufficient to meet the requirements set by the
+         * content owner in the license policy.
+         */
+        public static final int ERROR_INSUFFICIENT_OUTPUT_PROTECTION = 4;
+
+        /**
          * Retrieve the error code associated with a CryptoException
          */
         public int getErrorCode() {
@@ -1622,8 +1647,7 @@
      * @throws IllegalStateException if in the Uninitialized state.
      */
     public MediaCodecInfo getCodecInfo() {
-        return MediaCodecList.getCodecInfoAt(
-                   MediaCodecList.findCodecByName(getName()));
+        return MediaCodecList.getInfoFor(getName());
     }
 
     private native final ByteBuffer[] getBuffers(boolean input);
@@ -1732,7 +1756,7 @@
             if (cropRect != null) {
                 cropRect.offset(-xOffset, -yOffset);
             }
-            setCropRect(cropRect);
+            super.setCropRect(cropRect);
 
             // save offsets and info
             mXOffset = xOffset;
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 323a3e3..01f8193 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -321,6 +321,9 @@
             // check feature support
             for (Feature feat: getValidFeatures()) {
                 Integer yesNo = (Integer)map.get(MediaFormat.KEY_FEATURE_ + feat.mName);
+                if (yesNo == null) {
+                    continue;
+                }
                 if ((yesNo == 1 && !isFeatureSupported(feat.mName)) ||
                         (yesNo == 0 && isFeatureRequired(feat.mName))) {
                     return false;
@@ -414,7 +417,7 @@
          * profile} and {@code level}.  If the type, or profile-level combination
          * is not understood by the framework, it returns null.
          */
-        public static CodecCapabilities CreateFromProfileLevel(
+        public static CodecCapabilities createFromProfileLevel(
                 String mime, int profile, int level) {
             CodecProfileLevel pl = new CodecProfileLevel();
             pl.profile = profile;
@@ -470,13 +473,12 @@
                 Integer yesNo = (Integer)map.get(key);
                 if (yesNo == null) {
                     continue;
-                } else if (yesNo > 0) {
-                    mFlagsRequired |= feat.mValue;
-                    mDefaultFormat.setInteger(key, 1);
-                } else {
-                    mFlagsSupported |= feat.mValue;
-                    mDefaultFormat.setInteger(key, 1);
                 }
+                if (yesNo > 0) {
+                    mFlagsRequired |= feat.mValue;
+                }
+                mFlagsSupported |= feat.mValue;
+                mDefaultFormat.setInteger(key, 1);
                 // TODO restrict features by mFlagsVerified once all codecs reliably verify them
             }
         }
diff --git a/media/java/android/media/MediaCodecList.java b/media/java/android/media/MediaCodecList.java
index 5084c5c..0dcbd65 100644
--- a/media/java/android/media/MediaCodecList.java
+++ b/media/java/android/media/MediaCodecList.java
@@ -116,6 +116,12 @@
 
     /* package private */ static native final int findCodecByName(String codec);
 
+    /** @hide */
+    public static MediaCodecInfo getInfoFor(String codec) {
+        initCodecList();
+        return sAllCodecInfos[findCodecByName(codec)];
+    }
+
     private static native final void native_init();
 
     /**
diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java
index ca707d8..1490732 100644
--- a/media/java/android/media/MediaDrm.java
+++ b/media/java/android/media/MediaDrm.java
@@ -188,18 +188,37 @@
      */
     public static final class MediaDrmStateException extends java.lang.IllegalStateException {
         private final int mErrorCode;
+        private final String mDiagnosticInfo;
 
         public MediaDrmStateException(int errorCode, String detailMessage) {
             super(detailMessage);
             mErrorCode = errorCode;
+
+            // TODO get this from DRM session
+            final String sign = errorCode < 0 ? "neg_" : "";
+            mDiagnosticInfo =
+                "android.media.MediaDrm.error_" + sign + Math.abs(errorCode);
+
         }
 
         /**
          * Retrieve the associated error code
+         *
+         * @hide
          */
         public int getErrorCode() {
             return mErrorCode;
         }
+
+        /**
+         * Retrieve a human readable diagnostic information string
+         * associated with the exception. DO NOT SHOW THIS TO END-USERS!
+         * This string will not be localized or generally comprehensible
+         * to end-users.
+         */
+        public String getDiagnosticInfo() {
+            return mDiagnosticInfo;
+        }
     }
 
     /**
diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java
index 7c3b4fc..afa0b6e 100644
--- a/media/java/android/media/MediaPlayer.java
+++ b/media/java/android/media/MediaPlayer.java
@@ -961,6 +961,10 @@
      * @param context the Context to use when resolving the Uri
      * @param uri the Content URI of the data you want to play
      * @param headers the headers to be sent together with the request for the data
+     *                Note that the cross domain redirection is allowed by default, but that can be
+     *                changed with key/value pairs through the headers parameter with
+     *                "android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
+     *                to disallow or allow cross domain redirection.
      * @throws IllegalStateException if it is called in an invalid state
      */
     public void setDataSource(Context context, Uri uri, Map<String, String> headers)
@@ -1925,6 +1929,7 @@
         mSubtitleController.setAnchor(anchor);
     }
 
+    private final Object mInbandSubtitleLock = new Object();
     private SubtitleTrack[] mInbandSubtitleTracks;
     private int mSelectedSubtitleTrackIndex = -1;
     private Vector<SubtitleTrack> mOutOfBandSubtitleTracks;
@@ -2032,19 +2037,21 @@
         }
 
         TrackInfo[] tracks = getInbandTrackInfo();
-        SubtitleTrack[] inbandTracks = new SubtitleTrack[tracks.length];
-        for (int i=0; i < tracks.length; i++) {
-            if (tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
-                if (i < mInbandSubtitleTracks.length) {
-                    inbandTracks[i] = mInbandSubtitleTracks[i];
-                } else {
-                    SubtitleTrack track = mSubtitleController.addTrack(
-                            tracks[i].getFormat());
-                    inbandTracks[i] = track;
+        synchronized (mInbandSubtitleLock) {
+            SubtitleTrack[] inbandTracks = new SubtitleTrack[tracks.length];
+            for (int i=0; i < tracks.length; i++) {
+                if (tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
+                    if (i < mInbandSubtitleTracks.length) {
+                        inbandTracks[i] = mInbandSubtitleTracks[i];
+                    } else {
+                        SubtitleTrack track = mSubtitleController.addTrack(
+                                tracks[i].getFormat());
+                        inbandTracks[i] = track;
+                    }
                 }
             }
+            mInbandSubtitleTracks = inbandTracks;
         }
-        mInbandSubtitleTracks = inbandTracks;
         mSubtitleController.selectDefaultTrack();
     }
 
@@ -2220,9 +2227,9 @@
                 try {
                     Libcore.os.lseek(fd3, offset2, OsConstants.SEEK_SET);
                     byte[] buffer = new byte[4096];
-                    for (int total = 0; total < length2;) {
-                        int remain = (int)length2 - total;
-                        int bytes = IoBridge.read(fd3, buffer, 0, Math.min(buffer.length, remain));
+                    for (long total = 0; total < length2;) {
+                        int bytesToRead = (int) Math.min(buffer.length, length2 - total);
+                        int bytes = IoBridge.read(fd3, buffer, 0, bytesToRead);
                         if (bytes < 0) {
                             break;
                         } else {
@@ -2354,6 +2361,18 @@
             throws IllegalStateException {
         // handle subtitle track through subtitle controller
         SubtitleTrack track = null;
+        synchronized (mInbandSubtitleLock) {
+            if (mInbandSubtitleTracks.length == 0) {
+                TrackInfo[] tracks = getInbandTrackInfo();
+                mInbandSubtitleTracks = new SubtitleTrack[tracks.length];
+                for (int i=0; i < tracks.length; i++) {
+                    if (tracks[i].getTrackType() == TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
+                        mInbandSubtitleTracks[i] = mSubtitleController.addTrack(tracks[i].getFormat());
+                    }
+                }
+            }
+        }
+
         if (index < mInbandSubtitleTracks.length) {
             track = mInbandSubtitleTracks[index];
         } else if (index < mInbandSubtitleTracks.length + mOutOfBandSubtitleTracks.size()) {
@@ -3252,9 +3271,7 @@
                 if (DEBUG) Log.d(TAG, "scheduleUpdate");
                 int i = registerListener(listener);
 
-                if (mStopped) {
-                    scheduleNotification(NOTIFY_STOP, 0 /* delay */);
-                } else {
+                if (!mStopped) {
                     mTimes[i] = 0;
                     scheduleNotification(NOTIFY_TIME, 0 /* delay */);
                 }
diff --git a/media/java/android/media/MediaRouter.java b/media/java/android/media/MediaRouter.java
index 6a4bf07..958ffab 100644
--- a/media/java/android/media/MediaRouter.java
+++ b/media/java/android/media/MediaRouter.java
@@ -2131,7 +2131,7 @@
             if (mVolume != volume) {
                 mVolume = volume;
                 if (mSvp != null) {
-                    mSvp.notifyVolumeChanged();
+                    mSvp.setCurrentVolume(mVolume);
                 }
                 dispatchRouteVolumeChanged(this);
                 if (mGroup != null) {
@@ -2217,7 +2217,7 @@
                 // Only register a new listener if necessary
                 if (mSvp == null || mSvp.getVolumeControl() != volumeControl
                         || mSvp.getMaxVolume() != mVolumeMax) {
-                    mSvp = new SessionVolumeProvider(volumeControl, mVolumeMax);
+                    mSvp = new SessionVolumeProvider(volumeControl, mVolumeMax, mVolume);
                     session.setPlaybackToRemote(mSvp);
                 }
             } else {
@@ -2231,13 +2231,8 @@
 
         class SessionVolumeProvider extends VolumeProvider {
 
-            public SessionVolumeProvider(int volumeControl, int maxVolume) {
-                super(volumeControl, maxVolume);
-            }
-
-            @Override
-            public int onGetCurrentVolume() {
-                return mVcb == null ? 0 : mVcb.route.mVolume;
+            public SessionVolumeProvider(int volumeControl, int maxVolume, int currentVolume) {
+                super(volumeControl, maxVolume, currentVolume);
             }
 
             @Override
diff --git a/media/java/android/media/RemoteController.java b/media/java/android/media/RemoteController.java
index f378cef..d84cf30 100644
--- a/media/java/android/media/RemoteController.java
+++ b/media/java/android/media/RemoteController.java
@@ -789,8 +789,12 @@
     void startListeningToSessions() {
         final ComponentName listenerComponent = new ComponentName(mContext,
                 mOnClientUpdateListener.getClass());
+        Handler handler = null;
+        if (Looper.myLooper() == null) {
+            handler = new Handler(Looper.getMainLooper());
+        }
         mSessionManager.addOnActiveSessionsChangedListener(mSessionListener, listenerComponent,
-                UserHandle.myUserId(), null);
+                UserHandle.myUserId(), handler);
         mSessionListener.onActiveSessionsChanged(mSessionManager
                 .getActiveSessions(listenerComponent));
         if (DEBUG) {
@@ -976,7 +980,7 @@
         synchronized (mInfoLock) {
             if (controller == null) {
                 if (mCurrentSession != null) {
-                    mCurrentSession.removeCallback(mSessionCb);
+                    mCurrentSession.unregisterCallback(mSessionCb);
                     mCurrentSession = null;
                     sendMsg(mEventHandler, MSG_CLIENT_CHANGE, SENDMSG_REPLACE,
                             0 /* genId */, 1 /* clearing */, null /* obj */, 0 /* delay */);
@@ -985,12 +989,12 @@
                     || !controller.getSessionToken()
                             .equals(mCurrentSession.getSessionToken())) {
                 if (mCurrentSession != null) {
-                    mCurrentSession.removeCallback(mSessionCb);
+                    mCurrentSession.unregisterCallback(mSessionCb);
                 }
                 sendMsg(mEventHandler, MSG_CLIENT_CHANGE, SENDMSG_REPLACE,
                         0 /* genId */, 0 /* clearing */, null /* obj */, 0 /* delay */);
                 mCurrentSession = controller;
-                mCurrentSession.addCallback(mSessionCb, mEventHandler);
+                mCurrentSession.registerCallback(mSessionCb, mEventHandler);
 
                 PlaybackState state = controller.getPlaybackState();
                 sendMsg(mEventHandler, MSG_NEW_PLAYBACK_STATE, SENDMSG_REPLACE,
diff --git a/media/java/android/media/SubtitleController.java b/media/java/android/media/SubtitleController.java
index 37adb8c..f82dbe0 100644
--- a/media/java/android/media/SubtitleController.java
+++ b/media/java/android/media/SubtitleController.java
@@ -275,7 +275,7 @@
                      mSelectedTrack.getFormat().getInteger(
                             MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) {
                     show();
-                } else {
+                } else if (mSelectedTrack != null && !mSelectedTrack.isTimedText()) {
                     hide();
                 }
                 mVisibilityIsExplicit = false;
diff --git a/media/java/android/media/VolumeProvider.java b/media/java/android/media/VolumeProvider.java
index 9bda1d4..5d1e004 100644
--- a/media/java/android/media/VolumeProvider.java
+++ b/media/java/android/media/VolumeProvider.java
@@ -19,7 +19,9 @@
 
 /**
  * Handles requests to adjust or set the volume on a session. This is also used
- * to push volume updates back to the session after a request has been handled.
+ * to push volume updates back to the session. The provider must call
+ * {@link #setCurrentVolume(int)} each time the volume being provided changes.
+ * <p>
  * You can set a volume provider on a session by calling
  * {@link MediaSession#setPlaybackToRemote}.
  */
@@ -46,29 +48,26 @@
 
     private final int mControlType;
     private final int mMaxVolume;
+    private int mCurrentVolume;
     private Callback mCallback;
 
     /**
      * Create a new volume provider for handling volume events. You must specify
-     * the type of volume control and the maximum volume that can be used.
+     * the type of volume control, the maximum volume that can be used, and the
+     * current volume on the output.
      *
      * @param volumeControl The method for controlling volume that is used by
      *            this provider.
      * @param maxVolume The maximum allowed volume.
+     * @param currentVolume The current volume on the output.
      */
-    public VolumeProvider(int volumeControl, int maxVolume) {
+    public VolumeProvider(int volumeControl, int maxVolume, int currentVolume) {
         mControlType = volumeControl;
         mMaxVolume = maxVolume;
+        mCurrentVolume = currentVolume;
     }
 
     /**
-     * Get the current volume of the remote playback.
-     *
-     * @return The current volume.
-     */
-    public abstract int onGetCurrentVolume();
-
-    /**
      * Get the volume control type that this volume provider uses.
      *
      * @return The volume control type for this volume provider
@@ -87,9 +86,23 @@
     }
 
     /**
-     * Notify the system that the volume has been changed.
+     * Gets the current volume. This will be the last value set by
+     * {@link #setCurrentVolume(int)}.
+     *
+     * @return The current volume.
      */
-    public final void notifyVolumeChanged() {
+    public final int getCurrentVolume() {
+        return mCurrentVolume;
+    }
+
+    /**
+     * Notify the system that the current volume has been changed. This must be
+     * called every time the volume changes to ensure it is displayed properly.
+     *
+     * @param currentVolume The current volume on the output.
+     */
+    public final void setCurrentVolume(int currentVolume) {
+        mCurrentVolume = currentVolume;
         if (mCallback != null) {
             mCallback.onVolumeChanged(this);
         }
@@ -97,6 +110,8 @@
 
     /**
      * Override to handle requests to set the volume of the current output.
+     * After the volume has been modified {@link #setCurrentVolume} must be
+     * called to notify the system.
      *
      * @param volume The volume to set the output to.
      */
@@ -107,7 +122,9 @@
      * Override to handle requests to adjust the volume of the current output.
      * Direction will be one of {@link AudioManager#ADJUST_LOWER},
      * {@link AudioManager#ADJUST_RAISE}, {@link AudioManager#ADJUST_SAME}.
-     * 
+     * After the volume has been modified {@link #setCurrentVolume} must be
+     * called to notify the system.
+     *
      * @param direction The direction to change the volume in.
      */
     public void onAdjustVolume(int direction) {
diff --git a/media/java/android/media/audiofx/Virtualizer.java b/media/java/android/media/audiofx/Virtualizer.java
index b314c02..be5adc8 100644
--- a/media/java/android/media/audiofx/Virtualizer.java
+++ b/media/java/android/media/audiofx/Virtualizer.java
@@ -16,11 +16,14 @@
 
 package android.media.audiofx;
 
+import android.annotation.IntDef;
 import android.media.AudioDevice;
 import android.media.AudioFormat;
 import android.media.audiofx.AudioEffect;
 import android.util.Log;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 import java.util.StringTokenizer;
@@ -248,14 +251,114 @@
     }
 
     /**
-     * Checks if the combination of a channel mask and device type is supported by this virtualizer.
+     * A virtualization mode indicating virtualization processing is not active.
+     * See {@link #getVirtualizationMode()} as one of the possible return value.
+     */
+    public static final int VIRTUALIZATION_MODE_OFF = 0;
+
+    /**
+     * A virtualization mode used to indicate the virtualizer effect must stop forcing the
+     * processing to a particular mode in {@link #forceVirtualizationMode(int)}.
+     */
+    public static final int VIRTUALIZATION_MODE_AUTO = 1;
+    /**
+     * A virtualization mode typically used over headphones.
+     * Binaural virtualization describes an audio processing configuration for virtualization
+     * where the left and right channels are respectively reaching the left and right ear of the
+     * user, without also feeding the opposite ear (as is the case when listening over speakers).
+     * <p>Such a mode is therefore meant to be used when audio is playing over stereo wired
+     * headphones or headsets, but also stereo headphones through a wireless A2DP Bluetooth link.
+     * <p>See {@link #canVirtualize(int, int)} to verify this mode is supported by this Virtualizer.
+     */
+    public final static int VIRTUALIZATION_MODE_BINAURAL = 2;
+
+    /**
+     * A virtualization mode typically used over speakers.
+     * Transaural virtualization describes an audio processing configuration that differs from
+     * binaural (as described in {@link #VIRTUALIZATION_MODE_BINAURAL} in that cross-talk is
+     * present, i.e. audio played from the left channel also reaches the right ear of the user,
+     * and vice-versa.
+     * <p>When supported, such a mode is therefore meant to be used when audio is playing over the
+     * built-in stereo speakers of a device, if they are featured.
+     * <p>See {@link #canVirtualize(int, int)} to verify this mode is supported by this Virtualizer.
+     */
+    public final static int VIRTUALIZATION_MODE_TRANSAURAL = 3;
+
+    /** @hide */
+    @IntDef( {
+        VIRTUALIZATION_MODE_BINAURAL,
+        VIRTUALIZATION_MODE_TRANSAURAL
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface VirtualizationMode {}
+
+    /** @hide */
+    @IntDef( {
+        VIRTUALIZATION_MODE_AUTO,
+        VIRTUALIZATION_MODE_BINAURAL,
+        VIRTUALIZATION_MODE_TRANSAURAL
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface ForceVirtualizationMode {}
+
+    private static int getDeviceForModeQuery(@VirtualizationMode int virtualizationMode)
+            throws IllegalArgumentException {
+        switch (virtualizationMode) {
+            case VIRTUALIZATION_MODE_BINAURAL:
+                return AudioDevice.TYPE_WIRED_HEADPHONES;
+            case VIRTUALIZATION_MODE_TRANSAURAL:
+                return AudioDevice.TYPE_BUILTIN_SPEAKER;
+            default:
+                throw (new IllegalArgumentException(
+                        "Virtualizer: illegal virtualization mode " + virtualizationMode));
+        }
+    }
+
+    private static int getDeviceForModeForce(@ForceVirtualizationMode int virtualizationMode)
+            throws IllegalArgumentException {
+        if (virtualizationMode == VIRTUALIZATION_MODE_AUTO) {
+            return AudioDevice.TYPE_UNKNOWN;
+        } else {
+            return getDeviceForModeQuery(virtualizationMode);
+        }
+    }
+
+    private static int deviceToMode(int deviceType) {
+        switch (deviceType) {
+            case AudioDevice.TYPE_WIRED_HEADSET:
+            case AudioDevice.TYPE_WIRED_HEADPHONES:
+            case AudioDevice.TYPE_BLUETOOTH_SCO:
+            case AudioDevice.TYPE_BUILTIN_EARPIECE:
+                return VIRTUALIZATION_MODE_BINAURAL;
+            case AudioDevice.TYPE_BUILTIN_SPEAKER:
+            case AudioDevice.TYPE_LINE_ANALOG:
+            case AudioDevice.TYPE_LINE_DIGITAL:
+            case AudioDevice.TYPE_BLUETOOTH_A2DP:
+            case AudioDevice.TYPE_HDMI:
+            case AudioDevice.TYPE_HDMI_ARC:
+            case AudioDevice.TYPE_USB_DEVICE:
+            case AudioDevice.TYPE_USB_ACCESSORY:
+            case AudioDevice.TYPE_DOCK:
+            case AudioDevice.TYPE_FM:
+            case AudioDevice.TYPE_AUX_LINE:
+                return VIRTUALIZATION_MODE_TRANSAURAL;
+            case AudioDevice.TYPE_UNKNOWN:
+            default:
+                return VIRTUALIZATION_MODE_OFF;
+        }
+    }
+
+    /**
+     * Checks if the combination of a channel mask and virtualization mode is supported by this
+     * virtualizer.
      * Some virtualizer implementations may only support binaural processing (i.e. only support
-     * headphone output), some may support transaural processing (i.e. for speaker output) for the
+     * headphone output, see {@link #VIRTUALIZATION_MODE_BINAURAL}), some may support transaural
+     * processing (i.e. for speaker output, see {@link #VIRTUALIZATION_MODE_TRANSAURAL}) for the
      * built-in speakers. Use this method to query the virtualizer implementation capabilities.
      * @param inputChannelMask the channel mask of the content to virtualize.
-     * @param deviceType the device type for which virtualization processing is to be performed.
-     *    Valid values are the device types defined in {@link AudioDevice}.
-     * @return true if the combination of channel mask and output device type is supported, false
+     * @param virtualizationMode the mode for which virtualization processing is to be performed,
+     *    one of {@link #VIRTUALIZATION_MODE_BINAURAL}, {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
+     * @return true if the combination of channel mask and virtualization mode is supported, false
      *    otherwise.
      *    <br>An indication that a certain channel mask is not supported doesn't necessarily mean
      *    you cannot play content with that channel mask, it more likely implies the content will
@@ -268,22 +371,22 @@
      * @throws IllegalArgumentException
      * @throws UnsupportedOperationException
      */
-    public boolean canVirtualize(int inputChannelMask, int deviceType)
+    public boolean canVirtualize(int inputChannelMask, @VirtualizationMode int virtualizationMode)
             throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
-        return getAnglesInt(inputChannelMask, deviceType, null);
+        return getAnglesInt(inputChannelMask, getDeviceForModeQuery(virtualizationMode), null);
     }
 
     /**
      * Queries the virtual speaker angles (azimuth and elevation) for a combination of a channel
-     * mask and device type.
-     * If the virtualization configuration (mask and device) is supported (see
+     * mask and virtualization mode.
+     * If the virtualization configuration (mask and mode) is supported (see
      * {@link #canVirtualize(int, int)}, the array angles will contain upon return the
      * definition of each virtual speaker and its azimuth and elevation angles relative to the
      * listener.
      * <br>Note that in some virtualizer implementations, the angles may be strength-dependent.
      * @param inputChannelMask the channel mask of the content to virtualize.
-     * @param deviceType the device type for which virtualization processing is to be performed.
-     *    Valid values are the device types defined in {@link AudioDevice}.
+     * @param virtualizationMode the mode for which virtualization processing is to be performed,
+     *    one of {@link #VIRTUALIZATION_MODE_BINAURAL}, {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
      * @param angles a non-null array whose length is 3 times the number of channels in the channel
      *    mask.
      *    If the method indicates the configuration is supported, the array will contain upon return
@@ -297,37 +400,39 @@
      *      <li>the element at index <code>3*i+2</code> contains its corresponding elevation angle
      *          where +90 is directly above the listener, 0 is the horizontal plane, and -90 is
      *          directly below the listener.</li>
-     * @return true if the combination of channel mask and output device type is supported, false
+     * @return true if the combination of channel mask and virtualization mode is supported, false
      *    otherwise.
      * @throws IllegalStateException
      * @throws IllegalArgumentException
      * @throws UnsupportedOperationException
      */
-    public boolean getSpeakerAngles(int inputChannelMask, int deviceType, int[] angles)
+    public boolean getSpeakerAngles(int inputChannelMask,
+            @VirtualizationMode int virtualizationMode, int[] angles)
             throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
         if (angles == null) {
             throw (new IllegalArgumentException(
                     "Virtualizer: illegal null channel / angle array"));
         }
 
-        return getAnglesInt(inputChannelMask, deviceType, angles);
+        return getAnglesInt(inputChannelMask, getDeviceForModeQuery(virtualizationMode), angles);
     }
 
     /**
-     * Forces the virtualizer effect to use the processing mode used for the given device type.
+     * Forces the virtualizer effect to use the given processing mode.
      * The effect must be enabled for the forced mode to be applied.
-     * @param deviceType one of the device types defined in {@link AudioDevice}.
-     *     Use {@link AudioDevice#DEVICE_TYPE_UNKNOWN} to return to the non-forced mode.
-     * @return true if the processing mode for the device type is supported, and it is successfully
-     *     set, or forcing was successfully disabled with {@link AudioDevice#DEVICE_TYPE_UNKNOWN},
-     *     false otherwise.
+     * @param virtualizationMode one of {@link #VIRTUALIZATION_MODE_BINAURAL},
+     *     {@link #VIRTUALIZATION_MODE_TRANSAURAL} to force a particular processing mode, or
+     *     {@value #VIRTUALIZATION_MODE_AUTO} to stop forcing a mode.
+     * @return true if the processing mode is supported, and it is successfully set, or
+     *     forcing was successfully disabled, false otherwise.
      * @throws IllegalStateException
      * @throws IllegalArgumentException
      * @throws UnsupportedOperationException
      */
-    public boolean forceVirtualizationMode(int deviceType)
+    public boolean forceVirtualizationMode(@ForceVirtualizationMode int virtualizationMode)
             throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
         // convert Java device type to internal representation
+        int deviceType = getDeviceForModeForce(virtualizationMode);
         int internalDevice = AudioDevice.convertDeviceTypeToInternalDevice(deviceType);
 
         int status = setParameter(PARAM_FORCE_VIRTUALIZATION_MODE, internalDevice);
@@ -335,8 +440,8 @@
         if (status >= 0) {
             return true;
         } else if (status == AudioEffect.ERROR_BAD_VALUE) {
-            // a BAD_VALUE return from setParameter indicates the mode can't be forced to that
-            // of this device, don't throw an exception, just return false
+            // a BAD_VALUE return from setParameter indicates the mode can't be forced
+            // don't throw an exception, just return false
             return false;
         } else {
             // something wrong may have happened
@@ -349,31 +454,25 @@
     }
 
     /**
-     * Return the device type which reflects the virtualization mode being used, if any.
-     * @return a device type (as defined in {@link AudioDevice}) which reflects the virtualization
-     *     mode being used.
-     *     If virtualization is not active, the device type will be
-     *     {@link AudioDevice#DEVICE_TYPE_UNKNOWN}. Virtualization may not be active either because
-     *     the effect is not enabled or because the current output device is not compatible with
-     *     this virtualization implementation.
-     *     <p>Note that the return value may differ from a device type successfully set with
-     *     {@link #forceVirtualizationMode(int)} as the implementation
-     *     may use a single mode for multiple devices. An example of this is with
-     *     {@link AudioDevice#DEVICE_TYPE_WIRED_HEADSET} that would typically be handled
-     *     like {@link AudioDevice#DEVICE_TYPE_WIRED_HEADPHONES} from a virtualization
-     *     standpoint.
+     * Return the virtualization mode being used, if any.
+     * @return the virtualization mode being used.
+     *     If virtualization is not active, the virtualization mode will be
+     *     {@link #VIRTUALIZATION_MODE_OFF}. Otherwise the value will be
+     *     {@link #VIRTUALIZATION_MODE_BINAURAL} or {@link #VIRTUALIZATION_MODE_TRANSAURAL}.
+     *     Virtualization may not be active either because the effect is not enabled or
+     *     because the current output device is not compatible with this virtualization
+     *     implementation.
      * @throws IllegalStateException
-     * @throws IllegalArgumentException
      * @throws UnsupportedOperationException
      */
     public int getVirtualizationMode()
-            throws IllegalStateException, IllegalArgumentException, UnsupportedOperationException {
+            throws IllegalStateException, UnsupportedOperationException {
         int[] value = new int[1];
         int status = getParameter(PARAM_VIRTUALIZATION_MODE, value);
         if (status >= 0) {
-            return AudioDevice.convertInternalDeviceToDeviceType(value[0]);
+            return deviceToMode(AudioDevice.convertInternalDeviceToDeviceType(value[0]));
         } else if (status == AudioEffect.ERROR_BAD_VALUE) {
-            return AudioDevice.DEVICE_TYPE_UNKNOWN;
+            return VIRTUALIZATION_MODE_OFF;
         } else {
             // something wrong may have happened
             checkStatus(status);
@@ -381,7 +480,7 @@
         // unexpected virtualizer behavior
         Log.e(TAG, "unexpected status code " + status
                 + " after getParameter(PARAM_VIRTUALIZATION_MODE)");
-        return AudioDevice.DEVICE_TYPE_UNKNOWN;
+        return VIRTUALIZATION_MODE_OFF;
     }
 
     /**
diff --git a/packages/Keyguard/res/values-port/alias.xml b/media/java/android/media/browse/MediaBrowser.aidl
similarity index 61%
rename from packages/Keyguard/res/values-port/alias.xml
rename to media/java/android/media/browse/MediaBrowser.aidl
index c3ecbb9..782e094 100644
--- a/packages/Keyguard/res/values-port/alias.xml
+++ b/media/java/android/media/browse/MediaBrowser.aidl
@@ -1,8 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
-** Copyright 2012, The Android Open Source Project
+/* Copyright 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.
@@ -16,8 +12,7 @@
 ** See the License for the specific language governing permissions and
 ** limitations under the License.
 */
--->
-<resources>
-    <!-- Alias used to reference one of two possible layouts in keyguard.  -->
-    <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area</item>
-</resources>
+
+package android.media.browse;
+
+parcelable MediaBrowser.MediaItem;
\ No newline at end of file
diff --git a/media/java/android/media/browse/MediaBrowser.java b/media/java/android/media/browse/MediaBrowser.java
index debaf45..34713e7 100644
--- a/media/java/android/media/browse/MediaBrowser.java
+++ b/media/java/android/media/browse/MediaBrowser.java
@@ -25,8 +25,8 @@
 import android.content.ServiceConnection;
 import android.content.pm.ParceledListSlice;
 import android.media.MediaDescription;
+import android.media.session.MediaController;
 import android.media.session.MediaSession;
-import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -67,14 +67,14 @@
     private final ConnectionCallback mCallback;
     private final Bundle mRootHints;
     private final Handler mHandler = new Handler();
-    private final ArrayMap<Uri,Subscription> mSubscriptions =
-            new ArrayMap<Uri, MediaBrowser.Subscription>();
+    private final ArrayMap<String,Subscription> mSubscriptions =
+            new ArrayMap<String, MediaBrowser.Subscription>();
 
     private int mState = CONNECT_STATE_DISCONNECTED;
     private MediaServiceConnection mServiceConnection;
     private IMediaBrowserService mServiceBinder;
     private IMediaBrowserServiceCallbacks mServiceCallbacks;
-    private Uri mRootUri;
+    private String mRootId;
     private MediaSession.Token mMediaSessionToken;
     private Bundle mExtras;
 
@@ -85,7 +85,7 @@
      * @param serviceComponent The component name of the media browse service.
      * @param callback The connection callback.
      * @param rootHints An optional bundle of service-specific arguments to send
-     * to the media browse service when connecting and retrieving the root uri
+     * to the media browse service when connecting and retrieving the root id
      * for browsing, or null if none.  The contents of this bundle may affect
      * the information returned when browsing.
      */
@@ -136,7 +136,7 @@
 
         mState = CONNECT_STATE_CONNECTING;
 
-        final Intent intent = new Intent(MediaBrowserService.SERVICE_ACTION);
+        final Intent intent = new Intent(MediaBrowserService.SERVICE_INTERFACE);
         intent.setComponent(mServiceComponent);
 
         final ServiceConnection thisConnection = mServiceConnection = new MediaServiceConnection();
@@ -212,7 +212,7 @@
         mServiceConnection = null;
         mServiceBinder = null;
         mServiceCallbacks = null;
-        mRootUri = null;
+        mRootId = null;
         mMediaSessionToken = null;
     }
 
@@ -235,20 +235,20 @@
     }
 
     /**
-     * Gets the root Uri.
+     * Gets the root id.
      * <p>
-     * Note that the root uri may become invalid or change when when the
+     * Note that the root id may become invalid or change when when the
      * browser is disconnected.
      * </p>
      *
      * @throws IllegalStateException if not connected.
      */
-    public @NonNull Uri getRoot() {
+    public @NonNull String getRoot() {
         if (!isConnected()) {
             throw new IllegalStateException("getSessionToken() called while not connected (state="
                     + getStateLabel(mState) + ")");
         }
-        return mRootUri;
+        return mRootId;
     }
 
     /**
@@ -285,35 +285,35 @@
 
     /**
      * Queries for information about the media items that are contained within
-     * the specified Uri and subscribes to receive updates when they change.
+     * the specified id and subscribes to receive updates when they change.
      * <p>
      * The list of subscriptions is maintained even when not connected and is
      * restored after reconnection.  It is ok to subscribe while not connected
      * but the results will not be returned until the connection completes.
      * </p><p>
-     * If the uri is already subscribed with a different callback then the new
+     * If the id is already subscribed with a different callback then the new
      * callback will replace the previous one.
      * </p>
      *
-     * @param parentUri The uri of the parent media item whose list of children
+     * @param parentId The id of the parent media item whose list of children
      * will be subscribed.
      * @param callback The callback to receive the list of children.
      */
-    public void subscribe(@NonNull Uri parentUri, @NonNull SubscriptionCallback callback) {
+    public void subscribe(@NonNull String parentId, @NonNull SubscriptionCallback callback) {
         // Check arguments.
-        if (parentUri == null) {
-            throw new IllegalArgumentException("parentUri is null");
+        if (parentId == null) {
+            throw new IllegalArgumentException("parentId is null");
         }
         if (callback == null) {
             throw new IllegalArgumentException("callback is null");
         }
 
         // Update or create the subscription.
-        Subscription sub = mSubscriptions.get(parentUri);
+        Subscription sub = mSubscriptions.get(parentId);
         boolean newSubscription = sub == null;
         if (newSubscription) {
-            sub = new Subscription(parentUri);
-            mSubscriptions.put(parentUri, sub);
+            sub = new Subscription(parentId);
+            mSubscriptions.put(parentId, sub);
         }
         sub.callback = callback;
 
@@ -321,42 +321,42 @@
         // connected, the service will be told when we connect.
         if (mState == CONNECT_STATE_CONNECTED && newSubscription) {
             try {
-                mServiceBinder.addSubscription(parentUri, mServiceCallbacks);
+                mServiceBinder.addSubscription(parentId, mServiceCallbacks);
             } catch (RemoteException ex) {
                 // Process is crashing.  We will disconnect, and upon reconnect we will
                 // automatically reregister. So nothing to do here.
-                Log.d(TAG, "addSubscription failed with RemoteException parentUri=" + parentUri);
+                Log.d(TAG, "addSubscription failed with RemoteException parentId=" + parentId);
             }
         }
     }
 
     /**
-     * Unsubscribes for changes to the children of the specified Uri.
+     * Unsubscribes for changes to the children of the specified media id.
      * <p>
      * The query callback will no longer be invoked for results associated with
-     * this Uri once this method returns.
+     * this id once this method returns.
      * </p>
      *
-     * @param parentUri The uri of the parent media item whose list of children
+     * @param parentId The id of the parent media item whose list of children
      * will be unsubscribed.
      */
-    public void unsubscribe(@NonNull Uri parentUri) {
+    public void unsubscribe(@NonNull String parentId) {
         // Check arguments.
-        if (parentUri == null) {
-            throw new IllegalArgumentException("parentUri is null");
+        if (parentId == null) {
+            throw new IllegalArgumentException("parentId is null");
         }
 
         // Remove from our list.
-        final Subscription sub = mSubscriptions.remove(parentUri);
+        final Subscription sub = mSubscriptions.remove(parentId);
 
         // Tell the service if necessary.
         if (mState == CONNECT_STATE_CONNECTED && sub != null) {
             try {
-                mServiceBinder.removeSubscription(parentUri, mServiceCallbacks);
+                mServiceBinder.removeSubscription(parentId, mServiceCallbacks);
             } catch (RemoteException ex) {
                 // Process is crashing.  We will disconnect, and upon reconnect we will
                 // automatically reregister. So nothing to do here.
-                Log.d(TAG, "removeSubscription failed with RemoteException parentUri=" + parentUri);
+                Log.d(TAG, "removeSubscription failed with RemoteException parentId=" + parentId);
             }
         }
     }
@@ -380,7 +380,7 @@
     }
 
     private final void onServiceConnected(final IMediaBrowserServiceCallbacks callback,
-            final Uri root, final MediaSession.Token session, final Bundle extra) {
+            final String root, final MediaSession.Token session, final Bundle extra) {
         mHandler.post(new Runnable() {
             @Override
             public void run() {
@@ -395,7 +395,7 @@
                             + getStateLabel(mState) + "... ignoring");
                     return;
                 }
-                mRootUri = root;
+                mRootId = root;
                 mMediaSessionToken = session;
                 mExtras = extra;
                 mState = CONNECT_STATE_CONNECTED;
@@ -408,13 +408,13 @@
 
                 // we may receive some subscriptions before we are connected, so re-subscribe
                 // everything now
-                for (Uri uri : mSubscriptions.keySet()) {
+                for (String id : mSubscriptions.keySet()) {
                     try {
-                        mServiceBinder.addSubscription(uri, mServiceCallbacks);
+                        mServiceBinder.addSubscription(id, mServiceCallbacks);
                     } catch (RemoteException ex) {
                         // Process is crashing.  We will disconnect, and upon reconnect we will
                         // automatically reregister. So nothing to do here.
-                        Log.d(TAG, "addSubscription failed with RemoteException parentUri=" + uri);
+                        Log.d(TAG, "addSubscription failed with RemoteException parentId=" + id);
                     }
                 }
             }
@@ -448,8 +448,8 @@
         });
     }
 
-    private final void onLoadChildren(final IMediaBrowserServiceCallbacks callback, final Uri uri,
-            final ParceledListSlice list) {
+    private final void onLoadChildren(final IMediaBrowserServiceCallbacks callback,
+            final String parentId, final ParceledListSlice list) {
         mHandler.post(new Runnable() {
             @Override
             public void run() {
@@ -461,24 +461,24 @@
 
                 List<MediaItem> data = list.getList();
                 if (DBG) {
-                    Log.d(TAG, "onLoadChildren for " + mServiceComponent + " uri=" + uri);
+                    Log.d(TAG, "onLoadChildren for " + mServiceComponent + " id=" + parentId);
                 }
                 if (data == null) {
                     data = Collections.emptyList();
                 }
 
                 // Check that the subscription is still subscribed.
-                final Subscription subscription = mSubscriptions.get(uri);
+                final Subscription subscription = mSubscriptions.get(parentId);
                 if (subscription == null) {
                     if (DBG) {
-                        Log.d(TAG, "onLoadChildren for uri that isn't subscribed uri="
-                                + uri);
+                        Log.d(TAG, "onLoadChildren for id that isn't subscribed id="
+                                + parentId);
                     }
                     return;
                 }
 
                 // Tell the app.
-                subscription.callback.onChildrenLoaded(uri, data);
+                subscription.callback.onChildrenLoaded(parentId, data);
             }
         });
     }
@@ -514,7 +514,7 @@
         Log.d(TAG, "  mServiceConnection=" + mServiceConnection);
         Log.d(TAG, "  mServiceBinder=" + mServiceBinder);
         Log.d(TAG, "  mServiceCallbacks=" + mServiceCallbacks);
-        Log.d(TAG, "  mRootUri=" + mRootUri);
+        Log.d(TAG, "  mRootId=" + mRootId);
         Log.d(TAG, "  mMediaSessionToken=" + mMediaSessionToken);
     }
 
@@ -535,7 +535,8 @@
         /**
          * Flag: Indicates that the item is playable.
          * <p>
-         * The Uri of this item may be passed to link android.media.session.MediaController#play(Uri)
+         * The id of this item may be passed to
+         * {@link MediaController.TransportControls#playFromMediaId(String, Bundle)}
          * to start playing it.
          * </p>
          */
@@ -543,12 +544,11 @@
 
         /**
          * Create a new MediaItem for use in browsing media.
-         *
-         * @param flags The flags for this item.
          * @param description The description of the media, which must include a
          *            media id.
+         * @param flags The flags for this item.
          */
-        public MediaItem(@Flags int flags, @NonNull MediaDescription description) {
+        public MediaItem(@NonNull MediaDescription description, @Flags int flags) {
             if (description == null) {
                 throw new IllegalArgumentException("description cannot be null");
             }
@@ -669,18 +669,18 @@
         /**
          * Called when the list of children is loaded or updated.
          */
-        public void onChildrenLoaded(@NonNull Uri parentUri,
+        public void onChildrenLoaded(@NonNull String parentId,
                                      @NonNull List<MediaItem> children) {
         }
 
         /**
-         * Called when the Uri doesn't exist or other errors in subscribing.
+         * Called when the id doesn't exist or other errors in subscribing.
          * <p>
          * If this is called, the subscription remains until {@link MediaBrowser#unsubscribe}
          * called, because some errors may heal themselves.
          * </p>
          */
-        public void onError(@NonNull Uri uri) {
+        public void onError(@NonNull String id) {
         }
     }
 
@@ -783,7 +783,7 @@
          * are the initial data as requested.
          */
         @Override
-        public void onConnect(final Uri root, final MediaSession.Token session,
+        public void onConnect(final String root, final MediaSession.Token session,
                 final Bundle extras) {
             MediaBrowser mediaBrowser = mMediaBrowser.get();
             if (mediaBrowser != null) {
@@ -803,20 +803,20 @@
         }
 
         @Override
-        public void onLoadChildren(final Uri uri, final ParceledListSlice list) {
+        public void onLoadChildren(final String parentId, final ParceledListSlice list) {
             MediaBrowser mediaBrowser = mMediaBrowser.get();
             if (mediaBrowser != null) {
-                mediaBrowser.onLoadChildren(this, uri, list);
+                mediaBrowser.onLoadChildren(this, parentId, list);
             }
         }
     }
 
     private static class Subscription {
-        final Uri uri;
+        final String id;
         SubscriptionCallback callback;
 
-        Subscription(Uri u) {
-            this.uri = u;
+        Subscription(String id) {
+            this.id = id;
         }
     }
 }
diff --git a/media/java/android/media/projection/MediaProjection.java b/media/java/android/media/projection/MediaProjection.java
index 99d3ceb..3a74d93 100644
--- a/media/java/android/media/projection/MediaProjection.java
+++ b/media/java/android/media/projection/MediaProjection.java
@@ -97,12 +97,12 @@
      */
     public VirtualDisplay createVirtualDisplay(@NonNull String name,
             int width, int height, int dpi, boolean isSecure, @Nullable Surface surface,
-            @Nullable VirtualDisplay.Callbacks callbacks, @Nullable Handler handler) {
+            @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
         DisplayManager dm = (DisplayManager) mContext.getSystemService(Context.DISPLAY_SERVICE);
         int flags = isSecure ? DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE : 0;
         return dm.createVirtualDisplay(this, name, width, height, dpi, surface,
                     flags | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR |
-                    DisplayManager.VIRTUAL_DISPLAY_FLAG_PRESENTATION, callbacks, handler);
+                    DisplayManager.VIRTUAL_DISPLAY_FLAG_PRESENTATION, callback, handler);
     }
 
     /**
@@ -120,21 +120,21 @@
      * should be rendered, or null if there is none initially.
      * @param flags A combination of virtual display flags. See {@link DisplayManager} for the full
      * list of flags.
-     * @param callbacks Callbacks to call when the virtual display's state
+     * @param callback Callback to call when the virtual display's state
      * changes, or null if none.
      * @param handler The {@link android.os.Handler} on which the callback should be
      * invoked, or null if the callback should be invoked on the calling
      * thread's main {@link android.os.Looper}.
      *
      * @see android.hardware.display.DisplayManager#createVirtualDisplay(
-     * String, int, int, int, int, Surface, VirtualDisplay.Callbacks, Handler)
+     * String, int, int, int, int, Surface, VirtualDisplay.Callback, Handler)
      */
     public VirtualDisplay createVirtualDisplay(@NonNull String name,
             int width, int height, int dpi, int flags, @Nullable Surface surface,
-            @Nullable VirtualDisplay.Callbacks callbacks, @Nullable Handler handler) {
+            @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
         DisplayManager dm = (DisplayManager) mContext.getSystemService(Context.DISPLAY_SERVICE);
         return dm.createVirtualDisplay(
-                    this, name, width, height, dpi, surface, flags, callbacks, handler);
+                    this, name, width, height, dpi, surface, flags, callback, handler);
     }
 
     /**
diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java
index 9641f83..be86741 100644
--- a/media/java/android/media/session/MediaController.java
+++ b/media/java/android/media/session/MediaController.java
@@ -47,8 +47,9 @@
  * receive updates from the session, such as metadata and play state changes.
  * <p>
  * A MediaController can be created through {@link MediaSessionManager} if you
- * hold the "android.permission.MEDIA_CONTENT_CONTROL" permission or directly if
- * you have a {@link MediaSession.Token} from the session owner.
+ * hold the "android.permission.MEDIA_CONTENT_CONTROL" permission or are an
+ * enabled notification listener or by getting a {@link MediaSession.Token}
+ * directly from the session owner.
  * <p>
  * MediaController objects are thread-safe.
  */
@@ -328,24 +329,24 @@
     }
 
     /**
-     * Adds a callback to receive updates from the Session. Updates will be
+     * Registers a callback to receive updates from the Session. Updates will be
      * posted on the caller's thread.
      *
      * @param callback The callback object, must not be null.
      */
-    public void addCallback(@NonNull Callback callback) {
-        addCallback(callback, null);
+    public void registerCallback(@NonNull Callback callback) {
+        registerCallback(callback, null);
     }
 
     /**
-     * Adds a callback to receive updates from the session. Updates will be
+     * Registers a callback to receive updates from the session. Updates will be
      * posted on the specified handler's thread.
      *
      * @param callback The callback object, must not be null.
      * @param handler The handler to post updates on. If null the callers thread
      *            will be used.
      */
-    public void addCallback(@NonNull Callback callback, @Nullable Handler handler) {
+    public void registerCallback(@NonNull Callback callback, @Nullable Handler handler) {
         if (callback == null) {
             throw new IllegalArgumentException("callback must not be null");
         }
@@ -358,12 +359,12 @@
     }
 
     /**
-     * Stop receiving updates on the specified callback. If an update has
-     * already been posted you may still receive it after calling this method.
+     * Unregisters the specified callback. If an update has already been posted
+     * you may still receive it after calling this method.
      *
      * @param callback The callback to remove.
      */
-    public void removeCallback(@NonNull Callback callback) {
+    public void unregisterCallback(@NonNull Callback callback) {
         if (callback == null) {
             throw new IllegalArgumentException("callback must not be null");
         }
@@ -494,7 +495,7 @@
 
     /**
      * Callback for receiving updates on from the session. A Callback can be
-     * registered using {@link #addCallback}
+     * registered using {@link #registerCallback}
      */
     public static abstract class Callback {
         /**
@@ -612,14 +613,18 @@
 
         /**
          * Request that the player start playback for a specific search query.
+         * An empty or null query should be treated as a request to play any
+         * music.
          *
          * @param query The search query.
-         * @param extras Optional extras that can include extra information about the query.
+         * @param extras Optional extras that can include extra information
+         *            about the query.
          */
         public void playFromSearch(String query, Bundle extras) {
-            if (TextUtils.isEmpty(query)) {
-                throw new IllegalArgumentException(
-                        "You must specify a non-empty search query for playFromSearch.");
+            if (query == null) {
+                // This is to remain compatible with
+                // INTENT_ACTION_MEDIA_PLAY_FROM_SEARCH
+                query = "";
             }
             try {
                 mSessionBinder.playFromSearch(query, extras);
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index ae8ce4b..2c38697 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -191,11 +191,8 @@
                 return;
             }
             if (mCallback != null) {
-                if (mCallback.mCallback == callback) {
-                    Log.w(TAG, "Tried to set same callback, ignoring");
-                    return;
-                }
-                // We're changing callbacks, clear the session from the old one.
+                // We're updating the callback, clear the session from the old
+                // one.
                 mCallback.mCallback.mSession = null;
             }
             if (handler == null) {
@@ -300,7 +297,7 @@
         try {
             mBinder.setPlaybackToRemote(volumeProvider.getVolumeControl(),
                     volumeProvider.getMaxVolume());
-            mBinder.setCurrentVolume(volumeProvider.onGetCurrentVolume());
+            mBinder.setCurrentVolume(volumeProvider.getCurrentVolume());
         } catch (RemoteException e) {
             Log.wtf(TAG, "Failure in setPlaybackToRemote.", e);
         }
@@ -478,7 +475,7 @@
             return;
         }
         try {
-            mBinder.setCurrentVolume(provider.onGetCurrentVolume());
+            mBinder.setCurrentVolume(provider.getCurrentVolume());
         } catch (RemoteException e) {
             Log.e(TAG, "Error in notifyVolumeChanged", e);
         }
@@ -771,7 +768,10 @@
         }
 
         /**
-         * Override to handle requests to begin playback from a search query.
+         * Override to handle requests to begin playback from a search query. An
+         * empty query indicates that the app may play any music. The
+         * implementation should attempt to make a smart choice about what to
+         * play.
          */
         public void onPlayFromSearch(String query, Bundle extras) {
         }
diff --git a/media/java/android/media/session/MediaSessionLegacyHelper.java b/media/java/android/media/session/MediaSessionLegacyHelper.java
index aa196a9..06e40c5 100644
--- a/media/java/android/media/session/MediaSessionLegacyHelper.java
+++ b/media/java/android/media/session/MediaSessionLegacyHelper.java
@@ -467,10 +467,7 @@
                 mSessions.remove(mPi);
             } else if (mCb == null) {
                 mCb = new SessionCallback();
-                Handler handler = null;
-                if (Looper.myLooper() == null) {
-                    handler = new Handler(Looper.getMainLooper());
-                }
+                Handler handler = new Handler(Looper.getMainLooper());
                 mSession.setCallback(mCb, handler);
             }
         }
diff --git a/media/java/android/media/tv/ITvInputManagerCallback.aidl b/media/java/android/media/tv/ITvInputManagerCallback.aidl
index 50a7636..6792680 100644
--- a/media/java/android/media/tv/ITvInputManagerCallback.aidl
+++ b/media/java/android/media/tv/ITvInputManagerCallback.aidl
@@ -24,4 +24,5 @@
     void onInputStateChanged(in String inputId, int state);
     void onInputAdded(in String inputId);
     void onInputRemoved(in String inputId);
+    void onInputUpdated(in String inputId);
 }
diff --git a/media/java/android/media/tv/ITvInputSessionWrapper.java b/media/java/android/media/tv/ITvInputSessionWrapper.java
index 58e46f0..b8cdc4b 100644
--- a/media/java/android/media/tv/ITvInputSessionWrapper.java
+++ b/media/java/android/media/tv/ITvInputSessionWrapper.java
@@ -41,6 +41,8 @@
 public class ITvInputSessionWrapper extends ITvInputSession.Stub implements HandlerCaller.Callback {
     private static final String TAG = "TvInputSessionWrapper";
 
+    private static final int MESSAGE_HANDLING_DURATION_THRESHOLD_MILLIS = 50;
+
     private static final int DO_RELEASE = 1;
     private static final int DO_SET_MAIN = 2;
     private static final int DO_SET_SURFACE = 3;
@@ -77,6 +79,7 @@
             return;
         }
 
+        long startTime = System.currentTimeMillis();
         switch (msg.what) {
             case DO_RELEASE: {
                 mTvInputSessionImpl.release();
@@ -89,71 +92,76 @@
                     mChannel.dispose();
                     mChannel = null;
                 }
-                return;
+                break;
             }
             case DO_SET_MAIN: {
                 mTvInputSessionImpl.setMain((Boolean) msg.obj);
-                return;
+                break;
             }
             case DO_SET_SURFACE: {
                 mTvInputSessionImpl.setSurface((Surface) msg.obj);
-                return;
+                break;
             }
             case DO_DISPATCH_SURFACE_CHANGED: {
                 SomeArgs args = (SomeArgs) msg.obj;
                 mTvInputSessionImpl.dispatchSurfaceChanged(args.argi1, args.argi2, args.argi3);
                 args.recycle();
-                return;
+                break;
             }
             case DO_SET_STREAM_VOLUME: {
                 mTvInputSessionImpl.setStreamVolume((Float) msg.obj);
-                return;
+                break;
             }
             case DO_TUNE: {
                 SomeArgs args = (SomeArgs) msg.obj;
                 mTvInputSessionImpl.tune((Uri) args.arg1, (Bundle) args.arg2);
                 args.recycle();
-                return;
+                break;
             }
             case DO_SET_CAPTION_ENABLED: {
                 mTvInputSessionImpl.setCaptionEnabled((Boolean) msg.obj);
-                return;
+                break;
             }
             case DO_SELECT_TRACK: {
                 SomeArgs args = (SomeArgs) msg.obj;
                 mTvInputSessionImpl.selectTrack((Integer) args.arg1, (String) args.arg2);
                 args.recycle();
-                return;
+                break;
             }
             case DO_APP_PRIVATE_COMMAND: {
                 SomeArgs args = (SomeArgs) msg.obj;
                 mTvInputSessionImpl.appPrivateCommand((String) args.arg1, (Bundle) args.arg2);
                 args.recycle();
-                return;
+                break;
             }
             case DO_CREATE_OVERLAY_VIEW: {
                 SomeArgs args = (SomeArgs) msg.obj;
                 mTvInputSessionImpl.createOverlayView((IBinder) args.arg1, (Rect) args.arg2);
                 args.recycle();
-                return;
+                break;
             }
             case DO_RELAYOUT_OVERLAY_VIEW: {
                 mTvInputSessionImpl.relayoutOverlayView((Rect) msg.obj);
-                return;
+                break;
             }
             case DO_REMOVE_OVERLAY_VIEW: {
                 mTvInputSessionImpl.removeOverlayView(true);
-                return;
+                break;
             }
             case DO_REQUEST_UNBLOCK_CONTENT: {
                 mTvInputSessionImpl.unblockContent((String) msg.obj);
-                return;
+                break;
             }
             default: {
                 Log.w(TAG, "Unhandled message code: " + msg.what);
-                return;
+                break;
             }
         }
+        long duration = System.currentTimeMillis() - startTime;
+        if (duration > MESSAGE_HANDLING_DURATION_THRESHOLD_MILLIS) {
+            Log.w(TAG, "Handling message (" + msg.what + ") took too long time (duration="
+                    + duration + "ms)");
+        }
     }
 
     @Override
diff --git a/media/java/android/media/tv/TvContentRating.java b/media/java/android/media/tv/TvContentRating.java
index 93b40fb..b4ec2b3 100644
--- a/media/java/android/media/tv/TvContentRating.java
+++ b/media/java/android/media/tv/TvContentRating.java
@@ -44,45 +44,47 @@
  * {@literal
  * <rating-system-definitions xmlns:android="http://schemas.android.com/apk/res/android"
  *     android:versionCode="1">
- *     <!-- TV content rating system for US TV -->
  *     <rating-system-definition android:name="US_TV"
- *         android:title="US-TV"
- *         android:description="@string/description_ustv"
- *         android:country="US">
+ *         android:country="US"
+ *         android:description="@string/description_us_tv">
  *         <sub-rating-definition android:name="US_TV_D"
  *             android:title="D"
- *             android:description="@string/description_ustv_d" />
+ *             android:description="@string/description_us_tv_d" />
  *         <sub-rating-definition android:name="US_TV_L"
  *             android:title="L"
- *             android:description="@string/description_ustv_l" />
+ *             android:description="@string/description_us_tv_l" />
  *         <sub-rating-definition android:name="US_TV_S"
  *             android:title="S"
- *             android:description="@string/description_ustv_s" />
+ *             android:description="@string/description_us_tv_s" />
  *         <sub-rating-definition android:name="US_TV_V"
  *             android:title="V"
- *             android:description="@string/description_ustv_v" />
+ *             android:description="@string/description_us_tv_v" />
  *         <sub-rating-definition android:name="US_TV_FV"
  *             android:title="FV"
- *             android:description="@string/description_ustv_fv" />
+ *             android:description="@string/description_us_tv_fv" />
  *
  *         <rating-definition android:name="US_TV_Y"
  *             android:title="TV-Y"
- *             android:description="@string/description_ustv_y"
- *             android:ageHint="0" />
+ *             android:description="@string/description_us_tv_y"
+ *             android:icon="@drawable/icon_us_tv_y"
+ *             android:contentAgeHint="0" />
  *         <rating-definition android:name="US_TV_Y7"
  *             android:title="TV-Y7"
- *             android:description="@string/description_ustv_y7"
- *             android:ageHint="7">
+ *             android:description="@string/description_us_tv_y7"
+ *             android:icon="@drawable/icon_us_tv_y7"
+ *             android:contentAgeHint="7">
  *             <sub-rating android:name="US_TV_FV" />
  *         </rating-definition>
  *         <rating-definition android:name="US_TV_G"
  *             android:title="TV-G"
- *             android:description="@string/description_ustv_g"
- *             android:ageHint="0" />
+ *             android:description="@string/description_us_tv_g"
+ *             android:icon="@drawable/icon_us_tv_g"
+ *             android:contentAgeHint="0" />
  *         <rating-definition android:name="US_TV_PG"
  *             android:title="TV-PG"
- *             android:description="@string/description_ustv_pg"
- *             android:ageHint="14">
+ *             android:description="@string/description_us_tv_pg"
+ *             android:icon="@drawable/icon_us_tv_pg"
+ *             android:contentAgeHint="14">
  *             <sub-rating android:name="US_TV_D" />
  *             <sub-rating android:name="US_TV_L" />
  *             <sub-rating android:name="US_TV_S" />
@@ -90,8 +92,9 @@
  *         </rating-definition>
  *         <rating-definition android:name="US_TV_14"
  *             android:title="TV-14"
- *             android:description="@string/description_ustv_14"
- *             android:ageHint="14">
+ *             android:description="@string/description_us_tv_14"
+ *             android:icon="@drawable/icon_us_tv_14"
+ *             android:contentAgeHint="14">
  *             <sub-rating android:name="US_TV_D" />
  *             <sub-rating android:name="US_TV_L" />
  *             <sub-rating android:name="US_TV_S" />
@@ -99,8 +102,9 @@
  *         </rating-definition>
  *         <rating-definition android:name="US_TV_MA"
  *             android:title="TV-MA"
- *             android:description="@string/description_ustv_ma"
- *             android:ageHint="17">
+ *             android:description="@string/description_us_tv_ma"
+ *             android:icon="@drawable/icon_us_tv_ma"
+ *             android:contentAgeHint="17">
  *             <sub-rating android:name="US_TV_L" />
  *             <sub-rating android:name="US_TV_S" />
  *             <sub-rating android:name="US_TV_V" />
@@ -175,8 +179,12 @@
  *         <td>TV content rating system for Brazil</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV</td>
- *         <td>TV content rating system for Canada</td>
+ *         <td>CA_TV_CA</td>
+ *         <td>TV content rating system for Canada (Canadian)</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC</td>
+ *         <td>TV content rating system for Canada (Quebec)</td>
  *     </tr>
  *     <tr>
  *         <td>CH_TV</td>
@@ -239,6 +247,10 @@
  *         <td>TV content rating system for Iceland</td>
  *     </tr>
  *     <tr>
+ *         <td>JP_TV</td>
+ *         <td>TV content rating system for Japan</td>
+ *     </tr>
+ *     <tr>
  *         <td>KR_TV</td>
  *         <td>TV content rating system for South Korea</td>
  *     </tr>
@@ -300,11 +312,7 @@
  *         <td>TV content rating system for Serbia</td>
  *     </tr>
  *     <tr>
- *         <td>SG_FTV</td>
- *         <td>TV content rating system for Singapore</td>
- *     </tr>
- *     <tr>
- *         <td>SG_PTV</td>
+ *         <td>SG_TV</td>
  *         <td>TV content rating system for Singapore</td>
  *     </tr>
  *     <tr>
@@ -507,42 +515,67 @@
  *         <td>Content suitable for viewers over the age of 18</td>
  *     </tr>
  *     <tr>
- *         <td valign="top" rowspan="7">CA_TV</td>
- *         <td>CA_TV_EXEMPT</td>
- *         <td>Shows which are exempt from ratings (such as news and sports programming) will not
- *         display an on-screen rating at all</td>
+ *         <td valign="top" rowspan="7">CA_TV_CA</td>
+ *         <td>CA_TV_CA_EXEMPT</td>
+ *         <td>Exempt from ratings and won't display an on-screen rating</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_C</td>
- *         <td>Programming suitable for children ages of 2-7 years. No profanity or sexual content
- *         of any level allowed. Contains little violence</td>
+ *         <td>CA_TV_CA_C</td>
+ *         <td>Suitable for children ages 2-7. May contain mild violence</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_C8</td>
- *         <td>Suitable for children ages 8+. Low level violence and fantasy horror is allowed. No
- *         foul language is allowed, but occasional "socially offensive and discriminatory" language
- *         is allowed if in the context of the story. No sexual content of any level allowed</td>
+ *         <td>CA_TV_CA_C8</td>
+ *         <td>Suitable for children ages 8 and older. May contain mild violence, fantasy horror,
+ *         and socially offensive language</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_G</td>
- *         <td>Suitable for general audiences. Programming suitable for the entire family with mild
- *         violence, and mild profanity and/or censored language</td>
+ *         <td>CA_TV_CA_G</td>
+ *         <td>Suitable for the entire family and may contain mild violence, profanity, and censored
+ *         language</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_PG</td>
- *         <td>Parental guidance. Moderate violence and moderate profanity is allowed, as is brief
- *         nudity and sexual references if important to the context of the story</td>
+ *         <td>CA_TV_CA_PG</td>
+ *         <td>May contain moderate violence, profanity, nudity, and sexual references</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_14</td>
- *         <td>Programming intended for viewers ages 14 and older. May contain strong violence and
- *         strong profanity, and depictions of sexual activity as long as they are within the
- *         context of a story</td>
+ *         <td>CA_TV_CA_14</td>
+ *         <td>Intended for viewers ages 14 and older. May contain strong violence and profanity,
+ *         and depictions of sexual activity</td>
  *     </tr>
  *     <tr>
- *         <td>CA_TV_18</td>
- *         <td>Programming intended for viewers ages 18 and older. May contain explicit violence and
- *         sexual activity</td>
+ *         <td>CA_TV_CA_18</td>
+ *         <td>Intended for viewers ages 18 and older. May contain explicit violence and sexual
+ *         activity</td>
+ *     </tr>
+ *     <tr>
+ *         <td valign="top" rowspan="6">CA_TV_QC</td>
+ *         <td>CA_TV_QC_E</td>
+ *         <td>Exempt from ratings and won't display an on-screen rating</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC_G</td>
+ *         <td>Appropriate for all ages and must contain little or no violence and little to no
+ *         sexual content</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC_8</td>
+ *         <td>Appropriate for children 8 and may contain with little violence, language, and little
+ *         to no sexual situations</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC_13</td>
+ *         <td>Suitable for children 13 and may contain with moderate violence, language, and some
+ *         sexual situations</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC_16</td>
+ *         <td>Recommended for children over the age of 16 and may contain with strong violence,
+ *         strong language, and strong sexual content</td>
+ *     </tr>
+ *     <tr>
+ *         <td>CA_TV_QC_18</td>
+ *         <td>Only to be viewed by adults and may contain extreme violence and graphic sexual
+ *         content. It is mostly used for 18+ movies and pornography</td>
  *     </tr>
  *     <tr>
  *         <td valign="top" rowspan="2">CH_TV</td>
@@ -883,6 +916,23 @@
  *         <td>Programs suitable for ages 18 and older</td>
  *     </tr>
  *     <tr>
+ *         <td valign="top" rowspan="4">JP_TV</td>
+ *         <td>JP_TV_G</td>
+ *         <td>General, suitable for all ages</td>
+ *     </tr>
+ *     <tr>
+ *         <td>JP_TV_PG12</td>
+ *         <td>Parental guidance requested for young people under 12 years</td>
+ *     </tr>
+ *     <tr>
+ *         <td>JP_TV_R15</td>
+ *         <td>For persons aged 15 and above only</td>
+ *     </tr>
+ *     <tr>
+ *         <td>JP_TV_R18</td>
+ *         <td>For persons aged 18 and above only</td>
+ *     </tr>
+ *     <tr>
  *         <td valign="top" rowspan="5">KR_TV</td>
  *         <td>KR_TV_ALL</td>
  *         <td>Appropriate for all ages</td>
@@ -1215,22 +1265,30 @@
  *         <td>Program not suitable for minors under the age of 18</td>
  *     </tr>
  *     <tr>
- *         <td valign="top" rowspan="2">SG_FTV</td>
- *         <td>SG_FTV_PG</td>
- *         <td>Suitable for most but parents should guide their young</td>
+ *         <td valign="top" rowspan="6">SG_TV</td>
+ *         <td>SG_TV_G</td>
+ *         <td>Suitable for all ages</td>
  *     </tr>
  *     <tr>
- *         <td>SG_FTV_PG13</td>
- *         <td>Parental Guidance Strongly Cautioned - Suitable for 13 And Above</td>
+ *         <td>SG_TV_PG</td>
+ *         <td>Suitable for all but parents should guide their young</td>
  *     </tr>
  *     <tr>
- *         <td valign="top" rowspan="2">SG_PTV</td>
- *         <td>SG_PTV_NC16</td>
- *         <td>No Children Under 16</td>
+ *         <td>SG_TV_PG13</td>
+ *         <td>Suitable for persons aged 13 and above but parental guidance is advised for children
+ *         below 13</td>
  *     </tr>
  *     <tr>
- *         <td>SG_PTV_M18</td>
- *         <td>Nobody under age 18 is admitted</td>
+ *         <td>SG_TV_NC16</td>
+ *         <td>Suitable for persons aged 16 and above</td>
+ *     </tr>
+ *     <tr>
+ *         <td>SG_TV_M18</td>
+ *         <td>Suitable for persons aged 18 and above</td>
+ *     </tr>
+ *     <tr>
+ *         <td>SG_TV_R21</td>
+ *         <td>Suitable for adults aged 21 and above</td>
  *     </tr>
  *     <tr>
  *         <td valign="top" rowspan="4">SI_TV</td>
diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java
index 7f1c304..b3890d4 100644
--- a/media/java/android/media/tv/TvContract.java
+++ b/media/java/android/media/tv/TvContract.java
@@ -945,8 +945,8 @@
         /**
          * The comma-separated audio languages of this TV program.
          * <p>
-         * This is used to describe available audio languages included in the program. Use
-         * 3-character language code as specified by ISO 639-2.
+         * This is used to describe available audio languages included in the program. Use either
+         * ISO 639-1 or 639-2/T codes.
          * </p><p>
          * Type: TEXT
          * </p>
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index 00183bb..704e4a1 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -102,7 +102,7 @@
     /**
      * The ID of the TV input to provide to the setup activity and settings activity.
      */
-    public static final String EXTRA_INPUT_ID = "inputId";
+    public static final String EXTRA_INPUT_ID = "android.media.tv.extra.INPUT_ID";
 
     private static SparseIntArray sHardwareTypeToTvInputType = new SparseIntArray();
 
@@ -319,9 +319,9 @@
     }
 
     /**
-     * Returns an intent to start the setup activity for this TV input service.
+     * Returns an intent to start the setup activity for this TV input.
      */
-    public Intent getIntentForSetupActivity() {
+    public Intent createSetupIntent() {
         if (!TextUtils.isEmpty(mSetupActivity)) {
             Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.setClassName(mService.serviceInfo.packageName, mSetupActivity);
@@ -332,9 +332,9 @@
     }
 
     /**
-     * Returns an intent to start the settings activity for this TV input service.
+     * Returns an intent to start the settings activity for this TV input.
      */
-    public Intent getIntentForSettingsActivity() {
+    public Intent createSettingsIntent() {
         if (!TextUtils.isEmpty(mSettingsActivity)) {
             Intent intent = new Intent(Intent.ACTION_MAIN);
             intent.setClassName(mService.serviceInfo.packageName, mSettingsActivity);
@@ -416,23 +416,22 @@
      * Loads the user-displayed icon for this TV input.
      *
      * @param context Supplies a {@link Context} used to load the icon.
-     * @return a Drawable containing the TV input's icon. If the TV input does not have
-     *         an icon, application icon is returned. If it's unavailable too, system default is
-     *         returned.
+     * @return a Drawable containing the TV input's icon. If the TV input does not have an icon,
+     *         application's icon is returned. If it's unavailable too, {@code null} is returned.
      */
     public Drawable loadIcon(Context context) {
         if (mIconUri == null) {
-            return loadDefaultIcon(context);
+            return loadServiceIcon(context);
         }
         try (InputStream is = context.getContentResolver().openInputStream(mIconUri)) {
             Drawable drawable = Drawable.createFromStream(is, null);
             if (drawable == null) {
-                return loadDefaultIcon(context);
+                return loadServiceIcon(context);
             }
             return drawable;
         } catch (IOException e) {
             Log.w(TAG, "Loading the default icon due to a failure on loading " + mIconUri, e);
-            return loadDefaultIcon(context);
+            return loadServiceIcon(context);
         }
     }
 
@@ -486,7 +485,11 @@
         dest.writeByte(mIsConnectedToHdmiSwitch ? (byte) 1 : 0);
     }
 
-    private Drawable loadDefaultIcon(Context context) {
+    private Drawable loadServiceIcon(Context context) {
+        if (mService.serviceInfo.icon == 0
+                && mService.serviceInfo.applicationInfo.icon == 0) {
+            return null;
+        }
         return mService.serviceInfo.loadIcon(context.getPackageManager());
     }
 
@@ -529,10 +532,6 @@
                 DELIMITER_INFO_IN_ID, PREFIX_HARDWARE_DEVICE, hardwareInfo.getDeviceId());
     }
 
-    /**
-     * Used to make this class parcelable.
-     * @hide
-     */
     public static final Parcelable.Creator<TvInputInfo> CREATOR =
             new Parcelable.Creator<TvInputInfo>() {
         @Override
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 6d1f0e4..f809f54 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -33,6 +33,7 @@
 import android.view.InputChannel;
 import android.view.InputEvent;
 import android.view.InputEventSender;
+import android.view.KeyEvent;
 import android.view.Surface;
 import android.view.View;
 
@@ -74,7 +75,7 @@
      * The TV input is connected.
      * <p>
      * State for {@link #getInputState} and {@link
-     * TvInputManager.TvInputListener#onInputStateChanged}.
+     * TvInputManager.TvInputCallback#onInputStateChanged}.
      * </p>
      */
     public static final int INPUT_STATE_CONNECTED = 0;
@@ -83,7 +84,7 @@
      * fully ready.
      * <p>
      * State for {@link #getInputState} and {@link
-     * TvInputManager.TvInputListener#onInputStateChanged}.
+     * TvInputManager.TvInputCallback#onInputStateChanged}.
      * </p>
      */
     public static final int INPUT_STATE_CONNECTED_STANDBY = 1;
@@ -91,7 +92,7 @@
      * The TV input is disconnected.
      * <p>
      * State for {@link #getInputState} and {@link
-     * TvInputManager.TvInputListener#onInputStateChanged}.
+     * TvInputManager.TvInputCallback#onInputStateChanged}.
      * </p>
      */
     public static final int INPUT_STATE_DISCONNECTED = 2;
@@ -101,14 +102,14 @@
      * {@link #isRatingBlocked}.
      */
     public static final String ACTION_BLOCKED_RATINGS_CHANGED =
-            "android.media.tv.TvInputManager.ACTION_BLOCKED_RATINGS_CHANGED";
+            "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
 
     /**
      * Broadcast intent action when the parental controls enabled state changes. For use with the
      * {@link #isParentalControlsEnabled}.
      */
     public static final String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED =
-            "android.media.tv.TvInputManager.ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED";
+            "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
 
     /**
      * Broadcast intent action used to query available content rating systems.
@@ -142,7 +143,7 @@
      * @see TvContentRating
      */
     public static final String ACTION_QUERY_CONTENT_RATING_SYSTEMS =
-            "android.media.tv.TvInputManager.ACTION_QUERY_CONTENT_RATING_SYSTEMS";
+            "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
 
     /**
      * Content rating systems metadata associated with {@link #ACTION_QUERY_CONTENT_RATING_SYSTEMS}.
@@ -152,15 +153,15 @@
      * </p>
      */
     public static final String META_DATA_CONTENT_RATING_SYSTEMS =
-            "android.media.tv.TvInputManager.META_DATA_CONTENT_RATING_SYSTEMS";
+            "android.media.tv.metadata.CONTENT_RATING_SYSTEMS";
 
     private final ITvInputManager mService;
 
     private final Object mLock = new Object();
 
     // @GuardedBy(mLock)
-    private final List<TvInputListenerRecord> mTvInputListenerRecordsList =
-            new LinkedList<TvInputListenerRecord>();
+    private final List<TvInputCallbackRecord> mCallbackRecords =
+            new LinkedList<TvInputCallbackRecord>();
 
     // A mapping from TV input ID to the state of corresponding input.
     // @GuardedBy(mLock)
@@ -176,7 +177,7 @@
 
     private final ITvInputClient mClient;
 
-    private final ITvInputManagerCallback mCallback;
+    private final ITvInputManagerCallback mManagerCallback;
 
     private final int mUserId;
 
@@ -444,9 +445,9 @@
     }
 
     /**
-     * Interface used to monitor status of the TV input.
+     * Callback used to monitor status of the TV input.
      */
-    public abstract static class TvInputListener {
+    public abstract static class TvInputCallback {
         /**
          * This is called when the state of a given TV input is changed.
          *
@@ -476,26 +477,38 @@
          */
         public void onInputRemoved(String inputId) {
         }
+
+        /**
+         * This is called when a TV input is updated. The update of TV input happens when it is
+         * reinstalled or the media on which the newer version of TV input exists is
+         * available/unavailable.
+         *
+         * @param inputId The id of the TV input.
+         * @hide
+         */
+        @SystemApi
+        public void onInputUpdated(String inputId) {
+        }
     }
 
-    private static final class TvInputListenerRecord {
-        private final TvInputListener mListener;
+    private static final class TvInputCallbackRecord {
+        private final TvInputCallback mCallback;
         private final Handler mHandler;
 
-        public TvInputListenerRecord(TvInputListener listener, Handler handler) {
-            mListener = listener;
+        public TvInputCallbackRecord(TvInputCallback callback, Handler handler) {
+            mCallback = callback;
             mHandler = handler;
         }
 
-        public TvInputListener getListener() {
-            return mListener;
+        public TvInputCallback getCallback() {
+            return mCallback;
         }
 
         public void postInputStateChanged(final String inputId, final int state) {
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
-                    mListener.onInputStateChanged(inputId, state);
+                    mCallback.onInputStateChanged(inputId, state);
                 }
             });
         }
@@ -504,7 +517,7 @@
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
-                    mListener.onInputAdded(inputId);
+                    mCallback.onInputAdded(inputId);
                 }
             });
         }
@@ -513,10 +526,29 @@
             mHandler.post(new Runnable() {
                 @Override
                 public void run() {
-                    mListener.onInputRemoved(inputId);
+                    mCallback.onInputRemoved(inputId);
                 }
             });
         }
+
+        public void postInputUpdated(final String inputId) {
+            mHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                    mListener.onInputUpdated(inputId);
+                }
+            });
+        }
+    }
+
+    /**
+     * Interface used to receive events from Hardware objects.
+     * @hide
+     */
+    @SystemApi
+    public abstract static class HardwareCallback {
+        public abstract void onReleased();
+        public abstract void onStreamConfigChanged(TvStreamConfig[] configs);
     }
 
     /**
@@ -666,12 +698,12 @@
                 }
             }
         };
-        mCallback = new ITvInputManagerCallback.Stub() {
+        mManagerCallback = new ITvInputManagerCallback.Stub() {
             @Override
             public void onInputStateChanged(String inputId, int state) {
                 synchronized (mLock) {
                     mStateMap.put(inputId, state);
-                    for (TvInputListenerRecord record : mTvInputListenerRecordsList) {
+                    for (TvInputCallbackRecord record : mCallbackRecords) {
                         record.postInputStateChanged(inputId, state);
                     }
                 }
@@ -681,7 +713,7 @@
             public void onInputAdded(String inputId) {
                 synchronized (mLock) {
                     mStateMap.put(inputId, INPUT_STATE_CONNECTED);
-                    for (TvInputListenerRecord record : mTvInputListenerRecordsList) {
+                    for (TvInputCallbackRecord record : mCallbackRecords) {
                         record.postInputAdded(inputId);
                     }
                 }
@@ -691,14 +723,25 @@
             public void onInputRemoved(String inputId) {
                 synchronized (mLock) {
                     mStateMap.remove(inputId);
-                    for (TvInputListenerRecord record : mTvInputListenerRecordsList) {
+                    for (TvInputCallbackRecord record : mCallbackRecords) {
                         record.postInputRemoved(inputId);
                     }
                 }
             }
+
+            @Override
+            public void onInputUpdated(String inputId) {
+                synchronized (mLock) {
+                    for (TvInputListenerRecord record : mTvInputListenerRecordsList) {
+                        record.postInputUpdated(inputId);
+                    }
+                }
+            }
         };
         try {
-            mService.registerCallback(mCallback, mUserId);
+            if (mService != null) {
+                mService.registerCallback(mManagerCallback, mUserId);
+            }
         } catch (RemoteException e) {
             Log.e(TAG, "mService.registerCallback failed: " + e);
         }
@@ -760,39 +803,39 @@
     }
 
     /**
-     * Registers a {@link TvInputListener}.
+     * Registers a {@link TvInputCallback}.
      *
-     * @param listener A listener used to monitor status of the TV inputs.
+     * @param callback A callback used to monitor status of the TV inputs.
      * @param handler A {@link Handler} that the status change will be delivered to.
      * @throws IllegalArgumentException if any of the arguments is {@code null}.
      */
-    public void registerListener(TvInputListener listener, Handler handler) {
-        if (listener == null) {
+    public void registerCallback(TvInputCallback callback, Handler handler) {
+        if (callback == null) {
             throw new IllegalArgumentException("callback cannot be null");
         }
         if (handler == null) {
             throw new IllegalArgumentException("handler cannot be null");
         }
         synchronized (mLock) {
-            mTvInputListenerRecordsList.add(new TvInputListenerRecord(listener, handler));
+            mCallbackRecords.add(new TvInputCallbackRecord(callback, handler));
         }
     }
 
     /**
-     * Unregisters the existing {@link TvInputListener}.
+     * Unregisters the existing {@link TvInputCallback}.
      *
-     * @param listener The existing listener to remove.
+     * @param callback The existing callback to remove.
      * @throws IllegalArgumentException if any of the arguments is {@code null}.
      */
-    public void unregisterListener(final TvInputListener listener) {
-        if (listener == null) {
+    public void unregisterCallback(final TvInputCallback callback) {
+        if (callback == null) {
             throw new IllegalArgumentException("callback cannot be null");
         }
         synchronized (mLock) {
-            for (Iterator<TvInputListenerRecord> it = mTvInputListenerRecordsList.iterator();
+            for (Iterator<TvInputCallbackRecord> it = mCallbackRecords.iterator();
                     it.hasNext(); ) {
-                TvInputListenerRecord record = it.next();
-                if (record.getListener() == listener) {
+                TvInputCallbackRecord record = it.next();
+                if (record.getCallback() == callback) {
                     it.remove();
                     break;
                 }
@@ -1006,6 +1049,64 @@
     }
 
     /**
+     * Returns a list of TvInputHardwareInfo objects representing available hardware.
+     *
+     * @hide
+     */
+    @SystemApi
+    public List<TvInputHardwareInfo> getHardwareList() {
+        try {
+            return mService.getHardwareList();
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Returns acquired TvInputManager.Hardware object for given deviceId.
+     *
+     * If there are other Hardware object acquired for the same deviceId, calling this method will
+     * preempt the previously acquired object and report {@link HardwareCallback#onReleased} to the
+     * old object.
+     *
+     * @hide
+     */
+    @SystemApi
+    public Hardware acquireTvInputHardware(int deviceId, final HardwareCallback callback,
+            TvInputInfo info) {
+        try {
+            return new Hardware(
+                    mService.acquireTvInputHardware(deviceId, new ITvInputHardwareCallback.Stub() {
+                @Override
+                public void onReleased() {
+                    callback.onReleased();
+                }
+
+                @Override
+                public void onStreamConfigChanged(TvStreamConfig[] configs) {
+                    callback.onStreamConfigChanged(configs);
+                }
+            }, info, mUserId));
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Releases previously acquired hardware object.
+     *
+     * @hide
+     */
+    @SystemApi
+    public void releaseTvInputHardware(int deviceId, Hardware hardware) {
+        try {
+            mService.releaseTvInputHardware(deviceId, hardware.getInterface(), mUserId);
+        } catch (RemoteException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
      * The Session provides the per-session functionality of TV inputs.
      * @hide
      */
@@ -1652,4 +1753,60 @@
             }
         }
     }
+
+    /**
+     * The Hardware provides the per-hardware functionality of TV hardware.
+     *
+     * TV hardware is physical hardware attached to the Android device; for example, HDMI ports,
+     * Component/Composite ports, etc. Specifically, logical devices such as HDMI CEC logical
+     * devices don't fall into this category.
+     *
+     * @hide
+     */
+    @SystemApi
+    public final static class Hardware {
+        private final ITvInputHardware mInterface;
+
+        private Hardware(ITvInputHardware hardwareInterface) {
+            mInterface = hardwareInterface;
+        }
+
+        private ITvInputHardware getInterface() {
+            return mInterface;
+        }
+
+        public boolean setSurface(Surface surface, TvStreamConfig config) {
+            try {
+                return mInterface.setSurface(surface, config);
+            } catch (RemoteException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        public void setStreamVolume(float volume) {
+            try {
+                mInterface.setStreamVolume(volume);
+            } catch (RemoteException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        public boolean dispatchKeyEventToHdmi(KeyEvent event) {
+            try {
+                return mInterface.dispatchKeyEventToHdmi(event);
+            } catch (RemoteException e) {
+                throw new RuntimeException(e);
+            }
+        }
+
+        public void overrideAudioSink(int audioType, String audioAddress, int samplingRate,
+                int channelMask, int format) {
+            try {
+                mInterface.overrideAudioSink(audioType, audioAddress, samplingRate, channelMask,
+                        format);
+            } catch (RemoteException e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
 }
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index 72a6f88..317d472 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -389,8 +389,11 @@
         }
 
         /**
-         * Informs the application that video is available and the playback of the TV stream has
-         * been started.
+         * Informs the application that the video is now available for watching. This is primarily
+         * used to signal the application to unblock the screen. The TV input service must call this
+         * method as soon as the content rendered onto its surface gets ready for viewing.
+         *
+         * @see #notifyVideoUnavailable
          */
         public void notifyVideoAvailable() {
             runOnMainThread(new Runnable() {
@@ -407,16 +410,18 @@
         }
 
         /**
-         * Informs the application that video is not available, so the TV input cannot continue
-         * playing the TV stream.
+         * Informs the application that the video became unavailable for some reason. This is
+         * primarily used to signal the application to block the screen not to show any intermittent
+         * video artifacts.
          *
-         * @param reason The reason that the TV input stopped the playback:
-         * <ul>
-         * <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_UNKNOWN}
-         * <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_TUNING}
-         * <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL}
-         * <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING}
-         * </ul>
+         * @param reason The reason why the video became unavailable:
+         *            <ul>
+         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_UNKNOWN}
+         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_TUNING}
+         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL}
+         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING}
+         *            </ul>
+         * @see #notifyVideoAvailable
          */
         public void notifyVideoUnavailable(final int reason) {
             if (reason < TvInputManager.VIDEO_UNAVAILABLE_REASON_START
diff --git a/media/java/android/media/tv/TvView.java b/media/java/android/media/tv/TvView.java
index 017645a..213e34c 100644
--- a/media/java/android/media/tv/TvView.java
+++ b/media/java/android/media/tv/TvView.java
@@ -83,7 +83,7 @@
     private Rect mOverlayViewFrame;
     private final TvInputManager mTvInputManager;
     private MySessionCallback mSessionCallback;
-    private TvInputListener mListener;
+    private TvInputCallback mCallback;
     private OnUnhandledInputEventListener mOnUnhandledInputEventListener;
     private boolean mHasStreamVolume;
     private float mStreamVolume;
@@ -170,13 +170,13 @@
     }
 
     /**
-     * Sets a listener for events in this TvView.
+     * Sets the callback to be invoked when an event is dispatched to this TvView.
      *
-     * @param listener The listener to be called with events. A value of {@code null} removes any
-     *         existing listener.
+     * @param callback The callback to receive events. A value of {@code null} removes any existing
+     *            callbacks.
      */
-    public void setTvInputListener(TvInputListener listener) {
-        mListener = listener;
+    public void setCallback(TvInputCallback callback) {
+        mCallback = callback;
     }
 
     /**
@@ -312,7 +312,9 @@
             // is newly assigned for every createSession request and compared with
             // MySessionCreateCallback.this.
             mSessionCallback = new MySessionCallback(inputId, channelUri, params);
-            mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
+            if (mTvInputManager != null) {
+                mTvInputManager.createSession(inputId, mSessionCallback, mHandler);
+            }
         }
     }
 
@@ -680,9 +682,9 @@
     }
 
     /**
-     * Interface used to receive various status updates on the {@link TvView}.
+     * Callback used to receive various status updates on the {@link TvView}.
      */
-    public abstract static class TvInputListener {
+    public abstract static class TvInputCallback {
 
         /**
          * This is invoked when an error occurred while establishing a connection to the underlying
@@ -863,8 +865,8 @@
                 }
             } else {
                 mSessionCallback = null;
-                if (mListener != null) {
-                    mListener.onConnectionFailed(mInputId);
+                if (mCallback != null) {
+                    mCallback.onConnectionFailed(mInputId);
                 }
             }
         }
@@ -878,8 +880,8 @@
             mOverlayViewFrame = null;
             mSessionCallback = null;
             mSession = null;
-            if (mListener != null) {
-                mListener.onDisconnected(mInputId);
+            if (mCallback != null) {
+                mCallback.onDisconnected(mInputId);
             }
         }
 
@@ -891,8 +893,8 @@
             if (DEBUG) {
                 Log.d(TAG, "onChannelChangedByTvInput(" + channelUri + ")");
             }
-            if (mListener != null) {
-                mListener.onChannelRetuned(mInputId, channelUri);
+            if (mCallback != null) {
+                mCallback.onChannelRetuned(mInputId, channelUri);
             }
         }
 
@@ -904,8 +906,8 @@
             if (DEBUG) {
                 Log.d(TAG, "onTracksChanged()");
             }
-            if (mListener != null) {
-                mListener.onTracksChanged(mInputId, tracks);
+            if (mCallback != null) {
+                mCallback.onTracksChanged(mInputId, tracks);
             }
         }
 
@@ -918,8 +920,8 @@
                 Log.d(TAG, "onTrackSelected()");
             }
             // TODO: Update the video size when the type is TYPE_VIDEO.
-            if (mListener != null) {
-                mListener.onTrackSelected(mInputId, type, trackId);
+            if (mCallback != null) {
+                mCallback.onTrackSelected(mInputId, type, trackId);
             }
         }
 
@@ -931,8 +933,8 @@
             if (DEBUG) {
                 Log.d(TAG, "onVideoAvailable()");
             }
-            if (mListener != null) {
-                mListener.onVideoAvailable(mInputId);
+            if (mCallback != null) {
+                mCallback.onVideoAvailable(mInputId);
             }
         }
 
@@ -944,8 +946,8 @@
             if (DEBUG) {
                 Log.d(TAG, "onVideoUnavailable(" + reason + ")");
             }
-            if (mListener != null) {
-                mListener.onVideoUnavailable(mInputId, reason);
+            if (mCallback != null) {
+                mCallback.onVideoUnavailable(mInputId, reason);
             }
         }
 
@@ -957,23 +959,29 @@
             if (DEBUG) {
                 Log.d(TAG, "onContentAllowed()");
             }
-            if (mListener != null) {
-                mListener.onContentAllowed(mInputId);
+            if (mCallback != null) {
+                mCallback.onContentAllowed(mInputId);
             }
         }
 
         @Override
         public void onContentBlocked(Session session, TvContentRating rating) {
+            if (this != mSessionCallback) {
+                return;
+            }
             if (DEBUG) {
                 Log.d(TAG, "onContentBlocked()");
             }
-            if (mListener != null) {
-                mListener.onContentBlocked(mInputId, rating);
+            if (mCallback != null) {
+                mCallback.onContentBlocked(mInputId, rating);
             }
         }
 
         @Override
         public void onLayoutSurface(Session session, int left, int top, int right, int bottom) {
+            if (this != mSessionCallback) {
+                return;
+            }
             if (DEBUG) {
                 Log.d(TAG, "onLayoutSurface (left=" + left + ", top=" + top + ", right="
                         + right + ", bottom=" + bottom + ",)");
@@ -994,8 +1002,8 @@
             if (DEBUG) {
                 Log.d(TAG, "onSessionEvent(" + eventType + ")");
             }
-            if (mListener != null) {
-                mListener.onEvent(mInputId, eventType, eventArgs);
+            if (mCallback != null) {
+                mCallback.onEvent(mInputId, eventType, eventArgs);
             }
         }
     }
diff --git a/media/java/android/service/media/IMediaBrowserService.aidl b/media/java/android/service/media/IMediaBrowserService.aidl
index 2631ddd..01285ee 100644
--- a/media/java/android/service/media/IMediaBrowserService.aidl
+++ b/media/java/android/service/media/IMediaBrowserService.aidl
@@ -16,6 +16,6 @@
     void connect(String pkg, in Bundle rootHints, IMediaBrowserServiceCallbacks callbacks);
     void disconnect(IMediaBrowserServiceCallbacks callbacks);
 
-    void addSubscription(in Uri uri, IMediaBrowserServiceCallbacks callbacks);
-    void removeSubscription(in Uri uri, IMediaBrowserServiceCallbacks callbacks);
+    void addSubscription(String uri, IMediaBrowserServiceCallbacks callbacks);
+    void removeSubscription(String uri, IMediaBrowserServiceCallbacks callbacks);
 }
\ No newline at end of file
diff --git a/media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl b/media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl
index 7702a50..2a37ada 100644
--- a/media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl
+++ b/media/java/android/service/media/IMediaBrowserServiceCallbacks.aidl
@@ -5,7 +5,6 @@
 import android.content.pm.ParceledListSlice;
 import android.graphics.Bitmap;
 import android.media.session.MediaSession;
-import android.net.Uri;
 import android.os.Bundle;
 
 /**
@@ -16,12 +15,12 @@
 oneway interface IMediaBrowserServiceCallbacks {
     /**
      * Invoked when the connected has been established.
-     * @param root The root Uri for browsing.
+     * @param root The root media id for browsing.
      * @param session The {@link MediaSession.Token media session token} that can be used to control
      *         the playback of the media app.
      * @param extra Extras returned by the media service.
      */
-    void onConnect(in Uri root, in MediaSession.Token session, in Bundle extras);
+    void onConnect(String root, in MediaSession.Token session, in Bundle extras);
     void onConnectFailed();
-    void onLoadChildren(in Uri uri, in ParceledListSlice list);
+    void onLoadChildren(String mediaId, in ParceledListSlice list);
 }
diff --git a/media/java/android/service/media/MediaBrowserService.java b/media/java/android/service/media/MediaBrowserService.java
index 4d6fd7b..d50be42 100644
--- a/media/java/android/service/media/MediaBrowserService.java
+++ b/media/java/android/service/media/MediaBrowserService.java
@@ -25,12 +25,8 @@
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.ParceledListSlice;
-import android.content.res.Configuration;
-import android.graphics.Bitmap;
 import android.media.browse.MediaBrowser;
-import android.media.browse.MediaBrowser.MediaItem;
 import android.media.session.MediaSession;
-import android.net.Uri;
 import android.os.Binder;
 import android.os.Bundle;
 import android.os.IBinder;
@@ -38,18 +34,13 @@
 import android.os.RemoteException;
 import android.service.media.IMediaBrowserService;
 import android.service.media.IMediaBrowserServiceCallbacks;
-import android.service.media.IMediaBrowserService.Stub;
 import android.util.ArrayMap;
 import android.util.Log;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 /**
  * Base class for media browse services.
@@ -60,7 +51,7 @@
  * </p>
  *
  * To extend this class, you must declare the service in your manifest file with
- * an intent filter with the {@link #SERVICE_ACTION} action.
+ * an intent filter with the {@link #SERVICE_INTERFACE} action.
  *
  * For example:
  * </p><pre>
@@ -81,7 +72,7 @@
      * The {@link Intent} that must be declared as handled by the service.
      */
     @SdkConstant(SdkConstantType.SERVICE_ACTION)
-    public static final String SERVICE_ACTION = "android.media.browse.MediaBrowserService";
+    public static final String SERVICE_INTERFACE = "android.media.browse.MediaBrowserService";
 
     private final ArrayMap<IBinder, ConnectionRecord> mConnections = new ArrayMap();
     private final Handler mHandler = new Handler();
@@ -96,7 +87,7 @@
         Bundle rootHints;
         IMediaBrowserServiceCallbacks callbacks;
         BrowserRoot root;
-        HashSet<Uri> subscriptions = new HashSet();
+        HashSet<String> subscriptions = new HashSet();
     }
 
     /**
@@ -199,7 +190,7 @@
                         } else {
                             try {
                                 mConnections.put(b, connection);
-                                callbacks.onConnect(connection.root.getRootUri(),
+                                callbacks.onConnect(connection.root.getRootId(),
                                         mSession, connection.root.getExtras());
                             } catch (RemoteException ex) {
                                 Log.w(TAG, "Calling onConnect() failed. Dropping client. "
@@ -229,7 +220,7 @@
 
 
         @Override
-        public void addSubscription(final Uri uri, final IMediaBrowserServiceCallbacks callbacks) {
+        public void addSubscription(final String id, final IMediaBrowserServiceCallbacks callbacks) {
             mHandler.post(new Runnable() {
                     @Override
                     public void run() {
@@ -238,18 +229,18 @@
                         // Get the record for the connection
                         final ConnectionRecord connection = mConnections.get(b);
                         if (connection == null) {
-                            Log.w(TAG, "addSubscription for callback that isn't registered uri="
-                                + uri);
+                            Log.w(TAG, "addSubscription for callback that isn't registered id="
+                                + id);
                             return;
                         }
 
-                        MediaBrowserService.this.addSubscription(uri, connection);
+                        MediaBrowserService.this.addSubscription(id, connection);
                     }
                 });
         }
 
         @Override
-        public void removeSubscription(final Uri uri,
+        public void removeSubscription(final String id,
                 final IMediaBrowserServiceCallbacks callbacks) {
             mHandler.post(new Runnable() {
                 @Override
@@ -258,12 +249,12 @@
 
                     ConnectionRecord connection = mConnections.get(b);
                     if (connection == null) {
-                        Log.w(TAG, "removeSubscription for callback that isn't registered uri="
-                                + uri);
+                        Log.w(TAG, "removeSubscription for callback that isn't registered id="
+                                + id);
                         return;
                     }
-                    if (!connection.subscriptions.remove(uri)) {
-                        Log.w(TAG, "removeSubscription called for " + uri
+                    if (!connection.subscriptions.remove(id)) {
+                        Log.w(TAG, "removeSubscription called for " + id
                                 + " which is not subscribed");
                     }
                 }
@@ -279,7 +270,7 @@
 
     @Override
     public IBinder onBind(Intent intent) {
-        if (SERVICE_ACTION.equals(intent.getAction())) {
+        if (SERVICE_INTERFACE.equals(intent.getAction())) {
             return mBinder;
         }
         return null;
@@ -294,7 +285,7 @@
      * <p>
      * The implementation should verify that the client package has
      * permission to access browse media information before returning
-     * the root uri; it should return null if the client is not
+     * the root id; it should return null if the client is not
      * allowed to access this information.
      * </p>
      *
@@ -303,7 +294,7 @@
      * @param clientUid The uid of the application which is requesting
      * access to browse media.
      * @param rootHints An optional bundle of service-specific arguments to send
-     * to the media browse service when connecting and retrieving the root uri
+     * to the media browse service when connecting and retrieving the root id
      * for browsing, or null if none.  The contents of this bundle may affect
      * the information returned when browsing.
      */
@@ -319,11 +310,11 @@
      * from this function, and then {@link Result#sendResult result.sendResult} called when
      * the loading is complete.
      *
-     * @param parentUri The uri of the parent media item whose
+     * @param parentId The id of the parent media item whose
      * children are to be queried.
-     * @return The list of children, or null if the uri is invalid.
+     * @return The list of children, or null if the id is invalid.
      */
-    public abstract void onLoadChildren(@NonNull Uri parentUri,
+    public abstract void onLoadChildren(@NonNull String parentId,
             @NonNull Result<List<MediaBrowser.MediaItem>> result);
 
     /**
@@ -351,23 +342,23 @@
 
     /**
      * Notifies all connected media browsers that the children of
-     * the specified Uri have changed in some way.
+     * the specified parent id have changed in some way.
      * This will cause browsers to fetch subscribed content again.
      *
-     * @param parentUri The uri of the parent media item whose
+     * @param parentId The id of the parent media item whose
      * children changed.
      */
-    public void notifyChildrenChanged(@NonNull final Uri parentUri) {
-        if (parentUri == null) {
-            throw new IllegalArgumentException("parentUri cannot be null in notifyChildrenChanged");
+    public void notifyChildrenChanged(@NonNull final String parentId) {
+        if (parentId == null) {
+            throw new IllegalArgumentException("parentId cannot be null in notifyChildrenChanged");
         }
         mHandler.post(new Runnable() {
             @Override
             public void run() {
                 for (IBinder binder : mConnections.keySet()) {
                     ConnectionRecord connection = mConnections.get(binder);
-                    if (connection.subscriptions.contains(parentUri)) {
-                        performLoadChildren(parentUri, connection);
+                    if (connection.subscriptions.contains(parentId)) {
+                        performLoadChildren(parentId, connection);
                     }
                 }
             }
@@ -395,13 +386,13 @@
     /**
      * Save the subscription and if it is a new subscription send the results.
      */
-    private void addSubscription(Uri uri, ConnectionRecord connection) {
+    private void addSubscription(String id, ConnectionRecord connection) {
         // Save the subscription
-        final boolean added = connection.subscriptions.add(uri);
+        final boolean added = connection.subscriptions.add(id);
 
         // If this is a new subscription, send the results
         if (added) {
-            performLoadChildren(uri, connection);
+            performLoadChildren(id, connection);
         }
     }
 
@@ -410,39 +401,39 @@
      * <p>
      * Callers must make sure that this connection is still connected.
      */
-    private void performLoadChildren(final Uri uri, final ConnectionRecord connection) {
+    private void performLoadChildren(final String parentId, final ConnectionRecord connection) {
         final Result<List<MediaBrowser.MediaItem>> result
- = new Result<List<MediaBrowser.MediaItem>>(
-                uri) {
+                = new Result<List<MediaBrowser.MediaItem>>(parentId) {
             @Override
             void onResultSent(List<MediaBrowser.MediaItem> list) {
                 if (list == null) {
-                    throw new IllegalStateException("onLoadChildren sent null list for uri " + uri);
+                    throw new IllegalStateException("onLoadChildren sent null list for id "
+                            + parentId);
                 }
                 if (mConnections.get(connection.callbacks.asBinder()) != connection) {
                     if (DBG) {
                         Log.d(TAG, "Not sending onLoadChildren result for connection that has"
-                                + " been disconnected. pkg=" + connection.pkg + " uri=" + uri);
+                                + " been disconnected. pkg=" + connection.pkg + " id=" + parentId);
                     }
                     return;
                 }
 
                 final ParceledListSlice<MediaBrowser.MediaItem> pls = new ParceledListSlice(list);
                 try {
-                    connection.callbacks.onLoadChildren(uri, pls);
+                    connection.callbacks.onLoadChildren(parentId, pls);
                 } catch (RemoteException ex) {
                     // The other side is in the process of crashing.
-                    Log.w(TAG, "Calling onLoadChildren() failed for uri=" + uri
+                    Log.w(TAG, "Calling onLoadChildren() failed for id=" + parentId
                             + " package=" + connection.pkg);
                 }
             }
         };
 
-        onLoadChildren(uri, result);
+        onLoadChildren(parentId, result);
 
         if (!result.isDone()) {
             throw new IllegalStateException("onLoadChildren must call detach() or sendResult()"
-                    + " before returning for package=" + connection.pkg + " uri=" + uri);
+                    + " before returning for package=" + connection.pkg + " id=" + parentId);
         }
     }
 
@@ -451,28 +442,28 @@
      * when first connected.
      */
     public static final class BrowserRoot {
-        final private Uri mUri;
+        final private String mRootId;
         final private Bundle mExtras;
 
         /**
          * Constructs a browser root.
-         * @param uri The root Uri for browsing.
+         * @param rootId The root id for browsing.
          * @param extras Any extras about the browser service.
          */
-        public BrowserRoot(@NonNull Uri uri, @Nullable Bundle extras) {
-            if (uri == null) {
-                throw new IllegalArgumentException("The root uri in BrowserRoot cannot be null. " +
+        public BrowserRoot(@NonNull String rootId, @Nullable Bundle extras) {
+            if (rootId == null) {
+                throw new IllegalArgumentException("The root id in BrowserRoot cannot be null. " +
                         "Use null for BrowserRoot instead.");
             }
-            mUri = uri;
+            mRootId = rootId;
             mExtras = extras;
         }
 
         /**
-         * Gets the root uri for browsing.
+         * Gets the root id for browsing.
          */
-        public Uri getRootUri() {
-            return mUri;
+        public String getRootId() {
+            return mRootId;
         }
 
         /**
diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp
index f1e1099..1cf589d 100644
--- a/media/jni/android_media_MediaCodec.cpp
+++ b/media/jni/android_media_MediaCodec.cpp
@@ -62,6 +62,7 @@
     jint cryptoErrorNoKey;
     jint cryptoErrorKeyExpired;
     jint cryptoErrorResourceBusy;
+    jint cryptoErrorInsufficientOutputProtection;
 } gCryptoErrorCodes;
 
 static struct CodecActionCodes {
@@ -756,6 +757,9 @@
         case ERROR_DRM_RESOURCE_BUSY:
             err = gCryptoErrorCodes.cryptoErrorResourceBusy;
             break;
+        case ERROR_DRM_INSUFFICIENT_OUTPUT_PROTECTION:
+            err = gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection;
+            break;
         default:  /* Other negative DRM error codes go out as is. */
             break;
     }
@@ -1434,6 +1438,11 @@
     gCryptoErrorCodes.cryptoErrorResourceBusy =
         env->GetStaticIntField(clazz.get(), field);
 
+    field = env->GetStaticFieldID(clazz.get(), "ERROR_INSUFFICIENT_OUTPUT_PROTECTION", "I");
+    CHECK(field != NULL);
+    gCryptoErrorCodes.cryptoErrorInsufficientOutputProtection =
+        env->GetStaticIntField(clazz.get(), field);
+
     clazz.reset(env->FindClass("android/media/MediaCodec$CodecException"));
     CHECK(clazz.get() != NULL);
     field = env->GetStaticFieldID(clazz.get(), "ACTION_TRANSIENT", "I");
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index be37aa8..c9cefbd 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -705,11 +705,12 @@
 }
 
 static jobjectArray
-android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
+android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz __unused)
 {
     effect_descriptor_t desc;
     char str[EFFECT_STRING_LEN_MAX];
-    uint32_t numEffects = 0;
+    uint32_t totalEffectsCount = 0;
+    uint32_t returnedEffectsCount = 0;
     uint32_t i = 0;
     jstring jdescType;
     jstring jdescUuid;
@@ -717,19 +718,20 @@
     jstring jdescName;
     jstring jdescImplementor;
     jobject jdesc;
+    jobjectArray ret;
 
-    if (AudioEffect::queryNumberEffects(&numEffects) != NO_ERROR) {
+    if (AudioEffect::queryNumberEffects(&totalEffectsCount) != NO_ERROR) {
         return NULL;
     }
 
-    jobjectArray ret = env->NewObjectArray(numEffects, fields.clazzDesc, NULL);
-    if (ret == NULL) {
-        return ret;
+    jobjectArray temp = env->NewObjectArray(totalEffectsCount, fields.clazzDesc, NULL);
+    if (temp == NULL) {
+        return temp;
     }
 
-    ALOGV("queryEffects() numEffects: %d", numEffects);
+    ALOGV("queryEffects() totalEffectsCount: %d", totalEffectsCount);
 
-    for (i = 0; i < numEffects; i++) {
+    for (i = 0; i < totalEffectsCount; i++) {
         if (AudioEffect::queryEffect(i, &desc) != NO_ERROR) {
             goto queryEffects_failure;
         }
@@ -770,15 +772,26 @@
             goto queryEffects_failure;
         }
 
-        env->SetObjectArrayElement(ret, i, jdesc);
+        env->SetObjectArrayElement(temp, returnedEffectsCount++, jdesc);
    }
 
+    if (returnedEffectsCount == 0) {
+        goto queryEffects_failure;
+    }
+    ret = env->NewObjectArray(returnedEffectsCount, fields.clazzDesc, NULL);
+    if (ret == NULL) {
+        goto queryEffects_failure;
+    }
+    for (i = 0; i < returnedEffectsCount; i++) {
+        env->SetObjectArrayElement(ret, i, env->GetObjectArrayElement(temp, i));
+    }
+    env->DeleteLocalRef(temp);
     return ret;
 
 queryEffects_failure:
 
-    if (ret != NULL) {
-        env->DeleteLocalRef(ret);
+    if (temp != NULL) {
+        env->DeleteLocalRef(temp);
     }
     return NULL;
 
@@ -787,7 +800,8 @@
 
 
 static jobjectArray
-android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz, jint audioSession)
+android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz __unused,
+                                                     jint audioSession)
 {
     // kDefaultNumEffects is a "reasonable" value ensuring that only one query will be enough on
     // most devices to get all active audio pre processing on a given session.
@@ -895,7 +909,7 @@
     return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
 }
 
-jint JNI_OnLoad(JavaVM* vm, void* reserved)
+jint JNI_OnLoad(JavaVM* vm, void* reserved __unused)
 {
 
     JNIEnv* env = NULL;
diff --git a/packages/BackupRestoreConfirmation/res/values-am/strings.xml b/packages/BackupRestoreConfirmation/res/values-am/strings.xml
index 8721517..7077b39 100644
--- a/packages/BackupRestoreConfirmation/res/values-am/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-am/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"እባክህ የመሳሪያህ ምስጠራ የይለፍ ቃል ከታች አስገባ፡፡ይሄ ለምትኬ መዝገብ ለመመስጠርም ይጠቅማል፡፡"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"እባክዎ የሙሉ ውሂብ መጠበቂያ ማመስጠር ለመጠቅም የይለፍ ቃል ያስገቡ። ይህም ባዶ ከሆነ፣ የእርስዎ የአሁኑ የመጠበቂያ ይለፍ ቃል ይወሰዳል፡"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"ሙሉ የውሂብ መጠበቂያ ለማመስጠር ከፈለጉ ከታች የይለፍ ቃል ያስገቡ፡"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"መሣሪያዎ የተመሰጠረ እንደመሆኑ መጠን ምትኬዎን ማመስጠር አለብዎት። እባክዎ የይለፍ ቃል ከታች ያስገቡ፦"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"ውሂብ እነበረበት መልስ የተመሳጠረ ከሆነ፣ እባክዎ ከታች የይለፍ ቃል ያስገቡ"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"መጠባበቂያ በመጀመር ላይ..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"መጠባበቂያ ጨርሷል"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ar/strings.xml b/packages/BackupRestoreConfirmation/res/values-ar/strings.xml
index c5fb2e8..b7a56d1 100644
--- a/packages/BackupRestoreConfirmation/res/values-ar/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ar/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"الرجاء إدخال كلمة مرور تشفير الجهاز. سيتم استخدام ذلك أيضًا لتشفير أرشيف النسخ الاحتياطي."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"الرجاء إدخال كلمة المرور للاستخدام لتشفير بيانات النسخة الاحتياطية بالكامل. إذا تم ترك هذا فارغًا، فسيتم استخدام كلمة مرور النسخ الاحتياطي الحالية:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"إذا كنت ترغب في تشفير بيانات النسخة الاحتياطية بالكامل، فأدخل كلمة المرور أدناه:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"نظرًا لكون جهازك مشفرًا، أنت مطالب بتشفير النسخة الاحتياطية. يُرجى إدخال كلمة المرور أدناه:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"إذا كانت بيانات الاسترداد مشفرة، فالرجاء إدخال كلمة المرور أدناه:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"جارٍ بدء النسخ الاحتياطي..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"انتهت عملية النسخ الاحتياطي"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-bg/strings.xml b/packages/BackupRestoreConfirmation/res/values-bg/strings.xml
index 9ca2848..f1b01e5 100644
--- a/packages/BackupRestoreConfirmation/res/values-bg/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-bg/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Моля, въведете паролата си за шифроване на устройството по-долу. Тя ще се използва и за шифроване на резервното копие на архива."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Моля, въведете парола, която да използвате за шифроване на пълното резервно копие на данните. Ако не е попълнена, ще бъде използвана текущата ви парола за резервно копие:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Ако искате да шифровате пълното резервно копие на данните, въведете парола по-долу:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Тъй като устройството ви е шифровано, трябва да направите това и за резервното си копие. Моля, по-долу въведете парола:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Ако възстановените данни са шифровани, моля, въведете паролата по-долу:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Създаването на резервно копие се стартира..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Създаването на резервно копие завърши"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ca/strings.xml b/packages/BackupRestoreConfirmation/res/values-ca/strings.xml
index 10d66ad..3326ccb 100644
--- a/packages/BackupRestoreConfirmation/res/values-ca/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ca/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Introdueix la contrasenya d\'encriptació del dispositiu a continuació. També es farà servir per encriptar l\'arxiu de seguretat."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Introdueix una contrasenya que utilitzaràs per a l\'encriptació de les dades de còpia de la seguretat completa. Si es deixa en blanc, s\'utilitzarà la teva contrasenya de còpia de seguretat actual:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Si vols xifrar les dades de la còpia de seguretat completa, introdueix una contrasenya a continuació:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Com que el teu dispositiu està encriptat, has d\'encriptar el dispositiu secundari. Escriu una contrasenya a continuació:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Si la recuperació de dades està xifrada, introdueix la contrasenya a continuació:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"S\'està iniciant la còpia de seguretat..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Ha finalitzat la còpia de seguretat"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-cs/strings.xml b/packages/BackupRestoreConfirmation/res/values-cs/strings.xml
index a93292a..697de32 100644
--- a/packages/BackupRestoreConfirmation/res/values-cs/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-cs/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Sem prosím zadejte bezpečnostní gesto. Toto gesto se použije také při šifrování záložního archivu."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Zadejte prosím heslo pro šifrování dat úplné zálohy. Pokud pole ponecháte prázdné, použije se aktuální heslo pro zálohy:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Chcete-li data úplné zálohy zašifrovat, zadejte heslo:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Protože je zařízení šifrováno, je třeba zálohu zašifrovat. Níže prosím zadejte heslo:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Pokud jsou obnovená data šifrována, zadejte prosím heslo níže:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Spouští se zálohování..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Zálohování bylo dokončeno"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-da/strings.xml b/packages/BackupRestoreConfirmation/res/values-da/strings.xml
index 6fc6ac5..28aea33 100644
--- a/packages/BackupRestoreConfirmation/res/values-da/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-da/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Indtast adgangskoden til kryptering for din enhed nedenfor. Denne bliver også brugt til at kryptere sikkerhedskopien af arkivet."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Angiv en adgangskode, som skal bruges til kryptering af alle dine sikkerhedsdata. Hvis dette felt er tomt, bruges din aktuelle adgangskode til sikkerhedskopiering:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Hvis du ønsker at kryptere sikkerhedsdataene, skal du indtaste en adgangskode nedenfor:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Eftersom din enhed er krypteret, skal du kryptere din backup. Indtast en adgangskode nedenfor:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Hvis gendannelsesdataene er krypteret, skal du angive adgangskoden nedenfor:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Sikkerhedskopiering begynder..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Sikkerhedskopiering er færdig"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-es-rUS/strings.xml b/packages/BackupRestoreConfirmation/res/values-es-rUS/strings.xml
index 99a44ae..2d76a1e 100644
--- a/packages/BackupRestoreConfirmation/res/values-es-rUS/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-es-rUS/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Introduce tu contraseña de encriptación del dispositivo a continuación. Esta contraseña también se utilizará para encriptar la copia de seguridad."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Introduce una contraseña para encriptar los datos de la copia de seguridad completa. Si dejas este campo en blanco, se utilizará tu contraseña actual de copia de seguridad:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Si deseas encriptar los datos de la copia de seguridad completa, introduce una contraseña a continuación:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Dado que el dispositivo está encriptado, es necesario que encriptes la copia de seguridad. Ingresa una contraseña a continuación:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Si los datos de recuperación están encriptados, vuelve a introducir la contraseña a continuación:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Iniciando copia de seguridad..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"La realización de la copia de seguridad finalizó."</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml b/packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml
index 5413ce5..4399068 100644
--- a/packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Sisestage allpool oma seadme krüpteerimise parool. Seda kasutatakse ka varukoopiate arhiivi krüpteerimiseks."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Sisestage parool kõikide varundatud andmete krüpteerimise jaoks. Kui jätate selle tühjaks, siis kasutatakse teie praegust varunduse parooli:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Kui soovite kõik varundusandmed krüpteerida, siis sisestage allpool parool:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Kuna seade on krüpteeritud, siis peate krüpteerima ka varukoopia. Sisestage all parool:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Kui taasteandmed on krüpteeritud, siis sisestage allpool parool."</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Algab varundamine ..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Varundamine jõudis lõpule"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-fi/strings.xml b/packages/BackupRestoreConfirmation/res/values-fi/strings.xml
index 94f0d56..4517410 100644
--- a/packages/BackupRestoreConfirmation/res/values-fi/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-fi/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Kirjoita laitteen salauksen salasana alle. Salasanaa käytetään myös varmuuskopioarkiston salaamiseen."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Anna salasana kaikkien varmuuskopiotietojen salaamiseksi. Jos tämä jätetään tyhjäksi, nykyistä varmuuskopioinnin salasanaa käytetään:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Jos haluat salata kaikki varmuuskopiotiedot, kirjoita salasana alle:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Koska laite on salattu, myös varmuuskopiointi on salattava. Kirjoita salasana alle:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Jos palautustiedot on salattu, anna salasana alla:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Varmuuskopiointi alkaa..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Varmuuskopiointi valmis"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-fr-rCA/strings.xml b/packages/BackupRestoreConfirmation/res/values-fr-rCA/strings.xml
index 66a93f02..769b721 100644
--- a/packages/BackupRestoreConfirmation/res/values-fr-rCA/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-fr-rCA/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Veuillez saisir le mot de passe de chiffrement de l\'appareil ci-dessous. Il permettra également de chiffrer les archives de sauvegarde."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Veuillez saisir un mot de passe à utiliser pour chiffrer les données de sauvegarde complète. Si ce champ n\'est pas renseigné, votre mot de passe de sauvegarde actuel sera utilisé :"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Si vous souhaitez chiffrer l\'ensemble des données de sauvegarde, veuillez saisir un mot de passe ci-dessous :"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Votre appareil est chiffré. Vous devez donc chiffrer votre sauvegarde. Veuillez entrer un mot de passe ci-dessous :"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Si les données de restauration sont chiffrées, veuillez saisir le mot de passe ci-dessous :"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Démarrage de la sauvegarde…"</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Sauvegarde terminée."</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-fr/strings.xml b/packages/BackupRestoreConfirmation/res/values-fr/strings.xml
index 7fe005b..b8d6b56 100644
--- a/packages/BackupRestoreConfirmation/res/values-fr/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-fr/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Veuillez saisir le mot de passe de chiffrement de l\'appareil ci-dessous. Il permettra également de chiffrer les archives de sauvegarde."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Veuillez saisir un mot de passe à utiliser pour chiffrer les données de sauvegarde complète. Si ce champ n\'est pas renseigné, votre mot de passe de sauvegarde actuel sera utilisé :"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Si vous souhaitez chiffrer l\'ensemble des données de sauvegarde, veuillez saisir un mot de passe ci-dessous :"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Votre appareil est chiffré. Vous devez donc chiffrer votre sauvegarde. Veuillez saisir un mot de passe ci-dessous :"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Si les données de restauration sont chiffrées, veuillez saisir le mot de passe ci-dessous :"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Démarrage de la sauvegarde…"</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Sauvegarde terminée."</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-hi/strings.xml b/packages/BackupRestoreConfirmation/res/values-hi/strings.xml
index d80dc92..71a319f 100644
--- a/packages/BackupRestoreConfirmation/res/values-hi/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-hi/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"कृपया अपना उपकरण सुरक्षित तरीका पासवर्ड नीचे दर्ज करें. बैकअप संग्रहण को एन्‍क्रिप्‍ट करने के लिए भी इसका उपयोग किया जाएगा."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"कृपया संपूर्ण सुरक्षित डेटा को एन्‍क्रि‍प्‍ट करने में उपयोग के लि‍ए पासवर्ड डालें. यदि‍ यह खाली छोड़ दि‍या जाता है, तो आपके वर्तमान बैकअप पासवर्ड का उपयोग कि‍या जाएगा:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"यदि‍ आप संपूर्ण सुरक्षित डेटा को एन्‍क्रि‍प्‍ट करना चाहते हैं, तो नीचे पासवर्ड डालें:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"चूंकि आपका उपकरण एन्क्रिप्ट किया हुआ है, इसलिए आपको अपने बैकअप को एन्क्रिप्ट करना आवश्यक है. कृपया नीचे पासवर्ड डालें:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"यदि‍ पुनर्स्थापित डेटा को एन्‍क्रि‍प्‍ट कि‍या गया है, तो कृपया नीचे पासवर्ड डालें:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"सुरक्षित करना शुरु हो रहा है..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"सुरक्षित करना पूर्ण"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-hr/strings.xml b/packages/BackupRestoreConfirmation/res/values-hr/strings.xml
index 7696a26..66037f3 100644
--- a/packages/BackupRestoreConfirmation/res/values-hr/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-hr/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"U nastavku unesite svoju zaporku enkripcije za uređaj. Ona će se upotrijebiti i za enkripciju te za arhivu sigurnosnih kopija."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Unesite zaporku koju ćete upotrebljavati za kriptiranje podataka potpune sigurnosne kopije. Ako je ostavite praznom, bit će upotrijebljena vaša trenutačna zaporka za sigurnosno kopiranje:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Ako želite kriptirati podatke potpune sigurnosne kopije, u nastavku unesite zaporku:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Budući da vam je uređaj kriptiran, morate kriptirati sigurnosne kopije. Unesite zaporku u nastavku:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Ako su podaci za vraćanje kriptirani, unesite zaporku u nastavku:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Započinje stvaranje sigurnosne kopije..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Sigurnosna kopija dovršena"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml b/packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml
index c25eb72..a054068 100644
--- a/packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Խնդրում ենք մուտքագրել ձեր սարքի կոդավորված գաղտնաբառը ներքևում: Այն նաև կօգտագործվի պահուստային արխիվի կոդավորման համար:"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Խնդրում ենք մուտքագրել գաղտնաբառը` ամբողջական պահուստավորվող տվյալները կոդավորելու համար: Եթե ​​այն դատարկ թողնեք, ապա կօգտագործվի ձեր առկա պահուստավորման գաղտնաբառը`"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Եթե ​​ցանկանում եք կոդավորել ամբողջական պահուստավորված տվյալները, մուտքագրեք գաղտնաբառ ստորև`"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Քանի որ ձեր սարքը կոդավորված է, դուք պետք է կոդավորեք նաև ձեր պահուստը: Խնդրում ենք ստորև սահմանել գաղտնաբառը՝"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Եթե ​​վերականգնվող տվյալները կոդավորված են, խնդրում ենք մուտքագրել գաղտնաբառը ստորև`"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Պահուստավորումը սկսվում է..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Պահուստավորումն ավարտվեց"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ja/strings.xml b/packages/BackupRestoreConfirmation/res/values-ja/strings.xml
index 9ee09e2..177ef5b 100644
--- a/packages/BackupRestoreConfirmation/res/values-ja/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ja/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"以下に端末暗号化用のパスワードを入力してください。このパスワードはバックアップアーカイブの暗号化にも使用します。"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"フルバックアップデータの暗号化に使用するパスワードを入力してください。空白のままにした場合、現在のバックアップ用のパスワードが使用されます:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"フルバックアップのデータを暗号化する場合は、以下にパスワードを入力してください:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"端末は暗号化されているため、バックアップを暗号化する必要があります。下にパスワードを入力してください。"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"復元するデータが暗号化されている場合、以下にパスワードを入力してください:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"バックアップを開始しています..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"バックアップが終了しました"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml b/packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml
index abf969b..0c4b7c2 100644
--- a/packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"გთხოვთ, ქვემოთ მიუთითოთ თქვენი მოწყობილობის დაშიფვრის პაროლი. ეს ასევე გამოყენებული იქნება სათადარიგო არქივის დაშიფრვისათვის."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"გთხოვთ შეიყვანოთ ყველა სამარქაფო ასლის დაშიფრვის პაროლი. თუ ამ ველს ცარიელს დატოვებთ, გამოყენებული იქნება მიმდინარე პაროლი:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"თუ გსურთ სრული ლოკალური სარეზერვო კოპიის დაშიფრვა, შეიყვანეთ პაროლი ქვემოთ:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"ვინაიდან თქვენი მოწყობილობა დაშიფრულია, მოგიწევთ დაშიფროთ თქვენი მარქაფი. გთხოვთ, შეიყვანოთ ქვევით პაროლი:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"თუ აღსადგენი მონაცემები დაშიფრულია, გთხოვთ, შეიყვანოთ პაროლი ქვემოთ:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"ასლების მომზადება იწყება..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"სარეზერვო კოპირება დასრულებულია"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml b/packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml
index 6a36b9e..38d7172 100644
--- a/packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Құрылғыңыздың кодтық кілтсөзін енгізіңіз. Ол сақтық көшірме мұрағатын кодтау үшін де қолданылады."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Деректердің сақтық көшірмесін толығымен шифрлау үшін кілтсөзді енгізіңіз. Егер бұл бос қалдырылса, сіздің қазіргі сақтық көшірме кілтсөзіңіз қолданылады:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Деректердің сақтық көшірмесін толығымен шифрлауды қаласаңыз, кілтсөзді енгізіңіз:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Құрылғыңыз шифрланғандықтан, сақтық көшірмені шифрлау қажет. Төменде құпия сөзді енгізіңіз:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Қалпына келтіру деректері кодталса, кілтсөзді енгізіңіз:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Сақтық көшірме басталуда..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Қалпына келтіру аяқталды"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml b/packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml
index 355a600..cc46d9e 100644
--- a/packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"សូម​បញ្ចូល​ពាក្យ​សម្ងាត់​ដាក់​លេខ​កូដ​ឧបករណ៍​របស់​អ្នក​ខាង​ក្រោម។ វា​នឹង​ត្រូវ​បាន​ប្រើ ដើម្បី​ដាក់​លេខ​កូដ​ប័ណ្ណសារ​បម្រុងទុក​ផង​ដែរ។"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"សូម​បញ្ចូល​ពាក្យ​សម្ងាត់​ដើម្បី​ប្រើ​សម្រាប់​ដាក់លេខ​កូដ​ទិន្នន័យ​បម្រុងទុក​ពេញលេញ។ បើ​ទុក​វា​ទទេ ពាក្យ​សម្ងាត់​បម្រុងទុក​បច្ចុប្បន្ន​របស់​អ្នក​នឹង​ត្រូវ​បាន​ប្រើ៖"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"បើ​អ្នក​ចង់​ដាក់​លេខ​កូដ​ទិន្នន័យ​បម្រុងទុក​ពេញលេញ បញ្ចូល​ពាក្យ​សម្ងាត់​ខាង​ក្រោម៖"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"ព្រោះ​ថា​ឧបករណ៍​របស់​អ្នក​ត្រូវ​បាន​ដាក់​លេខ​កូដ អ្នក​ត្រូវ​បាន​ទាមទារ​ឲ្យ​ដាក់លេខ​កូដ​ការ​បម្រុង​ទុក​របស់​អ្នក។ សូម​បញ្ចូល​ពាក្យសម្ងាត់​ខាងក្រោម៖"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"បើ​​ទិន្នន័យ​ស្ដារ​ត្រូវ​បាន​ដាក់​លេខ​កូដ សូម​បញ្ចូល​ពាក្យ​សម្ងាត់​ខាង​ក្រោម៖"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"កំពុង​ចាប់ផ្ដើម​បម្រុងទុក..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"ការ​​បម្រុង​ទុក​បាន​បញ្ចប់"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ko/strings.xml b/packages/BackupRestoreConfirmation/res/values-ko/strings.xml
index 11a0d64..600ae62 100644
--- a/packages/BackupRestoreConfirmation/res/values-ko/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ko/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"아래에 기기 암호화 비밀번호를 입력하세요. 백업 자료실을 암호화할 때에도 사용됩니다."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"전체 백업 데이터를 암호화하려면 사용할 비밀번호를 입력하세요. 공백으로 남겨 두면 현재 백업 비밀번호가 사용됩니다."</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"전체 백업 데이터를 암호화하려면 아래에 비밀번호를 입력하세요."</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"기기가 암호화되었으므로 백업을 암호화해야 합니다. 아래에 비밀번호를 입력하세요."</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"복원 데이터가 암호화되어 있는 경우, 아래에 비밀번호를 입력하세요."</string>
     <string name="toast_backup_started" msgid="550354281452756121">"백업 시작 중..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"백업을 완료했습니다."</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml b/packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml
index 3c7b6e7..6333b18 100644
--- a/packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Түзмөгүңүздүн шифрлөө сырсөзүн төмөндө киргизиңиз. Ал бэкап архивин шифрлегенге дагы колдонулат."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Эгер сиз толук бэкапты шифрлегиңиз келсе, төмөндө сырсөз киргизиңиз. Эгер ал бош калтырылса, анда учурдагы сырсөз колдонулат:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Эгер сиз толук бэкапты шифрлегиңиз келсе, төмөндө сырсөз киргизиңиз:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Түзмөгүңүз шифрленген болгондуктан, камдооңузду шифрлешиңиз керек. Төмөнгө сырсөз киргизиңиз:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Эгер калыбына келтирүү берилиштери шифрленген болсо, төмөндө сырсөздү киргизиңиз:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Бэкап башталды..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Бэкап аяктады"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-lv/strings.xml b/packages/BackupRestoreConfirmation/res/values-lv/strings.xml
index 68e9876..c969726 100644
--- a/packages/BackupRestoreConfirmation/res/values-lv/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-lv/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Lūdzu, ievadiet ierīces šifrēšanas paroli. Tā tiks arī izmantota, lai šifrētu dublējuma arhīvu."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Lūdzu, ievadiet paroli, kas tiks izmantota dublējuma datu pilnīgai šifrēšanai. Ja paroles lauciņu atstāsiet tukšu, tiks izmantota jūsu pašreizējā dublējuma parole:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Ja vēlaties pilnībā šifrēt dublējuma datus, tālāk ievadiet paroli:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Tā kā ierīce ir šifrēta, jums ir jāšifrē dublējums. Lūdzu, tālāk ievadiet paroli."</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Ja atjaunošanas dati ir šifrēti, lūdzu, ievadiet tālāk paroli:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Tiek sākta dublēšana..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Dublēšana ir pabeigta."</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml b/packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml
index e024575..78ddd1c 100644
--- a/packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Sila masukkan kata laluan penyulitan peranti anda di bawah. Ini juga akan digunakan untuk menyulitkan arkib sandaran."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Sila masukkan kata laluan yang hendak digunakan untuk menyulitkan data sandaran lengkap. Jika dibiarkan kosong, kata laluan sandaran semasa anda akan digunakan:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Jika anda ingin menyulitkan data sandaran lengkap, masukkan kata laluan di bawah:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Memandangkan peranti anda disulitkan, anda perlu menyulitkan sandaran anda. Sila masukkan kata laluan di bawah:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Jika pemulihan data disulitkan, sila masukkan kata laluan di bawah:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Sandaran bermula..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Sandaran selesai"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml b/packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml
index 993311d..473802e 100644
--- a/packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"कृपया तल तपाईंको उपकरण एन्क्रिप्सन पासवर्ड प्रविष्टि गर्नुहोस्: यो ब्याकप सँग्रह एन्क्रिप्ट गर्न पनि प्रयोग हुने छ।"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"ब्याकप डेटालाई encrypt गर्न पासवर्ड प्रविष्टि गर्नुहोस्, यदि यो खालि छोडिएको खण्डमा तपाईको पुरानै पासवर्ड प्रयोग हुने छ।"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"यदि तपाईं पूर्ण ब्याकअप डेटा इन्क्रिप्ट गर्न चाहनु हुन्छ भने तल पासवर्ड प्रविष्टि गर्नुहोस्।"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"तपाईँको उपकरण गुप्तिकरण गरिए देखि, तपाईंले आफ्नो जगेडा गुप्तिकरण गर्न आवश्यक छ। कृपया तल पासवर्ड प्रविष्ट गर्नुहोस्:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"यदि पुनःबहाली डेटा इन्क्रिप्ट छ भने कृपया तल पासवर्ड प्रविष्टि गर्नुहोस्:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"जगेडा राख्न सुरु हुँदै..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"ब्याकअप सकियो"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-pt/strings.xml b/packages/BackupRestoreConfirmation/res/values-pt/strings.xml
index 00849c1..cbc579e 100644
--- a/packages/BackupRestoreConfirmation/res/values-pt/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-pt/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Insira sua senha de criptografia do dispositivo abaixo. Ela também será usada para criptografar o arquivo de backup."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Digite uma senha para usar para criptografar os dados de backup por completo. Se isso for deixado em branco, sua senha atual de backup será usada:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Se você deseja criptografar os dados de backup por completo, digite uma senha abaixo:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Como seu dispositivo está criptografado, é necessário criptografar seu backup. Insira uma senha abaixo:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Se os dados restaurados forem criptografada, digite a senha abaixo:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Iniciando backup..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"O backup foi concluído"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ro/strings.xml b/packages/BackupRestoreConfirmation/res/values-ro/strings.xml
index f1c08e7..1cf438b 100644
--- a/packages/BackupRestoreConfirmation/res/values-ro/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ro/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Introduceţi mai jos parola de criptare a dispozitivului. Aceasta va fi utilizată, de asemenea, pentru a cripta arhiva copiei de rezervă."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Introduceţi o parolă pentru a o utiliza la criptarea datelor copiei de rezervă complete. Dacă acest câmp rămâne necompletat, pentru copierea de rezervă se va utiliza parola dvs. actuală."</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Dacă doriţi să criptaţi datele copiei de rezervă complete, introduceţi o parolă mai jos:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Întrucât dispozitivul este criptat, trebuie să criptați backupurile. Introduceți o parolă mai jos:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Dacă datele pentru restabilire sunt criptate, introduceţi parola mai jos:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Se începe copierea de rezervă..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Copierea de rezervă a fost finalizată"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ru/strings.xml b/packages/BackupRestoreConfirmation/res/values-ru/strings.xml
index b71cfea..43fcf3b 100644
--- a/packages/BackupRestoreConfirmation/res/values-ru/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ru/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Введите пароль для шифрования устройства и архива резервных копий."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Введите пароль для шифрования всех резервных данных. Если поле останется пустым, будет использован текущий пароль:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Чтобы зашифровать все резервные данные, введите пароль:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"На устройстве включено шифрование. Оно будет применено и к резервной копии данных. Введите пароль."</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Если восстановленные данные зашифрованы, введите пароль:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Резервное копирование..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Резервное копирование завершено"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml b/packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml
index 8d1ede4..aaeaf04 100644
--- a/packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"කරුණාකර ඔබගේ උපාංගයේ සංකේතන මුරපදය පහත ඇතුලත් කරන්න. සංරක්ෂිත උපස්ථ සංකේතනය කිරීමට මෙය භාවිත කළ හැක."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"කරුණාකර සියලු උපස්ථ දත්ත සංකේතනය කිරීම සඳහා භාවිතයට මුරපදයක් ඇතුළත් කරන්න. මෙය හිස්ව තැබුවොත්, ඔබගේ වර්තමාන උපස්ථ මුරපදය භාවිත වෙයි:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"සියලු උපස්ථ දත්ත සංකේතනය කිරීමට ඔබ අදහස් කරන්නේ නම්, මුරපදය පහලින් ඇතුලත් කරන්න:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"ඔබගේ උපාංගය සංකේතනය කර තිබෙන නිසා, ඔබගේ උපස්ථය සංකේතනය ඔබට අවශ්‍ය වී තිබේ. කරුණාකර මුරපදය පහළින් එකතු කරන්න:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"යළි පිහිටුවන දත්ත සංකේතනය කරන ලද ඒවානම්, කරුණාකර මුරපදය පහලින් ඇතුල් කරන්න:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"උපස්ථ කිරීම ආරම්භ කරමින්..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"උපස්ථය අවසන්"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-sk/strings.xml b/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
index 7b5b4dc..a231d23 100644
--- a/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-sk/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Zadajte svoje heslo na šifrovanie zariadenia nižšie. Bude tiež použité na šifrovanie archívu zálohy."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Zadajte heslo, ktoré sa použije pri šifrovaní údajov úplnej zálohy. Ak pole ponecháte prázdne, použije sa vaše aktuálne heslo zálohy:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Ak chcete šifrovať údaje úplnej zálohy, zadajte heslo nižšie:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Pretože je vaše zariadenie šifrované, musíte zašifrovať aj svoju zálohu. Zadajte heslo nižšie:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Ak sú údaje obnovenia šifrované, zadajte heslo nižšie:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Vytváranie zálohy..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Zálohovanie bolo dokončené"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-sl/strings.xml b/packages/BackupRestoreConfirmation/res/values-sl/strings.xml
index eaede1ef..80551d6 100644
--- a/packages/BackupRestoreConfirmation/res/values-sl/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-sl/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Vnesite geslo za šifriranje naprave spodaj. Uporabljeno bo tudi za šifriranje arhiva varnostnih kopij."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Vnesite geslo za šifriranje podatkov popolnega varnostnega kopiranja. Če to pustite prazno, bo uporabljeno trenutno geslo za varnostno kopiranje:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Če želite šifrirati vse varnostno kopirane podatke, spodaj vnesite geslo:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Vaša naprava je šifrirana, zato morate šifrirati varnostno kopirane podatke. Spodaj vnesite geslo:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Če so podatki za obnovitev šifrirani, spodaj vnesite geslo:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Varnostno kopiranje se začenja ..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Varnostno kopiranje končano"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-sr/strings.xml b/packages/BackupRestoreConfirmation/res/values-sr/strings.xml
index 81c976e..7f48e48 100644
--- a/packages/BackupRestoreConfirmation/res/values-sr/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-sr/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Унесите лозинку уређаја за шифровање. Ово ће се користити и за шифровање резервне архиве."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Унесите лозинку коју ћете користити за шифровање података потпуне резервне копије. Ако то поље оставите празно, користиће се тренутна лозинка резервне копије:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Ако желите да шифрујете податке потпуне резервне копије, унесите лозинку у наставку."</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Пошто вам је уређај шифрован, морате да шифрујете резервну копију. Унесите лозинку у наставку:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Ако су подаци за враћање шифровани, унесите лозинку у наставку:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Покретање прављења резервне копије..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Резервна копија је направљена"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-th/strings.xml b/packages/BackupRestoreConfirmation/res/values-th/strings.xml
index d244c6a..a79cc6f 100644
--- a/packages/BackupRestoreConfirmation/res/values-th/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-th/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"โปรดป้อนรหัสผ่านการเข้ารหัสอุปกรณ์ของคุณด้านล่างนี้ ซึ่งจะใช้ในการเข้ารหัสที่เก็บข้อมูลสำรองด้วย"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"โปรดป้อนรหัสผ่านเพื่อใช้สำหรับเข้ารหัสข้อมูลที่สำรองแบบเต็มรูปแบบ หากเว้นว่างไว้ รหัสผ่านการสำรองข้อมูลปัจจุบันของคุณจะถูกใช้:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"หากคุณต้องการเข้ารหัสข้อมูลที่สำรองเต็มรูปแบบ โปรดป้อนรหัสผ่านด้านล่างนี้:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"เนื่องจากอุปกรณ์ของคุณมีการเข้ารหัสไว้ คุณจึงต้องเข้ารหัสการสำรองข้อมูล โปรดป้อนรหัสผ่านด้านล่าง:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"หากมีการเข้ารหัสข้อมูลที่คืนค่า โปรดป้อนรหัสผ่านด้านล่างนี้:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"กำลังเริ่มการสำรองข้อมูล..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"สำรองข้อมูลเสร็จแล้ว"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-tl/strings.xml b/packages/BackupRestoreConfirmation/res/values-tl/strings.xml
index 0b5b657..dac816b 100644
--- a/packages/BackupRestoreConfirmation/res/values-tl/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-tl/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Mangyaring ilagay ang password ng pag-encrypt ng iyong device sa ibaba. Gagamitin rin ito upang i-encrypt ang backup na archive."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Mangyaring maglagay ng password na gamitin sa pag-e-encrypt ng buong data sa pag-backup. Kung iiwanan itong blangko, gagamitin ang iyong kasalukuyang backup na password:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Kung nais mong i-encrypt ang buong data ng backup, maglagay ng password sa ibaba:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Dahil naka-encrypt ang iyong device, hinihiling sa iyo na i-encrypt ang iyong backup. Pakilagay ang password sa ibaba:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Kung naka-encrypt ang data sa pagpapanumbalik, pakilagay ang password sa ibaba:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Sinisimulan ang pag-backup..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Tapos na ang pag-backup"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-tr/strings.xml b/packages/BackupRestoreConfirmation/res/values-tr/strings.xml
index 8405da9..ee0c483 100644
--- a/packages/BackupRestoreConfirmation/res/values-tr/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-tr/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Lütfen cihazınızı şifrelemek için kullandığınız şifreyi aşağıya girin. Bu şifre aynı zamanda yedekleme arşivini şifrelemek için de kullanılacaktır."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Tam yedekleme verilerini şifrelemek için lütfen bir şifre girin. Boş bırakılırsa, mevcut yedekleme şifreniz kullanılır:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Yedeklenen tüm verileri şifrelemek isterseniz, aşağıya bir şifre girin:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Cihazınız şifrelenmiş olduğundan yedeklemenizi şifrelemeniz gerekmektedir. Lütfen şifreyi aşağıya girin:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Geri yükleme verileri şifreliyse, lütfen şifreyi aşağıya girin:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Yedekleme başlıyor..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Yedekleme işlemi sona erdi"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml b/packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml
index 416b693..6f1c9b5 100644
--- a/packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"براہ کرم ذیل میں اپنے آلہ کی مرموز کاری کا پاس ورڈ درج کریں۔ یہ بیک اپ آرکائیو کی مرموز کاری کرنے کیلئے بھی استعمال کیا جائے گا۔"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"مکمل بیک اپ ڈیٹا کی مرموز کاری کرنے کیلئے استعمال کیلئے براہ کرم ایک پاس ورڈ درج کریں۔ اگر یہ خالی رہتا ہے تو آپ کا موجودہ بیک اپ پاس ورڈ استعمال کیا جائے گا:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"اگر آپ مکمل بیک اپ ڈیٹا کی مرموز کاری کرنا چاہتے ہیں تو ذیل میں ایک پاس ورڈ درج کریں:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"چونکہ آپ کا آلہ مرموز کردہ ہے، آپ کو اپنے بیک اپ کی مرموز کاری کرنے کی ضرورت ہے۔ براہ کرم ذیل میں ایک پاس ورڈ درج کریں:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"اگر بحال ہونے والا ڈیٹا مرموز کردہ ہے تو براہ کرم ذیل میں پاس ورڈ درج کریں:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"بیک اپ شروع ہو رہا ہے…"</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"بیک اپ مکمل ہو گیا"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml b/packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml
index 032f884..1b5741f 100644
--- a/packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Qurilmangizning shifr parolini kiriting. U zahira arxivni shifrlash uchun ham ishlatiladi."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"To‘liq zahira fayllarini shifrlash uchun parol kiriting. Agar bo‘sh qoldirsangiz, joriy zahiralash parolingizdan foydalaniladi:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"To‘liq zahira ma’lumotlarini shifrlashni xohlasangiz, quyidagi parolni kiriting:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Qurilmangiz shifrlangani bois ma’lumotlaringizning zaxira nusxasini ham shifrlash zarur. Shifrlash uchun parolni kiriting:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Agar tiklash ma’lumoti shifrlangan bo‘lsa, pastga parolni kiriting:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Zahiralash jarayoni boshlandi..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Zahiralash jarayoni bajarildi"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-vi/strings.xml b/packages/BackupRestoreConfirmation/res/values-vi/strings.xml
index 7d6cc863..264164f 100644
--- a/packages/BackupRestoreConfirmation/res/values-vi/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-vi/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"Vui lòng nhập mật khẩu mã hóa thiết bị của bạn bên dưới. Mật khẩu này cũng được sử dụng để mã hóa kho lưu trữ sao lưu."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Vui lòng nhập mật khẩu dùng để mã hóa toàn bộ dữ liệu sao lưu. Nếu trường này bị bỏ trống, mật khẩu sao lưu hiện tại của bạn sẽ được sử dụng:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Nếu bạn muốn mã hóa toàn bộ dữ liệu sao lưu, hãy nhập mật khẩu bên dưới:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Vì thiết bị của bạn được mã hóa nên bạn phải mã hóa bản sao lưu của mình. Vui lòng nhập mật khẩu bên dưới:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Nếu dữ liệu khôi phục được mã hóa, vui lòng nhập mật khẩu bên dưới:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Đang bắt đầu sao lưu..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Đã hoàn thành sao lưu"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-zh-rCN/strings.xml b/packages/BackupRestoreConfirmation/res/values-zh-rCN/strings.xml
index 501a31c..ac20aed 100644
--- a/packages/BackupRestoreConfirmation/res/values-zh-rCN/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-zh-rCN/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"请在下方输入您的设备加密密码。此密码还会用于加密备份存档。"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"请输入用于加密完整备份数据的密码。如果留空,系统将会使用您当前的备份密码:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"如果您想为整个备份数据加密,请在下方输入密码:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"由于您的设备进行了加密,因此您需要加密备份。请在下方输入密码:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"如果恢复数据已加密,请在下方输入密码:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"开始备份..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"备份已完成"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-zh-rHK/strings.xml b/packages/BackupRestoreConfirmation/res/values-zh-rHK/strings.xml
index 913521f..c6180d2 100644
--- a/packages/BackupRestoreConfirmation/res/values-zh-rHK/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-zh-rHK/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"請在下面輸入您的裝置加密密碼,這也會用來將封存備份加密。"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"請輸入為完整備份資料加密的專用密碼。如果留空,系統將使用您目前的備份密碼:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"如果您想將完整的備份資料加密,請在下面輸入一組密碼:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"您的裝置已加密,因此您必須將您的備份加密。請在下方輸入密碼:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"如果還原的資料經過加密處理,請在下面輸入密碼:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"正在開始備份..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"備份完畢"</string>
diff --git a/packages/BackupRestoreConfirmation/res/values-zh-rTW/strings.xml b/packages/BackupRestoreConfirmation/res/values-zh-rTW/strings.xml
index 610cde6..3a753a0 100644
--- a/packages/BackupRestoreConfirmation/res/values-zh-rTW/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-zh-rTW/strings.xml
@@ -29,8 +29,7 @@
     <string name="device_encryption_backup_text" msgid="5866590762672844664">"請在下方輸入您的裝置加密密碼,這也會用來加密備份封存檔。"</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"請輸入完整備份資料加密專用的密碼。如果您沒有輸入密碼,系統會使用您目前的備用密碼:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"如果您想要將完整備份資料進行加密,請在下面輸入一組密碼:"</string>
-    <!-- no translation found for backup_enc_password_required (7889652203371654149) -->
-    <skip />
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"由於您的裝置已加密,因此您必須為您的備份加密。請在下方輸入密碼:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"如果還原的資料經過加密處理,請在下面輸入密碼:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"正在開始備份..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"備份完畢"</string>
diff --git a/packages/DocumentsUI/res/values-cs/strings.xml b/packages/DocumentsUI/res/values-cs/strings.xml
index b08fdab..36bb72f 100644
--- a/packages/DocumentsUI/res/values-cs/strings.xml
+++ b/packages/DocumentsUI/res/values-cs/strings.xml
@@ -17,10 +17,10 @@
 <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="2783841764617238354">"Dokumenty"</string>
-    <string name="title_open" msgid="4353228937663917801">"Otevřít z"</string>
+    <string name="title_open" msgid="4353228937663917801">"Otevřít"</string>
     <string name="title_save" msgid="2433679664882857999">"Uložit do"</string>
     <string name="menu_create_dir" msgid="5947289605844398389">"Vytvořit složku"</string>
-    <string name="menu_grid" msgid="6878021334497835259">"Mřížka"</string>
+    <string name="menu_grid" msgid="6878021334497835259">"Mřížkové zobrazení"</string>
     <string name="menu_list" msgid="7279285939892417279">"Seznam"</string>
     <string name="menu_sort" msgid="7677740407158414452">"Řadit podle"</string>
     <string name="menu_search" msgid="3816712084502856974">"Hledat"</string>
@@ -34,7 +34,7 @@
     <string name="menu_advanced_show" product="default" msgid="5792182900084144261">"Zobrazit SD kartu"</string>
     <string name="menu_advanced_hide" product="nosdcard" msgid="4218809952721972589">"Skrýt interní úložiště"</string>
     <string name="menu_advanced_hide" product="default" msgid="4845869969015718848">"Skrýt SD kartu"</string>
-    <string name="menu_file_size_show" msgid="3240323619260823076">"Zobr. velikost souboru"</string>
+    <string name="menu_file_size_show" msgid="3240323619260823076">"Zobrazit velikost souboru"</string>
     <string name="menu_file_size_hide" msgid="8881975928502581042">"Skrýt velikost souboru"</string>
     <string name="mode_selected_count" msgid="459111894725594625">"Vybráno: <xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="sort_name" msgid="9183560467917256779">"Podle názvu"</string>
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
index f81690a..d72db1d 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RootsCache.java
@@ -116,9 +116,6 @@
      * Gather roots from storage providers belonging to given package name.
      */
     public void updatePackageAsync(String packageName) {
-        // Need at least first load, since we're going to be using previously
-        // cached values for non-matching packages.
-        waitForFirstLoad();
         new UpdateTask(packageName).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
     }
 
@@ -183,6 +180,12 @@
         protected Void doInBackground(Void... params) {
             final long start = SystemClock.elapsedRealtime();
 
+            if (mFilterPackage != null) {
+                // Need at least first load, since we're going to be using
+                // previously cached values for non-matching packages.
+                waitForFirstLoad();
+            }
+
             mTaskRoots.put(mRecentsRoot.authority, mRecentsRoot);
 
             final ContentResolver resolver = mContext.getContentResolver();
diff --git a/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index cfd5db3..0000000
--- a/packages/Keyguard/res/drawable-hdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index e3cb6db..0000000
--- a/packages/Keyguard/res/drawable-mdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png b/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png
deleted file mode 100644
index b9e30e2..0000000
--- a/packages/Keyguard/res/drawable-xhdpi/kg_bouncer_bg_white.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml
index 78b5746..a083f89 100644
--- a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml
+++ b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml
@@ -40,39 +40,19 @@
         android:visibility="gone"
         androidprv:allCaps="@bool/kg_use_all_caps" />
 
-    <LinearLayout
-        android:layout_width="match_parent"
+    <com.android.keyguard.EmergencyButton
+        android:id="@+id/emergency_call_button"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_weight="1"
         android:layout_marginTop="@dimen/eca_overlap"
-        style="?android:attr/buttonBarStyle"
-        android:orientation="horizontal"
-        android:gravity="center"
-        android:weightSum="2">
-
-        <com.android.keyguard.EmergencyButton
-            android:id="@+id/emergency_call_button"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:drawableLeft="@drawable/lockscreen_emergency_button"
-            android:text="@string/kg_emergency_call_label"
-            style="?android:attr/buttonBarButtonStyle"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textSize="@dimen/kg_status_line_font_size"
-            android:textColor="?android:attr/textColorSecondary"
-            android:drawablePadding="8dip" 
-            android:textAllCaps="@bool/kg_use_all_caps" />
-
-        <Button android:id="@+id/forgot_password_button"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            style="?android:attr/buttonBarButtonStyle"
-            android:textSize="@dimen/kg_status_line_font_size"
-            android:textColor="?android:attr/textColorSecondary"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:visibility="gone"
-            android:textAllCaps="@bool/kg_use_all_caps" />
-    </LinearLayout>
+        android:drawableLeft="@drawable/lockscreen_emergency_button"
+        android:text="@string/kg_emergency_call_label"
+        style="?android:attr/buttonBarButtonStyle"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textSize="@dimen/kg_status_line_font_size"
+        android:textColor="?android:attr/textColorSecondary"
+        android:drawablePadding="8dip"
+        android:textAllCaps="@bool/kg_use_all_caps" />
 
 </com.android.keyguard.EmergencyCarrierArea>
diff --git a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area_empty.xml b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area_empty.xml
deleted file mode 100644
index 2f4adae..0000000
--- a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area_empty.xml
+++ /dev/null
@@ -1,31 +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.
-*/
--->
-
-<!-- This is a blank layout to simplify implementation on landscape on phones
-     it is referenced indirectly by keyguard_eca -->
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="0dip"
-    android:layout_height="0dip"
-    android:orientation="vertical"
-    android:gravity="center"
-    android:layout_gravity="center_horizontal"
-    android:layout_alignParentBottom="true">
-
-</LinearLayout>
diff --git a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
index 8c8ec7a..0c85dab 100644
--- a/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_face_unlock_view.xml
@@ -36,7 +36,6 @@
 
     <FrameLayout
        android:id="@+id/keyguard_bouncer_frame"
-       android:background="@drawable/kg_bouncer_bg_white"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
diff --git a/packages/Keyguard/res/layout/keyguard_password_view.xml b/packages/Keyguard/res/layout/keyguard_password_view.xml
index 9e886f2..b7d5d30 100644
--- a/packages/Keyguard/res/layout/keyguard_password_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_password_view.xml
@@ -42,7 +42,6 @@
     <!-- Password entry field -->
       <FrameLayout
          android:id="@+id/keyguard_bouncer_frame"
-         android:background="@drawable/kg_bouncer_bg_white"
          android:layout_height="wrap_content"
          android:layout_width="280dp"
          android:layout_gravity="center_horizontal"
diff --git a/packages/Keyguard/res/layout/keyguard_pattern_view.xml b/packages/Keyguard/res/layout/keyguard_pattern_view.xml
index a126465..bd585b5 100644
--- a/packages/Keyguard/res/layout/keyguard_pattern_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_pattern_view.xml
@@ -49,7 +49,6 @@
 
           <FrameLayout
              android:id="@+id/keyguard_bouncer_frame"
-             android:background="@drawable/kg_bouncer_bg_white"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
diff --git a/packages/Keyguard/res/layout/keyguard_selector_view.xml b/packages/Keyguard/res/layout/keyguard_selector_view.xml
index d3064ed..5330363 100644
--- a/packages/Keyguard/res/layout/keyguard_selector_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_selector_view.xml
@@ -48,8 +48,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_marginLeft="16dp"
-            android:layout_marginRight="16dp"
-            android:background="@drawable/kg_bouncer_bg_white"/>
+            android:layout_marginRight="16dp"/>
 
         <include layout="@layout/keyguard_glow_pad_container" />
 
diff --git a/packages/Keyguard/res/values-ms-rMY/strings.xml b/packages/Keyguard/res/values-ms-rMY/strings.xml
index fcf6518..705e2e1 100644
--- a/packages/Keyguard/res/values-ms-rMY/strings.xml
+++ b/packages/Keyguard/res/values-ms-rMY/strings.xml
@@ -78,7 +78,7 @@
     <string name="keyguard_accessibility_hide_bouncer" msgid="7896992171878309358">"Pelancaran dibatalkan"</string>
     <string name="keyguard_accessibility_delete_widget_start" msgid="4096550552634391451">"Jatuhkan <xliff:g id="WIDGET_INDEX">%1$s</xliff:g> untuk memadam."</string>
     <string name="keyguard_accessibility_delete_widget_end" msgid="508833506780909393">"<xliff:g id="WIDGET_INDEX">%1$s</xliff:g> tidak akan dipadamkan."</string>
-    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Penggera seterusnya ditetapkan untuk <xliff:g id="ALARM">%1$s</xliff:g>"</string>
+    <string name="keyguard_accessibility_next_alarm" msgid="7269583073750518672">"Penggera seterusnya ditetapkan pada <xliff:g id="ALARM">%1$s</xliff:g>"</string>
     <string name="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
     <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
     <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</string>
diff --git a/packages/Keyguard/res/values-ta-rIN/strings.xml b/packages/Keyguard/res/values-ta-rIN/strings.xml
index e4b81db..b763457 100644
--- a/packages/Keyguard/res/values-ta-rIN/strings.xml
+++ b/packages/Keyguard/res/values-ta-rIN/strings.xml
@@ -21,14 +21,14 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_name" msgid="719438068451601849">"விசைப்பாதுகாப்பு"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"PIN குறியீட்டை உள்ளிடவும்"</string>
-    <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_enter_pin_code" msgid="3037685796058495017">"பின் குறியீட்டை உள்ளிடவும்"</string>
+    <string name="keyguard_password_enter_puk_code" msgid="3035856550289724338">"சிம் PUK மற்றும் புதிய பின் குறியீட்டைத் தட்டச்சு செய்யவும்"</string>
+    <string name="keyguard_password_enter_puk_prompt" msgid="1801941051094974609">"சிம் PUK குறியீடு"</string>
+    <string name="keyguard_password_enter_pin_prompt" msgid="3201151840570492538">"புதிய சிம் பின் குறியீடு"</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>
+    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"திறக்க, பின்னை உள்ளிடவும்"</string>
+    <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"தவறான பின் குறியீடு."</string>
     <string name="keyguard_label_text" msgid="861796461028298424">"தடைநீக்க, மெனுவை அழுத்தி பின்பு 0 ஐ அழுத்தவும்."</string>
     <string name="faceunlock_multiple_failures" msgid="754137583022792429">"முகம் திறப்பதற்கான அதிகபட்ச முயற்சிகள் கடந்தன"</string>
     <string name="keyguard_charged" msgid="3272223906073492454">"சார்ஜ் செய்யப்பட்டது"</string>
@@ -36,16 +36,16 @@
     <string name="keyguard_low_battery" msgid="8143808018719173859">"உங்கள் சார்ஜரை இணைக்கவும்."</string>
     <string name="keyguard_instructions_when_pattern_disabled" msgid="1332288268600329841">"திறக்க, மெனுவை அழுத்தவும்."</string>
     <string name="keyguard_network_locked_message" msgid="9169717779058037168">"பிணையம் பூட்டப்பட்டது"</string>
-    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"SIM கார்டு இல்லை"</string>
-    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"டேப்லெட்டில் SIM கார்டு இல்லை."</string>
-    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"தொலைபேசியில் SIM கார்டு இல்லை."</string>
-    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"SIM கார்டைச் செருகவும்."</string>
-    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"SIM கார்டு இல்லை அல்லது படிக்கக்கூடியதாக இல்லை. SIM கார்டைச் செருகவும்."</string>
-    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"SIM கார்டைப் பயன்படுத்த முடியாது."</string>
-    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"உங்கள் SIM கார்டு நிரந்தரமாக முடக்கப்பட்டது.\n மற்றொரு SIM கார்டிற்காக உங்கள் வயர்லெஸ் சேவை வழங்குநரைத் தொடர்புகொள்ளவும்."</string>
-    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"SIM கார்டு பூட்டப்பட்டுள்ளது."</string>
-    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"SIM கார்டு PUK ஆல் பூட்டப்பட்டது."</string>
-    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"SIM கார்டின் தடையைநீக்குகிறது..."</string>
+    <string name="keyguard_missing_sim_message_short" msgid="494980561304211931">"சிம் கார்டு இல்லை"</string>
+    <string name="keyguard_missing_sim_message" product="tablet" msgid="1445849005909260039">"டேப்லெட்டில் சிம் கார்டு இல்லை."</string>
+    <string name="keyguard_missing_sim_message" product="default" msgid="3481110395508637643">"தொலைபேசியில் சிம் கார்டு இல்லை."</string>
+    <string name="keyguard_missing_sim_instructions" msgid="5210891509995942250">"சிம் கார்டைச் செருகவும்."</string>
+    <string name="keyguard_missing_sim_instructions_long" msgid="5968985489463870358">"சிம் கார்டு இல்லை அல்லது படிக்கக்கூடியதாக இல்லை. சிம் கார்டைச் செருகவும்."</string>
+    <string name="keyguard_permanent_disabled_sim_message_short" msgid="8340813989586622356">"சிம் கார்டைப் பயன்படுத்த முடியாது."</string>
+    <string name="keyguard_permanent_disabled_sim_instructions" msgid="5892940909699723544">"உங்கள் சிம் கார்டு நிரந்தரமாக முடக்கப்பட்டது.\n மற்றொரு சிம் கார்டிற்காக உங்கள் வயர்லெஸ் சேவை வழங்குநரைத் தொடர்புகொள்ளவும்."</string>
+    <string name="keyguard_sim_locked_message" msgid="6875773413306380902">"சிம் கார்டு பூட்டப்பட்டுள்ளது."</string>
+    <string name="keyguard_sim_puk_locked_message" msgid="3747232467471801633">"சிம் கார்டு PUK ஆல் பூட்டப்பட்டது."</string>
+    <string name="keyguard_sim_unlock_progress_dialog_message" msgid="7975221805033614426">"சிம் கார்டின் தடையைநீக்குகிறது..."</string>
     <string name="keyguard_accessibility_widget_changed" msgid="5678624624681400191">"%1$s. விட்ஜெட் %2$d / %3$d."</string>
     <string name="keyguard_accessibility_add_widget" msgid="8273277058724924654">"விட்ஜெட்டைச் சேர்க்கவும்."</string>
     <string name="keyguard_accessibility_widget_empty_slot" msgid="1281505703307930757">"காலியானது"</string>
@@ -103,20 +103,20 @@
     <string name="kg_forgot_pattern_button_text" msgid="8852021467868220608">"வடிவத்தை மறந்துவிட்டீர்களா"</string>
     <string name="kg_wrong_pattern" msgid="1850806070801358830">"தவறான வடிவம்"</string>
     <string name="kg_wrong_password" msgid="2333281762128113157">"தவறான கடவுச்சொல்"</string>
-    <string name="kg_wrong_pin" msgid="1131306510833563801">"தவறான PIN"</string>
+    <string name="kg_wrong_pin" msgid="1131306510833563801">"தவறான பின்"</string>
     <string name="kg_too_many_failed_attempts_countdown" msgid="6358110221603297548">"<xliff:g id="NUMBER">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_pattern_instructions" msgid="398978611683075868">"உங்கள் வடிவத்தை வரையவும்"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"SIM PIN ஐ உள்ளிடவும்"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"PIN ஐ உள்ளிடுக"</string>
+    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"சிம் பின்னை உள்ளிடவும்"</string>
+    <string name="kg_pin_instructions" msgid="2377242233495111557">"பின்னை உள்ளிடுக"</string>
     <string name="kg_password_instructions" msgid="5753646556186936819">"கடவுச்சொல்லை உள்ளிடவும்"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM தற்போது முடக்கப்பட்டுள்ளது. தொடர்வதற்கு PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு மொபைல் நிறுவனங்களைத் தொடர்புகொள்ளவும்."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"விரும்பிய PIN குறியீட்டை உள்ளிடவும்"</string>
-    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"விரும்பிய PIN குறியீட்டை உறுதிப்படுத்தவும்"</string>
-    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM கார்டின் தடையைநீக்குகிறது..."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 இலிருந்து 8 எண்கள் வரையுள்ள PIN ஐ உள்ளிடவும்."</string>
+    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"சிம் தற்போது முடக்கப்பட்டுள்ளது. தொடர்வதற்கு PUK குறியீட்டை உள்ளிடவும். விவரங்களுக்கு மொபைல் நிறுவனங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"விரும்பிய பின் குறியீட்டை உள்ளிடவும்"</string>
+    <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"விரும்பிய பின் குறியீட்டை உறுதிப்படுத்தவும்"</string>
+    <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"சிம் கார்டின் தடையைநீக்குகிறது..."</string>
+    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"4 இலிருந்து 8 எண்கள் வரையுள்ள பின்னை உள்ளிடவும்."</string>
     <string name="kg_invalid_sim_puk_hint" msgid="7553388325654369575">"PUK குறியீட்டில் 8 எண்கள் அல்லது அதற்கு மேல் இருக்க வேண்டும்."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"சரியான PUK குறியீட்டை மீண்டும் உள்ளிடவும். தொடர் முயற்சிகள் SIM ஐ நிரந்தரமாக முடக்கிவிடும்."</string>
-    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"PIN குறியீடுகள் பொருந்தவில்லை"</string>
+    <string name="kg_invalid_puk" msgid="3638289409676051243">"சரியான PUK குறியீட்டை மீண்டும் உள்ளிடவும். தொடர் முயற்சிகள் சிம் ஐ நிரந்தரமாக முடக்கிவிடும்."</string>
+    <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"பின் குறியீடுகள் பொருந்தவில்லை"</string>
     <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"அதிகமான வடிவ முயற்சிகள்"</string>
     <string name="kg_login_instructions" msgid="1100551261265506448">"திறக்க, உங்கள் Google கணக்கு மூலம் உள்நுழையவும்."</string>
     <string name="kg_login_username_hint" msgid="5718534272070920364">"பயனர்பெயர் (மின்னஞ்சல்)"</string>
@@ -125,7 +125,7 @@
     <string name="kg_login_invalid_input" msgid="5754664119319872197">"தவறான பயனர்பெயர் அல்லது கடவுச்சொல்."</string>
     <string name="kg_login_account_recovery_hint" msgid="5690709132841752974">"உங்கள் பயனர்பெயர் அல்லது கடவுச்சொல்லை மறந்துவிட்டீர்களா?\n"<b>"google.com/accounts/recovery"</b>" ஐப் பார்வையிடவும்."</string>
     <string name="kg_login_checking_password" msgid="1052685197710252395">"கணக்கைச் சரிபார்க்கிறது…"</string>
-    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"உங்கள் PIN ஐ <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
+    <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"உங்கள் பின்னை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"உங்கள் கடவுச்சொல்லை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக உள்ளிட்டீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். \n\n<xliff:g id="NUMBER_1">%d</xliff:g> வினாடிகளில் மீண்டும் முயற்சிக்கவும்."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="1575557200627128949">"டேப்லெட்டைத் திறக்க <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக முயற்சித்துள்ளீர்கள். இன்னும் <xliff:g id="NUMBER_1">%d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, டேப்லெட்டானது ஆரம்பநிலைக்கு மீட்டமைக்கப்பட்டு, எல்லா பயனர் தரவையும் இழப்பீர்கள்."</string>
@@ -136,18 +136,18 @@
     <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"திறப்பதற்கான வடிவத்தை <xliff:g id="NUMBER_0">%d</xliff:g> முறை தவறாக வரைந்துள்ளீர்கள். மேலும் <xliff:g id="NUMBER_1">%d</xliff:g> தோல்வி முயற்சிகளுக்குப் பிறகு, மின்னஞ்சல் கணக்கைப் பயன்படுத்தி உங்கள் மொபைலைத் திறக்கக் கேட்கப்படுவீர்கள்.\n\n <xliff:g id="NUMBER_2">%d</xliff:g> வினாடிகள் கழித்து முயற்சிக்கவும்."</string>
     <string name="kg_text_message_separator" product="default" msgid="4160700433287233771">" — "</string>
     <string name="kg_reordering_delete_drop_target_text" msgid="7899202978204438708">"அகற்று"</string>
-    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM PIN குறியீடு தவறானது, உங்கள் சாதனத்தின் தடையை நீக்க, உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ள வேண்டும்."</string>
+    <string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"சிம் பின் குறியீடு தவறானது, உங்கள் சாதனத்தின் தடையை நீக்க, உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ள வேண்டும்."</string>
   <plurals name="kg_password_wrong_pin_code">
-    <item quantity="one" msgid="8134313997799638254">"SIM PIN குறியீடு தவறானது, உங்கள் சாதனத்தைத் திறக்க, உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளும் முன், மேலும் <xliff:g id="NUMBER">%d</xliff:g> முறை முயர்ச்சிக்கலாம்."</item>
-    <item quantity="other" msgid="2215723361575359486">"SIM PIN குறியீடு தவறானது, மேலும் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
+    <item quantity="one" msgid="8134313997799638254">"சிம் பின் குறியீடு தவறானது, உங்கள் சாதனத்தைத் திறக்க, உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளும் முன், மேலும் <xliff:g id="NUMBER">%d</xliff:g> முறை முயர்ச்சிக்கலாம்."</item>
+    <item quantity="other" msgid="2215723361575359486">"சிம் பின் குறியீடு தவறானது, மேலும் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
   </plurals>
-    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM பயன்பாட்டிற்கு உகந்தது அல்ல. உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளவும்."</string>
+    <string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"சிம் பயன்பாட்டிற்கு உகந்தது அல்ல. உங்கள் மொபைல் நிறுவனத்தைத் தொடர்புகொள்ளவும்."</string>
   <plurals name="kg_password_wrong_puk_code">
-    <item quantity="one" msgid="3256893607561060649">"SIM PUK குறியீடு தவறானது, சிம் நிரந்தரமாகப் பயன்படுத்த முடியாமல் போவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயர்ச்சிக்கலாம்."</item>
-    <item quantity="other" msgid="5477305226026342036">"SIM PUK குறியீடு தவறானது, SIM நிரந்தரமாகப் பயன்படுத்த முடியாமல் போவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
+    <item quantity="one" msgid="3256893607561060649">"சிம் PUK குறியீடு தவறானது, சிம் நிரந்தரமாகப் பயன்படுத்த முடியாமல் போவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயர்ச்சிக்கலாம்."</item>
+    <item quantity="other" msgid="5477305226026342036">"சிம் PUK குறியீடு தவறானது, சிம் நிரந்தரமாகப் பயன்படுத்த முடியாமல் போவதற்கு முன், நீங்கள் <xliff:g id="NUMBER">%d</xliff:g> முறை முயற்சிக்கலாம்."</item>
   </plurals>
-    <string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM PIN செயல்பாடு தோல்வி!"</string>
-    <string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM PUK செயல்பாடு தோல்வி!"</string>
+    <string name="kg_password_pin_failed" msgid="6268288093558031564">"சிம் பின் செயல்பாடு தோல்வி!"</string>
+    <string name="kg_password_puk_failed" msgid="2838824369502455984">"சிம் PUK செயல்பாடு தோல்வி!"</string>
     <string name="kg_pin_accepted" msgid="1448241673570020097">"குறியீடு ஏற்கப்பட்டது!"</string>
     <string name="keyguard_transport_prev_description" msgid="8229108430245669854">"முந்தைய டிராக்கிற்கான பொத்தான்"</string>
     <string name="keyguard_transport_next_description" msgid="4299258300283778305">"அடுத்த டிராக்கிற்கான பொத்தான்"</string>
diff --git a/packages/Keyguard/res/values/alias.xml b/packages/Keyguard/res/values/alias.xml
index e6657a1..09e9591 100644
--- a/packages/Keyguard/res/values/alias.xml
+++ b/packages/Keyguard/res/values/alias.xml
@@ -49,4 +49,6 @@
     <!-- Alias used to reference framework activity duration.  -->
     <item type="integer" name="config_activityDefaultDur">@*android:integer/config_activityDefaultDur</item>
 
+    <!-- Alias used to reference one of two possible layouts in keyguard.  -->
+    <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area</item>
 </resources>
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index 73b11f3..e0507a8 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -99,8 +99,7 @@
         // TODO: implement a shorter timeout once new PowerManager API is ready.
         // should be the equivalent to the old userActivity(EMERGENCY_CALL_TIMEOUT)
         mPowerManager.userActivity(SystemClock.uptimeMillis(), true);
-        if (TelephonyManager.getDefault().getCallState()
-                == TelephonyManager.CALL_STATE_OFFHOOK) {
+        if (mLockPatternUtils.isInCall()) {
             mLockPatternUtils.resumeCall();
         } else {
             final boolean bypassHandler = true;
@@ -115,7 +114,7 @@
 
     private void updateEmergencyCallButton(State simState, int phoneState) {
         boolean enabled = false;
-        if (phoneState == TelephonyManager.CALL_STATE_OFFHOOK) {
+        if (mLockPatternUtils.isInCall()) {
             enabled = true; // always show "return to call" if phone is off-hook
         } else if (mLockPatternUtils.isEmergencyCallCapable()) {
             boolean simLocked = KeyguardUpdateMonitor.getInstance(mContext).isSimLocked();
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 65c4ce2..0e01a27 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -15,38 +15,27 @@
  */
 package com.android.keyguard;
 
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.accounts.AccountManagerCallback;
-import android.accounts.AccountManagerFuture;
-import android.accounts.AuthenticatorException;
-import android.accounts.OperationCanceledException;
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ValueAnimator;
 import android.content.Context;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
-import android.os.Bundle;
 import android.os.CountDownTimer;
 import android.os.SystemClock;
-import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.animation.AccelerateInterpolator;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
-import android.widget.Button;
 import android.widget.LinearLayout;
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.internal.widget.LockPatternView;
 
-import java.io.IOException;
 import java.util.List;
 
 public class KeyguardPatternView extends LinearLayout implements KeyguardSecurityView,
@@ -70,9 +59,7 @@
     private CountDownTimer mCountdownTimer = null;
     private LockPatternUtils mLockPatternUtils;
     private LockPatternView mLockPatternView;
-    private Button mForgotPatternButton;
     private KeyguardSecurityCallback mCallback;
-    private boolean mEnableFallback;
 
     /**
      * Keeps track of the last time we poked the wake lock during dispatching of the touch event.
@@ -144,20 +131,8 @@
         // vibrate mode will be the same for the life of this screen
         mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
 
-        mForgotPatternButton = (Button) findViewById(R.id.forgot_password_button);
-        // note: some configurations don't have an emergency call area
-        if (mForgotPatternButton != null) {
-            mForgotPatternButton.setText(R.string.kg_forgot_pattern_button_text);
-            mForgotPatternButton.setOnClickListener(new OnClickListener() {
-                public void onClick(View v) {
-                    mCallback.showBackupSecurity();
-                }
-            });
-        }
-
         setFocusableInTouchMode(true);
 
-        maybeEnableFallback(mContext);
         mSecurityMessageDisplay = new KeyguardMessageArea.Helper(this);
         mEcaView = findViewById(R.id.keyguard_selector_fade_container);
         View bouncerFrameView = findViewById(R.id.keyguard_bouncer_frame);
@@ -169,24 +144,6 @@
         mHelpMessage = (KeyguardMessageArea) findViewById(R.id.keyguard_message_area);
     }
 
-    private void updateFooter(FooterMode mode) {
-        if (mForgotPatternButton == null) return; // no ECA? no footer
-
-        switch (mode) {
-            case Normal:
-                if (DEBUG) Log.d(TAG, "mode normal");
-                mForgotPatternButton.setVisibility(View.GONE);
-                break;
-            case ForgotLockPattern:
-                if (DEBUG) Log.d(TAG, "mode ForgotLockPattern");
-                mForgotPatternButton.setVisibility(View.VISIBLE);
-                break;
-            case VerifyUnlocked:
-                if (DEBUG) Log.d(TAG, "mode VerifyUnlocked");
-                mForgotPatternButton.setVisibility(View.GONE);
-        }
-    }
-
     @Override
     public boolean onTouchEvent(MotionEvent ev) {
         boolean result = super.onTouchEvent(ev);
@@ -217,18 +174,6 @@
         } else {
             displayDefaultSecurityMessage();
         }
-
-        // the footer depends on how many total attempts the user has failed
-        if (mCallback.isVerifyUnlockOnly()) {
-            updateFooter(FooterMode.VerifyUnlocked);
-        } else if (mEnableFallback &&
-                (mKeyguardUpdateMonitor.getFailedUnlockAttempts()
-                        >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT)) {
-            updateFooter(FooterMode.ForgotLockPattern);
-        } else {
-            updateFooter(FooterMode.Normal);
-        }
-
     }
 
     private void displayDefaultSecurityMessage() {
@@ -291,68 +236,10 @@
         }
     }
 
-    private void maybeEnableFallback(Context context) {
-        // Ask the account manager if we have an account that can be used as a
-        // fallback in case the user forgets his pattern.
-        AccountAnalyzer accountAnalyzer = new AccountAnalyzer(AccountManager.get(context));
-        accountAnalyzer.start();
-    }
-
-    private class AccountAnalyzer implements AccountManagerCallback<Bundle> {
-        private final AccountManager mAccountManager;
-        private final Account[] mAccounts;
-        private int mAccountIndex;
-
-        private AccountAnalyzer(AccountManager accountManager) {
-            mAccountManager = accountManager;
-            mAccounts = accountManager.getAccountsByTypeAsUser("com.google",
-                    new UserHandle(mLockPatternUtils.getCurrentUser()));
-        }
-
-        private void next() {
-            // if we are ready to enable the fallback or if we depleted the list of accounts
-            // then finish and get out
-            if (mEnableFallback || mAccountIndex >= mAccounts.length) {
-                return;
-            }
-
-            // lookup the confirmCredentials intent for the current account
-            mAccountManager.confirmCredentialsAsUser(mAccounts[mAccountIndex], null, null, this,
-                    null, new UserHandle(mLockPatternUtils.getCurrentUser()));
-        }
-
-        public void start() {
-            mEnableFallback = false;
-            mAccountIndex = 0;
-            next();
-        }
-
-        public void run(AccountManagerFuture<Bundle> future) {
-            try {
-                Bundle result = future.getResult();
-                if (result.getParcelable(AccountManager.KEY_INTENT) != null) {
-                    mEnableFallback = true;
-                }
-            } catch (OperationCanceledException e) {
-                // just skip the account if we are unable to query it
-            } catch (IOException e) {
-                // just skip the account if we are unable to query it
-            } catch (AuthenticatorException e) {
-                // just skip the account if we are unable to query it
-            } finally {
-                mAccountIndex++;
-                next();
-            }
-        }
-    }
-
     private void handleAttemptLockout(long elapsedRealtimeDeadline) {
         mLockPatternView.clearPattern();
         mLockPatternView.setEnabled(false);
         final long elapsedRealtime = SystemClock.elapsedRealtime();
-        if (mEnableFallback) {
-            updateFooter(FooterMode.ForgotLockPattern);
-        }
 
         mCountdownTimer = new CountDownTimer(elapsedRealtimeDeadline - elapsedRealtime, 1000) {
 
@@ -367,12 +254,6 @@
             public void onFinish() {
                 mLockPatternView.setEnabled(true);
                 displayDefaultSecurityMessage();
-                // TODO mUnlockIcon.setVisibility(View.VISIBLE);
-                if (mEnableFallback) {
-                    updateFooter(FooterMode.ForgotLockPattern);
-                } else {
-                    updateFooter(FooterMode.Normal);
-                }
             }
 
         }.start();
@@ -489,13 +370,6 @@
             // Also animate the Emergency call
             mAppearAnimationUtils.createAnimation(mEcaView, delay, duration, startTranslationY,
             interpolator, null);
-
-            // And the forgot pattern button
-            if (mForgotPatternButton != null
-                    && mForgotPatternButton.getVisibility() == View.VISIBLE) {
-                mAppearAnimationUtils.createAnimation(mForgotPatternButton, delay, duration,
-                        startTranslationY, interpolator, null);
-            }
         }
         animator.start();
         mLockPatternView.invalidate();
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
index a0fab42..8898f9e 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
@@ -128,16 +128,19 @@
                 getResources().getDimensionPixelSize(R.dimen.widget_label_font_size));
     }
 
-    protected void refresh() {
-        AlarmManager.AlarmClockInfo nextAlarm = mLockPatternUtils.getNextAlarm();
-        Patterns.update(mContext, nextAlarm != null);
-
+    public void refreshTime() {
         mDateView.setFormat24Hour(Patterns.dateView);
         mDateView.setFormat12Hour(Patterns.dateView);
 
         mClockView.setFormat12Hour(Patterns.clockView12);
         mClockView.setFormat24Hour(Patterns.clockView24);
+    }
 
+    private void refresh() {
+        AlarmManager.AlarmClockInfo nextAlarm = mLockPatternUtils.getNextAlarm();
+        Patterns.update(mContext, nextAlarm != null);
+
+        refreshTime();
         refreshAlarmStatus(nextAlarm);
     }
 
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
index dc12cc7..1c6dc2c 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -367,8 +367,7 @@
 
             if (Intent.ACTION_TIME_TICK.equals(action)
                     || Intent.ACTION_TIME_CHANGED.equals(action)
-                    || Intent.ACTION_TIMEZONE_CHANGED.equals(action)
-                    || AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) {
+                    || Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
                 mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
             } else if (TelephonyIntents.SPN_STRINGS_UPDATED_ACTION.equals(action)) {
                 mTelephonyPlmn = getTelephonyPlmnFrom(intent);
@@ -395,20 +394,11 @@
             } else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) {
                 String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
                 mHandler.sendMessage(mHandler.obtainMessage(MSG_PHONE_STATE_CHANGED, state));
-            } else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED
-                    .equals(action)) {
-                mHandler.sendEmptyMessage(MSG_DPM_STATE_CHANGED);
             } else if (Intent.ACTION_USER_REMOVED.equals(action)) {
                 mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_REMOVED,
                        intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0), 0));
             } else if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
                 dispatchBootCompleted();
-            } else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) {
-                mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 1,
-                        getSendingUserId()));
-            } else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) {
-                mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0,
-                        getSendingUserId()));
             }
         }
     };
@@ -417,9 +407,20 @@
 
         public void onReceive(Context context, Intent intent) {
             final String action = intent.getAction();
-            if (Intent.ACTION_USER_INFO_CHANGED.equals(action)) {
+            if (AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) {
+                mHandler.sendEmptyMessage(MSG_TIME_UPDATE);
+            } else if (Intent.ACTION_USER_INFO_CHANGED.equals(action)) {
                 mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED,
                         intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0));
+            } else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) {
+                mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 1,
+                        getSendingUserId()));
+            } else if (ACTION_FACE_UNLOCK_STOPPED.equals(action)) {
+                mHandler.sendMessage(mHandler.obtainMessage(MSG_FACE_UNLOCK_STATE_CHANGED, 0,
+                        getSendingUserId()));
+            } else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED
+                    .equals(action)) {
+                mHandler.sendEmptyMessage(MSG_DPM_STATE_CHANGED);
             }
         }
     };
@@ -618,11 +619,7 @@
         filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
         filter.addAction(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION);
         filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
-        filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
         filter.addAction(Intent.ACTION_USER_REMOVED);
-        filter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
-        filter.addAction(ACTION_FACE_UNLOCK_STARTED);
-        filter.addAction(ACTION_FACE_UNLOCK_STOPPED);
         context.registerReceiver(mBroadcastReceiver, filter);
 
         final IntentFilter bootCompleteFilter = new IntentFilter();
@@ -630,8 +627,13 @@
         bootCompleteFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
         context.registerReceiver(mBroadcastReceiver, bootCompleteFilter);
 
-        final IntentFilter userInfoFilter = new IntentFilter(Intent.ACTION_USER_INFO_CHANGED);
-        context.registerReceiverAsUser(mBroadcastAllReceiver, UserHandle.ALL, userInfoFilter,
+        final IntentFilter allUserFilter = new IntentFilter();
+        allUserFilter.addAction(Intent.ACTION_USER_INFO_CHANGED);
+        allUserFilter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED);
+        allUserFilter.addAction(ACTION_FACE_UNLOCK_STARTED);
+        allUserFilter.addAction(ACTION_FACE_UNLOCK_STOPPED);
+        allUserFilter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
+        context.registerReceiverAsUser(mBroadcastAllReceiver, UserHandle.ALL, allUserFilter,
                 null, null);
 
         try {
@@ -646,7 +648,7 @@
                         @Override
                         public void onUserSwitchComplete(int newUserId) throws RemoteException {
                             mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_SWITCH_COMPLETE,
-                                    newUserId));
+                                    newUserId, 0));
                             mSwitchingUser = false;
                         }
                     });
diff --git a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
index 2d20b02..d539856 100644
--- a/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
+++ b/packages/Keyguard/src/com/android/keyguard/NumPadKey.java
@@ -152,6 +152,11 @@
         mKlondikeText.layout(left, top, left + mKlondikeText.getMeasuredWidth(), bottom);
     }
 
+    @Override
+    public boolean hasOverlappingRendering() {
+        return false;
+    }
+
     // Cause a VIRTUAL_KEY vibration
     public void doHapticKeyClick() {
         if (mEnableHaptics) {
diff --git a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
index f3ba3a7..6497f46 100644
--- a/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
+++ b/packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
@@ -145,6 +145,11 @@
         }
     }
 
+    @Override
+    public boolean hasOverlappingRendering() {
+        return false;
+    }
+
     private Rect getCharBounds() {
         float textHeight = mTextHeightRaw * getResources().getDisplayMetrics().scaledDensity;
         mDrawPaint.setTextSize(textHeight);
diff --git a/packages/PrintSpooler/Android.mk b/packages/PrintSpooler/Android.mk
index 3fbd4d8..27d1b23 100644
--- a/packages/PrintSpooler/Android.mk
+++ b/packages/PrintSpooler/Android.mk
@@ -19,9 +19,15 @@
 LOCAL_MODULE_TAGS := optional
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_SRC_FILES += \
+        src/com/android/printspooler/renderer/IPdfRenderer.aidl \
+        src/com/android/printspooler/renderer/IPdfEditor.aidl
 
 LOCAL_PACKAGE_NAME := PrintSpooler
 
+LOCAL_JNI_SHARED_LIBRARIES := libprintspooler_jni
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v7-recyclerview
 
 include $(BUILD_PACKAGE)
+
+include $(call all-makefiles-under, $(LOCAL_PATH))
\ No newline at end of file
diff --git a/packages/PrintSpooler/AndroidManifest.xml b/packages/PrintSpooler/AndroidManifest.xml
index 540a2f3..adff596 100644
--- a/packages/PrintSpooler/AndroidManifest.xml
+++ b/packages/PrintSpooler/AndroidManifest.xml
@@ -53,6 +53,11 @@
             android:permission="android.permission.BIND_PRINT_SPOOLER_SERVICE">
         </service>
 
+        <service
+            android:name=".renderer.PdfManipulationService"
+            android:isolatedProcess="true">
+        </service>
+
         <activity
             android:name=".ui.PrintActivity"
             android:configChanges="orientation|screenSize"
diff --git a/packages/PrintSpooler/jni/Android.mk b/packages/PrintSpooler/jni/Android.mk
new file mode 100644
index 0000000..fe7d06b
--- /dev/null
+++ b/packages/PrintSpooler/jni/Android.mk
@@ -0,0 +1,19 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+    com_android_printspooler_util_BitmapSerializeUtils.cpp \
+
+LOCAL_C_INCLUDES += \
+    $(JNI_H_INCLUDE)
+
+LOCAL_SHARED_LIBRARIES := \
+    libnativehelper \
+    libjnigraphics \
+    liblog
+
+LOCAL_MODULE := libprintspooler_jni
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/PrintSpooler/jni/com_android_printspooler_util_BitmapSerializeUtils.cpp b/packages/PrintSpooler/jni/com_android_printspooler_util_BitmapSerializeUtils.cpp
new file mode 100644
index 0000000..57281c8
--- /dev/null
+++ b/packages/PrintSpooler/jni/com_android_printspooler_util_BitmapSerializeUtils.cpp
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "BitmapSerializeUtils"
+
+#include <jni.h>
+#include <JNIHelp.h>
+
+#include <android/bitmap.h>
+#include <android/log.h>
+
+namespace android {
+
+#define RGBA_8888_COLOR_DEPTH 4
+
+static bool writeAllBytes(const int fd, void* buffer, const size_t byteCount) {
+    char* writeBuffer = static_cast<char*>(buffer);
+    size_t remainingBytes = byteCount;
+    while (remainingBytes > 0) {
+        ssize_t writtenByteCount = write(fd, writeBuffer, remainingBytes);
+        if (writtenByteCount == -1) {
+            if (errno == EINTR) {
+                continue;
+            }
+            __android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
+                    "Error writing to buffer: %d", errno);
+            return false;
+        }
+        remainingBytes -= writtenByteCount;
+        writeBuffer += writtenByteCount;
+    }
+    return true;
+}
+
+static bool readAllBytes(const int fd, void* buffer, const size_t byteCount) {
+    char* readBuffer = static_cast<char*>(buffer);
+    size_t remainingBytes = byteCount;
+    while (remainingBytes > 0) {
+        ssize_t readByteCount = read(fd, readBuffer, remainingBytes);
+        if (readByteCount == -1) {
+            if (errno == EINTR) {
+                continue;
+            }
+            __android_log_print(ANDROID_LOG_ERROR, LOG_TAG,
+                    "Error reading from buffer: %d", errno);
+            return false;
+        }
+        remainingBytes -= readByteCount;
+        readBuffer += readByteCount;
+    }
+    return true;
+}
+
+static void throwException(JNIEnv* env, const char* className, const char* message) {
+    jclass exceptionClass = env->FindClass(className);
+    env->ThrowNew(exceptionClass, message);
+}
+
+static void throwIllegalStateException(JNIEnv* env, char *message) {
+    const char* className = "java/lang/IllegalStateException";
+    throwException(env, className, message);
+}
+
+static void throwIllegalArgumentException(JNIEnv* env, char* message) {
+    const char* className = "java/lang/IllegalArgumentException";
+    throwException(env, className, message);
+}
+
+static void readBitmapPixels(JNIEnv* env, jclass clazz, jobject jbitmap, jint fd) {
+    // Read the info.
+    AndroidBitmapInfo readInfo;
+    bool read = readAllBytes(fd, (void*) &readInfo, sizeof(AndroidBitmapInfo));
+    if (!read) {
+        throwIllegalStateException(env, (char*) "Cannot read bitmap info");
+        return;
+    }
+
+    // Get the info of the target bitmap.
+    AndroidBitmapInfo targetInfo;
+    int result = AndroidBitmap_getInfo(env, jbitmap, &targetInfo);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot get bitmap info");
+        return;
+    }
+
+    // Enforce we can reuse the bitmap.
+    if (readInfo.width != targetInfo.width || readInfo.height != targetInfo.height
+            || readInfo.stride != targetInfo.stride || readInfo.format != targetInfo.format
+            || readInfo.flags != targetInfo.flags) {
+        throwIllegalArgumentException(env, (char*) "Cannot reuse bitmap");
+        return;
+    }
+
+    // Lock the pixels.
+    void* pixels;
+    result = AndroidBitmap_lockPixels(env, jbitmap, &pixels);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot lock bitmap pixels");
+        return;
+    }
+
+    // Read the pixels.
+    size_t byteCount = readInfo.stride * readInfo.height;
+    read = readAllBytes(fd, (void*) pixels, byteCount);
+    if (!read) {
+        throwIllegalStateException(env, (char*) "Cannot read bitmap pixels");
+        return;
+    }
+
+    // Unlock the pixels.
+    result = AndroidBitmap_unlockPixels(env, jbitmap);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot unlock bitmap pixels");
+    }
+}
+
+static void writeBitmapPixels(JNIEnv* env, jclass clazz, jobject jbitmap, jint fd) {
+    // Get the info.
+    AndroidBitmapInfo info;
+    int result = AndroidBitmap_getInfo(env, jbitmap, &info);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot get bitmap info");
+        return;
+    }
+
+    // Write the info.
+    bool written = writeAllBytes(fd, (void*) &info, sizeof(AndroidBitmapInfo));
+    if (!written) {
+        throwIllegalStateException(env, (char*) "Cannot write bitmap info");
+        return;
+    }
+
+    // Lock the pixels.
+    void* pixels;
+    result = AndroidBitmap_lockPixels(env, jbitmap, &pixels);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot lock bitmap pixels");
+        return;
+    }
+
+    // Write the pixels.
+    size_t byteCount = info.stride * info.height;
+    written = writeAllBytes(fd, (void*) pixels, byteCount);
+    if (!written) {
+        throwIllegalStateException(env, (char*) "Cannot write bitmap pixels");
+        return;
+    }
+
+    // Unlock the pixels.
+    result = AndroidBitmap_unlockPixels(env, jbitmap);
+    if (result < 0) {
+        throwIllegalStateException(env, (char*) "Cannot unlock bitmap pixels");
+    }
+}
+
+static JNINativeMethod sMethods[] = {
+    {"nativeReadBitmapPixels", "(Landroid/graphics/Bitmap;I)V", (void *) readBitmapPixels},
+    {"nativeWriteBitmapPixels", "(Landroid/graphics/Bitmap;I)V", (void *) writeBitmapPixels},
+};
+
+int register_com_android_printspooler_util_BitmapSerializeUtils(JNIEnv* env) {
+    return jniRegisterNativeMethods(env, "com/android/printspooler/util/BitmapSerializeUtils",
+        sMethods, NELEM(sMethods));
+}
+
+}
+
+jint JNI_OnLoad(JavaVM* jvm, void*) {
+    JNIEnv *env = NULL;
+    if (jvm->GetEnv((void**) &env, JNI_VERSION_1_6)) {
+        return JNI_ERR;
+    }
+
+    if (android::register_com_android_printspooler_util_BitmapSerializeUtils(env) == -1) {
+        return JNI_ERR;
+    }
+
+    return JNI_VERSION_1_6;
+}
diff --git a/packages/PrintSpooler/res/layout/preview_page.xml b/packages/PrintSpooler/res/layout/preview_page.xml
index df9848b..edce289 100644
--- a/packages/PrintSpooler/res/layout/preview_page.xml
+++ b/packages/PrintSpooler/res/layout/preview_page.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.printspooler.widget.PreviewPageFrame xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/preview_page"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
@@ -33,7 +33,8 @@
         android:layout_width="fill_parent"
         android:layout_height="@dimen/preview_page_footer_height"
         android:background="@color/material_grey_500"
-        android:orientation="horizontal">
+        android:orientation="horizontal"
+        android:duplicateParentState="true">
 
         <TextView
             android:id="@+id/page_number"
@@ -51,9 +52,10 @@
             android:layout_marginRight="8dip"
             android:layout_alignParentEnd="true"
             android:layout_centerVertical="true"
-            android:background="@drawable/page_selector_background">
+            android:background="@drawable/page_selector_background"
+            android:duplicateParentState="true">
         </ImageView>
 
     </RelativeLayout>
 
-</LinearLayout>
+</com.android.printspooler.widget.PreviewPageFrame>
diff --git a/packages/PrintSpooler/res/layout/preview_page_loading.xml b/packages/PrintSpooler/res/layout/preview_page_loading.xml
new file mode 100644
index 0000000..1af3a17
--- /dev/null
+++ b/packages/PrintSpooler/res/layout/preview_page_loading.xml
@@ -0,0 +1,32 @@
+<?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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="36dip"
+        android:layout_gravity="center"
+        android:src="@drawable/ic_grayedout_printer"
+        android:contentDescription="@null"
+        android:scaleType="centerInside"
+        android:adjustViewBounds="true">
+    </ImageView>
+
+</FrameLayout>
diff --git a/packages/PrintSpooler/res/layout/print_activity.xml b/packages/PrintSpooler/res/layout/print_activity.xml
index 761d58a..6b8aa47 100644
--- a/packages/PrintSpooler/res/layout/print_activity.xml
+++ b/packages/PrintSpooler/res/layout/print_activity.xml
@@ -33,7 +33,7 @@
 
         <Spinner
             android:id="@+id/destination_spinner"
-            android:layout_width="wrap_content"
+            android:layout_width="@dimen/preview_destination_spinner_width"
             android:layout_height="wrap_content"
             android:layout_marginTop="4dip"
             android:dropDownWidth="wrap_content"
@@ -98,7 +98,7 @@
         android:id="@+id/print_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="16dip"
+        android:layout_marginStart="16dip"
         android:elevation="@dimen/preview_controls_elevation"
         android:background="@drawable/print_button">
     </ImageButton>
diff --git a/packages/PrintSpooler/res/values-land/constants.xml b/packages/PrintSpooler/res/values-land/constants.xml
index 6cf9754b5..84fc050 100644
--- a/packages/PrintSpooler/res/values-land/constants.xml
+++ b/packages/PrintSpooler/res/values-land/constants.xml
@@ -16,7 +16,7 @@
 
 <resources>
 
-    <integer name="preview_page_per_row_count">2</integer>
+    <integer name="preview_page_per_row_count">4</integer>
 
     <integer name="print_option_column_count">3</integer>
 
diff --git a/packages/PrintSpooler/res/values-sw600dp-land/constants.xml b/packages/PrintSpooler/res/values-sw600dp-land/constants.xml
index f60d8e4..f7f8a18 100644
--- a/packages/PrintSpooler/res/values-sw600dp-land/constants.xml
+++ b/packages/PrintSpooler/res/values-sw600dp-land/constants.xml
@@ -17,6 +17,9 @@
 <resources>
 
     <integer name="print_option_column_count">6</integer>
+
     <integer name="preview_page_per_row_count">4</integer>
 
+    <dimen name="preview_destination_spinner_width">256dip</dimen>
+
 </resources>
diff --git a/packages/PrintSpooler/res/values/constants.xml b/packages/PrintSpooler/res/values/constants.xml
index b4e4777..357d3e1 100644
--- a/packages/PrintSpooler/res/values/constants.xml
+++ b/packages/PrintSpooler/res/values/constants.xml
@@ -45,4 +45,6 @@
     <dimen name="preview_page_footer_height">32dip</dimen>
     <dimen name="preview_page_min_width">128dip</dimen>
 
+    <dimen name="preview_destination_spinner_width">192dip</dimen>
+
 </resources>
diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml
index 5b7fda3..ab633ea 100644
--- a/packages/PrintSpooler/res/values/strings.xml
+++ b/packages/PrintSpooler/res/values/strings.xml
@@ -76,11 +76,36 @@
     <!-- Title for the print dialog announced to the user for accessibility. Not shown in the UI. [CHAR LIMIT=none] -->
     <string name="print_dialog">Print dialog</string>
 
-
-    <!-- Template for the message that shows the current page out of the total number of pages -->
+    <!-- Template for the message that shows the current page out of the total number of pages [CHAR LIMIT=none] -->
     <string name="current_page_template"><xliff:g id="current_page">%1$d</xliff:g>
         /<xliff:g id="page_count">%2$d</xliff:g></string>
 
+    <!-- Description of the current page - spoken to the user [CHAR LIMIT=none] -->
+    <string name="page_description_template">Page <xliff:g id="current_page" example="1">%1$d</xliff:g>
+        of <xliff:g id="page_count" example="100">%2$d</xliff:g></string>
+
+    <!-- Template for the message to announce the print options summary - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="summary_template">Summary, copies <xliff:g id="copies" example="1">%1$s</xliff:g>,
+        paper size <xliff:g id="paper_size" example="A4">%2$s</xliff:g></string>
+
+    <!-- Description for the handle to expand all print options - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="expand_handle">Expand handle</string>
+
+    <!-- Description for the handle to collapse all print options - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="collapse_handle">Collapse handle</string>
+
+    <!-- Description for the print button - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="print_button">Print</string>
+
+    <!-- Description for the save to PDF button - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="savetopdf_button">Save to PDF</string>
+
+    <!-- Message to announce print options are expanded - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="print_options_expanded">Print options expanded</string>
+
+    <!-- Message to announce print options are collapsed - spoken to the user. [CHAR LIMIT=none] -->
+    <string name="print_options_collapsed">Print options collapsed</string>
+
     <!-- Select printer activity -->
 
     <!-- Title for the share action bar menu item. [CHAR LIMIT=20] -->
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
index c3ddad9..1d8261b 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java
@@ -17,23 +17,30 @@
 package com.android.printspooler.model;
 
 import android.app.ActivityManager;
+import android.content.ComponentName;
 import android.content.Context;
-import android.content.res.Configuration;
+import android.content.Intent;
+import android.content.ServiceConnection;
 import android.graphics.Bitmap;
 import android.graphics.Color;
-import android.graphics.Matrix;
-import android.graphics.Rect;
 import android.graphics.drawable.BitmapDrawable;
-import android.graphics.pdf.PdfRenderer;
 import android.os.AsyncTask;
+import android.os.IBinder;
 import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.PrintAttributes;
 import android.print.PrintAttributes.MediaSize;
 import android.print.PrintAttributes.Margins;
 import android.print.PrintDocumentInfo;
 import android.util.ArrayMap;
 import android.util.Log;
 import android.view.View;
+import com.android.internal.annotations.GuardedBy;
+import com.android.printspooler.renderer.IPdfRenderer;
+import com.android.printspooler.renderer.PdfManipulationService;
+import com.android.printspooler.util.BitmapSerializeUtils;
 import dalvik.system.CloseGuard;
+import libcore.io.IoUtils;
 
 import java.io.IOException;
 import java.util.Iterator;
@@ -55,9 +62,6 @@
 
     private static final int BYTES_PER_MEGABYTE = 1048576;
 
-    private static final int MILS_PER_INCH = 1000;
-    private static final int POINTS_IN_INCH = 72;
-
     private final CloseGuard mCloseGuard = CloseGuard.get();
 
     private final ArrayMap<Integer, PageContentProvider> mPageContentProviders =
@@ -115,7 +119,6 @@
         if (DEBUG) {
             Log.i(LOG_TAG, "STATE_DESTROYED");
         }
-        throwIfNotClosed();
         doDestroy();
     }
 
@@ -351,15 +354,14 @@
     public static final class RenderSpec {
         final int bitmapWidth;
         final int bitmapHeight;
-        final MediaSize mediaSize;
-        final Margins minMargins;
+        final PrintAttributes printAttributes = new PrintAttributes.Builder().build();
 
         public RenderSpec(int bitmapWidth, int bitmapHeight,
                 MediaSize mediaSize, Margins minMargins) {
             this.bitmapWidth = bitmapWidth;
             this.bitmapHeight = bitmapHeight;
-            this.mediaSize = mediaSize;
-            this.minMargins = minMargins;
+            printAttributes.setMediaSize(mediaSize);
+            printAttributes.setMinMargins(minMargins);
         }
 
         @Override
@@ -380,18 +382,11 @@
             if (bitmapWidth != other.bitmapWidth) {
                 return false;
             }
-            if (mediaSize != null) {
-                if (!mediaSize.equals(other.mediaSize)) {
+            if (printAttributes != null) {
+                if (!printAttributes.equals(other.printAttributes)) {
                     return false;
                 }
-            } else if (other.mediaSize != null) {
-                return false;
-            }
-            if (minMargins != null) {
-                if (!minMargins.equals(other.minMargins)) {
-                    return false;
-                }
-            } else if (other.minMargins != null) {
+            } else if (other.printAttributes != null) {
                 return false;
             }
             return true;
@@ -407,8 +402,7 @@
         public int hashCode() {
             int result = bitmapWidth;
             result = 31 * result + bitmapHeight;
-            result = 31 * result + (mediaSize != null ? mediaSize.hashCode() : 0);
-            result = 31 * result + (minMargins != null ? minMargins.hashCode() : 0);
+            result = 31 * result + (printAttributes != null ? printAttributes.hashCode() : 0);
             return result;
         }
     }
@@ -440,13 +434,11 @@
         }
     }
 
-    private static int pointsFromMils(int mils) {
-        return (int) (((float) mils / MILS_PER_INCH) * POINTS_IN_INCH);
-    }
-
-    private static class AsyncRenderer {
+    private static final class AsyncRenderer implements ServiceConnection {
         private static final int MALFORMED_PDF_FILE_ERROR = -2;
 
+        private final Object mLock = new Object();
+
         private final Context mContext;
 
         private final PageContentLruCache mPageContentCache;
@@ -457,8 +449,10 @@
 
         private int mPageCount = PrintDocumentInfo.PAGE_COUNT_UNKNOWN;
 
-        // Accessed only by the executor thread.
-        private PdfRenderer mRenderer;
+        @GuardedBy("mLock")
+        private IPdfRenderer mRenderer;
+
+        private boolean mBoundToService;
 
         public AsyncRenderer(Context context, OnMalformedPdfFileListener malformedPdfFileListener) {
             mContext = context;
@@ -470,6 +464,22 @@
             mPageContentCache = new PageContentLruCache(cacheSizeInBytes);
         }
 
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            mBoundToService = true;
+            synchronized (mLock) {
+                mRenderer = IPdfRenderer.Stub.asInterface(service);
+                mLock.notifyAll();
+            }
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            synchronized (mLock) {
+                mRenderer = null;
+            }
+        }
+
         public void open(final ParcelFileDescriptor source, final Runnable callback) {
             // Opening a new document invalidates the cache as it has pages
             // from the last document. We keep the cache even when the document
@@ -479,13 +489,32 @@
 
             new AsyncTask<Void, Void, Integer>() {
                 @Override
+                protected void onPreExecute() {
+                    Intent intent = new Intent(PdfManipulationService.ACTION_GET_RENDERER);
+                    intent.setClass(mContext, PdfManipulationService.class);
+                    mContext.bindService(intent, AsyncRenderer.this, Context.BIND_AUTO_CREATE);
+                }
+
+                @Override
                 protected Integer doInBackground(Void... params) {
-                    try {
-                        mRenderer = new PdfRenderer(source);
-                        return mRenderer.getPageCount();
-                    } catch (IOException ioe) {
-                        Log.e(LOG_TAG, "Cannot open PDF document");
-                        return MALFORMED_PDF_FILE_ERROR;
+                    synchronized (mLock) {
+                        while (mRenderer == null) {
+                            try {
+                                mLock.wait();
+                            } catch (InterruptedException ie) {
+                                /* ignore */
+                            }
+                        }
+                        try {
+                            return mRenderer.openDocument(source);
+                        } catch (RemoteException re) {
+                            Log.e(LOG_TAG, "Cannot open PDF document");
+                            return MALFORMED_PDF_FILE_ERROR;
+                        } finally {
+                            // Close the fd as we passed it to another process
+                            // which took ownership.
+                            IoUtils.closeQuietly(source);
+                        }
                     }
                 }
 
@@ -510,7 +539,13 @@
             new AsyncTask<Void, Void, Void>() {
                 @Override
                 protected Void doInBackground(Void... params) {
-                    mRenderer.close();
+                    synchronized (mLock) {
+                        try {
+                            mRenderer.closeDocument();
+                        } catch (RemoteException re) {
+                            /* ignore */
+                        }
+                    }
                     return null;
                 }
 
@@ -521,12 +556,26 @@
                         callback.run();
                     }
                 }
-            }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+            }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
         }
 
         public void destroy() {
-            mPageContentCache.invalidate();
-            mPageContentCache.clear();
+            new AsyncTask<Void, Void, Void>() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    return null;
+                }
+
+                @Override
+                public void onPostExecute(Void result) {
+                    if (mBoundToService) {
+                        mBoundToService = false;
+                        mContext.unbindService(AsyncRenderer.this);
+                    }
+                    mPageContentCache.invalidate();
+                    mPageContentCache.clear();
+                }
+            }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
         }
 
         public void startPreload(int firstShownPage, int lastShownPage, RenderSpec renderSpec) {
@@ -752,62 +801,28 @@
                     return mRenderedPage;
                 }
 
-                PdfRenderer.Page page = mRenderer.openPage(mPageIndex);
-
-                if (isCancelled()) {
-                    page.close();
-                    return mRenderedPage;
-                }
-
                 Bitmap bitmap = mRenderedPage.content.getBitmap();
 
-                final int srcWidthPts = page.getWidth();
-                final int srcHeightPts = page.getHeight();
+                ParcelFileDescriptor[] pipe = null;
+                try {
+                    pipe = ParcelFileDescriptor.createPipe();
+                    ParcelFileDescriptor source = pipe[0];
+                    ParcelFileDescriptor destination = pipe[1];
 
-                final int dstWidthPts = pointsFromMils(mRenderSpec.mediaSize.getWidthMils());
-                final int dstHeightPts = pointsFromMils(mRenderSpec.mediaSize.getHeightMils());
+                    mRenderer.renderPage(mPageIndex, bitmap.getWidth(), bitmap.getHeight(),
+                            mRenderSpec.printAttributes, destination);
 
-                final boolean scaleContent = mRenderer.shouldScaleForPrinting();
-                final boolean contentLandscape = !mRenderSpec.mediaSize.isPortrait();
+                    // We passed the file descriptor to the other side which took
+                    // ownership, so close our copy for the write to complete.
+                    destination.close();
 
-                final float displayScale;
-                Matrix matrix = new Matrix();
-
-                if (scaleContent) {
-                    displayScale = Math.min((float) bitmap.getWidth() / srcWidthPts,
-                            (float) bitmap.getHeight() / srcHeightPts);
-                } else {
-                    if (contentLandscape) {
-                        displayScale = (float) bitmap.getHeight() / dstHeightPts;
-                    } else {
-                        displayScale = (float) bitmap.getWidth() / dstWidthPts;
-                    }
+                    BitmapSerializeUtils.readBitmapPixels(bitmap, source);
+                } catch (IOException|RemoteException e) {
+                    Log.e(LOG_TAG, "Error rendering page:" + mPageIndex, e);
+                } finally {
+                    IoUtils.closeQuietly(pipe[0]);
+                    IoUtils.closeQuietly(pipe[1]);
                 }
-                matrix.postScale(displayScale, displayScale);
-
-                Configuration configuration = mContext.getResources().getConfiguration();
-                if (configuration.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
-                    matrix.postTranslate(bitmap.getWidth() - srcWidthPts * displayScale, 0);
-                }
-
-                final int paddingLeftPts = pointsFromMils(mRenderSpec.minMargins.getLeftMils());
-                final int paddingTopPts = pointsFromMils(mRenderSpec.minMargins.getTopMils());
-                final int paddingRightPts = pointsFromMils(mRenderSpec.minMargins.getRightMils());
-                final int paddingBottomPts = pointsFromMils(mRenderSpec.minMargins.getBottomMils());
-
-                Rect clip = new Rect();
-                clip.left = (int) (paddingLeftPts * displayScale);
-                clip.top = (int) (paddingTopPts * displayScale);
-                clip.right = (int) (bitmap.getWidth() - paddingRightPts * displayScale);
-                clip.bottom = (int) (bitmap.getHeight() - paddingBottomPts * displayScale);
-
-                if (DEBUG) {
-                    Log.i(LOG_TAG, "Rendering page:" + mPageIndex + " of " + mPageCount);
-                }
-
-                page.render(bitmap, clip, matrix, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
-
-                page.close();
 
                 return mRenderedPage;
             }
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
index d1aa33b..1e7a011 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/model/RemotePrintDocument.java
@@ -55,7 +55,7 @@
 public final class RemotePrintDocument {
     private static final String LOG_TAG = "RemotePrintDocument";
 
-    private static final boolean DEBUG = true;
+    private static final boolean DEBUG = false;
 
     private static final int STATE_INITIAL = 0;
     private static final int STATE_STARTED = 1;
@@ -317,6 +317,11 @@
         return mState == STATE_FAILED;
     }
 
+    public boolean hasLaidOutPages() {
+        return mDocumentInfo.info != null
+                && mDocumentInfo.info.getPageCount() > 0;
+    }
+
     public void clearUpdateError() {
         if (!hasUpdateError()) {
             throw new IllegalStateException("No update error to clear");
diff --git a/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfEditor.aidl b/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfEditor.aidl
new file mode 100644
index 0000000..b450ccb
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfEditor.aidl
@@ -0,0 +1,30 @@
+/*
+ * 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.printspooler.renderer;
+
+import android.os.ParcelFileDescriptor;
+import android.print.PageRange;
+
+/**
+ * Interface for communication with a remote pdf editor.
+ */
+interface IPdfEditor {
+    int openDocument(in ParcelFileDescriptor source);
+    void removePages(in PageRange[] pages);
+    void write(in ParcelFileDescriptor destination);
+    void closeDocument();
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfRenderer.aidl b/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfRenderer.aidl
new file mode 100644
index 0000000..8e595d7
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/renderer/IPdfRenderer.aidl
@@ -0,0 +1,32 @@
+/*
+ * 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.printspooler.renderer;
+
+import android.graphics.Rect;
+import android.os.ParcelFileDescriptor;
+import android.print.PageRange;
+import android.print.PrintAttributes;
+
+/**
+ * Interface for communication with a remote pdf renderer.
+ */
+interface IPdfRenderer {
+    int openDocument(in ParcelFileDescriptor source);
+    oneway void renderPage(int pageIndex, int bitmapWidth, int bitmapHeight,
+        in PrintAttributes attributes, in ParcelFileDescriptor destination);
+    oneway void closeDocument();
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java b/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java
new file mode 100644
index 0000000..62716b2
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java
@@ -0,0 +1,291 @@
+/*
+ * 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.printspooler.renderer;
+
+import android.app.Service;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.Color;
+import android.graphics.Matrix;
+import android.graphics.Rect;
+import android.graphics.pdf.PdfEditor;
+import android.graphics.pdf.PdfRenderer;
+import android.os.IBinder;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.PageRange;
+import android.print.PrintAttributes;
+import android.print.PrintAttributes.Margins;
+import android.util.Log;
+import android.view.View;
+import com.android.printspooler.util.PageRangeUtils;
+import libcore.io.IoUtils;
+import com.android.printspooler.util.BitmapSerializeUtils;
+import java.io.IOException;
+
+/**
+ * Service for manipulation of PDF documents in an isolated process.
+ */
+public final class PdfManipulationService extends Service {
+    public static final String ACTION_GET_RENDERER =
+            "com.android.printspooler.renderer.ACTION_GET_RENDERER";
+    public static final String ACTION_GET_EDITOR =
+            "com.android.printspooler.renderer.ACTION_GET_EDITOR";
+
+    private static final String LOG_TAG = "PdfManipulationService";
+    private static final boolean DEBUG = false;
+
+    private static final int MILS_PER_INCH = 1000;
+    private static final int POINTS_IN_INCH = 72;
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        String action = intent.getAction();
+        switch (action) {
+            case ACTION_GET_RENDERER: {
+                return new PdfRendererImpl();
+            }
+            case ACTION_GET_EDITOR: {
+                return new PdfEditorImpl();
+            }
+            default: {
+                throw new IllegalArgumentException("Invalid intent action:" + action);
+            }
+        }
+    }
+
+    private final class PdfRendererImpl extends IPdfRenderer.Stub {
+        private final Object mLock = new Object();
+
+        private Bitmap mBitmap;
+        private PdfRenderer mRenderer;
+
+        @Override
+        public int openDocument(ParcelFileDescriptor source) throws RemoteException {
+            synchronized (mLock) {
+                try {
+                    throwIfOpened();
+                    if (DEBUG) {
+                        Log.i(LOG_TAG, "openDocument()");
+                    }
+                    mRenderer = new PdfRenderer(source);
+                    return mRenderer.getPageCount();
+                } catch (IOException|IllegalStateException e) {
+                    IoUtils.closeQuietly(source);
+                    Log.e(LOG_TAG, "Cannot open file", e);
+                    throw new RemoteException(e.toString());
+                }
+            }
+        }
+
+        @Override
+        public void renderPage(int pageIndex, int bitmapWidth, int bitmapHeight,
+                PrintAttributes attributes, ParcelFileDescriptor destination) {
+            synchronized (mLock) {
+                try {
+                    throwIfNotOpened();
+
+                    PdfRenderer.Page page = mRenderer.openPage(pageIndex);
+
+                    final int srcWidthPts = page.getWidth();
+                    final int srcHeightPts = page.getHeight();
+
+                    final int dstWidthPts = pointsFromMils(
+                            attributes.getMediaSize().getWidthMils());
+                    final int dstHeightPts = pointsFromMils(
+                            attributes.getMediaSize().getHeightMils());
+
+                    final boolean scaleContent = mRenderer.shouldScaleForPrinting();
+                    final boolean contentLandscape = !attributes.getMediaSize().isPortrait();
+
+                    final float displayScale;
+                    Matrix matrix = new Matrix();
+
+                    if (scaleContent) {
+                        displayScale = Math.min((float) bitmapWidth / srcWidthPts,
+                                (float) bitmapHeight / srcHeightPts);
+                    } else {
+                        if (contentLandscape) {
+                            displayScale = (float) bitmapHeight / dstHeightPts;
+                        } else {
+                            displayScale = (float) bitmapWidth / dstWidthPts;
+                        }
+                    }
+                    matrix.postScale(displayScale, displayScale);
+
+                    Configuration configuration = PdfManipulationService.this.getResources()
+                            .getConfiguration();
+                    if (configuration.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
+                        matrix.postTranslate(bitmapWidth - srcWidthPts * displayScale, 0);
+                    }
+
+                    Margins minMargins = attributes.getMinMargins();
+                    final int paddingLeftPts = pointsFromMils(minMargins.getLeftMils());
+                    final int paddingTopPts = pointsFromMils(minMargins.getTopMils());
+                    final int paddingRightPts = pointsFromMils(minMargins.getRightMils());
+                    final int paddingBottomPts = pointsFromMils(minMargins.getBottomMils());
+
+                    Rect clip = new Rect();
+                    clip.left = (int) (paddingLeftPts * displayScale);
+                    clip.top = (int) (paddingTopPts * displayScale);
+                    clip.right = (int) (bitmapWidth - paddingRightPts * displayScale);
+                    clip.bottom = (int) (bitmapHeight - paddingBottomPts * displayScale);
+
+                    if (DEBUG) {
+                        Log.i(LOG_TAG, "Rendering page:" + pageIndex);
+                    }
+
+                    Bitmap bitmap = getBitmapForSize(bitmapWidth, bitmapHeight);
+                    page.render(bitmap, clip, matrix, PdfRenderer.Page.RENDER_MODE_FOR_DISPLAY);
+
+                    page.close();
+
+                    BitmapSerializeUtils.writeBitmapPixels(bitmap, destination);
+                } finally {
+                    IoUtils.closeQuietly(destination);
+                }
+            }
+        }
+
+        @Override
+        public void closeDocument() {
+            synchronized (mLock) {
+                throwIfNotOpened();
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "closeDocument()");
+                }
+                mRenderer.close();
+                mRenderer = null;
+            }
+        }
+
+        private Bitmap getBitmapForSize(int width, int height) {
+            if (mBitmap != null) {
+                if (mBitmap.getWidth() == width && mBitmap.getHeight() == height) {
+                    mBitmap.eraseColor(Color.WHITE);
+                    return mBitmap;
+                }
+                mBitmap.recycle();
+            }
+            mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+            mBitmap.eraseColor(Color.WHITE);
+            return mBitmap;
+        }
+
+        private void throwIfOpened() {
+            if (mRenderer != null) {
+                throw new IllegalStateException("Already opened");
+            }
+        }
+
+        private void throwIfNotOpened() {
+            if (mRenderer == null) {
+                throw new IllegalStateException("Not opened");
+            }
+        }
+    }
+
+    private final class PdfEditorImpl extends IPdfEditor.Stub {
+        private final Object mLock = new Object();
+
+        private PdfEditor mEditor;
+
+        @Override
+        public int openDocument(ParcelFileDescriptor source) throws RemoteException {
+            synchronized (mLock) {
+                try {
+                    throwIfOpened();
+                    if (DEBUG) {
+                        Log.i(LOG_TAG, "openDocument()");
+                    }
+                    mEditor = new PdfEditor(source);
+                    return mEditor.getPageCount();
+                } catch (IOException|IllegalStateException e) {
+                    IoUtils.closeQuietly(source);
+                    Log.e(LOG_TAG, "Cannot open file", e);
+                    throw new RemoteException(e.toString());
+                }
+            }
+        }
+
+        @Override
+        public void removePages(PageRange[] ranges) {
+            synchronized (mLock) {
+                throwIfNotOpened();
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "removePages()");
+                }
+
+                ranges = PageRangeUtils.normalize(ranges);
+
+                final int rangeCount = ranges.length;
+                for (int i = rangeCount - 1; i >= 0; i--) {
+                    PageRange range = ranges[i];
+                    for (int j = range.getEnd(); j >= range.getStart(); j--) {
+                        mEditor.removePage(j);
+                    }
+                }
+            }
+        }
+
+        @Override
+        public void write(ParcelFileDescriptor destination) throws RemoteException {
+            synchronized (mLock) {
+                try {
+                    throwIfNotOpened();
+                    if (DEBUG) {
+                        Log.i(LOG_TAG, "write()");
+                    }
+                    mEditor.write(destination);
+                } catch (IOException | IllegalStateException e) {
+                    IoUtils.closeQuietly(destination);
+                    Log.e(LOG_TAG, "Error writing PDF to file.", e);
+                    throw new RemoteException(e.toString());
+                }
+            }
+        }
+
+        @Override
+        public void closeDocument() {
+            synchronized (mLock) {
+                throwIfNotOpened();
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "closeDocument()");
+                }
+                mEditor.close();
+                mEditor = null;
+            }
+        }
+
+        private void throwIfOpened() {
+            if (mEditor != null) {
+                throw new IllegalStateException("Already opened");
+            }
+        }
+
+        private void throwIfNotOpened() {
+            if (mEditor == null) {
+                throw new IllegalStateException("Not opened");
+            }
+        }
+    }
+
+    private static int pointsFromMils(int mils) {
+        return (int) (((float) mils / MILS_PER_INCH) * POINTS_IN_INCH);
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
index d949673..22a74d6 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PageAdapter.java
@@ -17,6 +17,9 @@
 package com.android.printspooler.ui;
 
 import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.ParcelFileDescriptor;
 import android.print.PageRange;
 import android.print.PrintAttributes.MediaSize;
@@ -26,18 +29,19 @@
 import android.support.v7.widget.RecyclerView.ViewHolder;
 import android.util.Log;
 import android.util.SparseArray;
-import android.util.TypedValue;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
+import android.view.View.MeasureSpec;
 import android.widget.TextView;
 import com.android.printspooler.R;
 import com.android.printspooler.model.PageContentRepository;
 import com.android.printspooler.model.PageContentRepository.PageContentProvider;
 import com.android.printspooler.util.PageRangeUtils;
 import com.android.printspooler.widget.PageContentView;
+import com.android.printspooler.widget.PreviewPageFrame;
 import dalvik.system.CloseGuard;
 
 import java.util.ArrayList;
@@ -48,7 +52,7 @@
  * This class represents the adapter for the pages in the print preview list.
  */
 public final class PageAdapter extends Adapter implements
-        PageContentRepository.OnMalformedPdfFileListener{
+        PageContentRepository.OnMalformedPdfFileListener {
     private static final String LOG_TAG = "PageAdapter";
 
     private static final int MAX_PREVIEW_PAGES_BATCH = 50;
@@ -86,15 +90,11 @@
     // Pages the user selected in the UI.
     private PageRange[] mSelectedPages;
 
+    private BitmapDrawable mEmptyState;
+
     private int mDocumentPageCount = PrintDocumentInfo.PAGE_COUNT_UNKNOWN;
     private int mSelectedPageCount;
 
-    private float mSelectedPageElevation;
-    private float mSelectedPageAlpha;
-
-    private float mUnselectedPageElevation;
-    private float mUnselectedPageAlpha;
-
     private int mPreviewPageMargin;
     private int mPreviewPageMinWidth;
     private int mPreviewListPadding;
@@ -129,16 +129,6 @@
                 Context.LAYOUT_INFLATER_SERVICE);
         mPageContentRepository = new PageContentRepository(context, this);
 
-        mSelectedPageElevation = mContext.getResources().getDimension(
-                R.dimen.selected_page_elevation);
-        mSelectedPageAlpha = mContext.getResources().getFraction(
-                R.fraction.page_selected_alpha, 1, 1);
-
-        mUnselectedPageElevation = mContext.getResources().getDimension(
-                R.dimen.unselected_page_elevation);
-        mUnselectedPageAlpha = mContext.getResources().getFraction(
-                R.fraction.page_unselected_alpha, 1, 1);
-
         mPreviewPageMargin = mContext.getResources().getDimensionPixelSize(
                 R.dimen.preview_page_margin);
 
@@ -257,7 +247,7 @@
         }
 
         if (updatePreviewAreaAndPageSize) {
-            updatePreviewAreaAndPageSize();
+            updatePreviewAreaPageSizeAndEmptyState();
         }
 
         if (documentChanged) {
@@ -291,7 +281,7 @@
 
         MyViewHolder myHolder = (MyViewHolder) holder;
 
-        View page = holder.itemView;
+        PreviewPageFrame page = (PreviewPageFrame) holder.itemView;
         page.setOnClickListener(mPageClickListener);
 
         page.setTag(holder);
@@ -318,12 +308,12 @@
             }
 
             // OK, there are bugs in recycler view which tries to bind views
-            // without recycling them which would give us a chane to clean up.
+            // without recycling them which would give us a chance to clean up.
             PageContentProvider boundProvider = mPageContentRepository
-                   .peekPageContentProvider(pageIndexInFile);
+                    .peekPageContentProvider(pageIndexInFile);
             if (boundProvider != null) {
                 PageContentView owner = (PageContentView) boundProvider.getOwner();
-                owner.init(null, mMediaSize, mMinMargins);
+                owner.init(null, mEmptyState, mMediaSize, mMinMargins);
                 mPageContentRepository.releasePageContentProvider(boundProvider);
             }
 
@@ -333,22 +323,17 @@
         } else {
             onSelectedPageNotInFile(pageInDocument);
         }
-        content.init(provider, mMediaSize, mMinMargins);
-
-        View pageSelector = page.findViewById(R.id.page_selector);
-        pageSelector.setTag(myHolder);
-        pageSelector.setOnClickListener(mPageClickListener);
+        content.init(provider, mEmptyState, mMediaSize, mMinMargins);
 
         if (mConfirmedPagesInDocument.indexOfKey(pageInDocument) >= 0) {
-            pageSelector.setSelected(true);
-            page.setTranslationZ(mSelectedPageElevation);
-            page.setAlpha(mSelectedPageAlpha);
+            page.setSelected(true, false);
         } else {
-            pageSelector.setSelected(false);
-            page.setTranslationZ(mUnselectedPageElevation);
-            page.setAlpha(mUnselectedPageAlpha);
+            page.setSelected(false, false);
         }
 
+        page.setContentDescription(mContext.getString(R.string.page_description_template,
+                pageInDocument + 1, mDocumentPageCount));
+
         TextView pageNumberView = (TextView) page.findViewById(R.id.page_number);
         String text = mContext.getString(R.string.current_page_template,
                 pageInDocument + 1, mDocumentPageCount);
@@ -384,7 +369,7 @@
             mSelectedPages = selectedPages;
             mSelectedPageCount = PageRangeUtils.getNormalizedPageCount(
                     mSelectedPages, mDocumentPageCount);
-            updatePreviewAreaAndPageSize();
+            updatePreviewAreaPageSizeAndEmptyState();
             notifyDataSetChanged();
         }
         return mSelectedPages;
@@ -392,12 +377,12 @@
 
     public void onPreviewAreaSizeChanged() {
         if (mMediaSize != null) {
-            updatePreviewAreaAndPageSize();
+            updatePreviewAreaPageSizeAndEmptyState();
             notifyDataSetChanged();
         }
     }
 
-    private void updatePreviewAreaAndPageSize() {
+    private void updatePreviewAreaPageSizeAndEmptyState() {
         final int availableWidth = mPreviewArea.getWidth();
         final int availableHeight = mPreviewArea.getHeight();
 
@@ -419,7 +404,7 @@
         final int pageContentDesiredHeight = (int) (((float) pageContentDesiredWidth
                 / pageAspectRatio) + 0.5f);
 
-        // If the page does not fit entirely in a vertial direction,
+        // If the page does not fit entirely in a vertical direction,
         // we shirk it but not less than the minimal page width.
         final int pageContentMinHeight = (int) (mPreviewPageMinWidth / pageAspectRatio + 0.5f);
         final int pageContentMaxHeight = Math.max(pageContentMinHeight,
@@ -437,7 +422,8 @@
                 * mPreviewPageMargin);
 
         final int verticalPadding;
-        if (mPageContentHeight + mFooterHeight + mPreviewListPadding > availableHeight) {
+        if (mPageContentHeight + mFooterHeight + mPreviewListPadding
+                + 2 * mPreviewPageMargin > availableHeight) {
             verticalPadding = Math.max(0,
                     (availableHeight - mPageContentHeight - mFooterHeight) / 2
                             - mPreviewPageMargin);
@@ -448,6 +434,23 @@
 
         mPreviewArea.setPadding(horizontalPadding, verticalPadding,
                 horizontalPadding, verticalPadding);
+
+        // Now update the empty state drawable, as it depends on the page
+        // size and is reused for all views for better performance.
+        LayoutInflater inflater = LayoutInflater.from(mContext);
+        View content = inflater.inflate(R.layout.preview_page_loading, null, false);
+        content.measure(MeasureSpec.makeMeasureSpec(mPageContentWidth, MeasureSpec.EXACTLY),
+                MeasureSpec.makeMeasureSpec(mPageContentHeight, MeasureSpec.EXACTLY));
+        content.layout(0, 0, content.getMeasuredWidth(), content.getMeasuredHeight());
+
+        Bitmap bitmap = Bitmap.createBitmap(mPageContentWidth, mPageContentHeight,
+                Bitmap.Config.ARGB_8888);
+        Canvas canvas = new Canvas(bitmap);
+        content.draw(canvas);
+
+        // Do not recycle the old bitmap if such as it may be set as an empty
+        // state to any of the page views. Just let the GC take care of it.
+        mEmptyState = new BitmapDrawable(mContext.getResources(), bitmap);
     }
 
     private PageRange[] computeSelectedPages() {
@@ -718,7 +721,7 @@
     private void recyclePageView(PageContentView page, int pageIndexInAdapter) {
         PageContentProvider provider = page.getPageContentProvider();
         if (provider != null) {
-            page.init(null, null, null);
+            page.init(null, null, null, null);
             mPageContentRepository.releasePageContentProvider(provider);
             mBoundPagesInAdapter.remove(pageIndexInAdapter);
         }
@@ -770,24 +773,20 @@
 
     private final class PageClickListener implements OnClickListener {
         @Override
-        public void onClick(View page) {
+        public void onClick(View view) {
+            PreviewPageFrame page = (PreviewPageFrame) view;
             MyViewHolder holder = (MyViewHolder) page.getTag();
             final int pageInAdapter = holder.mPageInAdapter;
             final int pageInDocument = computePageIndexInDocument(pageInAdapter);
-            View pageSelector = page.findViewById(R.id.page_selector);
             if (mConfirmedPagesInDocument.indexOfKey(pageInDocument) < 0) {
                 mConfirmedPagesInDocument.put(pageInDocument, null);
-                pageSelector.setSelected(true);
-                page.animate().translationZ(mSelectedPageElevation)
-                        .alpha(mSelectedPageAlpha);
+                page.setSelected(true, true);
             } else {
                 if (mConfirmedPagesInDocument.size() <= 1) {
                     return;
                 }
                 mConfirmedPagesInDocument.remove(pageInDocument);
-                pageSelector.setSelected(false);
-                page.animate().translationZ(mUnselectedPageElevation)
-                        .alpha(mUnselectedPageAlpha);
+                page.setSelected(false, true);
             }
         }
     }
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
index 01c9746..967efd4 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java
@@ -23,6 +23,7 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
+import android.content.ServiceConnection;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
@@ -30,9 +31,12 @@
 import android.database.DataSetObserver;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
+import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
 import android.print.IPrintDocumentAdapter;
 import android.print.PageRange;
 import android.print.PrintAttributes;
@@ -57,6 +61,7 @@
 import android.view.View.OnClickListener;
 import android.view.View.OnFocusChangeListener;
 import android.view.ViewGroup;
+import android.view.accessibility.AccessibilityEvent;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemSelectedListener;
@@ -74,6 +79,8 @@
 import com.android.printspooler.model.PrintSpoolerService;
 import com.android.printspooler.model.RemotePrintDocument;
 import com.android.printspooler.model.RemotePrintDocument.RemotePrintDocumentInfo;
+import com.android.printspooler.renderer.IPdfEditor;
+import com.android.printspooler.renderer.PdfManipulationService;
 import com.android.printspooler.util.MediaSizeUtils;
 import com.android.printspooler.util.MediaSizeUtils.MediaSizeComparator;
 import com.android.printspooler.util.PageRangeUtils;
@@ -81,8 +88,15 @@
 import com.android.printspooler.widget.PrintContentView;
 import com.android.printspooler.widget.PrintContentView.OptionsStateChangeListener;
 import com.android.printspooler.widget.PrintContentView.OptionsStateController;
+import libcore.io.IoUtils;
+import libcore.io.Streams;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -114,14 +128,15 @@
     private static final int DEST_ADAPTER_ITEM_ID_SAVE_AS_PDF = Integer.MAX_VALUE;
     private static final int DEST_ADAPTER_ITEM_ID_ALL_PRINTERS = Integer.MAX_VALUE - 1;
 
-    private static final int STATE_CONFIGURING = 0;
-    private static final int STATE_PRINT_CONFIRMED = 1;
-    private static final int STATE_PRINT_CANCELED = 2;
-    private static final int STATE_UPDATE_FAILED = 3;
-    private static final int STATE_CREATE_FILE_FAILED = 4;
-    private static final int STATE_PRINTER_UNAVAILABLE = 5;
-    private static final int STATE_UPDATE_SLOW = 6;
-    private static final int STATE_PRINT_COMPLETED = 7;
+    private static final int STATE_INITIALIZING = 0;
+    private static final int STATE_CONFIGURING = 1;
+    private static final int STATE_PRINT_CONFIRMED = 2;
+    private static final int STATE_PRINT_CANCELED = 3;
+    private static final int STATE_UPDATE_FAILED = 4;
+    private static final int STATE_CREATE_FILE_FAILED = 5;
+    private static final int STATE_PRINTER_UNAVAILABLE = 6;
+    private static final int STATE_UPDATE_SLOW = 7;
+    private static final int STATE_PRINT_COMPLETED = 8;
 
     private static final int UI_STATE_PREVIEW = 0;
     private static final int UI_STATE_ERROR = 1;
@@ -177,6 +192,7 @@
 
     private PrintContentView mOptionsContent;
 
+    private View mSummaryContainer;
     private TextView mSummaryCopies;
     private TextView mSummaryPaperSize;
 
@@ -185,6 +201,7 @@
     private ImageView mPrintButton;
 
     private ProgressMessageController mProgressMessageController;
+    private MutexFileProvider mFileProvider;
 
     private MediaSizeComparator mMediaSizeComparator;
 
@@ -196,7 +213,7 @@
 
     private int mCurrentPageCount;
 
-    private int mState;
+    private int mState = STATE_INITIALIZING;
 
     private int mUiState = UI_STATE_PREVIEW;
 
@@ -204,8 +221,6 @@
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        setState(STATE_CONFIGURING);
-
         Bundle extras = getIntent().getExtras();
 
         mPrintJob = extras.getParcelable(PrintManager.EXTRA_PRINT_JOB);
@@ -256,9 +271,8 @@
         setTitle(R.string.print_dialog);
         setContentView(R.layout.print_activity);
 
-        final MutexFileProvider fileProvider;
         try {
-            fileProvider = new MutexFileProvider(
+            mFileProvider = new MutexFileProvider(
                     PrintSpoolerService.generateFileForPrintJob(
                             PrintActivity.this, mPrintJob.getId()));
         } catch (IOException ioe) {
@@ -267,12 +281,13 @@
         }
 
         mPrintPreviewController = new PrintPreviewController(PrintActivity.this,
-                fileProvider);
+                mFileProvider);
         mPrintedDocument = new RemotePrintDocument(PrintActivity.this,
                 IPrintDocumentAdapter.Stub.asInterface(documentAdapter),
-                fileProvider, new RemotePrintDocument.DocumentObserver() {
+                mFileProvider, new RemotePrintDocument.DocumentObserver() {
             @Override
             public void onDestroy() {
+                setState(STATE_PRINT_CANCELED);
                 finish();
             }
         }, PrintActivity.this);
@@ -290,12 +305,23 @@
         mPrintedDocument.start();
 
         ensurePreviewUiShown();
+
+        setState(STATE_CONFIGURING);
     }
 
     @Override
     public void onPause() {
+        PrintSpoolerService spooler = mSpoolerProvider.getSpooler();
+
+        if (mState == STATE_INITIALIZING) {
+            if (isFinishing()) {
+                spooler.setPrintJobState(mPrintJob.getId(), PrintJobInfo.STATE_CANCELED, null);
+            }
+            super.onPause();
+            return;
+        }
+
         if (isFinishing()) {
-            PrintSpoolerService spooler = mSpoolerProvider.getSpooler();
             spooler.updatePrintJobUserConfigurableOptionsNoPersistence(mPrintJob);
 
             switch (mState) {
@@ -319,7 +345,12 @@
 
             mProgressMessageController.cancel();
             mPrinterRegistry.setTrackedPrinter(null);
+            mPrintPreviewController.destroy();
             mSpoolerProvider.destroy();
+
+            if (mPrintedDocument.isUpdating()) {
+                mPrintedDocument.cancel();
+            }
             mPrintedDocument.finish();
             mPrintedDocument.destroy();
         }
@@ -340,9 +371,14 @@
 
     @Override
     public boolean onKeyUp(int keyCode, KeyEvent event) {
+        if (mState == STATE_INITIALIZING) {
+            finish();
+            return true;
+        }
+
         if (keyCode == KeyEvent.KEYCODE_BACK
                 && event.isTracking() && !event.isCanceled()) {
-            if (mPrintPreviewController != null&&mPrintPreviewController.isOptionsOpened()
+            if (mPrintPreviewController != null && mPrintPreviewController.isOptionsOpened()
                     && !hasErrors()) {
                 mPrintPreviewController.closeOptions();
             } else {
@@ -356,7 +392,7 @@
     @Override
     public void onRequestContentUpdate() {
         if (canUpdateDocument()) {
-            updateDocument(true, false);
+            updateDocument(false);
         }
     }
 
@@ -373,7 +409,7 @@
     @Override
     public void onActionPerformed() {
         if (mState == STATE_UPDATE_FAILED
-                && canUpdateDocument() && updateDocument(true, true)) {
+                && canUpdateDocument() && updateDocument(true)) {
             ensurePreviewUiShown();
             setState(STATE_CONFIGURING);
             updateOptionsUi();
@@ -544,14 +580,13 @@
         if (resultCode == RESULT_OK && data != null) {
             setState(STATE_PRINT_COMPLETED);
             updateOptionsUi();
-            Uri uri = data.getData();
-            mPrintedDocument.writeContent(getContentResolver(), uri);
+            final Uri uri = data.getData();
             // Calling finish here does not invoke lifecycle callbacks but we
             // update the print job in onPause if finishing, hence post a message.
             mDestinationSpinner.post(new Runnable() {
                 @Override
                 public void run() {
-                    finish();
+                    shredPagesAndFinish(uri);
                 }
             });
         } else if (resultCode == RESULT_CANCELED) {
@@ -695,7 +730,7 @@
 
         // Update the content if needed.
         if (canUpdateDocument()) {
-            updateDocument(true, false);
+            updateDocument(false);
         }
     }
 
@@ -827,7 +862,7 @@
         if (mCurrentPrinter == mDestinationSpinnerAdapter.getPdfPrinter()) {
             startCreateDocumentActivity();
         } else {
-            finish();
+            shredPagesAndFinish(null);
         }
     }
 
@@ -880,7 +915,7 @@
         attributes.setMinMargins(defaults.getMinMargins());
     }
 
-    private boolean updateDocument(boolean preview, boolean clearLastError) {
+    private boolean updateDocument(boolean clearLastError) {
         if (!clearLastError && mPrintedDocument.hasUpdateError()) {
             return false;
         }
@@ -889,6 +924,7 @@
             mPrintedDocument.clearUpdateError();
         }
 
+        final boolean preview = mState != STATE_PRINT_CONFIRMED;
         final PageRange[] pages;
         if (preview) {
             pages = mPrintPreviewController.getRequestedPages();
@@ -899,7 +935,7 @@
         final boolean willUpdate = mPrintedDocument.update(mPrintJob.getAttributes(),
                 pages, preview);
 
-        if (willUpdate) {
+        if (willUpdate && !mPrintedDocument.hasLaidOutPages()) {
             // When the update is done we update the print preview.
             mProgressMessageController.post();
             return true;
@@ -946,7 +982,7 @@
         mPrintPreviewController.closeOptions();
 
         if (canUpdateDocument()) {
-            updateDocument(false, false);
+            updateDocument(false);
         }
 
         if (!mPrintedDocument.isUpdating()) {
@@ -956,6 +992,7 @@
 
     private void bindUi() {
         // Summary
+        mSummaryContainer = findViewById(R.id.summary_content);
         mSummaryCopies = (TextView) findViewById(R.id.copies_count_summary);
         mSummaryPaperSize = (TextView) findViewById(R.id.paper_size_summary);
 
@@ -1054,15 +1091,7 @@
 
     void updateOptionsUi() {
         // Always update the summary.
-        if (!TextUtils.isEmpty(mCopiesEditText.getText())) {
-            mSummaryCopies.setText(mCopiesEditText.getText());
-        }
-
-        final int selectedMediaIndex = mMediaSizeSpinner.getSelectedItemPosition();
-        if (selectedMediaIndex >= 0) {
-            SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(selectedMediaIndex);
-            mSummaryPaperSize.setText(mediaItem.label);
-        }
+        updateSummary();
 
         if (mState == STATE_PRINT_CONFIRMED
                 || mState == STATE_PRINT_COMPLETED
@@ -1303,8 +1332,10 @@
         // Print
         if (mDestinationSpinnerAdapter.getPdfPrinter() != mCurrentPrinter) {
             mPrintButton.setImageResource(com.android.internal.R.drawable.ic_print);
+            mPrintButton.setContentDescription(getString(R.string.print_button));
         } else {
             mPrintButton.setImageResource(R.drawable.ic_menu_savetopdf);
+            mPrintButton.setContentDescription(getString(R.string.savetopdf_button));
         }
         if ((mRangeOptionsSpinner.getSelectedItemPosition() == 1
                 && (TextUtils.isEmpty(mPageRangeEditText.getText()) || hasErrors()))
@@ -1330,6 +1361,28 @@
         }
     }
 
+    private void updateSummary() {
+        CharSequence copiesText = null;
+        CharSequence mediaSizeText = null;
+
+        if (!TextUtils.isEmpty(mCopiesEditText.getText())) {
+            copiesText = mCopiesEditText.getText();
+            mSummaryCopies.setText(copiesText);
+        }
+
+        final int selectedMediaIndex = mMediaSizeSpinner.getSelectedItemPosition();
+        if (selectedMediaIndex >= 0) {
+            SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(selectedMediaIndex);
+            mediaSizeText = mediaItem.label;
+            mSummaryPaperSize.setText(mediaSizeText);
+        }
+
+        if (!TextUtils.isEmpty(copiesText) && !TextUtils.isEmpty(mediaSizeText)) {
+            String summaryText = getString(R.string.summary_template, copiesText, mediaSizeText);
+            mSummaryContainer.setContentDescription(summaryText);
+        }
+    }
+
     private void updatePageRangeOptions(int pageCount) {
         ArrayAdapter<SpinnerItem<Integer>> rangeOptionsSpinnerAdapter =
                 (ArrayAdapter) mRangeOptionsSpinner.getAdapter();
@@ -1420,7 +1473,7 @@
         if (mCurrentPrinter.equals(printer)) {
             setState(STATE_CONFIGURING);
             if (canUpdateDocument()) {
-                updateDocument(true, false);
+                updateDocument(false);
             }
             ensurePreviewUiShown();
             updateOptionsUi();
@@ -1479,6 +1532,18 @@
         return true;
     }
 
+    private void shredPagesAndFinish(final Uri writeToUri) {
+        new PageShredder(this, mPrintJob, mFileProvider, new Runnable() {
+            @Override
+            public void run() {
+                if (writeToUri != null) {
+                    mPrintedDocument.writeContent(getContentResolver(), writeToUri);
+                }
+                finish();
+            }
+        }).shred();
+    }
+
     private final class SpinnerItem<T> {
         final T value;
         final CharSequence label;
@@ -1929,7 +1994,7 @@
                     || (becameActive && hasCapab) || (isActive && gotCapab));
 
             if (updateNeeded && canUpdateDocument()) {
-                updateDocument(true, false);
+                updateDocument(false);
             }
 
             updateOptionsUi();
@@ -2020,7 +2085,7 @@
             }
 
             if (canUpdateDocument()) {
-                updateDocument(true, false);
+                updateDocument(false);
             }
 
             updateOptionsUi();
@@ -2145,7 +2210,7 @@
             updateOptionsUi();
 
             if (hadErrors && canUpdateDocument()) {
-                updateDocument(true, false);
+                updateDocument(false);
             }
         }
     }
@@ -2185,4 +2250,176 @@
             updateOptionsUi();
         }
     }
-}
\ No newline at end of file
+
+    private static final class PageShredder implements ServiceConnection {
+        private static final String TEMP_FILE_PREFIX = "print_job";
+        private static final String TEMP_FILE_EXTENSION = ".pdf";
+
+        private final Context mContext;
+
+        private final MutexFileProvider mFileProvider;
+
+        private final PrintJobInfo mPrintJob;
+
+        private final PageRange[] mPagesToShred;
+
+        private final Runnable mCallback;
+
+        public PageShredder(Context context, PrintJobInfo printJob,
+                MutexFileProvider fileProvider, Runnable callback) {
+            mContext = context;
+            mPrintJob = printJob;
+            mFileProvider = fileProvider;
+            mCallback = callback;
+            mPagesToShred = computePagesToShred(mPrintJob);
+        }
+
+        public void shred() {
+            // If we have only the pages we want, done.
+            if (mPagesToShred.length <= 0) {
+                mCallback.run();
+                return;
+            }
+
+            // Bind to the manipulation service and the work
+            // will be performed upon connection to the service.
+            Intent intent = new Intent(PdfManipulationService.ACTION_GET_EDITOR);
+            intent.setClass(mContext, PdfManipulationService.class);
+            mContext.bindService(intent, this, Context.BIND_AUTO_CREATE);
+        }
+
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            final IPdfEditor editor = IPdfEditor.Stub.asInterface(service);
+            new AsyncTask<Void, Void, Void>() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    try {
+                        // It's OK to access the data members as they are
+                        // final and this code is the last one to touch
+                        // them as shredding is the very last step, so the
+                        // UI is not interactive at this point.
+                        shredPages(editor);
+                        updatePrintJob();
+                    } finally {
+                        mContext.unbindService(PageShredder.this);
+                        mCallback.run();
+                    }
+                    return null;
+                }
+            }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            /* do nothing */
+        }
+
+        private void shredPages(IPdfEditor editor) {
+            File tempFile = null;
+            ParcelFileDescriptor src = null;
+            ParcelFileDescriptor dst = null;
+            InputStream in = null;
+            OutputStream out = null;
+            try {
+                File jobFile = mFileProvider.acquireFile(null);
+                src = ParcelFileDescriptor.open(jobFile, ParcelFileDescriptor.MODE_READ_WRITE);
+
+                // Open the document.
+                editor.openDocument(src);
+
+                // We passed the fd over IPC, close this one.
+                src.close();
+
+                // Drop the pages.
+                editor.removePages(mPagesToShred);
+
+                // Write the modified PDF to a temp file.
+                tempFile = File.createTempFile(TEMP_FILE_PREFIX, TEMP_FILE_EXTENSION,
+                        mContext.getCacheDir());
+                dst = ParcelFileDescriptor.open(tempFile, ParcelFileDescriptor.MODE_READ_WRITE);
+                editor.write(dst);
+                dst.close();
+
+                // Close the document.
+                editor.closeDocument();
+
+                // Copy the temp file over the print job file.
+                jobFile.delete();
+                in = new FileInputStream(tempFile);
+                out = new FileOutputStream(jobFile);
+                Streams.copy(in, out);
+            } catch (IOException|RemoteException e) {
+                Log.e(LOG_TAG, "Error dropping pages", e);
+            } finally {
+                IoUtils.closeQuietly(src);
+                IoUtils.closeQuietly(dst);
+                IoUtils.closeQuietly(in);
+                IoUtils.closeQuietly(out);
+                if (tempFile != null) {
+                    tempFile.delete();
+                }
+            }
+        }
+
+        private void updatePrintJob() {
+            // Update the print job pages.
+            final int newPageCount = PageRangeUtils.getNormalizedPageCount(
+                    mPrintJob.getPages(), 0);
+            mPrintJob.setPages(new PageRange[]{PageRange.ALL_PAGES});
+
+            // Update the print job document info.
+            PrintDocumentInfo oldDocInfo = mPrintJob.getDocumentInfo();
+            PrintDocumentInfo newDocInfo = new PrintDocumentInfo
+                    .Builder(oldDocInfo.getName())
+                    .setContentType(oldDocInfo.getContentType())
+                    .setPageCount(newPageCount)
+                    .build();
+            mPrintJob.setDocumentInfo(newDocInfo);
+        }
+
+        private static PageRange[] computePagesToShred(PrintJobInfo printJob) {
+            List<PageRange> rangesToShred = new ArrayList<>();
+            PageRange previousRange = null;
+
+            final int pageCount = printJob.getDocumentInfo().getPageCount();
+
+            PageRange[] printedPages = printJob.getPages();
+            final int rangeCount = printedPages.length;
+            for (int i = 0; i < rangeCount; i++) {
+                PageRange range = PageRangeUtils.asAbsoluteRange(printedPages[i], pageCount);
+
+                if (previousRange == null) {
+                    final int startPageIdx = 0;
+                    final int endPageIdx = range.getStart() - 1;
+                    if (startPageIdx <= endPageIdx) {
+                        PageRange removedRange = new PageRange(startPageIdx, endPageIdx);
+                        rangesToShred.add(removedRange);
+                    }
+                } else {
+                    final int startPageIdx = previousRange.getEnd() + 1;
+                    final int endPageIdx = range.getStart() - 1;
+                    if (startPageIdx <= endPageIdx) {
+                        PageRange removedRange = new PageRange(startPageIdx, endPageIdx);
+                        rangesToShred.add(removedRange);
+                    }
+                }
+
+                if (i == rangeCount - 1) {
+                    final int startPageIdx = range.getEnd() + 1;
+                    final int endPageIdx = printJob.getDocumentInfo().getPageCount() - 1;
+                    if (startPageIdx <= endPageIdx) {
+                        PageRange removedRange = new PageRange(startPageIdx, endPageIdx);
+                        rangesToShred.add(removedRange);
+                    }
+                }
+
+                previousRange = range;
+            }
+
+            PageRange[] result = new PageRange[rangesToShred.size()];
+            rangesToShred.toArray(result);
+            return result;
+        }
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java
index 4a23ec4..5d858ca 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/ui/PrintPreviewController.java
@@ -24,6 +24,7 @@
 import android.print.PrintAttributes.MediaSize;
 import android.print.PrintAttributes.Margins;
 import android.print.PrintDocumentInfo;
+import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.OrientationHelper;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.ViewHolder;
@@ -51,7 +52,7 @@
     private final MyHandler mHandler;
 
     private final PageAdapter mPageAdapter;
-    private final StaggeredGridLayoutManager mLayoutManger;
+    private final GridLayoutManager mLayoutManger;
 
     private final PrintOptionsLayout mPrintOptionsLayout;
     private final RecyclerView mRecyclerView;
@@ -73,7 +74,7 @@
         final int columnCount = mActivity.getResources().getInteger(
                 R.integer.preview_page_per_row_count);
 
-        mLayoutManger = new StaggeredGridLayoutManager(columnCount, OrientationHelper.VERTICAL);
+        mLayoutManger = new GridLayoutManager(mActivity, columnCount);
 
         mRecyclerView = (RecyclerView) activity.findViewById(R.id.preview_content);
         mRecyclerView.setLayoutManager(mLayoutManger);
@@ -184,13 +185,19 @@
             public void run() {
                 // At this point the other end will write to the file, hence
                 // we have to close it and reopen after the write completes.
-                Message operation = mHandler.obtainMessage(MyHandler.MSG_CLOSE);
-                mHandler.enqueueOperation(operation);
+                if (mPageAdapter.isOpened()) {
+                    Message operation = mHandler.obtainMessage(MyHandler.MSG_CLOSE);
+                    mHandler.enqueueOperation(operation);
+                }
             }
         });
     }
 
     public void destroy() {
+        if (mPageAdapter.isOpened()) {
+            mPageAdapter.close(null);
+        }
+        mRecyclerView.setAdapter(null);
         mPageAdapter.destroy();
     }
 
diff --git a/packages/PrintSpooler/src/com/android/printspooler/util/BitmapSerializeUtils.java b/packages/PrintSpooler/src/com/android/printspooler/util/BitmapSerializeUtils.java
new file mode 100644
index 0000000..a1845f6
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/util/BitmapSerializeUtils.java
@@ -0,0 +1,60 @@
+/*
+ * 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.printspooler.util;
+
+import android.graphics.Bitmap;
+import android.os.ParcelFileDescriptor;
+
+/**
+ * Helper for serialization of bitmaps in the very specific
+ * use case of having the same bitmap on both ends and just
+ * marshaling the pixels from one side to the other.
+ */
+public final class BitmapSerializeUtils {
+
+    static {
+        System.loadLibrary("printspooler_jni");
+    }
+
+    private BitmapSerializeUtils() {
+        /* do nothing */
+    }
+
+    /**
+     * Reads a bitmap pixels from a file descriptor.
+     *
+     * @param bitmap A bitmap whose pixels to populate.
+     * @param source The source file descriptor.
+     */
+    public static void readBitmapPixels(Bitmap bitmap, ParcelFileDescriptor source) {
+        nativeReadBitmapPixels(bitmap, source.getFd());
+    }
+
+    /**
+     * Writes a bitmap pixels to a file descriptor.
+     *
+     * @param bitmap The bitmap.
+     * @param destination The destination file descriptor.
+     */
+    public static void writeBitmapPixels(Bitmap bitmap, ParcelFileDescriptor destination) {
+        nativeWriteBitmapPixels(bitmap, destination.getFd());
+    }
+
+    private static native void nativeReadBitmapPixels(Bitmap bitmap, int fd);
+
+    private static native void nativeWriteBitmapPixels(Bitmap bitmap, int fd);
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
index 8365373..c22c0e2 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
@@ -17,17 +17,15 @@
 package com.android.printspooler.widget;
 
 import android.content.Context;
-import android.graphics.Canvas;
 import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
 import android.print.PrintAttributes.MediaSize;
 import android.print.PrintAttributes.Margins;
 import android.util.AttributeSet;
-import android.util.TypedValue;
 import android.view.View;
 import com.android.printspooler.model.PageContentRepository;
-import com.android.printspooler.model.PageContentRepository.PageContentProvider;
 import com.android.printspooler.model.PageContentRepository.RenderSpec;
+import com.android.printspooler.model.PageContentRepository.PageContentProvider;
 
 /**
  * This class represents a page in the print preview list. The width of the page
@@ -38,61 +36,62 @@
 public class PageContentView extends View
         implements PageContentRepository.OnPageContentAvailableCallback {
 
-    private final ColorDrawable mEmptyState;
-
     private PageContentProvider mProvider;
 
     private MediaSize mMediaSize;
+
     private Margins mMinMargins;
 
+    private Drawable mEmptyState;
+
     private boolean mContentRequested;
 
+    private boolean mNeedsLayout;
+
     public PageContentView(Context context, AttributeSet attrs) {
         super(context, attrs);
-
-        TypedValue typedValue = new TypedValue();
-        context.getTheme().resolveAttribute(com.android.internal.R.attr.textColorPrimary,
-                typedValue, true);
-
-        mEmptyState = new ColorDrawable(typedValue.data);
-
-        setBackground(mEmptyState);
-    }
-
-    @Override
-    protected void onDraw(Canvas canvas) {
-        super.onDraw(canvas);
-        requestPageContentIfNeeded();
     }
 
     @Override
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
+        mNeedsLayout = false;
         requestPageContentIfNeeded();
     }
 
     @Override
     public void onPageContentAvailable(BitmapDrawable content) {
-        if (getBackground() != content) {
-            setBackground(content);
-        }
+        assert (getBackground() != content);
+        setBackground(content);
     }
 
     public PageContentProvider getPageContentProvider() {
         return mProvider;
     }
 
-    public void init(PageContentProvider provider, MediaSize mediaSize, Margins minMargins) {
-        if (mProvider == provider
-                && ((mMediaSize == null) ? mediaSize == null : mMediaSize.equals(mediaSize))
-                && ((mMinMargins == null) ? minMargins == null : mMinMargins.equals(minMargins))) {
+    public void init(PageContentProvider provider, Drawable emptyState,
+            MediaSize mediaSize, Margins minMargins) {
+        final boolean providerChanged = (mProvider == null)
+                ? provider != null : !mProvider.equals(provider);
+        final boolean loadingDrawableChanged = (mEmptyState == null)
+                ? mEmptyState != null : !mEmptyState.equals(emptyState);
+        final boolean mediaSizeChanged = (mMediaSize == null)
+                ? mediaSize != null : !mMediaSize.equals(mediaSize);
+        final boolean marginsChanged = (mMinMargins == null)
+                ? minMargins != null : !mMinMargins.equals(minMargins);
+
+        if (!providerChanged && !mediaSizeChanged
+                && !marginsChanged && !loadingDrawableChanged) {
             return;
         }
 
         mProvider = provider;
         mMediaSize = mediaSize;
         mMinMargins = minMargins;
+
+        mEmptyState = emptyState;
         mContentRequested = false;
+        mNeedsLayout = mNeedsLayout || mediaSizeChanged || marginsChanged;
 
         // If there is no provider we want immediately to switch to
         // the empty state, so pages with no content appear blank.
@@ -104,10 +103,11 @@
     }
 
     private void requestPageContentIfNeeded() {
-        if (getWidth() > 0 && getHeight() > 0 && !mContentRequested && mProvider != null) {
+        if (getWidth() > 0 && getHeight() > 0 && !mContentRequested
+                && mProvider != null && !mNeedsLayout) {
             mContentRequested = true;
-            mProvider.getPageContent(new RenderSpec(getWidth(), getHeight(), mMediaSize,
-                    mMinMargins), this);
+            mProvider.getPageContent(new RenderSpec(getWidth(), getHeight(),
+                    mMediaSize, mMinMargins), this);
         }
     }
 }
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java
new file mode 100644
index 0000000..feb0316
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PreviewPageFrame.java
@@ -0,0 +1,89 @@
+/*
+ * 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.printspooler.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.widget.CompoundButton;
+import android.widget.LinearLayout;
+import com.android.printspooler.R;
+
+/**
+ * This class represents the frame of page in the print preview list
+ * that contains the page and a footer.
+ */
+public final class PreviewPageFrame extends LinearLayout {
+    private final float mSelectedElevation;
+    private final float mNotSelectedElevation;
+
+    private final float mSelectedPageAlpha;
+    private final float mNotSelectedAlpha;
+
+    public PreviewPageFrame(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mSelectedElevation = mContext.getResources().getDimension(
+                R.dimen.selected_page_elevation);
+        mNotSelectedElevation = mContext.getResources().getDimension(
+                R.dimen.unselected_page_elevation);
+        mSelectedPageAlpha = mContext.getResources().getFraction(
+                R.fraction.page_selected_alpha, 1, 1);
+        mNotSelectedAlpha = mContext.getResources().getFraction(
+                R.fraction.page_unselected_alpha, 1, 1);
+    }
+
+    @Override
+    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+        super.onInitializeAccessibilityEvent(event);
+        event.setClassName(CompoundButton.class.getName());
+        event.setChecked(isSelected());
+    }
+
+    @Override
+    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+        super.onInitializeAccessibilityNodeInfo(info);
+        info.setClassName(CompoundButton.class.getName());
+        info.setSelected(false);
+        info.setCheckable(true);
+        info.setChecked(isSelected());
+    }
+
+    public void setSelected(boolean selected, boolean animate) {
+        if (isSelected() == selected) {
+            return;
+        }
+        setSelected(selected);
+        if (selected) {
+            if (animate) {
+                animate().translationZ(mSelectedElevation)
+                        .alpha(mSelectedPageAlpha);
+            } else {
+                setTranslationZ(mSelectedElevation);
+                setAlpha(mSelectedPageAlpha);
+            }
+        } else {
+            if (animate) {
+                animate().translationZ(mNotSelectedElevation)
+                        .alpha(mNotSelectedAlpha);
+            } else {
+                setTranslationZ(mNotSelectedElevation);
+                setAlpha(mNotSelectedAlpha);
+            }
+        }
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
index c84b06a..bfcd334 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java
@@ -283,8 +283,13 @@
         mDynamicContent.layout(left, dynContentTop, right, dynContentBottom);
 
         MarginLayoutParams params = (MarginLayoutParams) mPrintButton.getLayoutParams();
-        final int rightMargin = params.rightMargin;
-        final int printButtonLeft = right - mPrintButton.getMeasuredWidth() - rightMargin;
+
+        final int printButtonLeft;
+        if (getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) {
+            printButtonLeft = right - mPrintButton.getMeasuredWidth() - params.getMarginStart();
+        } else {
+            printButtonLeft = left + params.getMarginStart();
+        }
         final int printButtonTop = dynContentBottom - mPrintButton.getMeasuredHeight() / 2;
         final int printButtonRight = printButtonLeft + mPrintButton.getMeasuredWidth();
         final int printButtonBottom = printButtonTop + mPrintButton.getMeasuredHeight();
@@ -336,6 +341,9 @@
             if (mOptionsStateChangeListener != null) {
                 mOptionsStateChangeListener.onOptionsOpened();
             }
+            mExpandCollapseHandle.setContentDescription(
+                    mContext.getString(R.string.collapse_handle));
+            announceForAccessibility(mContext.getString(R.string.print_options_expanded));
             mSummaryContent.setVisibility(View.GONE);
             mEmbeddedContentScrim.setOnClickListener(this);
             mExpandCollapseIcon.setBackgroundResource(R.drawable.ic_expand_less);
@@ -347,6 +355,9 @@
             if (mOptionsStateChangeListener != null) {
                 mOptionsStateChangeListener.onOptionsClosed();
             }
+            mExpandCollapseHandle.setContentDescription(
+                    mContext.getString(R.string.expand_handle));
+            announceForAccessibility(mContext.getString(R.string.print_options_collapsed));
             if (mMoreOptionsButton.getVisibility() != View.GONE) {
                 mMoreOptionsButton.setVisibility(View.INVISIBLE);
             }
diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
index 71f4aa7..7a80a8b 100644
--- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
+++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java
@@ -89,7 +89,7 @@
                             columnWidth - childParams.getMarginStart() - childParams.getMarginEnd(),
                             MeasureSpec.EXACTLY);
                 } else {
-                    childWidthMeasureSpec = getChildMeasureSpec(heightMeasureSpec,
+                    childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec,
                             getPaddingStart() + getPaddingEnd() + width, childParams.width);
                 }
 
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index fd5e6fe..6d08970 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -70,7 +70,7 @@
     // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
     // is properly propagated through your change.  Not doing so will result in a loss of user
     // settings.
-    private static final int DATABASE_VERSION = 109;
+    private static final int DATABASE_VERSION = 111;
 
     private Context mContext;
     private int mUserHandle;
@@ -1749,6 +1749,45 @@
             upgradeVersion = 109;
         }
 
+        if (upgradeVersion < 110) {
+            // The SIP_CALL_OPTIONS value SIP_ASK_EACH_TIME is being deprecated.
+            // If the SIP_CALL_OPTIONS setting is set to SIP_ASK_EACH_TIME, default to
+            // SIP_ADDRESS_ONLY.
+            db.beginTransaction();
+            SQLiteStatement stmt = null;
+            try {
+                stmt = db.compileStatement("UPDATE system SET value = ? " +
+                        "WHERE name = ? AND value = ?;");
+                stmt.bindString(1, Settings.System.SIP_ADDRESS_ONLY);
+                stmt.bindString(2, Settings.System.SIP_CALL_OPTIONS);
+                stmt.bindString(3, Settings.System.SIP_ASK_ME_EACH_TIME);
+                stmt.execute();
+                db.setTransactionSuccessful();
+            } finally {
+                db.endTransaction();
+                if (stmt != null) stmt.close();
+            }
+            upgradeVersion = 110;
+        }
+
+        if (upgradeVersion < 111) {
+            // reset ringer mode, so it doesn't force zen mode to follow
+            if (mUserHandle == UserHandle.USER_OWNER) {
+                db.beginTransaction();
+                SQLiteStatement stmt = null;
+                try {
+                    stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
+                            + " VALUES(?,?);");
+                    loadSetting(stmt, Settings.Global.MODE_RINGER, AudioManager.RINGER_MODE_NORMAL);
+                    db.setTransactionSuccessful();
+                } finally {
+                    db.endTransaction();
+                    if (stmt != null) stmt.close();
+                }
+            }
+            upgradeVersion = 111;
+        }
+
         // *** Remember to update DATABASE_VERSION above!
 
         if (upgradeVersion != currentVersion) {
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index d4ebb01..b94a258 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -176,6 +176,7 @@
                 android:theme="@style/RecentsStyle"
                 android:excludeFromRecents="true"
                 android:launchMode="singleInstance"
+                android:resumeWhilePausing="true"
                 android:exported="true">
           <intent-filter>
             <action android:name="com.android.systemui.TOGGLE_RECENTS" />
@@ -196,6 +197,8 @@
                   android:label="@string/accessibility_desc_recent_apps"
                   android:launchMode="singleInstance"
                   android:excludeFromRecents="true"
+                  android:stateNotNeeded="true"
+                  android:resumeWhilePausing="true"
                   android:theme="@style/RecentsTheme">
             <intent-filter>
                 <action android:name="com.android.systemui.recents.TOGGLE_RECENTS" />
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_enter.xml b/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
index 4e1d66d..b191e62 100644
--- a/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
+++ b/packages/SystemUI/res/anim/recents_from_launcher_enter.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear"
-         android:duration="100"/>
+         android:duration="150"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_exit.xml b/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
index afab78d..fa6caf2 100644
--- a/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
+++ b/packages/SystemUI/res/anim/recents_from_launcher_exit.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear_out_slow_in"
-         android:duration="100"/>
+         android:duration="150"/>
 </set>
diff --git a/packages/Keyguard/res/values-land/alias.xml b/packages/SystemUI/res/anim/recents_from_search_launcher_enter.xml
similarity index 62%
rename from packages/Keyguard/res/values-land/alias.xml
rename to packages/SystemUI/res/anim/recents_from_search_launcher_enter.xml
index 7aac5b4..20e7764 100644
--- a/packages/Keyguard/res/values-land/alias.xml
+++ b/packages/SystemUI/res/anim/recents_from_search_launcher_enter.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
+/*
 ** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +16,13 @@
 ** limitations under the License.
 */
 -->
-<resources>
-    <!-- Alias used to reference one of two possible layouts in keyguard.  -->
-    <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area_empty</item>
-</resources>
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:shareInterpolator="false"
+     android:zAdjustment="normal">
+  <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+         android:fillEnabled="true"
+         android:fillBefore="true" android:fillAfter="true"
+         android:interpolator="@android:interpolator/linear"
+         android:duration="50"/>
+</set>
diff --git a/packages/SystemUI/res/anim/recents_from_search_launcher_exit.xml b/packages/SystemUI/res/anim/recents_from_search_launcher_exit.xml
new file mode 100644
index 0000000..92a8882
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_from_search_launcher_exit.xml
@@ -0,0 +1,29 @@
+<?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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:shareInterpolator="false"
+     android:zAdjustment="top">
+  <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+  		 android:startOffset="50"
+         android:fillEnabled="true"
+         android:fillBefore="true" android:fillAfter="true"
+         android:interpolator="@android:interpolator/linear_out_slow_in"
+         android:duration="100"/>
+</set>
diff --git a/packages/SystemUI/res/anim/recents_from_unknown_enter.xml b/packages/SystemUI/res/anim/recents_from_unknown_enter.xml
index f68a143..da1dee0 100644
--- a/packages/SystemUI/res/anim/recents_from_unknown_enter.xml
+++ b/packages/SystemUI/res/anim/recents_from_unknown_enter.xml
@@ -23,6 +23,6 @@
   <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
-         android:interpolator="@android:interpolator/fast_out_slow_in"
+         android:interpolator="@android:interpolator/linear"
          android:duration="200"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_bounce.xml b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_bounce.xml
new file mode 100644
index 0000000..a571cbc
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_bounce.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
+
+    <alpha android:fromAlpha="1.0" android:toAlpha="0.6"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:interpolator="@android:interpolator/accelerate_cubic"
+        android:duration="133"/>
+
+    <translate android:fromYDelta="0" android:toYDelta="10%"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:interpolator="@android:interpolator/accelerate_cubic"
+        android:duration="350"/>
+
+    <scale android:fromXScale="1.0" android:toXScale="0.9"
+        android:fromYScale="1.0" android:toYScale="0.9"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:pivotX="50%p" android:pivotY="50%p"
+        android:interpolator="@android:interpolator/fast_out_slow_in"
+        android:duration="350" />
+
+    <alpha android:fromAlpha="1.0" android:toAlpha="1.6666666666"
+        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
+        android:interpolator="@android:interpolator/decelerate_cubic"
+        android:startOffset="350"
+        android:duration="133"/>
+
+    <translate android:fromYDelta="0%" android:toYDelta="-8.8888888888%"
+        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
+        android:interpolator="@android:interpolator/decelerate_cubic"
+        android:startOffset="350"
+        android:duration="350"/>
+
+    <scale android:fromXScale="1.0" android:toXScale="1.1111111111"
+        android:fromYScale="1.0" android:toYScale="1.1111111111"
+        android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
+        android:pivotX="50%p" android:pivotY="50%p"
+        android:interpolator="@android:interpolator/decelerate_cubic"
+        android:startOffset="350"
+        android:duration="350" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_source.xml b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_source.xml
new file mode 100644
index 0000000..f0fd684
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_source.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
+
+    <alpha android:fromAlpha="1.0" android:toAlpha="0.6"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:interpolator="@android:interpolator/accelerate_cubic"
+        android:duration="150"/>
+
+    <scale android:fromXScale="1.0" android:toXScale="0.9"
+        android:fromYScale="1.0" android:toYScale="0.9"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:pivotX="50%p" android:pivotY="50%p"
+        android:interpolator="@android:interpolator/fast_out_slow_in"
+        android:duration="300" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_target.xml b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_target.xml
new file mode 100644
index 0000000..170ac82
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_target.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
+
+    <translate android:fromYDelta="110%" android:toYDelta="0%"
+               android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+               android:interpolator="@android:interpolator/decelerate_quint"
+               android:startOffset="50"
+               android:duration="250" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_bounce.xml b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_bounce.xml
new file mode 100644
index 0000000..46045ac
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_bounce.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
+
+    <translate android:fromYDelta="0%" android:toYDelta="10%"
+               android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+               android:interpolator="@android:interpolator/decelerate_quint"
+               android:duration="300" />
+
+    <translate android:fromYDelta="10%" android:toYDelta="0%"
+               android:fillEnabled="true" android:fillBefore="false" android:fillAfter="true"
+               android:interpolator="@android:interpolator/accelerate_quint"
+               android:startOffset="300"
+               android:duration="300" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_source.xml b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_source.xml
new file mode 100644
index 0000000..ad5341b
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_source.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="top">
+
+    <translate android:fromYDelta="0%" android:toYDelta="110%"
+               android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+               android:interpolator="@android:interpolator/accelerate_quint"
+               android:duration="300" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_target.xml b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_target.xml
new file mode 100644
index 0000000..7687f02
--- /dev/null
+++ b/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_target.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:background="#ff000000" android:shareInterpolator="false" android:zAdjustment="normal">
+
+    <alpha android:fromAlpha="0.6" android:toAlpha="1.0"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:interpolator="@android:interpolator/decelerate_cubic"
+        android:startOffset="75"
+        android:duration="150"/>
+
+    <scale android:fromXScale="0.9" android:toXScale="1.0"
+        android:fromYScale="0.9" android:toYScale="1.0"
+        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+        android:interpolator="@android:interpolator/linear_out_slow_in"
+        android:pivotX="50%p" android:pivotY="50%p"
+        android:startOffset="75"
+        android:duration="225" />
+</set>
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_enter.xml b/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
index 4e1d66d..b191e62 100644
--- a/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
+++ b/packages/SystemUI/res/anim/recents_to_launcher_enter.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear"
-         android:duration="100"/>
+         android:duration="150"/>
 </set>
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_exit.xml b/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
index afab78d..fa6caf2 100644
--- a/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
+++ b/packages/SystemUI/res/anim/recents_to_launcher_exit.xml
@@ -24,5 +24,5 @@
          android:fillEnabled="true"
          android:fillBefore="true" android:fillAfter="true"
          android:interpolator="@android:interpolator/linear_out_slow_in"
-         android:duration="100"/>
+         android:duration="150"/>
 </set>
diff --git a/packages/Keyguard/res/values-land/alias.xml b/packages/SystemUI/res/anim/recents_to_search_launcher_enter.xml
similarity index 62%
copy from packages/Keyguard/res/values-land/alias.xml
copy to packages/SystemUI/res/anim/recents_to_search_launcher_enter.xml
index 7aac5b4..4e1d66d 100644
--- a/packages/Keyguard/res/values-land/alias.xml
+++ b/packages/SystemUI/res/anim/recents_to_search_launcher_enter.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
+/*
 ** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +16,13 @@
 ** limitations under the License.
 */
 -->
-<resources>
-    <!-- Alias used to reference one of two possible layouts in keyguard.  -->
-    <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area_empty</item>
-</resources>
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:shareInterpolator="false"
+     android:zAdjustment="normal">
+  <alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+         android:fillEnabled="true"
+         android:fillBefore="true" android:fillAfter="true"
+         android:interpolator="@android:interpolator/linear"
+         android:duration="100"/>
+</set>
diff --git a/packages/Keyguard/res/values-land/alias.xml b/packages/SystemUI/res/anim/recents_to_search_launcher_exit.xml
similarity index 60%
copy from packages/Keyguard/res/values-land/alias.xml
copy to packages/SystemUI/res/anim/recents_to_search_launcher_exit.xml
index 7aac5b4..d7a12a4 100644
--- a/packages/Keyguard/res/values-land/alias.xml
+++ b/packages/SystemUI/res/anim/recents_to_search_launcher_exit.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-/* //device/apps/common/assets/res/any/colors.xml
-**
+/*
 ** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +16,14 @@
 ** limitations under the License.
 */
 -->
-<resources>
-    <!-- Alias used to reference one of two possible layouts in keyguard.  -->
-    <item type="layout" name="keyguard_eca">@layout/keyguard_emergency_carrier_area_empty</item>
-</resources>
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:shareInterpolator="false"
+     android:zAdjustment="top">
+  <alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+  		 android:startOffset="100"
+         android:fillEnabled="true"
+         android:fillBefore="true" android:fillAfter="true"
+         android:interpolator="@android:interpolator/linear"
+         android:duration="50"/>
+</set>
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
deleted file mode 100644
index 2fa0293..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index d43d1dc..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index dcf86c0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 5171333..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 1b45762..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index fcbfac1..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 4555731..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
deleted file mode 100644
index d7a48f2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 61d7511..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 14d1060..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png
deleted file mode 100644
index 64327ba..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 192d3f7..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 95c217c..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png
deleted file mode 100644
index 3c33a56..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 1e5f15f..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 155c222..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_info.xml b/packages/SystemUI/res/drawable/ic_info.xml
new file mode 100644
index 0000000..65e7bf5
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_info.xml
@@ -0,0 +1,24 @@
+<!--
+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.
+-->
+<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:pathData="M12.000000,2.000000C6.500000,2.000000 2.000000,6.500000 2.000000,12.000000s4.500000,10.000000 10.000000,10.000000c5.500000,0.000000 10.000000,-4.500000 10.000000,-10.000000S17.500000,2.000000 12.000000,2.000000zM13.000000,17.000000l-2.000000,0.000000l0.000000,-6.000000l2.000000,0.000000L13.000000,17.000000zM13.000000,9.000000l-2.000000,0.000000L11.000000,7.000000l2.000000,0.000000L13.000000,9.000000z"
+        android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml b/packages/SystemUI/res/drawable/ic_qs_no_sim.xml
similarity index 94%
rename from packages/SystemUI/res/drawable/stat_sys_no_sim.xml
rename to packages/SystemUI/res/drawable/ic_qs_no_sim.xml
index 22d1d4b..bd46012 100644
--- a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_no_sim.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="32dp"
+        android:height="32dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
 
diff --git a/packages/SystemUI/res/drawable/notification_guts_bg.xml b/packages/SystemUI/res/drawable/notification_guts_bg.xml
index 07932d1..1730dce 100644
--- a/packages/SystemUI/res/drawable/notification_guts_bg.xml
+++ b/packages/SystemUI/res/drawable/notification_guts_bg.xml
@@ -17,5 +17,6 @@
 
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <solid android:color="@color/notification_guts_bg_color" />
-    <corners android:radius="@dimen/notification_material_rounded_rect_radius" />
+    <!--The radius is 1dp smaller than the notification one, to avoid aliasing bugs on the corners -->
+    <corners android:radius="1dp" />
 </shape>
diff --git a/packages/SystemUI/res/drawable/notification_material_bg_dim.xml b/packages/SystemUI/res/drawable/notification_material_bg_dim.xml
index b04394d..6581942 100644
--- a/packages/SystemUI/res/drawable/notification_material_bg_dim.xml
+++ b/packages/SystemUI/res/drawable/notification_material_bg_dim.xml
@@ -14,7 +14,11 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License
   -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="@color/notification_material_background_dimmed_color" />
-    <corners android:radius="@dimen/notification_material_rounded_rect_radius" />
-</shape>
+<ripple xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <solid android:color="@color/notification_material_background_dimmed_color" />
+            <corners android:radius="@dimen/notification_material_rounded_rect_radius" />
+        </shape>
+    </item>
+</ripple>
diff --git a/packages/SystemUI/res/drawable/recents_button_bg.xml b/packages/SystemUI/res/drawable/recents_button_bg.xml
index a4cb088..7456365 100644
--- a/packages/SystemUI/res/drawable/recents_button_bg.xml
+++ b/packages/SystemUI/res/drawable/recents_button_bg.xml
@@ -15,4 +15,5 @@
 -->
 
 <ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight" />
\ No newline at end of file
+    android:color="#40ffffff">
+</ripple>
diff --git a/packages/SystemUI/res/drawable/stat_notify_more.xml b/packages/SystemUI/res/drawable/stat_notify_more.xml
new file mode 100644
index 0000000..50f1286
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_notify_more.xml
@@ -0,0 +1,24 @@
+<!--
+  ~ 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
+  -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="16dp"
+        android:height="16dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
+    <path
+        android:pathData="M22.000000,3.000000L7.000000,3.000000C6.300000,3.000000 5.800000,3.400000 5.400000,3.900000L0.000000,12.000000l5.400000,8.100000c0.400000,0.500000 1.000000,0.900000 1.700000,0.900000L22.000000,21.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L24.000000,5.000000C24.000000,3.900000 23.100000,3.000000 22.000000,3.000000zM9.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S9.800000,13.500000 9.000000,13.500000zM14.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S14.800000,13.500000 14.000000,13.500000zM19.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S19.799999,13.500000 19.000000,13.500000z"
+        android:fillColor="#FFFFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml b/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml
new file mode 100644
index 0000000..433da5f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml
@@ -0,0 +1,28 @@
+<!--
+  ~ 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
+  -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="17.25dp"
+        android:height="18dp"
+        android:viewportWidth="46.0"
+        android:viewportHeight="48.0">
+
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M20.4,18.0"/>
+    <path
+        android:fillColor="#FFFFFFFF"
+        android:pathData="M42.0,32.0l0.0,-4.0L26.0,18.0L26.0,7.0c0.0,-1.7 -1.3,-3.0 -3.0,-3.0c-1.7,0.0 -3.0,1.3 -3.0,3.0l0.0,11.0L4.0,28.0l0.0,4.0l16.0,-5.0l0.0,11.0l-4.0,3.0l0.0,3.0l7.0,-2.0l7.0,2.0l0.0,-3.0l-4.0,-3.0L26.0,27.0L42.0,32.0z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_alarm.xml b/packages/SystemUI/res/drawable/stat_sys_alarm.xml
index 3b2bc31..5754569 100644
--- a/packages/SystemUI/res/drawable/stat_sys_alarm.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_alarm.xml
@@ -13,13 +13,17 @@
   ~ 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="18dp"
-    android:height="18dp"
-    android:viewportWidth="24.0"
-    android:viewportHeight="24.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="2.5dp"
+    android:insetRight="2.5dp">
+    <vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="22dp"
+        android:height="17dp"
+        android:viewportWidth="24.0"
+        android:viewportHeight="24.0">
 
-    <path
-        android:fillColor="#ffffffff"
-        android:pathData="M22.0,5.7l-4.6,-3.9l-1.3,1.5l4.6,3.9L22.0,5.7zM7.9,3.4L6.6,1.9L2.0,5.7l1.3,1.5L7.9,3.4zM12.5,8.0L11.0,8.0l0.0,6.0l4.7,2.9l0.8,-1.2l-4.0,-2.4L12.5,8.0zM12.0,4.0c-5.0,0.0 -9.0,4.0 -9.0,9.0c0.0,5.0 4.0,9.0 9.0,9.0s9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0zM12.0,20.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.9 3.1,-7.0 7.0,-7.0c3.9,0.0 7.0,3.1 7.0,7.0C19.0,16.9 15.9,20.0 12.0,20.0z"/>
-</vector>
+        <path
+            android:fillColor="#ffffffff"
+            android:pathData="M22.0,5.7l-4.6,-3.9l-1.3,1.5l4.6,3.9L22.0,5.7zM7.9,3.4L6.6,1.9L2.0,5.7l1.3,1.5L7.9,3.4zM12.5,8.0L11.0,8.0l0.0,6.0l4.7,2.9l0.8,-1.2l-4.0,-2.4L12.5,8.0zM12.0,4.0c-5.0,0.0 -9.0,4.0 -9.0,9.0c0.0,5.0 4.0,9.0 9.0,9.0s9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0zM12.0,20.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.9 3.1,-7.0 7.0,-7.0c3.9,0.0 7.0,3.1 7.0,7.0C19.0,16.9 15.9,20.0 12.0,20.0z"/>
+    </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_cast.xml b/packages/SystemUI/res/drawable/stat_sys_cast.xml
index c9e65e0..df28638 100644
--- a/packages/SystemUI/res/drawable/stat_sys_cast.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_cast.xml
@@ -13,13 +13,16 @@
     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="18dp"
-        android:height="18dp"
-        android:viewportWidth="48.0"
-        android:viewportHeight="48.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="2.5dp"
+    android:insetRight="2.5dp">
+    <vector android:width="22dp"
+            android:height="17dp"
+            android:viewportWidth="48.0"
+            android:viewportHeight="48.0">
 
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M2.0,36.0l0.0,6.0l6.0,0.0C8.0,38.7 5.3,36.0 2.0,36.0zM2.0,28.0l0.0,4.0c5.5,0.0 10.0,4.5 10.0,10.0l4.0,0.0C16.0,34.3 9.7,28.0 2.0,28.0zM38.0,14.0L10.0,14.0l0.0,3.3c7.9,2.6 14.2,8.8 16.7,16.7L38.0,34.0L38.0,14.0zM2.0,20.0l0.0,4.0c9.9,0.0 18.0,8.1 18.0,18.0l4.0,0.0C24.0,29.8 14.1,20.0 2.0,20.0zM42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,6.0l4.0,0.0l0.0,-6.0l36.0,0.0l0.0,28.0L28.0,38.0l0.0,4.0l14.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0z"/>
-</vector>
+        <path
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M2.0,36.0l0.0,6.0l6.0,0.0C8.0,38.7 5.3,36.0 2.0,36.0zM2.0,28.0l0.0,4.0c5.5,0.0 10.0,4.5 10.0,10.0l4.0,0.0C16.0,34.3 9.7,28.0 2.0,28.0zM38.0,14.0L10.0,14.0l0.0,3.3c7.9,2.6 14.2,8.8 16.7,16.7L38.0,34.0L38.0,14.0zM2.0,20.0l0.0,4.0c9.9,0.0 18.0,8.1 18.0,18.0l4.0,0.0C24.0,29.8 14.1,20.0 2.0,20.0zM42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,6.0l4.0,0.0l0.0,-6.0l36.0,0.0l0.0,28.0L28.0,38.0l0.0,4.0l14.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0z"/>
+    </vector>
+</inset>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
index f53f0e4..e2d3539 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="48.0"
         android:viewportHeight="48.0">
 
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
index 2aac4ee..94c40ba 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="48.0"
         android:viewportHeight="48.0">
 
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
index 26d2632..d7463a4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="9.0dp"
-        android:height="18dp"
+        android:width="8.5dp"
+        android:height="17dp"
         android:viewportWidth="12.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
index 5aaf93b..6309b6d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="9.75dp"
-        android:height="18dp"
+        android:width="9.208dp"
+        android:height="17dp"
         android:viewportWidth="13.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
index b7d84f0..4067ae5 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="9.0dp"
-        android:height="18dp"
+        android:width="8.5dp"
+        android:height="17dp"
         android:viewportWidth="12.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
index 7111457..acaa9b1 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="3.75dp"
-        android:height="18dp"
+        android:width="3.541dp"
+        android:height="17dp"
         android:viewportWidth="5.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
index 97962b2..7985237 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="5.25dp"
-        android:height="18dp"
+        android:width="4.958dp"
+        android:height="17dp"
         android:viewportWidth="7.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
index 4859c14..fda8761 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="4.5dp"
-        android:height="18dp"
+        android:width="4.25dp"
+        android:height="17dp"
         android:viewportWidth="6.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
index d6446db..c08ff20 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="9.75dp"
-        android:height="18dp"
+        android:width="9.208dp"
+        android:height="17dp"
         android:viewportWidth="13.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
index 7f7d5fc..363e231 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="4.5dp"
-        android:height="18dp"
+        android:width="4.25dp"
+        android:height="17dp"
         android:viewportWidth="6.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_location.xml b/packages/SystemUI/res/drawable/stat_sys_location.xml
new file mode 100644
index 0000000..433f73b
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_location.xml
@@ -0,0 +1,29 @@
+<!--
+  ~ 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
+  -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="1.5dp"
+    android:insetRight="1.5dp">
+        <vector
+            android:width="20dp"
+            android:height="17dp"
+            android:viewportWidth="48.0"
+            android:viewportHeight="48.0">
+
+        <path
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0s14.0,-15.5 14.0,-26.0C38.0,10.3 31.7,4.0 24.0,4.0zM24.0,23.0c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0c2.8,0.0 5.0,2.2 5.0,5.0S26.8,23.0 24.0,23.0z"/>
+        </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
index 352d86f..f017d58 100644
--- a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
@@ -13,13 +13,16 @@
     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">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="3dp"
+    android:insetRight="3dp">
+    <vector android:width="24dp"
+            android:height="18dp"
+            android:viewportWidth="24.0"
+            android:viewportHeight="24.0">
 
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/>
-</vector>
+        <path
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/>
+    </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
index 67d9259..e1e81fd 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
index 3bbb800..c0dfcf4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
index 55f764a..a53e946 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
index b82e428..6bc55cd 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
index ca0eeb3..537c788 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
index abc8dd1..7d9376e 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
index 2b3e571..09fe33a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
index d47f167..8ec5500 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
index 7d4dd8a..bb98541 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
index 5b1bac3..a468410 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
index 45d34a2..d25fc1c 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
@@ -15,8 +15,8 @@
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:autoMirrored="true"
-        android:width="18dp"
-        android:height="18dp"
+        android:width="17dp"
+        android:height="17dp"
         android:viewportWidth="24.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_vpn_ic.xml b/packages/SystemUI/res/drawable/stat_sys_vpn_ic.xml
new file mode 100644
index 0000000..7ca8c40
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_vpn_ic.xml
@@ -0,0 +1,24 @@
+<!--
+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.
+-->
+<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_wifi_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
index 4965674..be930e8 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
index e9cad0e..b2691f6 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
index 7d588a3..dde781d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
index 348f963..65931f4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
index 4fbdd69..63d9dca 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
index 66588f0..7ba4895 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
index 1f3de74..7d393b4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
index aa5d2ed..e2cde53 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
index ca53b56..ec8137f 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
index 1c7a539..9d02980 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
index c68fb49..95c6531 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
@@ -14,8 +14,8 @@
     limitations under the License.
 -->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="20dp"
-        android:height="18dp"
+        android:width="18.41dp"
+        android:height="17dp"
         android:viewportWidth="26.0"
         android:viewportHeight="24.0">
     <path
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
index 73d7cba..9dabb03 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
@@ -13,13 +13,16 @@
     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">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="2.5dp"
+    android:insetRight="2.5dp">
+    <vector android:width="23dp"
+            android:height="18dp"
+            android:viewportWidth="24.0"
+            android:viewportHeight="24.0">
 
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M12.0,17.273l6.1800003,3.7269993 -1.6350002,-7.0290003 5.455,-4.7269993 -7.191,-0.6170006 -2.809,-6.627 -2.809,6.627 -7.191,0.6170006 5.455,4.7269993 -1.6349998,7.0290003z"/>
-</vector>
+        <path
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M12.0,17.273l6.1800003,3.7269993 -1.6350002,-7.0290003 5.455,-4.7269993 -7.191,-0.6170006 -2.809,-6.627 -2.809,6.627 -7.191,0.6170006 5.455,4.7269993 -1.6349998,7.0290003z"/>
+    </vector>
+</inset>
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
index d8ab078..7573de0 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
@@ -13,13 +13,16 @@
     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="19dp"
-        android:height="19dp"
-        android:viewportWidth="48.0"
-        android:viewportHeight="48.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:insetLeft="2.5dp"
+    android:insetRight="2.5dp">
+    <vector android:width="22dp"
+            android:height="17dp"
+            android:viewportWidth="48.0"
+            android:viewportHeight="48.0">
 
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0C44.0,13.0 35.0,4.0 24.0,4.0zM24.0,40.0c-8.8,0.0 -16.0,-7.2 -16.0,-16.0c0.0,-3.7 1.3,-7.1 3.4,-9.8l22.4,22.4C31.1,38.7 27.7,40.0 24.0,40.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8z"/>
-</vector>
+        <path
+            android:fillColor="#FFFFFFFF"
+            android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0C44.0,13.0 35.0,4.0 24.0,4.0zM24.0,40.0c-8.8,0.0 -16.0,-7.2 -16.0,-16.0c0.0,-3.7 1.3,-7.1 3.4,-9.8l22.4,22.4C31.1,38.7 27.7,40.0 24.0,40.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8z"/>
+    </vector>
+</inset>
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index faa2820..b5f917a 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -44,7 +44,7 @@
         android:layout_toStartOf="@id/multi_user_switch"
         android:layout_alignWithParentIfMissing="true"
         android:layout_marginStart="16dp"
-        android:paddingEnd="2dp">
+        android:paddingEnd="@dimen/system_icons_keyguard_padding_end">
         <FrameLayout android:id="@+id/system_icons_container"
             android:layout_width="wrap_content"
             android:layout_height="@dimen/status_bar_height"
diff --git a/packages/SystemUI/res/layout/notification_guts.xml b/packages/SystemUI/res/layout/notification_guts.xml
index 566c304..d52c274 100644
--- a/packages/SystemUI/res/layout/notification_guts.xml
+++ b/packages/SystemUI/res/layout/notification_guts.xml
@@ -15,11 +15,10 @@
     limitations under the License.
 -->
 
-<FrameLayout
+<com.android.systemui.statusbar.NotificationGuts
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/notification_guts_bg"
     android:id="@+id/notification_guts"
     android:visibility="gone"
     android:clickable="true"
@@ -78,13 +77,23 @@
         </LinearLayout>
 
         <ImageButton style="@android:style/Widget.Material.Light.Button.Borderless.Small"
+                 android:id="@+id/notification_inspect_app_provided_settings"
+                 android:layout_width="52dp"
+                 android:layout_height="match_parent"
+                 android:layout_weight="0"
+                 android:gravity="center"
+                 android:src="@drawable/ic_settings"
+                 android:visibility="gone"
+                />
+
+        <ImageButton style="@android:style/Widget.Material.Light.Button.Borderless.Small"
                 android:id="@+id/notification_inspect_item"
                 android:layout_width="52dp"
                 android:layout_height="match_parent"
                 android:layout_weight="0"
                 android:gravity="center"
                 android:contentDescription="@string/status_bar_notification_inspect_item_title"
-                android:src="@drawable/ic_settings"
+                android:src="@drawable/ic_info"
                 />
     </LinearLayout>
-</FrameLayout>
+</com.android.systemui.statusbar.NotificationGuts>
diff --git a/packages/SystemUI/res/layout/notification_public_default.xml b/packages/SystemUI/res/layout/notification_public_default.xml
new file mode 100644
index 0000000..acfc4bb
--- /dev/null
+++ b/packages/SystemUI/res/layout/notification_public_default.xml
@@ -0,0 +1,77 @@
+<?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
+  -->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:internal="http://schemas.android.com/apk/prv/res/android"
+    android:id="@+id/status_bar_latest_event_content"
+    android:layout_width="match_parent"
+    android:layout_height="64dp"
+    internal:layout_minHeight="64dp"
+    internal:layout_maxHeight="64dp"
+    >
+    <ImageView android:id="@+id/icon"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginStart="12dp"
+        android:layout_marginEnd="12dp"
+        android:scaleType="centerInside"
+        />
+    <DateTimeView android:id="@+id/time"
+        android:textAppearance="@android:style/TextAppearance.Material.Notification.Time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="8dp"
+        android:layout_alignParentEnd="true"
+        android:layout_alignBaseline="@id/title"
+        android:singleLine="true"
+        android:gravity="center"
+        android:paddingStart="8dp"
+        android:visibility="gone"
+        />
+    <TextView android:id="@+id/title"
+        android:textAppearance="@android:style/TextAppearance.Material.Notification.Title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_toEndOf="@id/icon"
+        android:layout_toStartOf="@id/time"
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:fadingEdge="horizontal"
+        />
+    <ImageView android:id="@+id/profile_badge_line3"
+        android:layout_width="@*android:dimen/notification_badge_size"
+        android:layout_height="@*android:dimen/notification_badge_size"
+        android:layout_below="@id/title"
+        android:layout_marginStart="4dp"
+        android:layout_marginEnd="8dp"
+        android:layout_alignParentEnd="true"
+        android:scaleType="fitCenter"
+        android:visibility="gone"
+        />
+    <TextView android:id="@+id/text"
+        android:textAppearance="@android:style/TextAppearance.Material.Notification"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignStart="@id/title"
+        android:layout_below="@id/title"
+        android:layout_toStartOf="@id/profile_badge_line3"
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:fadingEdge="horizontal"
+        />
+</RelativeLayout>
diff --git a/packages/SystemUI/res/layout/qs_detail.xml b/packages/SystemUI/res/layout/qs_detail.xml
index 5cdf819..2eb99ba 100644
--- a/packages/SystemUI/res/layout/qs_detail.xml
+++ b/packages/SystemUI/res/layout/qs_detail.xml
@@ -40,7 +40,6 @@
                 android:layout_height="wrap_content"
                 android:layout_marginEnd="8dp"
                 android:minWidth="132dp"
-                android:text="@string/quick_settings_more_settings"
                 android:textAppearance="@style/TextAppearance.QS.DetailButton"
                 android:focusable="true" />
 
@@ -50,9 +49,8 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:minWidth="88dp"
-                android:text="@string/quick_settings_done"
                 android:textAppearance="@style/TextAppearance.QS.DetailButton"
                 android:focusable="true"/>
 
     </LinearLayout>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/recents_empty.xml b/packages/SystemUI/res/layout/recents_empty.xml
index 1ef9cad..4b68e77 100644
--- a/packages/SystemUI/res/layout/recents_empty.xml
+++ b/packages/SystemUI/res/layout/recents_empty.xml
@@ -23,6 +23,6 @@
     android:textSize="16sp"
     android:textColor="#ffffffff"
     android:text="@string/recents_empty_message"
-    android:fontFamily="sans-serif-light"
+    android:fontFamily="sans-serif"
     android:background="#80000000"
     android:visibility="gone" />
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
index ae54f8c..5889c55 100644
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -25,6 +25,13 @@
     android:gravity="center_vertical"
     android:orientation="horizontal"
     >
+    <ImageView
+        android:id="@+id/vpn"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:paddingEnd="6dp"
+        android:src="@drawable/stat_sys_vpn_ic"
+        />
     <FrameLayout
         android:id="@+id/wifi_combo"
         android:layout_height="wrap_content"
@@ -37,20 +44,15 @@
             />
     </FrameLayout>
     <View
-        android:layout_height="6dp"
-        android:layout_width="6dp"
+        android:id="@+id/wifi_signal_spacer"
+        android:layout_width="4dp"
+        android:layout_height="4dp"
         android:visibility="gone"
-        android:id="@+id/spacer"
         />
     <FrameLayout
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
         >
-        <View
-            android:layout_height="6dp"
-            android:layout_width="6dp"
-            android:visibility="invisible"
-            />
         <FrameLayout
             android:id="@+id/mobile_combo"
             android:layout_width="wrap_content"
@@ -68,6 +70,12 @@
                 />
         </FrameLayout>
     </FrameLayout>
+    <View
+        android:id="@+id/wifi_airplane_spacer"
+        android:layout_width="4dp"
+        android:layout_height="4dp"
+        android:visibility="gone"
+        />
     <ImageView
         android:id="@+id/airplane"
         android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index beb8e00..0d414f9 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -43,8 +43,8 @@
     <LinearLayout android:id="@+id/status_bar_contents"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:paddingStart="6dip"
-        android:paddingEnd="6dip"
+        android:paddingStart="6dp"
+        android:paddingEnd="8dp"
         android:orientation="horizontal"
         >
 
@@ -91,7 +91,7 @@
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:singleLine="true"
-                android:paddingStart="6dip"
+                android:paddingStart="7dp"
                 android:gravity="center_vertical|start"
                 />
         </com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index f9e7852..34e062c 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -60,11 +60,14 @@
         android:layout_alignWithParentIfMissing="true"
         android:layout_marginStart="16dp"
         android:background="@drawable/ripple_drawable"
-        android:paddingEnd="2dp" >
+        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" />
+            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"
diff --git a/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml b/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml
index 351177b..ef85847 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml
@@ -64,9 +64,4 @@
             />
     </LinearLayout>
 
-    <com.android.systemui.statusbar.NotificationScrimView
-        android:id="@+id/scrim_view"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-
 </com.android.systemui.statusbar.NotificationOverflowContainer>
diff --git a/packages/SystemUI/res/layout/status_bar_notification_row.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
index ef4e27c..e9d86d6 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_row.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_row.xml
@@ -52,16 +52,12 @@
         android:paddingStart="8dp"
         />
 
-    <include
-        layout="@layout/notification_guts"
-        android:id="@+id/notification_guts"
+    <ViewStub
+        android:layout="@layout/notification_guts"
+        android:id="@+id/notification_guts_stub"
+        android:inflatedId="@+id/notification_guts"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         />
 
-    <com.android.systemui.statusbar.NotificationScrimView
-        android:id="@+id/scrim_view"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-
 </com.android.systemui.statusbar.ExpandableNotificationRow>
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 09e541f..29fec41 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -26,24 +26,6 @@
     android:fitsSystemWindows="true"
     android:descendantFocusability="afterDescendants">
 
-    <FrameLayout android:id="@+id/brightness_mirror"
-            android:layout_width="@dimen/notification_panel_width"
-            android:layout_height="wrap_content"
-            android:layout_gravity="@integer/notification_panel_layout_gravity"
-            android:paddingLeft="@dimen/notification_side_padding"
-            android:paddingRight="@dimen/notification_side_padding"
-            android:visibility="gone">
-        <FrameLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:elevation="2dp"
-                android:background="@drawable/brightness_mirror_background">
-            <include layout="@layout/quick_settings_brightness_dialog"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content" />
-        </FrameLayout>
-    </FrameLayout>
-
     <com.android.systemui.statusbar.AlphaOptimizedFrameLayout
             android:id="@+id/backdrop"
             android:layout_width="match_parent"
@@ -69,6 +51,24 @@
         android:layout_width="match_parent"
         android:layout_height="@dimen/status_bar_height" />
 
+    <FrameLayout android:id="@+id/brightness_mirror"
+                 android:layout_width="@dimen/notification_panel_width"
+                 android:layout_height="wrap_content"
+                 android:layout_gravity="@integer/notification_panel_layout_gravity"
+                 android:paddingLeft="@dimen/notification_side_padding"
+                 android:paddingRight="@dimen/notification_side_padding"
+                 android:visibility="gone">
+        <FrameLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:elevation="2dp"
+                android:background="@drawable/brightness_mirror_background">
+            <include layout="@layout/quick_settings_brightness_dialog"
+                     android:layout_width="match_parent"
+                     android:layout_height="wrap_content" />
+        </FrameLayout>
+    </FrameLayout>
+
     <com.android.systemui.statusbar.phone.PanelHolder
         android:id="@+id/panel_holder"
         android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/system_icons.xml b/packages/SystemUI/res/layout/system_icons.xml
index 69f9c142..8f25d99 100644
--- a/packages/SystemUI/res/layout/system_icons.xml
+++ b/packages/SystemUI/res/layout/system_icons.xml
@@ -30,12 +30,12 @@
         android:id="@+id/signal_cluster"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginStart="2dp"/>
+        android:layout_marginStart="2.5dp"/>
 
     <!-- battery must be padded below to match assets -->
     <com.android.systemui.BatteryMeterView android:id="@+id/battery"
-        android:layout_height="16dp"
-        android:layout_width="10.5dp"
-        android:layout_marginBottom="0.33dp"
-        android:layout_marginStart="4dip"/>
+        android:layout_height="14.5dp"
+        android:layout_width="9.5dp"
+        android:layout_marginBottom="@dimen/battery_margin_bottom"
+        android:layout_marginStart="7dp"/>
 </LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index e2b4475..215d0f1 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Deursoek"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Foon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Ontsluit"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ontsluit"</string>
     <string name="phone_label" msgid="2320074140205331708">"maak foon oop"</string>
     <string name="camera_label" msgid="7261107956054836961">"maak kamera oop"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Toestel beveilig."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Toestel nie beveilig nie."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Toestel beveilig, vertrouensagent aktief."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Toestel nie beveilig nie, vertrouensagent aktief."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Gesigherkenning werk tans, vertrouensagent aktief."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Knoppie vir wissel van invoermetode."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Versoenbaarheid-zoem se knoppie."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoem kleiner na groter skerm."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Twee stawe."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Drie stawe."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sein vol."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Aan."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Af"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Gekoppel."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Koppel tans."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter geaktiveer."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Luitoestel-vibreer."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Luitoestel stil."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Maak <xliff:g id="APP">%s</xliff:g> toe."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> verwerp."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Begin tans <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Soek"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Gly op vir <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Gly links vir <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Gee onderbrekings, insluitend wekkers, nie"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Geen onderbrekings nie. Nie eens wekkers nie."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Geen onderbrekings nie"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Net prioriteitonderbrekings"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Jou volgende wekker is om <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Begin nou"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Geen kennisgewings nie"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Toestel kan gemonitor word"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profiel kan gemonitor word"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Netwerk kan dalk gemonitor word"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Toestelmonitering"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profielmonitering"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Netwerkmonitering"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Deaktiveer VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Ontkoppel VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Jy is aan \'n VPN gekoppel (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nJou VPN-diensverskaffer kan jou toestel en netwerkaktiwiteit monitor, insluitend e-posse, programme en veilige webwerwe."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Hierdie toestel word bestuur deur:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJou administrateur kan jou netwerkaktiwiteit monitor, insluitend e-posse, programme en veilige webwerwe. Kontak jou administrateur vir meer inligting.\n\nJy het ook \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" toestemming gegee om \'n VPN-verbinding op te stel. Die program kan ook jou netwerkaktiwiteit monitor."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Hierdie toestel word bestuur deur:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJou administrateur is in staat om jou netwerkaktiwiteit te monitor, insluitend e-posse, programme en veilige webwerwe. Kontak jou administrateur vir meer inligting.\n\nJy is ook aan \'n VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") gekoppel. Jou VPN-diensverskaffer kan ook jou netwerkaktiwiteit monitor."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Hierdie profiel word bestuur deur:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJou administrateur kan jou toestel en netwerkaktiwiteit, insluitend e-posse, programme en veilige webwerwe, monitor.\n\nKontak jou administrateur vir meer inligting."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Hierdie toestel word bestuur deur:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJou profiel word bestuur deur:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJou administrateur kan jou toestel en netwerkaktiwiteit, insluitend e-posse, programme en veilige webwerwe, monitor.\n\nKontak jou administrateur vir meer inligting."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Hierdie profiel word bestuur deur:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJou administrateur kan jou netwerkaktiwiteit, insluitend e-posse, programme en veilige webwerwe, monitor. Kontak jou administrateur vir meer inligting.\n\nOok het jy \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" toestemming gegee om \'n VPN-verbinding op te stel. Hierdie program kan ook netwerkaktiwiteit monitor."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Hierdie profiel word bestuur deur:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJou administrateur kan jou netwerkaktiwiteit, insluitend e-posse, programme en veilige webwerwe, monitor. Kontak jou administrateur vir meer inligting.\n\nJy is ook gekoppel aan \'n VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Jou VPN-diensverskaffer kan ook netwerkaktiwiteit monitor."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Dié toestel word bestuur deur:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJou profiel word bestuur deur:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJou administrateur kan netwerkaktiwiteit, soos e-pos, programme en veilige webwerwe, monitor. Kontak jou administrateur vir meer inligting.\n\nOok het jy \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" toegelaat om \'n VPN-verbinding te skep. Dié program kan ook netwerkaktiwiteit monitor."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Dié toestel word bestuur deur:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJou profiel word bestuur deur:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJou administrateur kan jou netwerkaktiwiteit, soos e-posse, programme en veilige webwerwe, monitor. Kontak jou administrateur vir meer inligting.\n\nJy is ook gekoppel aan \'n VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Jou VPN-diensverskaffer kan ook netwerkaktiwiteit monitor."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Toestel sal gesluit bly totdat jy dit handmatig ontsluit"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Kry kennisgewings vinniger"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Sien hulle voordat jy ontsluit"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nee dankie"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Stel op"</string>
     <string name="muted_by" msgid="6147073845094180001">"Gedemp deur <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 9ab4437..23f9136 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ፈልግ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ካሜራ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ስልክ"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ክፈት"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ክፈት"</string>
     <string name="phone_label" msgid="2320074140205331708">"ስልክ ክፈት"</string>
     <string name="camera_label" msgid="7261107956054836961">"ካሜራ ክፈት"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"የመሣሪያ ደህንነት ተረጋግጧል።"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"የመሣሪያ ደህንነት አልተረጋገጠም።"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"የመሣሪያ ደህንነት ተረጋግጧል፣ የእምነት ወኪል ገቢር።"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"የመሣሪያ ደህንነት አልተረጋገጠም፣ የእምነት ወኪል ገቢር።"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"መልክ ማወቅ በማሄድ ላይ፣ የእምነት ወኪል ገቢር።"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"የግቤት ስልት አዝራር ቀይር"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"የተኳኋኝአጉላ አዝራር።"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"አነስተኛውን ማያ ወደ ትልቅ አጉላ።"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"ሁለት አሞሌዎች።"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"ሶስት አሞሌዎች።"</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_connected" msgid="8366256693719499665">"ተገናኝቷል።"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"በማገናኘት ላይ።"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter ነቅቷል።"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"የስልክ ጥሪ ይንዘር።"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"የስልክ ጥሪ ፀጥታ።"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> አስወግድ።"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ተሰናብቷል::"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> በመጀመር ላይ።"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ፍለጋ"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"ለ<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ወደ ላይ አንሸራትት።"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"ለ<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ወደ ግራ አንሸራትት።"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ምንም ማቋረጦች የሉም፣ ማንቂያዎችን ጨምሮ"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ምንም ማቋረጦች የሉም። ማንቂያዎችም እንኳ።"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ምንም ማቋረጦች የሉም"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ቅድሚያ የሚሰጣቸው ማቋረጦች ብቻ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ቀጣዩ ማንቂያ ደውልዎ በ<xliff:g id="ALARM_TIME">%s</xliff:g> ነው"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"አሁን ጀምር"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"ምንም ማሳወቂያ የለም"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"መሣሪያው ክትትል የሚደረግበት ሊሆን ይችላል"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"መገለጫ ክትትል ሊደረግበት ይችላል"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"አውታረ መረብ በክትትል እየተደረገበት ሊሆን ይችላል"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"የመሣሪያ ክትትል"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"መገለጫን መከታተል"</string>
     <string name="monitoring_title" msgid="169206259253048106">"የአውታረ መረብ ክትትል"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN አሰናክል"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"የVPN ግንኙነት አቋርጥ"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"ከአንድ VPN («<xliff:g id="APPLICATION">%1$s</xliff:g>») ጋር ተገናኝተዋል።\n\nየእርስዎ VPN አገልግሎት አቅራቢ መሣሪያዎን እና ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የአውታረ መረብ እንቅስቃሴዎን መከታተል ይችላል።"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የአውታረ መረብ እንቅስቃሴዎን መከታተል ይችላል። ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም፣ «<xliff:g id="APPLICATION">%2$s</xliff:g>» አንድ የVPN ግንኙነት እንዲያዋቅር ፍቃድ ሰጥተዋቸዋል። ይህ መተግበሪያም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የአውታረ መረብ እንቅስቃሴዎን መከታተል ይችላል። ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም ከአንድ VPN («<xliff:g id="APPLICATION">%2$s</xliff:g>») ጋር ተገናኝተዋል። የእርስዎ የVPN አገልግሎት አቅራቢዎም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የእርስዎን መሣሪያ እና የአውታረ መረብ እንቅስቃሴ የመከታተል ችሎታ አላቸው።\n\nተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nየእርስዎ መገለጫ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የእርስዎን መሣሪያ እና የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።\n\nተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ይህ መገለጫ የሚቀናበረው በ፦\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የአውታረ መረብ እንቅስቃሴዎን የመከታተል ችሎታ አላቸው። ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም «<xliff:g id="APPLICATION">%2$s</xliff:g>» የቪፒኤን ግንኙነት የማዋቀር ፍቃድ ሰጥተውታል። ይህ መተግበሪያ እንዲሁም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የእርስዎን መሣሪያ እና የአውታረ መረብ እንቅስቃሴ የመከታተል ችሎታ አላቸው።ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም ከአንድ ቪፒኤን («<xliff:g id="APPLICATION">%2$s</xliff:g>») ጋር ተገናኝተዋል። የእርስዎ የቪፒኤን አገልግሎት አቅራቢም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ይህ መሣሪያ የሚቀናበረው በ፦\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nየእርስዎ መገለጫ የሚቀናበረው በ፦\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የአውታረ መረብ እንቅስቃሴዎን የመከታተል ችሎታ አላቸው። ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም «<xliff:g id="APPLICATION">%3$s</xliff:g>» የቪፒኤን ግንኙነት የማዋቀር ፍቃድ ሰጥተውታል። ይህ መተግበሪያ እንዲሁም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ይህ መሣሪያ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nየእርስዎ መገለጫ የሚተዳደረው በ፦\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nየእርስዎ አስተዳዳሪ ኢሜይሎችን፣ መተግበሪያዎችን እና ደህንነታቸው የተጠበቁ ድር ጣቢያዎችን ጨምሮ የእርስዎን መሣሪያ እና የአውታረ መረብ እንቅስቃሴ የመከታተል ችሎታ ይኖራቸዋል።ተጨማሪ መረጃ ለማግኘት አስተዳዳሪዎን ያነጋግሩ።\n\nእንዲሁም ከአንድ ቪፒኤን («<xliff:g id="APPLICATION">%3$s</xliff:g>») ጋር ተገናኝተዋል። የእርስዎ የቪፒኤን አገልግሎት አቅራቢም የአውታረ መረብ እንቅስቃሴ መከታተል ይችላል።"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"አይ፣ አመሰግናለሁ"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"አዋቅር"</string>
     <string name="muted_by" msgid="6147073845094180001">"ድምጽ በ<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ተዘግቷል"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index e36b49c..6416006 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"بحث"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"الكاميرا"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"الهاتف"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"إلغاء القفل"</string>
     <string name="unlock_label" msgid="8779712358041029439">"إلغاء القفل"</string>
     <string name="phone_label" msgid="2320074140205331708">"فتح الهاتف"</string>
     <string name="camera_label" msgid="7261107956054836961">"فتح الكاميرا"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"الجهاز مؤمّن."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"الجهاز غير مؤمّن."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"الجهاز مؤمّن، الوكيل المعتمد نشط."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"الجهاز غير مؤمّن، الوكيل المعتمد نشط."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"اكتشاف الوجه قيد التشغيل، الوكيل المعتمد نشط."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"زر تبديل طريقة الإدخال."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"زر تكبير/تصغير للتوافق."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"استخدام التكبير/التصغير لتحويل شاشة صغيرة إلى شاشة أكبر"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"شريطان."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"ثلاثة أشرطة."</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_connected" msgid="8366256693719499665">"متصل."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"جارٍ الاتصال."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1‎ X‎"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"تم تمكين المبرقة الكاتبة."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"رنين مع الاهتزاز."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"رنين صامت."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"إزالة <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"تمت إزالة <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"جارٍ بدء <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"بحث"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"تمرير لأعلى لـ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"تمرير لليسار لـ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"بدون إزعاج، بما في ذلك المنبهات"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"عدم المقاطعة، ولا بالتنبيهات كذلك."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"بدون مقاطعات"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"المقاطعات ذات الأولوية فقط"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"التنبيه المقبل في <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"البدء الآن"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"ليس هناك أي اشعارات"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ربما تتم مراقبة الجهاز"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ربما تتم مراقبة الملف الشخصي"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"قد تكون الشبكة خاضعة للمراقبة"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"مراقبة الأجهزة"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"مراقبة الملف الشخصي"</string>
     <string name="monitoring_title" msgid="169206259253048106">"مراقبة الشبكات"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"تعطيل الشبكة الظاهرية الخاصة"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"‏قطع الاتصال بشبكة VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"أنت متصل بشبكة ظاهرية خاصة (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nيمكن لموفر خدمة الشبكة الظاهرية الخاصة مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"هذا الجهاز تتم إدارته بواسطة:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nيمكن للمشرف مراقبة نشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات اتصل بالمشرف.\n\nوكذلك، فإنك منحت \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" إذنًا لإعداد الاتصال بالشبكة الظاهرية الخاصة. ويمكن لهذا التطبيق مراقبة نشاط الشبكة أيضًا."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"هذا الجهاز تتم إدارته بواسطة:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nيمكن للمشرف مراقبة نشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات اتصل بالمشرف.\n\nوكذلك، فإنك متصل بالشبكة الظاهرية الخاصة (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). ويمكن لمزوّد خدمة الشبكة الظاهرية الخاصة مراقبة نشاط الشبكة أيضًا."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"تتم إدارة هذا الملف الشخصي بواسطة:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة.\n\nللحصول على مزيد من المعلومات، اتصل بالمشرف."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"تتم إدارة هذا الجهاز بواسطة:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nتتم إدارة ملفك الشخصي بواسطة:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة.\n\nللحصول على مزيد من المعلومات، اتصل بالمشرف."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"تتم إدارة هذا الملف الشخصي بواسطة:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات، اتصل بالمشرف.\n\nوكذلك، فإنك منحت \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" إذنًا لإعداد اتصال بشبكة ظاهرية خاصة. يتمكن هذا التطبيق من مراقبة نشاط الشبكة كذلك."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"تتم إدارة هذا الجهاز بواسطة:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات، اتصل بالمشرف.\n\nوكذلك، فإنك متصل بشبكة ظاهرية خاصة (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). يتمكن موفر خدمة الشبكة الظاهرية الخاصة من مراقبة نشاط الشبكة كذلك."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"تتم إدارة هذا الجهاز بواسطة:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nتتم إدارة ملفك الشخصي بواسطة:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات، اتصل بالمشرف.\n\nوكذلك، فإنك منحت \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" إذنًا لإعداد اتصال بشبكة ظاهرية خاصة. يتمكن هذا التطبيق من مراقبة نشاط الشبكة كذلك."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"‏تتم إدارة هذا الجهاز بواسطة:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nتتم إدارة ملفك الشخصي بواسطة:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nيتمكن المشرف من مراقبة جهازك ونشاط الشبكة، بما في ذلك الرسائل الإلكترونية والتطبيقات ومواقع الويب الآمنة. للحصول على مزيد من المعلومات، اتصل بالمشرف.\n\nوكذلك، فإنك متصل بشبكة ظاهرية خاصة VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). يتمكن موفر خدمة الشبكة الظاهرية الخاصة من مراقبة نشاط الشبكة كذلك."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"لا، شكرًا"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"إعداد"</string>
     <string name="muted_by" msgid="6147073845094180001">"تم كتم الصوت بواسطة <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 129edb7..ee27bb2 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Търсене"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Отключване"</string>
     <string name="unlock_label" msgid="8779712358041029439">"отключване"</string>
     <string name="phone_label" msgid="2320074140205331708">"отваряне на телефона"</string>
     <string name="camera_label" msgid="7261107956054836961">"отваряне на камерата"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Бутон за превключване на метода на въвеждане."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Бутон за промяна на мащаба с цел съвместимост."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Промяна на мащаба на екрана от по-малък до по-голям."</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Две чертички."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Три чертички."</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_connected" msgid="8366256693719499665">"Има връзка."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Установява се връзка."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -160,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter бе активиран."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Вибрира при звънене."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Звънът е заглушен."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Отхвърляне на <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Приложението <xliff:g id="APP">%s</xliff:g> е отхвърлено."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> се стартира."</string>
@@ -289,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Търсене"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Плъзнете нагоре за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Плъзнете наляво за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Без прекъсвания, включително будилници"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Без прекъсвания. Дори без будилници."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Без прекъсвания"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Само приоритетни прекъсвания"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Следващият ви будилник е в <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -339,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Стартиране сега"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Няма известия"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Устройството може да се наблюдава"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Възможно е потребителският профил да се наблюдава"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Мрежата може да се наблюдава"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Наблюдение на устройството"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Наблюдаване на потр. профил"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Наблюдение на мрежата"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Деактивиране на VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Прекратяване на връзката с VPN"</string>
@@ -349,7 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Свързани сте с виртуална частна мрежа („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nДоставчикът ви на услуги за VPN може да наблюдава устройството ви и активността ви в мрежата, включително имейлите, приложенията и защитените уебсайтове."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"У-вото се управлява от:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторът ви може да наблюдава активн. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За повече информация се свържете с него.\n\nСъщо така дадохте на „<xliff:g id="APPLICATION">%2$s</xliff:g>“ разрешение да настрои връзка с вирт. частна мрежа (VPN). Прилож. може да наблюдава и активн. в мрежата."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"У-вото се управлява от:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторът ви може да наблюдава активн. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За повече информация се свържете с него.\n\nСъщо така сте свързани с вирт. частна мрежа (VPN) („<xliff:g id="APPLICATION">%2$s</xliff:g>“). Доставчикът ви на услуги за VPN може да наблюдава и активн. ви в мрежата."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Този потребителски профил се управлява от:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторът ви може да наблюдава устройството ви и активността ви в мрежата, включително имейлите, приложенията и защитените уебсайтове.\n\nЗа още информация се свържете с него."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Това устройство се управлява от:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПотребителският ви профил се управлява от:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистраторът ви може да наблюдава устройството ви и активността ви в мрежата, включително имейлите, приложенията и защитените уебсайтове.\n\nЗа още информация се свържете с него."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Този потр. профил се управлява от:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторът ви може да наблюдава акт. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За още информация се свържете с него.\n\nСъщо така дадохте на <xliff:g id="APPLICATION">%2$s</xliff:g> разрешение да настрои връзка с вирт. частна мрежа (VPN). Прилож. може да наблюдава и акт. в мрежата."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Този потр. профил се управлява от:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторът ви може да наблюдава акт. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За още информация се свържете с него.\n\nСъщо така сте свързани с вирт. частна мрежа (VPN) (<xliff:g id="APPLICATION">%2$s</xliff:g>). Доставчикът ви на услуги за VPN може да наблюдава и акт. ви в мрежата."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Това у-во се управлява от:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПотр. ви профил се управлява от:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистр. ви може да наблюдава акт. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За още информация се свържете с него.\n\nСъщо така дадохте на <xliff:g id="APPLICATION">%3$s</xliff:g> разрешение да настрои връзка с VPN. Приложението може да наблюдава и акт. в мрежата."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"У-вото се управлява от:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПотр. ви профил се управлява от:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистраторът ви може да наблюдава акт. ви в мрежата, вкл. имейлите, прилож. и защитените уебсайтове. За още информация се свържете с него.\n\nСъщо така сте свързани с VPN (<xliff:g id="APPLICATION">%3$s</xliff:g>). Доставчикът ви на услуги за VPN може да наблюдава и акт. ви в мрежата."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Устройството ще остане заключено, докато не го отключите ръчно"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Получавайте известия по-бързо"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Вижте известията, преди да отключите"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Няма нужда"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Настройване"</string>
+    <string name="muted_by" msgid="6147073845094180001">"Заглушено от <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn-rBD/strings.xml
index f8232bc..812b19c 100644
--- a/packages/SystemUI/res/values-bn-rBD/strings.xml
+++ b/packages/SystemUI/res/values-bn-rBD/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"অনুসন্ধান করুন"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ক্যামেরা"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ফোন"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"আনলক করুন"</string>
     <string name="unlock_label" msgid="8779712358041029439">"আনলক করুন"</string>
     <string name="phone_label" msgid="2320074140205331708">"ফোন খুলুন"</string>
     <string name="camera_label" msgid="7261107956054836961">"ক্যামেরা খুলুন"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"ডিভাইস সুরক্ষিত।"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"ডিভাইস সুরক্ষিত নয়।"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"ডিভাইস সুরক্ষিত, বিশ্বস্ত এজেন্ট সক্রিয়।"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"ডিভাইস সুরক্ষিত নয়, বিশ্বস্ত এজেন্ট সক্রিয়।"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"মুখ শনাক্তকরণ চলছে, বিশ্বস্ত এজেন্ট সক্রিয়।"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ইনপুট পদ্ধতির বোতাম পরিবর্তন করুন৷"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"সামঞ্জস্যের জুম বোতাম৷"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ছোট থেকে বৃহৎ স্ক্রীণে জুম করুন৷"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"দুইটি দণ্ড৷"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"তিনটি দণ্ড৷"</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_connected" msgid="8366256693719499665">"সংযুক্ত৷"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"সংযুক্ত হচ্ছে৷"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"১ X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"টেলি টাইপরাইটার সক্ষম করা আছে৷"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"রিং বাজার সাথে স্পন্দিত করুন৷"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"রিং বাজানো বন্ধ করুন৷"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> খারিজ করুন।"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> খারিজ করা হয়েছে৷"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> তারাঙ্কিত করা হচ্ছে।"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"অনুসন্ধান করুন"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> এর জন্য উপরের দিকে স্লাইড করুন৷"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> এর জন্য বাম দিকে স্লাইড করুন৷"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ব্যাঘাত ছাড়াই, অ্যালার্মও নেই"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ব্যাঘাত ছাড়াই। এমনকি অ্যালার্মও নেই।"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"কোনো বাধা নয়"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"শুধুমাত্র প্রাধান্য বাধাগুলি"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"আপনার পরবর্তী অ্যালার্মের সময় <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"এখন শুরু করুন"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"কোনো বিজ্ঞপ্তি নেই"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ডিভাইসটি নিরীক্ষণ করা হতে পারে"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"প্রোফাইল পর্যবেক্ষণ করা হতে পারে"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"নেটওয়ার্ক নিরীক্ষণ করা হতে পারে"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ডিভাইস নিরীক্ষণ"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"প্রোফাইল পর্যবেক্ষণ করা"</string>
     <string name="monitoring_title" msgid="169206259253048106">"নেটওয়ার্ক নিরীক্ষণ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN অক্ষম করুন"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN এর সংযোগ বিচ্ছিন্ন করুন"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"আপনি একটি VPN (“<xliff:g id="APPLICATION">%1$s</xliff:g>”) এর সঙ্গে সংযুক্ত আছেন।\n\nআপনার VPN পরিষেবা প্রদানকারী ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে পারেন।"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nআপনার প্রশাসক ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nআপনি \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"-কে একটি VPN সংযোগ সেট আপ করার অনুমতি দিয়েছেন। এই অ্যাপ্লিকেশান নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nআপনার প্রশাসক ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nএছাড়াও, আপনি একটি VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") এ সংযুক্ত আছেন। আপনার VPN পরিষেবা প্রদানকারী নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"এই প্রোফাইলটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nআপনার প্রশাসক ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে পারেন।\n\nআরো তথ্যের জন্য আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"এই ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nআপনার প্রোফাইলটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nআপনার প্রশাসক ইমেল,অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম।\n\nআরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"এই ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nআপনার প্রশাসক ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nআপনি \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"-কে একটি VPN সংযোগ সেট আপ করার অনুমতিও দিয়েছেন। এই অ্যাপ্লিকেশান নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"এই প্রোফাইলটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nআপনার প্রশাসক ইমেল, অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nএছাড়াও, আপনি একটি VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") এ সংযুক্ত আছেন। আপনার VPN পরিষেবা প্রদানকারী নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"এই ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nআপনার প্রোফাইলটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nআপনার প্রশাসক ইমেল,অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nআপনি \"<xliff:g id="APPLICATION">%3$s</xliff:g>\"-কে একটি VPN সংযোগ সেট আপ করার অনুমতিও দিয়েছেন। এই অ্যাপ্লিকেশান নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"এই ডিভাইসটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nআপনার প্রোফাইলটি পরিচালনা করছে:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nআপনার প্রশাসক ইমেল,অ্যাপ্লিকেশান ও নিরাপদ ওয়েবসাইটগুলি সহ আপনার নেটওয়ার্ক ক্রিয়াকলাপ নিরীক্ষণ করতে সক্ষম। আরো তথ্যের জন্য, আপনার প্রশাসকের সঙ্গে যোগাযোগ করুন।\n\nএছাড়াও, আপনি একটি VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") এ সংযুক্ত আছেন। আপনার VPN পরিষেবা প্রদানকারী নেটওয়ার্ক ক্রিয়াকলাপও নিরীক্ষণ করতে পারে।"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"না থাক"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"সেট আপ"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> দ্বারা নিঃশব্দ করা হয়েছে"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 3636316..ee20ce9 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Càmera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telèfon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloqueja"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloqueja"</string>
     <string name="phone_label" msgid="2320074140205331708">"obre el telèfon"</string>
     <string name="camera_label" msgid="7261107956054836961">"obre la càmera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"El dispositiu està protegit."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"El dispositiu no està protegit."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"El dispositiu està protegit. L\'agent de confiança està activat."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"El dispositiu no està protegit. L\'agent de confiança està activat."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"La detecció facial s\'està executant. L\'agent de confiança està activat."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Botó de canvi del mètode d\'entrada."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botó de zoom de compatibilitat."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Amplia menys com més gran sigui la pantalla."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dues barres."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tres barres."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Senyal complet."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activat."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desactivat."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connectat."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"S’està connectant."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Teletip activat."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Mode vibració."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Mode silenci."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Descarta <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"S\'ha omès <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"S\'està iniciant <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Cerca"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Fes lliscar el dit cap amunt per <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Fes lliscar el dit cap a l\'esquerra per <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sense interrupcions (incloses les alarmes)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Sense interrupcions. Ni tan sols alarmes."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Cap interrupció"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Només les interrupcions prioritàries"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"La propera alarma és a les <xliff:g id="ALARM_TIME">%s</xliff:g>."</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Comença ara"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Cap notificació"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"És possible que el dispositiu estigui supervisat."</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"El perfil es pot supervisar"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"És possible que la xarxa estigui supervisada."</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Supervisió del dispositiu"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Supervisió del perfil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Supervisió de la xarxa"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Desactiva la VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desconnecta la VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Estàs connectat a una VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nEl proveïdor de serveis de VPN pot supervisar el dispositiu i l\'activitat de la xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Administrador del dispositiu:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'administrador pot supervisar la teva activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per obtenir més informació, contacta amb l\'administrador.\n\nA més, has donat permís a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" per configurar una connexió VPN. Aquesta aplicació també pot supervisar l\'activitat de xarxa."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Administrador del dispositiu:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'administrador pot supervisar la teva activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per obtenir més informació, contacta amb l\'administrador.\n\nA més, estàs connectat a una VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). El proveïdor del servei VPN també pot supervisar l\'activitat de xarxa."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Administrador del perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'administrador pot supervisar el dispositiu i la teva activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs.\n\nPer obtenir més informació, contacta amb l\'administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Administrador del dispositiu:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador del perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'administrador pot supervisar el dispositiu i la teva activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs webs segurs.\n\nPer obtenir més informació, contacta amb l\'administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Admin. perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'admin. pot supervisar l\'activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per obtenir més informació, contacta amb l\'admin.\n\nHas donat permís a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" per configurar una connexió VPN. Aquesta aplicació també pot supervisar l\'activitat de xarxa."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Admin. dispositiu:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'admin. pot supervisar l\'activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per obtenir més informació, contacta amb l\'administrador.\n\nEstàs connectat a una VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). El proveïdor del servei VPN també pot supervisar l\'activitat de xarxa."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Admin. dispositiu:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdmin. perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'admin. pot supervisar l\'activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per a més informació, contacta amb l\'admin.\n\nHas donat permís a \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" per configurar una connexió VPN. L\'aplicació pot supervisar l\'activitat de xarxa."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Admin. dispos.:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdmin. perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'admin. pot supervisar l\'activitat de xarxa, inclosos els correus electrònics, les aplicacions i els llocs web segurs. Per a més informació, contacta amb l\'administrador.\n\nEstàs connectat a una VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). El prov. del servei VPN també pot supervisar l\'activitat de xarxa."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"El dispositiu continuarà bloquejat fins que no el desbloquegis manualment."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Obtén notificacions més ràpidament"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Mostra-les abans de desbloquejar"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configura"</string>
     <string name="muted_by" msgid="6147073845094180001">"Silenciat per <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 09d5cde..89911ad 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -69,7 +69,7 @@
     <string name="screenshot_saving_ticker" msgid="7403652894056693515">"Ukládání snímku obrazovky..."</string>
     <string name="screenshot_saving_title" msgid="8242282144535555697">"Ukládání snímku obrazovky..."</string>
     <string name="screenshot_saving_text" msgid="2419718443411738818">"Probíhá ukládání snímku obrazovky."</string>
-    <string name="screenshot_saved_title" msgid="6461865960961414961">"Snímek obrazovky zachycen."</string>
+    <string name="screenshot_saved_title" msgid="6461865960961414961">"Snímek obrazovky Snímek obrazovky pořízen."</string>
     <string name="screenshot_saved_text" msgid="1152839647677558815">"Snímek obrazovky zobrazíte dotykem."</string>
     <string name="screenshot_failed_title" msgid="705781116746922771">"Snímek obrazovky se nepodařilo zachytit."</string>
     <string name="screenshot_failed_text" msgid="1260203058661337274">"Snímek obrazovky nelze pořídit kvůli nedostatku místa, nebo to aplikace či vaše organizace zakazuje."</string>
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hledat"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Odemknout"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odemknout"</string>
     <string name="phone_label" msgid="2320074140205331708">"otevřít telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"spustit fotoaparát"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Zařízení je zabezpečeno."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Zařízení není zabezpečeno."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Zařízení je zabezpečeno, agent důvěry je aktivní."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Zařízení není zabezpečeno, agent důvěry je aktivní."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Je spuštěno rozpoznávání obličeje a je aktivní agent důvěry."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Tlačítko přepnutí metody zadávání"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tlačítko úpravy velikosti z důvodu kompatibility"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zvětšit menší obrázek na větší obrazovku."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dvě čárky."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tři čárky."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Plný signál."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Zapnuto."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Vypnuto."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Připojeno."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Připojování."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Rozhraní TeleTypewriter zapnuto."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibrační vyzvánění."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tiché vyzvánění."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Zavřít aplikaci <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikace <xliff:g id="APP">%s</xliff:g> byla odebrána."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Spouštění aplikace <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Vyhledávání"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Přejeďte prstem nahoru: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Přejeďte prstem doleva: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Žádná přerušení, ani budíky"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Žádná vyrušení, dokonce ani budíky."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Žádná vyrušení"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Pouze prioritní vyrušení"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Další budík je nastaven na: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Spustit"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Žádná oznámení"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Zařízení může být sledováno"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil může být monitorován"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Síť může být sledována"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Sledování zařízení"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitoring profilu"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Sledování sítě"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Deaktivovat VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Odpojit VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Jste připojeni k síti VPN (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nPoskytovatel připojení VPN může sledovat vaši aktivitu zařízení a aktivitu v síti, včetně e-mailů, aplikací a zabezpečených webových stránek."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Toto zařízení je spravováno následující organizací:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávce může sledovat vaši aktivitu v síti, včetně e-mailů, aplikací a zabezpečených webových stránek. Další informace získáte od svého správce.\n\nNavíc jste aplikaci <xliff:g id="APPLICATION">%2$s</xliff:g> udělili oprávnění k nastavení připojení VPN. Aktivitu v síti může sledovat také tato aplikace."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Toto zařízení je spravováno následující organizací:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávce může sledovat vaši aktivitu v síti, včetně e-mailů, aplikací a zabezpečených webových stránek. Další informace získáte od svého správce.\n\nNavíc jste připojeni také k síti VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Vaši aktivitu v síti může sledovat také poskytovatel připojení VPN."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Tento profil spravuje organizace:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrátor může monitorovat vaše zařízení a síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů.\n\nO další informace požádejte svého administrátora."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Toto zařízení spravuje organizace:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizace:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrátor může monitorovat vaše zařízení a síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů.\n\nO další informace požádejte svého administrátora."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Tento profil spravuje organizace:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrátor může monitorovat vaši síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů. O další informace požádejte svého administrátora.\n\nTaké jste aplikaci <xliff:g id="APPLICATION">%2$s</xliff:g> dali oprávnění nastavit připojení VPN. Tato aplikace může síťovou aktivitu monitorovat také."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Tento profil spravuje organizace:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrátor může monitorovat vaši síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů. O další informace požádejte svého administrátora.\n\nJste také připojeni k síti VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>“). Síťovou aktivitu může monitorovat i poskytovatel služby VPN."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Toto zařízení spravuje organizace:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizace:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrátor může monitorovat vaši síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů. O další informace požádejte svého administrátora.\n\nTaké jste aplikaci <xliff:g id="APPLICATION">%3$s</xliff:g> dali oprávnění nastavit připojení VPN. Tato aplikace může síťovou aktivitu monitorovat také."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Toto zařízení spravuje organizace:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizace:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrátor může monitorovat vaši síťovou aktivitu, včetně e-mailů, aplikací a zabezpečených webů. O další informace požádejte svého administrátora.\n\nJste také připojeni k síti VPN („<xliff:g id="APPLICATION">%3$s</xliff:g>“). Síťovou aktivitu může monitorovat i poskytovatel služby VPN."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Zařízení zůstane uzamčeno, dokud je ručně neodemknete"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Čtěte si oznámení rychleji"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Můžete si je přečíst před odemčením obrazovky."</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ne, děkuji"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Nastavit"</string>
     <string name="muted_by" msgid="6147073845094180001">"Ignorováno stranou <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 036bbcb..a4b36ed 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Søg"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås op"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås op"</string>
     <string name="phone_label" msgid="2320074140205331708">"åbn telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"åbn kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Enheden er sikret."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Enheden er ikke sikret."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Enheden er sikret, trust agent er aktiv."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Enheden er ikke sikret, trust agent er aktiv."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Ansigtsgenkendelse kører, trust agent er aktiv."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Skift indtastningsmetode-knappen."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knap for kompatibilitetszoom."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom mindre til større skærm."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"To bjælker."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tre bjælker."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Fuldt signal."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Til."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Fra."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Forbundet."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Opretter forbindelse..."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter aktiveret."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Ringervibration."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Lydløs."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Afvis <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> er annulleret."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> startes."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Søgning"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Glid op for at <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Glid til venstre for at <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Ingen afbrydelser, heller ikke alarmer"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Ingen afbrydelser. Ikke engang alarmer."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Ingen afbrydelser"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Kun prioriterede afbrydelser"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Dit næste alarm er indstillet til kl. <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Start nu"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ingen underretninger"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Enheden kan være overvåget"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilen kan overvåges"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Netværket kan være overvåget"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Overvågning af enhed"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilovervågning"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Overvågning af netværk"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Deaktiver VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Afbryd VPN-forbindelse"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Du har forbindelse til et VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nDin VPN-udbyder kan overvåge din enhed og netværksaktivitet, herunder e-mails, apps og sikre websites."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Denne enhed administreres af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administrator kan overvåge din netværksaktivitet, f.eks. e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu gav også \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" tilladelse til at konfigurere en VPN-forbindelse. Denne app kan også overvåge netværksaktiviteten."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Denne enhed administreres af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administrator kan overvåge din netværksaktivitet, f.eks. e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu har også forbindelse til et VPN-netværk (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Din VPN-udbyder kan også overvåge netværksaktiviteten."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Denne profil administreres af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administrator kan overvåge din enhed og netværksaktivitet, herunder e-mails, apps og sikre websites.\n\nKontakt administratoren for at få flere oplysninger."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Denne enhed administreres af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil administreres af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nDin administrator kan overvåge din enhed og netværksaktivitet, herunder e-mails, apps og sikre websites.\n\nKontakt administratoren for at få flere oplysninger."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Denne enhed administreres af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administrator kan overvåge din netværksaktivitet, f.eks. e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu har også givet \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" tilladelse til at konfigurere en VPN-forbindelse. Denne app kan også overvåge netværksaktiviteten."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Denne profil administreres af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administrator kan overvåge din netværksaktivitet, herunder e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu har desuden forbindelse til et VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Din VPN-udbyder kan også overvåge din netværksaktivitet."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Enheden administreres af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil administreres af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoren kan overvåge din netværksaktivitet, herunder e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu har desuden givet \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" tilladelse til at konfigurere en VPN-forbindelse. Denne app kan også overvåge netværksaktivitet."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Enheden administreres af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil administreres af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoren kan overvåge din netværksaktivitet, herunder e-mails, apps og sikre websites. Kontakt administratoren for at få flere oplysninger.\n\nDu har desuden forbindelse til et VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Din VPN-udbyder kan også overvåge din netværksaktivitet."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Enheden vil forblive låst, indtil du manuelt låser den op"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Modtag underretninger hurtigere"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Se dem, før du låser op"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nej tak"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Konfigurer"</string>
     <string name="muted_by" msgid="6147073845094180001">"Lyden blev afbrudt af <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index bf70d24..4675c8f 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Suchen"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefonnummer"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Entsperren"</string>
     <string name="unlock_label" msgid="8779712358041029439">"Entsperren"</string>
     <string name="phone_label" msgid="2320074140205331708">"Telefon öffnen"</string>
     <string name="camera_label" msgid="7261107956054836961">"Kamera öffnen"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Gerät ist gesichert."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Gerät ist nicht gesichert."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Gerät ist gesichert, Trust Agent ist aktiv."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Gerät ist nicht gesichert, Trust Agent ist aktiv."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Gesichtserkennung läuft, Trust Agent ist aktiv."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Schaltfläche zum Ändern der Eingabemethode"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Schaltfläche für Kompatibilitätszoom"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom auf einen größeren Bildschirm"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Zwei Balken"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Drei Balken"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Volle Signalstärke"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"An"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Aus"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Verbunden"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Verbindung wird hergestellt."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Schreibtelefonie aktiviert"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Klingeltonmodus \"Vibration\""</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Klingelton lautlos"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> beenden"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> entfernt"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> wird gestartet."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Suche"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Zum <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> nach oben schieben"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Zum <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> nach links schieben"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Unterbrechungsfrei, gilt auch für Alarme"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Keine Unterbrechungen. Auch keine Weckrufe."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Keine Unterbrechungen"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Nur wichtige Unterbrechungen"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Nächster Weckruf: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Jetzt starten"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Keine Benachrichtigungen"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Das Gerät wird möglicherweise überwacht."</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil wird möglicherweise überwacht."</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Das Netzwerk wird möglicherweise überwacht."</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Geräteüberwachung"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilüberwachung"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Netzwerküberwachung"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN deaktivieren"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN-Verbindung trennen"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Sie sind mit einem VPN verbunden: <xliff:g id="APPLICATION">%1$s</xliff:g>.\n\nIhr VPN-Anbieter kann Ihr Gerät und Ihre Netzwerkaktivität überwachen, einschließlich E-Mails, Apps und sicherer Websites."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Dieses Gerät wird verwaltet von:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivitäten überwachen, darunter E-Mails, Apps und sichere Websites. Mehr erfahren Sie von Ihrem Administrator.\n\nSie haben zudem \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" gestattet, eine VPN-Verbindung herzustellen. Diese App kann auch Ihre Netzwerkaktivitäten überwachen."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Dieses Gerät wird verwaltet von:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivitäten überwachen, einschließlich E-Mails, Apps und sicherer Websites. Mehr erfahren Sie von Ihrem Administrator.\n\nSie sind zudem mit einem VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") verbunden. Ihr VPN-Anbieter kann ebenfalls Ihre Netzwerkaktivitäten überwachen."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Dieses Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIhr Administrator kann Ihr Gerät und Ihre Netzwerkaktivität überwachen, einschließlich E-Mails, Apps und sicherer Websites.\n\nWeitere Informationen erhalten Sie von Ihrem Administrator."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Dieses Gerät wird verwaltet von:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIhr Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nIhr Administrator kann Ihr Gerät und Ihre Netzwerkaktivität überwachen, einschließlich E-Mails, Apps und sicherer Websites.\n\nWeitere Informationen erhalten Sie von Ihrem Administrator."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Dieses Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivität überwachen, darunter E-Mails, Apps und sichere Websites. Mehr erfahren Sie von Ihrem Administrator.\n\nSie haben zudem \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" gestattet, eine VPN-Verbindung herzustellen. Diese App kann Ihre Netzwerkaktivität auch überwachen."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Dieses Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivitäten überwachen, einschließlich E-Mails, Apps und sicherer Websites. Mehr erfahren Sie von Ihrem Administrator.\n\nSie sind zudem mit einem VPN verbunden (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Ihr VPN-Anbieter kann die Netzwerkaktivität ebenfalls überwachen."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Dieses Gerät wird verwaltet von:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIhr Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivität überwachen, einschließlich E-Mails, Apps und sicherer Websites. Weitere Informationen erhalten Sie von Ihrem Administrator.\n\nSie haben zudem \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" das Herstellen einer VPN-Verbindung gestattet. Diese App kann die Netzwerkaktivität auch überwachen."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Dieses Gerät wird verwaltet von:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIhr Profil wird verwaltet von:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nIhr Administrator kann Ihre Netzwerkaktivität überwachen, einschließlich E-Mails, Apps und sicherer Websites. Weitere Informationen erhalten Sie von Ihrem Administrator.\n\nSie sind zudem mit einem VPN verbunden (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Ihr VPN-Anbieter kann die Netzwerkaktivität ebenfalls überwachen."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Das Gerät bleibt gesperrt, bis Sie es manuell entsperren."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Benachrichtigungen schneller erhalten"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Vor dem Entsperren anzeigen"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nein danke"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Einrichten"</string>
     <string name="muted_by" msgid="6147073845094180001">"Stummgeschaltet durch <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index a314cb1..02f0ca0 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Αναζήτηση"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Φωτογραφική μηχανή"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Τηλέφωνο"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Ξεκλείδωμα"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ξεκλείδωμα"</string>
     <string name="phone_label" msgid="2320074140205331708">"άνοιγμα τηλεφώνου"</string>
     <string name="camera_label" msgid="7261107956054836961">"άνοιγμα φωτογραφικής μηχανής"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Η συσκευή ασφαλίστηκε."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Η συσκευή δεν ασφαλίστηκε."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Η συσκευή ασφαλίστηκε, ο παράγοντας εμπιστοσύνης είναι ενεργός."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Η συσκευή δεν ασφαλίστηκε, ο παράγοντας εμπιστοσύνης είναι ενεργός."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Ανίχνευση προσώπου σε λειτουργία, ο παράγοντας εμπιστοσύνης είναι ενεργός."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Κουμπί εναλλαγής μεθόδου εισόδου"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Κουμπί εστίασης συμβατότητας."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Ζουμ από μικρότερη σε μεγαλύτερη οθόνη."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Δύο γραμμές."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Τρεις γραμμές."</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_connected" msgid="8366256693719499665">"Έχει συνδεθεί."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Σύνδεση."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Το TeleTypewriter ενεργοποιήθηκε."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Δόνηση ειδοποίησης ήχου."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ειδοποίηση ήχου στο αθόρυβο."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Παράβλεψη <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Απορρίφθηκαν <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Έναρξη <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Αναζήτηση"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Κύλιση προς τα επάνω για <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Κύλιση προς τα αριστερά για <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Χωρίς διακοπές, συμπεριλαμβανομένων των ξυπνητηριών"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Χωρίς διακοπές. Ούτε ειδοποιήσεις,"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Χωρίς διακοπές"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Μόνο διακοπές προτεραιότητας"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Το επόμενο ξυπνητήρι είναι στις <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Έναρξη τώρα"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Δεν υπάρχουν ειδοποιήσεις"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Η συσκευή μπορεί να παρακολουθείται"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Το προφίλ ενδέχεται να παρακολουθείται"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Το δίκτυο ενδέχεται να παρακολουθείται"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Παρακολούθηση συσκευής"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Παρακολούθηση προφίλ"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Παρακολούθηση δικτύου"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Απενεργοποίηση VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Αποσύνδεση VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Είστε συνδεδεμένοι σε VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nΟ πάροχος της υπηρεσίας VPN μπορεί να παρακολουθεί τη δραστηριότητα της συσκευής σας και του δικτύου, συμπεριλαμβανομένων των μηνυμάτων ηλεκτρονικού ταχυδρομείου, των εφαρμογών και των ασφαλών ιστότοπων."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Η διαχ. της συσκευής γίνεται από:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακ. τη δραστ. του δικτύου, όπως τα μην. ηλ. ταχυδρ., τις εφαρ. και τους ασφ. ιστότ. Για περισ. πληροφορίες, επικοιν. με το διαχειριστή.\n\nΕπίσης, επιτρέψατε στο \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" να ρυθμίσει σύνδεση VPN. Αυτή η εφαρ. μπορεί να παρακ. τη δραστ. του δικτύου."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Η διαχείριση της συσκευής γίνεται από:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολ. τη δραστ. του δικτύου, όπως τα μην. ηλεκ. ταχυδρ., τις εφαρμογές και τους ασφαλείς ιστότοπους. Για περισ. πληροφορίες, επικοιν. με το διαχειριστή.\n\nΕπίσης, είστε συνδεδ. σε VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Ο παροχέας VPN μπορεί να παρακολ. τη δραστ. του δικτύου."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Η διαχείριση του προφίλ γίνεται από:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και δραστηριότητα δικτύου, email, εφαρμογές και ασφαλείς ιστότοπους.\n\nΓια πληροφορίες, επικοινωνήστε με το διαχειριστή."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Η διαχείριση της συσκευής γίνεται από:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nΗ διαχείριση του προφίλ σας γίνεται από:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και τη δραστηριότητα δικτύου σας, τα μηνύματα ηλεκτρονικού ταχυδρομείου, τις εφαρμογές και τους ασφαλείς ιστότοπους.\n\nΓια πληροφορίες, επικοινωνήστε με το διαχειριστή."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Η διαχείριση του προφίλ γίνεται από:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και δραστηριότητα δικτύου, email, εφαρμογές και ασφαλείς ιστότοπους. Για πληροφορίες, επικοινωνήστε με το διαχειριστή.\n\nΠαραχωρήσατε άδεια \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" για ρύθμιση σύνδεσης VPN. Η εφαρμογή μπορεί να παρακολουθεί τη δραστηριότητα δικτύου."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Η διαχείριση του προφίλ γίνεται από:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και δραστηριότητα δικτύου, email, εφαρμογές και ασφαλείς ιστότοπους. Για πληροφορίες, επικοινωνήστε με το διαχειριστή.\n\nΕπίσης, συνδεθήκατε σε VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Ο πάροχος VPN μπορεί να παρακολουθεί τη δραστηριότητα δικτύου."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Η διαχείριση της συσκευής γίνεται από:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nΗ διαχείριση του προφίλ γίνεται από:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και δραστηριότητα δικτύου, email, εφαρμογές και ασφαλείς ιστότοπους. Για πληροφορίες, επικοινωνήστε με το διαχειριστή.\n\nΠαραχωρήσατε άδεια \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" για ρύθμιση σύνδεσης VPN. Η εφαρμογή μπορεί να παρακολουθεί τη δραστηριότητα δικτύου."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Η διαχείριση της συσκευής γίνεται από:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nΗ διαχείριση του προφίλ γίνεται από:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nΟ διαχειριστής μπορεί να παρακολουθεί τη συσκευή και τη δραστηριότητα δικτύου σας, τα email, εφαρμογές και ασφαλείς ιστότοπους.\n\nΕπίσης, συνδεθήκατε σε VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Ο πάροχος VPN μπορεί να παρακολουθεί τη δραστηριότητα δικτύου σας."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Όχι"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Ρύθμιση"</string>
     <string name="muted_by" msgid="6147073845094180001">"Σίγαση από <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 6273bc2..ffbdcb9 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Phone"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
     <string name="camera_label" msgid="7261107956054836961">"open camera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Device secured."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Device not secured."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Device secured, trust agent active."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Device not secured, trust agent active."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Face detection running, trust agent active."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Switch input method button."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Two bars."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Three bars."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal full."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"On."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Off."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connected."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Connecting."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter enabled."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Ringer vibrate."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Starting <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Search"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Slide up for <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Slide left for <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"No interruptions, including alarms"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"No interruptions. Not even alarms."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"No interruptions"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Priority interruptions only"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Your next alarm is at <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Start now"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"No notifications"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Device may be monitored"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profile may be monitored"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Network may be monitored"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Device monitoring"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profile monitoring"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Network monitoring"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Disable VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Disconnect VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"You\'re connected to a VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nYour VPN service provider can monitor your device and network activity including emails, apps and secure websites."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"This device is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"This device is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator can monitor your device and network activity, including emails, apps and secure websites.\n\nFor more information, contact your administrator."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator can monitor your device and network activity, including emails, apps and secure websites.\n\nFor more information, contact your administrator."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Device will stay locked until you manually unlock"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Get notifications faster"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"See them before you unlock"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No, thanks"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Setup"</string>
     <string name="muted_by" msgid="6147073845094180001">"Muted by <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 6273bc2..ffbdcb9 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Search"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Phone"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
     <string name="camera_label" msgid="7261107956054836961">"open camera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Device secured."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Device not secured."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Device secured, trust agent active."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Device not secured, trust agent active."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Face detection running, trust agent active."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Switch input method button."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Compatibility zoom button."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom smaller to larger screen."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Two bars."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Three bars."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal full."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"On."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Off."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connected."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Connecting."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter enabled."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Ringer vibrate."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ringer silent."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Dismiss <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> dismissed."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Starting <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Search"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Slide up for <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Slide left for <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"No interruptions, including alarms"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"No interruptions. Not even alarms."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"No interruptions"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Priority interruptions only"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Your next alarm is at <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Start now"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"No notifications"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Device may be monitored"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profile may be monitored"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Network may be monitored"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Device monitoring"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profile monitoring"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Network monitoring"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Disable VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Disconnect VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"You\'re connected to a VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nYour VPN service provider can monitor your device and network activity including emails, apps and secure websites."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"This device is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"This device is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator can monitor your device and network activity, including emails, apps and secure websites.\n\nFor more information, contact your administrator."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator can monitor your device and network activity, including emails, apps and secure websites.\n\nFor more information, contact your administrator."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Device will stay locked until you manually unlock"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Get notifications faster"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"See them before you unlock"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No, thanks"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Setup"</string>
     <string name="muted_by" msgid="6147073845094180001">"Muted by <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index a684b26..9b1f2af 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Teléfono"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
     <string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispositivo protegido"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispositivo no protegido"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispositivo protegido, agente de confianza activo"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispositivo no protegido, agente de confianza activo"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Detección de rostro en ejecución, agente de confianza activo"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Botón Cambiar método de entrada"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidad"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de pantalla más pequeña a más grande"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dos barras"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tres barras"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Señal excelente"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activado"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desactivado"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Conectado"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Conectando"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter habilitado"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Timbre en vibración"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Timbre en silencio"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rechazar <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> descartada."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Iniciando <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Buscar"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Desliza el dedo hacia arriba para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Desliza el dedo hacia la izquierda para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sin interrupciones, incluidas las alarmas"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Sin interrupciones (ni siquiera alarmas)"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Sin interrupciones"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Solo interrupciones de prioridad"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Próxima alarma a la(s) <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Comenzar ahora"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"No hay notificaciones"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Es posible que el dispositivo esté supervisado."</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Es posible que se supervise el perfil."</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Es posible que la red esté supervisada."</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Supervisión del dispositivo"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Supervisión del perfil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Supervisión de red"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Inhabilitar VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desconectar VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Estás conectado a una VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nEl proveedor de servicios de VPN puede supervisar la actividad de la red y del dispositivo, incluidos el correo electrónico, las aplicaciones y los sitios web seguros."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Dispositivo está administrado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red (correo electrónico, aplicaciones y sitios web seguros). Para más información, comunícate con el administrador.\n\nY permitiste que \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" configure una VPN. La aplicación también puede supervisar la actividad de red."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Dispositivo administrado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red (correo electrónico, aplicaciones y sitios web seguros). Para más información, comunícate con el administrador.\n\nY estás conectado a una VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). El proveedor de servicios de VPN puede supervisar la actividad de red."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Administrador de este perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar el dispositivo y la actividad de red, incluidos correos electrónicos, aplicaciones y sitios web seguros.\n\nPara más información, comunícate con el administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Administrador de este dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador de tu perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nEl administrador puede supervisar el dispositivo y la actividad de red, incluidos correos electrónicos, aplicaciones y sitios web seguros.\n\nPara más información, comunícate con el administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Administrador de perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red, como correos electrónicos, aplicaciones y sitios web seguros. Para más información, comunícate con el administrador.\n\nPermitiste que \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" configure una conexión VPN; también puede supervisar la actividad de red."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Administrador perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red, como correos electrónicos, aplicaciones y sitios web seguros. Para más información, comunícate con el administrador.\n\nEstás conectado a una VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). El proveedor de servicios VPN también puede supervisar la actividad de red."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Administrador dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red, como correos, aplicaciones y sitios web seguros. Para más información, comunícate con el administrador.\n\nPermitiste que \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" configure una conexión VPN; también puede supervisar la actividad de red."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Administrador dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nEl administrador puede supervisar la actividad de red, como correos, aplicaciones y sitios seguros. Para más información, comunícate con el administrador.\n\nEstás conectado a una VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). El proveedor de servicios VPN puede supervisar la actividad de red."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"El dispositivo permanecerá bloqueado hasta que lo desbloquees manualmente."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Recibe notificaciones más rápido"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ver antes de desbloquear"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurar"</string>
     <string name="muted_by" msgid="6147073845094180001">"Silenciados por <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 5b9c225..03fde10 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Teléfono"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
     <string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"El dispositivo es seguro."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"El dispositivo no es seguro."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"El dispositivo es seguro, agente de confianza activo."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"El dispositivo no es seguro, agente de confianza activo."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Reconocimiento facial en curso, agente de confianza activo."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Botón Cambiar método de entrada"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidad"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de pantalla más pequeña a más grande"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dos barras"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tres barras"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Señal al máximo"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Sí"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"No"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Conectado"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Conectando."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Teletipo habilitado"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Modo vibración"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Modo silencio"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ignorar <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Se ha eliminado <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Iniciando <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Buscar"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Desliza el dedo hacia arriba para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Desliza el dedo hacia la izquierda para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sin interrupciones, incluidas alarmas"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Sin interrupciones, ni siquiera alarmas."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Sin interrupciones"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Solo interrupciones de prioridad"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Siguiente alarma: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Iniciar ahora"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ninguna notificación"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Es posible que este dispositivo esté supervisado"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Es posible que se supervise el perfil"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Puede que la red esté supervisada"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Supervisión de dispositivo"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Supervisión del perfil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Supervisión de red"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Inhabilitar VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desconectar VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Estás conectado a una red VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nTu proveedor de servicios de VPN puede supervisar la actividad de tu red y de tu dispositivo, incluidos correos electrónicos, aplicaciones y sitios web seguros."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Este dispositivo está administrado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nTu administrador puede supervisar la actividad de tu red, incluidos correos electrónicos, aplicaciones y sitios web seguros. Para obtener más información, ponte en contacto con tu administrador.\n\nAdemás, has concedido permiso a <xliff:g id="APPLICATION">%2$s</xliff:g> para configurar una red VPN. Esta aplicación también puede supervisar tu red."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Este dispositivo está administrado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nTu administrador puede supervisar la actividad de tu red, incluidos correos electrónicos, aplicaciones y sitios web seguros. Para obtener más información, ponte en contacto con tu administrador.\n\nAdemás, estás conectado a una red VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). El proveedor de servicios de VPN también puede supervisar la actividad de la red."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Administrador de este perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nEl administrador puede supervisar tu dispositivo y actividad de red, como correos electrónicos, aplicaciones y sitios web seguros.\n\nPara obtener más información, ponte en contacto con el administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Administrador de este dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador de tu perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nEl administrador puede supervisar tu dispositivo y actividad de red, como correos electrónicos, aplicaciones y sitios web seguros.\n\nPara obtener más información, ponte en contacto con el administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Administrador perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrador puede supervisar actividad red, como correos electrónicos, aplicaciones y sitios web seguros. Para obtener más información, ponte en contacto con administrador.\n\nHas concedido permiso a <xliff:g id="APPLICATION">%2$s</xliff:g> para configurar conexión VPN, por lo que también puede supervisar actividad red."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Administrador del perfil:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrador puede supervisar actividad red, como correos electrónicos, aplicaciones y sitios web seguros. Para obtener más información, ponte en contacto con administrador.\n\nEstás conectado a red VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"), por lo que proveedor servicios VPN puede supervisar actividad red."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Administrador dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrador puede supervisar actividad red, como correos electrónicos, aplicaciones y sitios web seguros. Para info, ponte en contacto con administrador.\n\nHas concedido permiso a <xliff:g id="APPLICATION">%3$s</xliff:g> para configurar conexión VPN y también puede supervisar actividad red."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Administrador dispositivo:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAdministrador perfil:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrador puede supervisar actividad red, como correos electrónicos, aplicaciones y sitios web seguros. Para más info, ponte en contacto con administrador.\n\nEstás conectado a VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"), por lo que proveedor servicios VPN puede supervisar actividad red."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"El dispositivo permanecerá bloqueado hasta que se desbloquee manualmente"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Recibe notificaciones más rápido"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ver antes de desbloquear"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No, gracias"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurar"</string>
     <string name="muted_by" msgid="6147073845094180001">"Silenciado por <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et-rEE/strings.xml
index 0f11085..951757a 100644
--- a/packages/SystemUI/res/values-et-rEE/strings.xml
+++ b/packages/SystemUI/res/values-et-rEE/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Otsing"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kaamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Luku avamine"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ava lukk"</string>
     <string name="phone_label" msgid="2320074140205331708">"ava telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"ava kaamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Seade on kaitstud."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Seade ei ole kaitstud."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Seade on kaitstud, usaldusväärne agent on aktiivne."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Seade ei ole kaitstud, usaldusväärne agent on aktiivne."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Näotuvastus töötab, usaldusväärne agent on aktiivne."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Sisestusmeetodi vahetamise nupp."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Sobivussuumi nupp."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Suumi suuremale ekraanile vähem."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Kaks pulka."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Kolm pulka."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signaal on tugev."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Sees."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Väljas."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Ühendatud."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Ühenduse loomine."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter lubatud."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibreeriv kõlisti."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Vaikne kõlisti."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rakendusest <xliff:g id="APP">%s</xliff:g> loobumine."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Loobusite rakendusest <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Rakenduse <xliff:g id="APP">%s</xliff:g> käivitamine."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Otsing"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Lohistage üles: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Lohistage vasakule: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Ei mingeid katkestusi, k.a äratus"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Katkestusi pole. Pole isegi hoiatusi."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Mitte ühtegi katkestust"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Ainult prioriteetsed katkestused"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Teie järgmine äratus on <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Alusta kohe"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Märguandeid pole"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Seadet võidakse jälgida"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profiili võidakse jälgida"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Võrku võidakse jälgida"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Seadme jälgimine"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profiili jälgimine"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Võrgu jälgimine"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Keela VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Katkesta VPN-i ühendus"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Olete ühendatud VPN-iga („<xliff:g id="APPLICATION">%1$s</xliff:g>”).\n\nTeie VPN-i teenusepakkuja võib jälgida teie seadet ja võrgutegevust, sh meile, rakendusi ja turvalisi veebisaite."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Seda seadet haldab\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutegevust, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke ühendust administraatoriga.\n\nLisaks andsite rakendusele „<xliff:g id="APPLICATION">%2$s</xliff:g>” loa seadistada VPN-i ühendus. See rakendus võib ka jälgida teie võrgutegevust."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Seda seadet haldab\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutegevust, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke ühendust administraatoriga.\n\nSamuti olete ühendatud VPN-iga („<xliff:g id="APPLICATION">%2$s</xliff:g>”). VPN-i teenusepakkuja saab ka teie võrgutegevust jälgida."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Seda profiili haldab\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministraator saab jälgida teie seadet ja võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite.\n\nLisateabe saamiseks võtke administraatoriga ühendust."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Seda seadet haldab\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nTeie profiili haldab\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministraator saab jälgida teie seadet ja võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite.\n\nLisateabe saamiseks võtke administraatoriga ühendust."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Seda profiili haldab\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke administraatoriga ühendust.\n\nLisaks andsite rakendusele „<xliff:g id="APPLICATION">%2$s</xliff:g>” loa VPN-ühenduse seadistamiseks. Ka see rakendus saab teie võrgutoiminguid jälgida."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Seda profiili haldab\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke administraatoriga ühendust.\n\nLisaks olete ühendatud VPN-iga („<xliff:g id="APPLICATION">%2$s</xliff:g>”). Ka teie VPN-i teenusepakkuja saab teie võrgutoiminguid jälgida."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Seda seadet haldab\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nTeie profiili haldab\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke administraatoriga ühendust.\n\nLisaks andsite rakendusele „<xliff:g id="APPLICATION">%3$s</xliff:g>” loa VPN-ühenduse seadistamiseks. Ka see rakendus saab teie võrgutoiminguid jälgida."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Seda seadet haldab\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nTeie profiili haldab\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministraator saab jälgida teie võrgutoiminguid, sh meile, rakendusi ja turvalisi veebisaite. Lisateabe saamiseks võtke administraatoriga ühendust.\n\nLisaks olete ühendatud VPN-iga („<xliff:g id="APPLICATION">%3$s</xliff:g>”). Ka teie VPN-i teenusepakkuja saab teie võrgutoiminguid jälgida."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Seade jääb lukku, kuni selle käsitsi avate"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Saate märguandeid kiiremini"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Näete neid enne avamist"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Tänan, ei"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Seadistus"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> vaigistas"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu-rES/strings.xml
index 697963f..5226b9c 100644
--- a/packages/SystemUI/res/values-eu-rES/strings.xml
+++ b/packages/SystemUI/res/values-eu-rES/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Bilatu"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefonoa"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desblokeatu"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desblokeatu"</string>
     <string name="phone_label" msgid="2320074140205331708">"ireki telefonoan"</string>
     <string name="camera_label" msgid="7261107956054836961">"ireki kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Gailua babestuta dago."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Gailua ez dago babestuta."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Gailua babestuta dago eta fidagarritasun-agentea aktibo dago."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Gailua ez dago babestuta eta fidagarritasun-agentea aktibo dago."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Aurpegia hautemateko eginbidea abian da eta fidagarritasun-agentea aktibo dago."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Idazketa-metodoa aldatzeko botoia."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Zoom-bateragarritasunaren botoia."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Handiagotu pantaila txikia."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Bi barra."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Hiru barra."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Seinalea osoa."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Aktibatuta."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desaktibatuta."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Konektatuta."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Konektatzen."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter gaituta."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Tonu-jotzailea dardara moduan."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tonu-jotzailea isilik."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Baztertu <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> baztertu da."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> hasten."</string>
@@ -166,36 +168,36 @@
     <string name="accessibility_desc_recent_apps" msgid="8376953390514779637">"Azken pantailak."</string>
     <string name="accessibility_quick_settings_user" msgid="1104846699869476855">"<xliff:g id="USER">%s</xliff:g> erabiltzailea."</string>
     <string name="accessibility_quick_settings_wifi" msgid="5518210213118181692">"<xliff:g id="SIGNAL">%1$s</xliff:g>."</string>
-    <string name="accessibility_quick_settings_wifi_changed_off" msgid="8716484460897819400">"Wi-Fi konexioa desaktibatu da."</string>
-    <string name="accessibility_quick_settings_wifi_changed_on" msgid="6440117170789528622">"Wi-Fi konexioa aktibatu da."</string>
+    <string name="accessibility_quick_settings_wifi_changed_off" msgid="8716484460897819400">"Wi-Fi konexioa desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_wifi_changed_on" msgid="6440117170789528622">"Wi-Fi konexioa aktibatu egin da."</string>
     <string name="accessibility_quick_settings_mobile" msgid="4876806564086241341">"Datu mugikorrak: <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string>
     <string name="accessibility_quick_settings_battery" msgid="1480931583381408972">"Bateria <xliff:g id="STATE">%s</xliff:g>."</string>
     <string name="accessibility_quick_settings_airplane_off" msgid="7786329360056634412">"Hegaldi modua desaktibatuta dago."</string>
     <string name="accessibility_quick_settings_airplane_on" msgid="6406141469157599296">"Hegaldi modua aktibatuta dago."</string>
-    <string name="accessibility_quick_settings_airplane_changed_off" msgid="66846307818850664">"Hegaldi modua desaktibatu da."</string>
-    <string name="accessibility_quick_settings_airplane_changed_on" msgid="8983005603505087728">"Hegaldi modua aktibatu da."</string>
+    <string name="accessibility_quick_settings_airplane_changed_off" msgid="66846307818850664">"Hegaldi modua desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_airplane_changed_on" msgid="8983005603505087728">"Hegaldi modua aktibatu egin da."</string>
     <string name="accessibility_quick_settings_bluetooth_off" msgid="2133631372372064339">"Bluetooth konexioa desaktibatuta dago."</string>
     <string name="accessibility_quick_settings_bluetooth_on" msgid="7681999166216621838">"Bluetooth konexioa aktibatuta dago."</string>
     <string name="accessibility_quick_settings_bluetooth_connecting" msgid="6953242966685343855">"Bluetooth bidez konektatzen ari da."</string>
     <string name="accessibility_quick_settings_bluetooth_connected" msgid="4306637793614573659">"Bluetooth bidez konektatuta dago."</string>
-    <string name="accessibility_quick_settings_bluetooth_changed_off" msgid="2730003763480934529">"Bluetooth konexioa desaktibatu da."</string>
-    <string name="accessibility_quick_settings_bluetooth_changed_on" msgid="8722351798763206577">"Bluetooth konexioa aktibatu da."</string>
+    <string name="accessibility_quick_settings_bluetooth_changed_off" msgid="2730003763480934529">"Bluetooth konexioa desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_bluetooth_changed_on" msgid="8722351798763206577">"Bluetooth konexioa aktibatu egin da."</string>
     <string name="accessibility_quick_settings_location_off" msgid="5119080556976115520">"Kokapena hautemateko aukera desaktibatuta dago."</string>
     <string name="accessibility_quick_settings_location_on" msgid="5809937096590102036">"Kokapena hautemateko aukera aktibatuta dago."</string>
-    <string name="accessibility_quick_settings_location_changed_off" msgid="8526845571503387376">"Kokapena hautemateko aukera desaktibatu da."</string>
-    <string name="accessibility_quick_settings_location_changed_on" msgid="339403053079338468">"Kokapena hautemateko aukera aktibatu da."</string>
+    <string name="accessibility_quick_settings_location_changed_off" msgid="8526845571503387376">"Kokapena hautemateko aukera desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_location_changed_on" msgid="339403053079338468">"Kokapena hautemateko aukera aktibatu egin da."</string>
     <string name="accessibility_quick_settings_alarm" msgid="3959908972897295660">"Alarmaren ordua: <xliff:g id="TIME">%s</xliff:g>."</string>
     <string name="accessibility_quick_settings_close" msgid="3115847794692516306">"Itxi panela."</string>
     <string name="accessibility_quick_settings_more_time" msgid="3659274935356197708">"Denbora gehiago."</string>
     <string name="accessibility_quick_settings_less_time" msgid="2404728746293515623">"Denbora gutxiago."</string>
     <string name="accessibility_quick_settings_flashlight_off" msgid="4936432000069786988">"Flasha desaktibatuta dago."</string>
     <string name="accessibility_quick_settings_flashlight_on" msgid="2003479320007841077">"Flasha aktibatuta dago."</string>
-    <string name="accessibility_quick_settings_flashlight_changed_off" msgid="3303701786768224304">"Flasha desaktibatu da."</string>
-    <string name="accessibility_quick_settings_flashlight_changed_on" msgid="6531793301533894686">"Flasha aktibatu da."</string>
-    <string name="accessibility_quick_settings_color_inversion_changed_off" msgid="4406577213290173911">"Koloreak trukatzeko aukera desaktibatu da."</string>
-    <string name="accessibility_quick_settings_color_inversion_changed_on" msgid="6897462320184911126">"Koloreak trukatzeko aukera aktibatu da."</string>
-    <string name="accessibility_quick_settings_hotspot_changed_off" msgid="5004708003447561394">"Konexioa partekatzeko aukera desaktibatu da."</string>
-    <string name="accessibility_quick_settings_hotspot_changed_on" msgid="2890951609226476206">"Konexioa partekatzeko aukera aktibatu da."</string>
+    <string name="accessibility_quick_settings_flashlight_changed_off" msgid="3303701786768224304">"Flasha desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_flashlight_changed_on" msgid="6531793301533894686">"Flasha aktibatu egin da."</string>
+    <string name="accessibility_quick_settings_color_inversion_changed_off" msgid="4406577213290173911">"Koloreak alderantzikatzeko aukera desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_color_inversion_changed_on" msgid="6897462320184911126">"Koloreak alderantzikatzeko aukera aktibatu egin da."</string>
+    <string name="accessibility_quick_settings_hotspot_changed_off" msgid="5004708003447561394">"Konexioa partekatzeko aukera desaktibatu egin da."</string>
+    <string name="accessibility_quick_settings_hotspot_changed_on" msgid="2890951609226476206">"Konexioa partekatzeko aukera aktibatu egin da."</string>
     <string name="accessibility_casting_turned_off" msgid="1430668982271976172">"Pantaila igortzeari utzi zaio."</string>
     <string name="accessibility_brightness" msgid="8003681285547803095">"Bistaratu distira"</string>
     <string name="data_usage_disabled_dialog_3g_title" msgid="2626865386971800302">"2G-3G datu-konexioa desaktibatuta dago"</string>
@@ -216,7 +218,7 @@
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Pantaila bertikalki blokeatuta dago."</string>
     <string name="accessibility_rotation_lock_off_changed" msgid="8134601071026305153">"Hemendik aurrera, pantaila automatikoki biratuko da."</string>
     <string name="accessibility_rotation_lock_on_landscape_changed" msgid="3135965553707519743">"Pantaila horizontalki blokeatuta dago."</string>
-    <string name="accessibility_rotation_lock_on_portrait_changed" msgid="8922481981834012126">"Pantaila bertikalki blokeatuta dago ."</string>
+    <string name="accessibility_rotation_lock_on_portrait_changed" msgid="8922481981834012126">"Pantaila bertikalki blokeatuta dago."</string>
     <string name="dessert_case" msgid="1295161776223959221">"Postreen kutxa"</string>
     <string name="start_dreams" msgid="7219575858348719790">"Pantaila-babeslea"</string>
     <string name="ethernet_label" msgid="7967563676324087464">"Ethernet"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Bilatu"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Lerratu gora hau egiteko: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Lerratu ezkerrera hau egiteko: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Etenaldirik ez, ezta alarmenak ere"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Etenaldirik ez, ezta alarmaren bat bada ere."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Etenaldirik gabe"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Lehentasun-etenaldiak soilik"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Hurrengo alarma: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Hasi"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ez dago jakinarazpenik"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Baliteke gailua kontrolatuta egotea"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Baliteke profila kontrolatuta egotea"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Baliteke sarea kontrolatuta egotea"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Gailuen kontrola"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profila kontrolatzeko aukera"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Sareen kontrola"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Desgaitu VPN konexioa"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Deskonektatu VPN sarea"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN sarera konektatuta zaude (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nVPN zerbitzu-hornitzaileak gailua eta sarean egiten dituzun jarduerak kontrola ditzake, mezu elektronikoak, aplikazioak eta webgune seguruak barne."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Honek kudeatzen du gailua:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezu elektronikoak, aplikazioak eta webgune seguruak barne.Informazio gehiago lortzeko, jarri administratzailearekin harremanetan.\n\nGainera, VPN konexio bat ezartzeko baimena eman diozu \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" aplikazioari. Aplikazioak ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Honek kudeatzen du gailua:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezu elektronikoak, aplikazioak eta webgune seguruak barne. Informazio gehiago lortzeko, jarri administratzailearekin harremanetan.\n\nGainera, VPN sare batera konektatuta zaude (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). VPN hornitzaileak ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Honek kudeatzen du profila:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratzaileak gailua eta sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne.\n\nInformazio gehiago lortzeko, jo administratzailearengana."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Honek kudeatzen du gailua:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHonek kudeatzen du profila:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratzaileak gailua eta sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne.\n\nInformazio gehiago lortzeko, jo administratzailearengana."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Honek kudeatzen du profila:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne. Info. gehiago lortzeko, jo administratzailearengana.\n\nGainera, VPN konexioa konfiguratzeko \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" baimena eman duzu. Aplikazio horrek ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Honek kudeatzen du profila:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne. Info. gehiago lortzeko, jo administratzailearengana.\n\nGainera, VPN sare batera konektatuta zaude (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). VPN hornitzaileak ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Honek kudeatzen du gailua:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHonek kudeatzen du profila:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne. Info. gehiago lortzeko, jo administratzailearengana.\n\nGainera, VPN konexioa konfiguratzeko \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" baimena eman duzu. Aplikazio horrek ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Honek kudeatzen du gailua:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHonek kudeatzen du profila:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratzaileak sarean egiten dituzun jarduerak kontrola ditzake, mezuak, aplikazioak eta webgune seguruak barne. Info. gehiago lortzeko, jo administratzailearengana.\n\nGainera, VPN sare batera konektatuta zaude (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). VPN hornitzaileak ere kontrola ditzake sarean egiten dituzun jarduerak."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Gailua blokeatuta egongo da eskuz desblokeatu arte"</string>
-    <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> erabiltzaileak audioa desaktibatu du"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Eskuratu jakinarazpenak azkarrago"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ikusi desblokeatu baino lehen"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ez, eskerrik asko"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Konfiguratu"</string>
+    <string name="muted_by" msgid="6147073845094180001">"Audioa desaktibatu da (<xliff:g id="THIRD_PARTY">%1$s</xliff:g>)"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 8405d51..9f63781 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"جستجو"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"دوربین"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"تلفن"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"باز کردن قفل"</string>
     <string name="unlock_label" msgid="8779712358041029439">"بازکردن قفل"</string>
     <string name="phone_label" msgid="2320074140205331708">"باز کردن تلفن"</string>
     <string name="camera_label" msgid="7261107956054836961">"باز کردن دوربین"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"دستگاه ایمن شد."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"دستگاه ایمن نشده است."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"دستگاه ایمن شد، نماینده معتمد فعال است."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"دستگاه ایمن نشده است، نماینده معتمد فعال است."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"تشخیص چهره در حال اجرا و نماینده معتمد فعال است."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"کلید تغییر روش ورود متن."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"دکمه بزرگنمایی سازگار."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"بزرگنمایی از صفحه‌های کوچک تا بزرگ."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"دو میله."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"سه میله."</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_connected" msgid="8366256693719499665">"متصل."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"در حال مرتبط‌ شدن."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"‏TeleTypewriter فعال شد."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"زنگ لرزشی."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"زنگ بی‌صدا."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"رد کردن <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> نادیده گرفته شد."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> در حال شروع به کار است."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"جستجو"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"لغزاندن به بالا برای <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"لغزاندن به چپ برای <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"بدون قطع شدن، شامل هشدارها"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"بدون قطعی. حتی هشدارها قطع نمی‌شوند."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"بدون وقفه"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"فقط وقفه‌های اولویت‌دار"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"هشدار بعدی شما در ساعت <xliff:g id="ALARM_TIME">%s</xliff:g> است"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"اکنون شروع شود"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"اعلانی موجود نیست"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ممکن است دستگاه کنترل شود"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"شاید نمایه کنترل شود"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ممکن است شبکه کنترل شود"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"کنترل دستگاه"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"کنترل نمایه"</string>
     <string name="monitoring_title" msgid="169206259253048106">"کنترل شبکه"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"‏غیرفعال کردن VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"‏قطع اتصال VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"‏به VPN ‏(\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") وصل هستید.\n\nارائه‌دهنده سرویس VPN می‌تواند دستگاه‌ و فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"‏مدیریت این دستگاه توسط:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند، از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید.\n\nهمچنین، به \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" اجازه دادید تا اتصال VPN را تنظیم کند. این برنامه می‌تواند فعالیت شبکه را نیز کنترل کند."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"‏مدیریت این دستگاه توسط:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها، و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید.\n\nهمچنین، به VPN‏ ‎‏(\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") وصل هستید. ارائه‌دهنده سرویس VPN شما می‌تواند فعالیت شبکه را نیز کنترل کند."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"مدیریت این نمایه توسط:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه و دستگاهتان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن.\n\nبرای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"مدیریت این دستگاه توسط:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nمدیریت نمایه‌تان توسط:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه و دستگاهتان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن.\n\nبرای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"‏مدیریت این نمایه توسط:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید.\n\nهمچنین به «<xliff:g id="APPLICATION">%2$s</xliff:g>» اجازه دادید اتصال VPN را تنظیم کند. این برنامه می‌تواند فعالیت شبکه را نیز کنترل کند."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"‏مدیریت این نمایه توسط:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر با سرپرستتان تماس بگیرید.\n\nهمچنین به VPN ‏(«<xliff:g id="APPLICATION">%2$s</xliff:g>») وصل هستید. ارائه‌دهنده سرویس VPN شما می‌تواند فعالیت شبکه را نیز کنترل کند."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"‏مدیریت این دستگاه توسط:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nمدیریت نمایه‌تان توسط:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید.\n\nهمچنین، به «<xliff:g id="APPLICATION">%3$s</xliff:g>» اجازه دادید اتصال VPN را تنظیم کند. این برنامه می‌تواند فعالیت شبکه‌ را نیز کنترل کند."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"‏مدیریت این دستگاه توسط:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nمدیریت نمایه‌تان توسط:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nسرپرستتان می‌تواند فعالیت شبکه‌تان را کنترل کند از جمله ایمیل‌ها، برنامه‌ها و وب‌سایت‌های ایمن. برای کسب اطلاعات بیشتر، با سرپرستتان تماس بگیرید.\n\nهمچنین، به VPN ‏(«<xliff:g id="APPLICATION">%3$s</xliff:g>») وصل هستید. ارائه‌دهنده سرویس VPN شما می‌تواند فعالیت شبکه را نیز کنترل کند."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"خیر، سپاسگزارم"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"راه‌اندازی"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> آن را بی‌صدا کرد"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index d7a7720..e2dd843 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Haku"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Puhelin"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Avaa lukitus"</string>
     <string name="unlock_label" msgid="8779712358041029439">"avaa lukitus"</string>
     <string name="phone_label" msgid="2320074140205331708">"avaa puhelin"</string>
     <string name="camera_label" msgid="7261107956054836961">"avaa kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Laite on suojattu."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Laitetta ei ole suojattu."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Laite on suojattu. Luotettava taho on aktiivinen."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Laitetta ei ole suojattu. Luotettava taho on aktiivinen."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Kasvojen tunnistus käynnissä. Luotettava taho on aktiivinen."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Syöttötavan vaihtopainike."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Yhteensopivuuszoomaus-painike."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoomaa pienemmältä suuremmalle ruudulle."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Kaksi palkkia."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Kolme palkkia."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Vahva signaali."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Käytössä."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Pois käytöstä."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Yhdistetty."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Yhdistetään."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Tekstipuhelin käytössä."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Soittoääni: värinä."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Soittoääni: äänetön."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Hylätään <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> hylättiin."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Käynnistetään <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Haku"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Liu\'uta ylös ja <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Liu\'uta vasemmalle ja <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Ei keskeytyksiä tai hälytyksiä"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Ei keskeytyksiä, ei edes herätyksiä."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Ei häiriöitä"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Vain tärkeät häiriöt"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Seuraava hälytysaika on <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Aloita nyt"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ei ilmoituksia"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Laitetta voidaan valvoa"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profiilia saatetaan valvoa"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Verkkoa saatetaan valvoa"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Laitteiden valvonta"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profiilin valvonta"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Verkon valvonta"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Poista VPN käytöstä"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Katkaise VPN-yhteys"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Sinulla on VPN-yhteys (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nVPN-palveluntarjoaja saattaa tarkkailla laitteesi ja verkon toimintaa, kuten sähköposteja, sovelluksia ja turvallisia sivustoja."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Tämän laitteen hallinnoija on \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJärjestelmänvalvoja pystyy valvomaan toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nAnnoit sovellukselle <xliff:g id="APPLICATION">%2$s</xliff:g> luvan VPN-yhteyden määrittämiseen. Myös se pystyy valvomaan toimiasi verkossa."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Tämän laitteen hallinnoija on \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJärjestelmänvalvoja pystyy valvomaan toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nLisäksi on muodostettu VPN-yhteys (<xliff:g id="APPLICATION">%2$s</xliff:g>). VPN-palveluntarjoaja voi myös valvoa toimiasi verkossa."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profiilisi hallinnoija: \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä.\n\nSaat lisätietoja järjestelmänvalvojalta."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Laitteen hallinnoija: \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfiilisi hallinnoija: \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä.\n\nSaat lisätietoja järjestelmänvalvojalta."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profiilin hallinnoija: \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nAnnoit sovellukselle <xliff:g id="APPLICATION">%2$s</xliff:g> luvan VPN-yhteyden määrittämiseen. Myös se voi valvoa toimiasi."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profiilisi hallinnoija: \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nKäytät VPN-yhteyttä (<xliff:g id="APPLICATION">%2$s</xliff:g>). VPN-palveluntarjoaja voi myös valvoa toimiasi."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Laitteen hallinnoija: \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfiilisi hallinnoija: \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nAnnoit sovellukselle <xliff:g id="APPLICATION">%3$s</xliff:g> luvan VPN-yhteyden määrittämiseen. Myös se voi valvoa toimiasi."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Laitteen hallinnoija: \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfiilisi hallinnoija: \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJärjestelmänvalvoja voi valvoa toimiasi verkossa, esimerkiksi sähköpostin, sovellusten ja turvallisten verkkosivustojen käyttöä. Saat lisätietoja järjestelmänvalvojalta.\n\nKäytät VPN-yhteyttä (<xliff:g id="APPLICATION">%3$s</xliff:g>). VPN-palveluntarjoaja voi myös valvoa toimiasi."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Laite pysyy lukittuna, kunnes se avataan käsin"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Näe ilmoitukset nopeammin"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Näytä ennen lukituksen avaamista"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ei kiitos"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Määritä asetukset"</string>
     <string name="muted_by" msgid="6147073845094180001">"Mykistänyt <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 300c61f..71f042d 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Rechercher"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Appareil photo"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Téléphone"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Déverrouiller"</string>
     <string name="unlock_label" msgid="8779712358041029439">"déverrouiller"</string>
     <string name="phone_label" msgid="2320074140205331708">"Ouvrir le téléphone"</string>
     <string name="camera_label" msgid="7261107956054836961">"Ouvrir l\'appareil photo"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"L\'appareil est sécurisé."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"L\'appareil n\'est pas sécurisé."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"L\'appareil est sécurisé, l\'agent de confiance est actif."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"L\'appareil n\'est pas sécurisé, l\'agent de confiance est actif."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"La détection de visage est en cours, l\'agent de confiance est actif."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Bouton \"Changer le mode de saisie\""</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Bouton \"Zoom de compatibilité\""</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de compatibilité avec la taille de l\'écran"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Moyen"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Bon"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal excellent"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activé"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Désactivé"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connecté"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Connexion."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1x"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"3G+"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Téléscripteur activé"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Sonnerie en mode vibreur"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Sonnerie en mode silencieux"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Supprimer <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Application \"<xliff:g id="APP">%s</xliff:g>\" ignorée."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Lancement de <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Recherche"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Faire glisser le doigt vers le haut : <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Faites glisser votre doigt vers la gauche pour <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Aucune interruption, y compris les alarmes"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Aucune interruption. Même pas pour les alarmes."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Aucune interruption"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Interruptions prioritaires seulement"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Prochaine alarme : <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Commencer maintenant"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Aucune notification"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Il est possible que cet appareil soit surveillé."</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"le profil peut être contrôlé"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Le réseau peut être surveillé"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Surveillance d\'appareils"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Contrôle de profil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Surveillance réseau"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Désactiver le RPV"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Déconnecter le RPV"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Vous êtes connecté à un RPV (« <xliff:g id="APPLICATION">%1$s</xliff:g> »).\n\nVotre fournisseur de services RPV peut surveiller votre activité réseau, y compris les courriels, les applications et les sites Web sécurisés."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut surveiller votre activité réseau, y compris les courriels, les applications et les sites Web sécurisés. Pour en savoir plus à ce sujet, communiquez avec votre administrateur réseau.\n\nVous avez aussi autorisé « <xliff:g id="APPLICATION">%2$s</xliff:g> » à créer une connexion RPV. Cette application peut aussi surveiller votre activité réseau."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut surveiller votre activité (courriels, applications, sites Web sécurisés, etc.). Pour en savoir plus, communiquez avec votre administrateur.\n\nVous êtes également connecté à un RPV (<xliff:g id="APPLICATION">%2$s</xliff:g>). Votre fournisseur RPV peut aussi surveiller votre activité réseau."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Ce profil est géré par : \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut surveiller votre appareil et votre activité réseau, y compris les courriels, les applications et les sites Web sécurisés.\n\nPour en savoir plus, communiquez avec votre administrateur."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Cet appareil est géré par : \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVotre profil est géré par : \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut surveiller l\'activité de votre appareil et votre activité réseau, y compris les courriels, les applications et les sites Web sécurisés. \n\n Pour en savoir plus, communiquez avec votre administrateur."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profil géré par : \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut surveiller votre activité réseau (courriels, applications et sites sécurisés). Communiquez avec votre administrateur.\n\nEn outre, vous avez autorisé <xliff:g id="APPLICATION">%2$s</xliff:g> à créer une connexion RPV. Cette application peut aussi surveiller l\'activité réseau."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profil géré par : \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut surveiller l\'acti. de votre appareil et votre act. réseau (courriels, applications et sites sécurisés). Communiquez avec votre administrateur.\n\n Vous êtes aussi connecté à un RPV (<xliff:g id="APPLICATION">%2$s</xliff:g>). Votre fournisseur de services RPV peut lui aussi surveiller votre act. réseau."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Appareil géré par : \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil géré par : \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut surveiller votre activité réseau (courriels, applications et sites sécurisés). Communiquez avec votre administrateur.\n\nEn outre, vous avez autorisé <xliff:g id="APPLICATION">%3$s</xliff:g> à créer une connexion RPV. Cette application peut aussi surveiller l\'activité réseau."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Appareil géré par : \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil géré par : \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut surveiller l\'act. de votre appareil et votre act. réseau (courriels, applications et sites sécurisés). Communiquez avec votre administrateur.\n\nVous êtes aussi connecté à un RPV (<xliff:g id="APPLICATION">%3$s</xliff:g>). Votre admin RPV peut lui aussi surveiller votre act. réseau."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"L\'appareil restera verrouillé jusqu\'à ce que vous le déverrouilliez manuellement"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Voir les notifications plus rapidement"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Afficher les notifications avant de déverrouiller l\'appareil"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Non, merci"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurer"</string>
     <string name="muted_by" msgid="6147073845094180001">"Mis en sourdine par <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index e22294c..a85b209 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Rechercher"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Appareil photo"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Téléphoner"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Déverrouiller"</string>
     <string name="unlock_label" msgid="8779712358041029439">"déverrouiller"</string>
     <string name="phone_label" msgid="2320074140205331708">"ouvrir le téléphone"</string>
     <string name="camera_label" msgid="7261107956054836961">"ouvrir l\'appareil photo"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Bouton \"Changer le mode de saisie\""</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Bouton \"Zoom de compatibilité\""</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de compatibilité avec la taille de l\'écran"</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Moyen"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Bon"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal excellent"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activé"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Désactivé"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connecté"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Connexion en cours…"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1x"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -162,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Téléscripteur activé"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Sonnerie en mode vibreur"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Sonnerie en mode silencieux"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Supprimer <xliff:g id="APP">%s</xliff:g>"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Application \"<xliff:g id="APP">%s</xliff:g>\" ignorée."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Lancement de <xliff:g id="APP">%s</xliff:g>"</string>
@@ -291,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Rechercher"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Faites glisser vers le haut pour <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Faites glisser vers la gauche pour <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Aucune interruption, pas même pour les alarmes"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Aucune interruption, pas même pour les alarmes"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Aucune interruption"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Interruptions prioritaires seulement"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Prochaine alarme : <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -341,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Commencer"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Aucune notification"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Il est possible que cet appareil soit surveillé."</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Le profil peut être contrôlé."</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Il est possible que le réseau soit surveillé."</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Contrôle des appareils"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Contrôle du profil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Contrôle du réseau"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Désactiver le VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Déconnecter le VPN"</string>
@@ -351,7 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Vous êtes connecté à un VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nVotre fournisseur de services VPN peut surveiller votre activité réseau, y compris les e-mails, les applications et les sites Web sécurisés."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applis et sites Web sécurisés). Pour en savoir plus, contactez votre administrateur.\n\nVous avez autorisé l\'appli \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" à configurer une connexion VPN. Cette appli peut également contrôler votre activité réseau."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applications et sites sécurisés). Pour en savoir plus, contactez votre administrateur.\n\nVous êtes aussi connecté à un VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Votre fournisseur de services VPN peut également contrôler l\'activité réseau."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Ce profil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut contrôler l\'activité de votre appareil et votre activité réseau (e-mails, applications et sites sécurisés).\n\nPour en savoir plus, contactez votre administrateur."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVotre profil est géré par :\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut contrôler l\'activité de votre appareil et votre activité réseau (e-mails, applications et sites sécurisés).\n\nPour en savoir plus, contactez votre administrateur."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profil géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applications et sites sécurisés). Pour en savoir plus, contactez votre administrateur.\n\nVous avez donné à l\'appli \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" l\'autorisation de configurer une connexion VPN. Cette appli peut contrôler votre activité réseau."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Cet appareil est géré par :\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applications et sites sécurisés). Pour en savoir plus, contactez votre administrateur.\n\nVous êtes aussi connecté à un VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Votre fournisseur de services VPN peut également contrôler l\'activité réseau."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Appareil géré par :\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil géré par :\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applications et sites sécurisés). Pour en savoir plus, contactez votre admin.\n\nVous avez donné à l\'appli \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" l\'autorisation de configurer une connexion VPN. Cette appli peut contrôler votre activité réseau."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Appareil géré par :\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil géré par :\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVotre administrateur peut contrôler votre activité réseau (e-mails, applications et sites sécurisés). Pour en savoir plus, contactez votre administrateur.\n\nVous êtes aussi connecté à un VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Votre fournisseur de services VPN peut également contrôler l\'activité réseau."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"L\'appareil restera verrouillé jusqu\'à ce que vous le déverrouilliez manuellement."</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Recevoir les notifications plus vite"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Afficher les notifications avant de déverrouiller l\'appareil"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Non, merci"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurer"</string>
+    <string name="muted_by" msgid="6147073845094180001">"Son coupé par : <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl-rES/strings.xml
index 60aff3a..3d7f2a1 100644
--- a/packages/SystemUI/res/values-gl-rES/strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Buscar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cámara"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Teléfono"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
     <string name="camera_label" msgid="7261107956054836961">"abrir cámara"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispositivo protexido."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispositivo non protexido."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispositivo protexido, axente de confianza activo."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispositivo non protexido, axente de confianza activo."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Recoñecemento facial en curso, axente de confianza activo."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Cambiar o botón do método de entrada."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botón de zoom de compatibilidade"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom de compatibilidade co tamaño da pantalla."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dúas barras"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tres barras"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sinal completo"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activada"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desactivada"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Conectado"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Conectando."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter activado"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Timbre en vibración"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Timbre silenciado"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Rexeitar <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Rexeitouse <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Iniciando <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Buscar"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Pasa o dedo cara arriba para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Pasa o dedo cara a esquerda para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sen interrupcións, incluídas as alarmas"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Non hai interrupcións nin alarmas."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Sen interrupcións"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Só interrupcións de prioridade"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"A túa próxima alarma ten lugar ás <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Iniciar agora"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Non hai notificacións"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"É posible que se supervise o dispositivo"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"O perfil pódese supervisar"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"É posible que se supervise a rede"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Supervisión de dispositivos"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Supervisión do perfil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Supervisión de rede"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Desactivar VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desconectar VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Estás conectado a unha VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nO teu provedor de servizo de VPN pode controlar a actividade da rede e o dispositivo, incluídos os correos electrónicos, as aplicacións e os sitios web seguros."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Este dispositivo está xestionado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO teu administrador pode supervisar a actividade da túa rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, outorgaches permiso a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" para configurar unha conexión VPN. Esta aplicación tamén pode supervisar a actividade da rede."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Este dispositivo está xestionado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO teu administrador pode supervisar a actividade da túa rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, estás conectado a unha VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). O fornecedor de servizos da VPN tamén pode supervisar a actividade da rede."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Este perfil está xestionado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO teu administrador pode supervisar o teu dispositivo e a actividade da rede e o dispositivo, incluídos os correos electrónicos, as aplicacións e os sitios web seguros.\n\nPara obter máis información, contacta co administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Este dispositivo está xestionado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO teu perfil está xestionado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO teu administrador pode supervisar o teu dispositivo e a actividade da rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros.\n\nPara obter máis información, contacta co teu administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Este perfil está xestionado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO teu administrador pode supervisar a túa actividade da rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, outorgaches permiso a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" para configurar unha conexión VPN. Esta aplicación tamén pode supervisar a actividade da rede."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Este perfil está xestionado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO teu administrador pode supervisar a túa actividade da rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, estás conectado a unha VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). O provedor de servizos VPN tamén pode supervisar a actividade da rede."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Este dispositivo está xestionado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO teu perfil está xestionado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO teu administrador pode supervisar a túa actividade da rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, outorgaches permiso a \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" para configurar unha conexión VPN. Esta aplicación tamén pode supervisar a actividade da rede."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Este dispositivo está xestionado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO teu perfil está xestionado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO teu administrador pode supervisar a túa actividade da rede, incluídos os correos electrónicos, as aplicacións e os sitios web seguros. Para obter máis información, contacta co teu administrador.\n\nAdemais, estás conectado a unha VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). O provedor de servizos VPN tamén pode supervisar a actividade da rede."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"O dispositivo permanecerá bloqueado ata que o desbloquees manualmente"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Recibir notificacións máis rápido"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Consúltaas antes de desbloquear"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Non grazas"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurar"</string>
     <string name="muted_by" msgid="6147073845094180001">"Silenciado por <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hdpi/dimens.xml b/packages/SystemUI/res/values-hdpi/dimens.xml
new file mode 100644
index 0000000..10b00eb
--- /dev/null
+++ b/packages/SystemUI/res/values-hdpi/dimens.xml
@@ -0,0 +1,28 @@
+<?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>
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <fraction name="battery_button_height_fraction">10.5%</fraction>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">20%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">12%</fraction>
+
+    <dimen name="battery_margin_bottom">1px</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 6f43a2e..99c5153 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"खोजें"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कैमरा"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"फ़ोन"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"अनलॉक करें"</string>
     <string name="unlock_label" msgid="8779712358041029439">"अनलॉक करें"</string>
     <string name="phone_label" msgid="2320074140205331708">"फ़ोन खोलें"</string>
     <string name="camera_label" msgid="7261107956054836961">"कैमरा खोलें"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"उपकरण सुरक्षित है."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"उपकरण सुरक्षित नहीं है."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"उपकरण सुरक्षित है, विश्वसनीय एजेंट सक्रिय है."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"उपकरण सुरक्षित नहीं है, विश्वसनीय एजेंट सक्रिय है."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"चेहरा पहचान सुविधा चल रही है, विश्वसनीय एजेंट सक्रिय है."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"इनपुट पद्धति‍ बटन स्विच करें."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"संगतता ज़ूम बटन."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"छोटी से बड़ी स्‍क्रीन पर ज़ूम करें."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"दो बार."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"तीन बार."</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_connected" msgid="8366256693719499665">"कनेक्ट है."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"कनेक्ट हो रहा है."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"टेलीटाइपराइटर सक्षम."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"रिंगर कंपन."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"रिंगर मौन."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> को ख़ारिज करें."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> खा़रिज कर दिया गया."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> प्रारंभ हो रहा है."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"खोजें"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> के लिए ऊपर स्‍लाइड करें."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> के लिए बाएं स्‍लाइड करें."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"अलार्म सहित कोई बाधा नहीं है"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"कोई बाधा नहीं. यहां तक कि अलार्म भी नहीं."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"कोई अवरोध नहीं"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"केवल प्राथमिक अवरोध"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"आपका अगला अलार्म <xliff:g id="ALARM_TIME">%s</xliff:g> पर है"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"अब प्रारंभ करें"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"कोई सूचना नहीं"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"उपकरण को मॉनीटर किया जा सकता है"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"प्रोफ़ाइल को मॉनीटर किया जा सकता है"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"नेटवर्क को मॉनीटर किया जा सकता है"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"उपकरण को मॉनीटर करना"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"प्रोफ़ाइल को मॉनीटर करना"</string>
     <string name="monitoring_title" msgid="169206259253048106">"नेटवर्क को मॉनीटर करना"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN अक्षम करें"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN डिस्‍कनेक्‍ट करें"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"आप VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") से कनेक्‍ट हैं.\n\nआपका VPN सेवा प्रदाता ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित आपके उपकरण और नेटवर्क गतिविधि की निगरानी कर सकता है."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"यह उपकरण इसके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपका व्‍यवस्‍थापक ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित आपकी नेटवर्क गतिविधि को मॉनीटर कर सकता है. अधिक जानकारी के लिए, अपने व्‍यवस्‍थापक से संपर्क करें.\n\nसाथ ही, आपने VPN कनेक्‍शन सेट करने के लिए \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" अनुमति भी दी है. यह ऐप्‍स नेटवर्क गतिविधि को भी मॉनीटर कर सकता है."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"यह उपकरण इसके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपका व्‍यवस्‍थापक, ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित आपकी नेटवर्क गतिविधि को मॉनीटर कर सकता है. अधिक जानकारी के लिए, अपने व्‍यवस्‍थापक से संपर्क करें.\n\nसाथ ही, आप VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") से कनेक्‍ट हैं. आपका VPN सेवा प्रदाता नेटवर्क गतिविधि को भी मॉनीटर कर सकता है."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"यह प्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपका व्यवस्थापक ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित आपकी उपकरण और नेटवर्क गतिविधि को मॉनीटर कर सकता है.\n\nअधिक जानकारी के लिए, अपने व्‍यवस्‍थापक से संपर्क करें."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"यह उपकरण इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nआपकी प्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nआपका व्यवस्थापक ईमेल, ऐप्स और सुरक्षित वेबसाइटों सहित आपकी उपकरण और नेटवर्क गतिविधि को मॉनीटर कर सकता है.\n\nअधिक जानकारी के लिए, अपने व्यवस्थापक से संपर्क करें."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"यह प्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपका व्‍यवस्‍थापक ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित आपकी नेटवर्क गतिविधि को मॉनीटर करने में सक्षम है. अधिक जानकारी के लिए, अपने व्यवस्थापक से संपर्क करें.\n\nसाथ ही, आपने \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" को VPN कनेक्शन सेट करने की अनुमति दी है. यह ऐप्स नेटवर्क गतिविधि भी मॉनीटर कर सकता है."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"यह प्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपका व्यवस्थापक ईमेल, ऐप्स और सुरक्षित वेबसाइटों सहित आपकी नेटवर्क गतिविधि को मॉनीटर करने में सक्षम है. अधिक जानकारी के लिए, अपने व्यवस्थापक से संपर्क करें.\n\nसाथ ही, आप VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") से भी कनेक्ट हैं. आपका VPN सेवा प्रदाता नेटवर्क गतिविधि भी मॉनीटर कर सकता है."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"उपकरण इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nप्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nव्यवस्थापक ईमेल, ऐप्‍स और सुरक्षित वेबसाइटों सहित नेटवर्क गतिविधि मॉनीटर कर सकते हैं. अधिक जानकारी हेतु, व्‍यवस्‍थापक से संपर्क करें.\n\nसाथ ही, आपने \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" को VPN कनेक्शन सेट करने की अनुमति दी है. यह ऐप्स नेटवर्क गतिविधि भी मॉनीटर कर सकता है."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"यह उपकरण इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nआपकी प्रोफ़ाइल इनके द्वारा प्रबंधित है:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nआपका व्यवस्थापक ईमेल, ऐप्स और सुरक्षित वेबसाइटों सहित आपकी नेटवर्क गतिविधि को मॉनीटर करने में सक्षम है. अधिक जानकारी के लिए, अपने व्यवस्थापक से संपर्क करें.\n\nसाथ ही, आप VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") से भी कनेक्ट हैं. आपका VPN सेवा प्रदाता नेटवर्क गतिविधि भी मॉनीटर कर सकता है."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"नहीं धन्यवाद"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"सेट करें"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> द्वारा म्यूट किया गया"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 53aca5e..a35fed5 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pretraži"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Otključavanje"</string>
     <string name="unlock_label" msgid="8779712358041029439">"otključavanje"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvaranje telefona"</string>
     <string name="camera_label" msgid="7261107956054836961">"otvaranje fotoaparata"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Uređaj je zaštićen."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Uređaj nije zaštićen."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Uređaj je zaštićen, agent za pouzdanost je aktivan."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Uređaj nije zaštićen, agent za pouzdanost je aktivan."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Prepoznavanje lica je u tijeku, agent za pouzdanost je aktivan."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Gumb za promjenu načina unosa."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Gumb za kompatibilnost zumiranja."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zumiranje manjeg zaslona na veći."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dva stupca."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tri stupca."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal je pun."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Uključeno."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Isključeno."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Povezano."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Povezivanje."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter je omogućen."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibracija softvera zvona."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Softver zvona utišan."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Odbacivanje aplikacije <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikacija <xliff:g id="APP">%s</xliff:g> odbačena je."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Pokretanje aplikacije <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Pretraživanje"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Kliznite prema gore za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Kliznite lijevo za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Bez prekida, uključujući alarme"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Bez prekida, čak ni za alarme."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Bez prekida"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Samo prioritetni prekidi"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Vaš sljedeći alarm bit će u <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Započni sad"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nema obavijesti"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Uređaj se možda nadzire"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil se možda nadzire"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Mreža se možda nadzire"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Nadzor uređaja"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Nadzor profila"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Nadzor mreže"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Onemogući VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Prekini vezu s VPN-om"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Povezani ste s VPN-om (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nDavatelj usluge VPN-a može pratiti vaš uređaj i aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Uređajem upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš administrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više informacija možete saznati od administratora.\n\nOsim toga, dali ste aplikaciji \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" dopuštenje za postavljanje VPN veze, pa i ona može pratiti vašu aktivnost na mreži."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Uređajem upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš administrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više informacija možete saznati od administratora.\n\nOsim toga, povezani ste s VPN-om (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Davatelj usluge VPN-a također može pratiti vašu aktivnost na mreži."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profilom upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš administrator može pratiti vaš uređaj i aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije.\n\nViše informacija možete saznati od administratora."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Uređajem upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVašim profilom upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVaš administrator može pratiti vaš uređaj i aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije.\n\nViše informacija možete saznati od administratora."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profilom upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš administrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više informacija možete saznati od administratora.\n\nOsim toga, \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" može uspostaviti VPN vezu. Ta aplikacija također može pratiti aktivnost na mreži."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profilom upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš administrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više informacija možete saznati od administratora.\n\nOsim toga, povezani ste s VPN-om (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Davatelj usluge VPN-a također može pratiti vašu aktivnost na mreži."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Uređajem upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVašim profilom upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVaš administrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više informacija možete saznati od administratora.\n\nOsim toga, \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" može uspostaviti VPN vezu. Ta aplikacija također može pratiti aktivnost na mreži."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Uređajem upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVašim profilom upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrator može pratiti vašu aktivnost na mreži, uključujući e-poštu, aplikacije i sigurne web-lokacije. Više možete saznati od administratora.\n\nOsim toga, povezani ste s VPN-om (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Davatelj usluge VPN-a također može pratiti aktivnost na mreži."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Uređaj će ostati zaključan dok ga ručno ne otključate"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Primajte obavijesti brže"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Pogledajte ih prije otključavanja"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ne, hvala"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Postavi"</string>
     <string name="muted_by" msgid="6147073845094180001">"Zvuk je isklj. treća strana <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 5a4619f..4507754 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Keresés"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Feloldás"</string>
     <string name="unlock_label" msgid="8779712358041029439">"feloldás"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefon megnyitása"</string>
     <string name="camera_label" msgid="7261107956054836961">"kamera megnyitása"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Az eszköz biztosítva van."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Az eszköz nincs biztosítva."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Az eszköz biztosítva van, a trust agent komponens aktív."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Az eszköz nincs biztosítva, a trust agent komponens aktív."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Az arcfelismerés fut, a trust agent komponens aktív."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Beviteli mód váltása gomb."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kompatibilitási zoom gomb."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kicsinyítsen a nagyobb képernyőhöz."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Két sáv."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Három sáv."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Teljes jelerősség."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Bekapcsolva."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Kikapcsolva."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Csatlakoztatva."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Csatlakozás."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter engedélyezve."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Csengő rezeg."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Csengő néma."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"A(z) <xliff:g id="APP">%s</xliff:g> elvetése."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> eltávolítva."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"A(z) <xliff:g id="APP">%s</xliff:g> indítása."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Keresés"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"A(z) <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> művelethez csúsztassa felfelé."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"A(z) <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> művelethez csúsztassa balra."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Nincs megszakítás, még ébresztés sem"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Semmi sem zavarja meg, még a riasztások sem."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Ne zavarjon"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Csak prioritást élvező zavaró üzenetek"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"A következő ébresztés ideje: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Indítás most"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nincs értesítés"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Lehet, hogy az eszközt figyelik"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilját felügyelhetik"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Lehet, hogy a hálózatot figyelik"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Eszközfigyelés"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilfelügyelet"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Hálózatfigyelés"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN letiltása"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN-kapcsolat bontása"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Ön egy VPN-hez kapcsolódott („<xliff:g id="APPLICATION">%1$s</xliff:g>”).\n\nVPN-szolgáltatója figyelheti az Ön eszköz- és hálózati tevékenységét, beleértve az e-maileket, az alkalmazásokat és a biztonságos webhelyeket."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Ezt az eszközt a következő felügyeli:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nA rendszergazda figyelheti a hálózati tevékenységet, beleértve az e-mailt, az alkalmazásokat és a biztonságos webhelyeket. További információért forduljon a rendszergazdához.\n\nEzenfelül engedélyt adott „<xliff:g id="APPLICATION">%2$s</xliff:g>” számára VPN-kapcsolat beállítására. Ez az alkalmazás is figyelheti a hálózati tevékenységet."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Ezt az eszközt a következő felügyeli:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nA rendszergazda figyelheti a hálózati tevékenységet, beleértve az e-mailt, az alkalmazásokat és a biztonságos webhelyeket. További információért forduljon a rendszergazdához.\n\nEzenfelül VPN-hez is csatlakozik („<xliff:g id="APPLICATION">%2$s</xliff:g>”). VPN-szolgáltatója is figyelheti hálózati tevékenységét."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profilját felügyeli:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét eszközén és a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek).\n\nTovábbi információért forduljon rendszergazdájához."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Az eszközt felügyeli:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilját felügyeli:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét eszközén és a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek).\n\nTovábbi információért forduljon rendszergazdájához."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profilját felügyeli:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek). További információért forduljon rendszergazdájához.\n\nEzenfelül engedélyt adott „<xliff:g id="APPLICATION">%2$s</xliff:g>” alkalmazásnak, hogy VPN-kapcsolatot létesítsen. Ez az alkalmazás is megfigyelheti hálózati tevékenységét."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profilját felügyeli:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek). További információért forduljon rendszergazdájához.\n\nEzenfelül VPN-hez („<xliff:g id="APPLICATION">%2$s</xliff:g>”) is kapcsolódik. VPN-szolgáltatója is megfigyelheti hálózati tevékenységét."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Az eszközt felügyeli:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilját felügyeli:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek). További információért forduljon rendszergazdájához.\n\nEzenfelül engedélyt adott „<xliff:g id="APPLICATION">%3$s</xliff:g>” alkalmazásnak, hogy VPN-kapcsolatot létesítsen. Ez az alkalmazás is megfigyelheti hálózati tevékenységét."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Az eszközt felügyeli:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilját felügyeli:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nRendszergazdája felügyelheti tevékenységét a hálózaton (pl. e-mailek, alkalmazások és biztonságos webhelyek). További információért forduljon rendszergazdájához.\n\nEzenfelül VPN-hez („<xliff:g id="APPLICATION">%3$s</xliff:g>”) is kapcsolódik. VPN-szolgáltatója is megfigyelheti hálózati tevékenységét."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Az eszköz addig zárolva marad, amíg kézileg fel nem oldja"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Gyorsabban megkaphatja az értesítéseket"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Már a képernyőzár feloldása előtt megtekintheti őket"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nem, köszönöm"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Beállítás"</string>
     <string name="muted_by" msgid="6147073845094180001">"A(z) <xliff:g id="THIRD_PARTY">%1$s</xliff:g> elnémította"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index 09e5f72..af20b98 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Որոնել"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Ֆոտոխցիկ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Հեռախոս"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Ապակողպել"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ապակողպել"</string>
     <string name="phone_label" msgid="2320074140205331708">"բացել հեռախոսը"</string>
     <string name="camera_label" msgid="7261107956054836961">"բացել ֆոտոխցիկը"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Սարքը պաշտպանված է:"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Սարքը պաշտպանված չէ:"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Սարքը պաշտպանված է, վստահության գործակալն ակտիվ  է:"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Սարքը պաշտպանված չէ, վստահության գործակալն ակտիվ  է:"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Կատարվում է դիմաճանաչում, վստահության գործակալն ակտիվ է:"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Միացնել մուտքագրման եղանակի կոճակը:"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Համատեղելիության խոշորացման կոճակը:"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Դիտափոխել փոքրից ավելի մեծ էկրան:"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Երկու գիծ:"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Երեք գիծ:"</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_connected" msgid="8366256693719499665">"Միացված է:"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Միանում է:"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Հեռամուտքագրիչը միացված է:"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Զանգի թրթռոց:"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Զանգակը լռեցված է:"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Անտեսել <xliff:g id="APP">%s</xliff:g>-ը:"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>-ը անտեսված է:"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Մեկնարկել <xliff:g id="APP">%s</xliff:g>-ը:"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Որոնել"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Սահեցրեք վերև <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>-ի համար:"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Սահեցրեք ձախ` <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>-ի համար:"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Առանց ընդհատումների՝ ներառյալ զարթուցիչները"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Առանց ընդհատումների՝ ներառյալ զարթուցիչները:"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Առանց ընդհատումների"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Միայն կարևոր ընդհատումներ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Ձեր հաջորդ զարթուցիչի ժամն է՝ <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Մեկնարկել հիմա"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ծանուցումներ չկան"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Սարքը կարող է վերահսկվել"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Պրոֆիլը կարող է մշտադիտարկվել"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Ցանցը կարող է վերահսկվել"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Սարքի մշտադիտարկում"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Պրոֆիլի մշտադիտարկում"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Ցանցի մշտադիտարկում"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Անջատել VPN-ը"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Անջատել VPN-ը"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Դուք միացած եք VPN-ին («<xliff:g id="APPLICATION">%1$s</xliff:g>»):\n\nՁեզ VPN ծառայություն մատուցողը կարող է վերահսկել ձեր սարքի և ցանցի գործունեությունը, այդ թվում` նամակները, ծրագրերը և վստահելի կայքերը:"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Այս սարքը կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\n Բացի այդ, դուք «<xliff:g id="APPLICATION">%2$s</xliff:g>» ծրագրին թույլատրել եք ստեղծել VPN կապ: Այդ ծրագիրը նույնպես կարող է վերահսկել ձեր ցանցային գործունեությունը:"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Այս սարքը կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\nԲացի այդ, դուք միացած եք VPN-ին («<xliff:g id="APPLICATION">%2$s</xliff:g>»): Ձեզ VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը:\n\nԼրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nՁեր ադմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը:\n\nՀավելյալ տեղեկությունների համար դիմեք ադմինիստրատորին:"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը, այդ թվում՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%2$s</xliff:g>» ծրագրին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Այս պրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ձեր ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%2$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Լրացուցիչ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև «<xliff:g id="APPLICATION">%3$s</xliff:g>»-ին թույլատրել եք ստեղծել VPN: Այն նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Սարքի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nՊրոֆիլի կառավարիչն է՝\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nԱդմինիստրատորը կարող է վերահսկել ձեր ցանցային գործունեությունը՝ նամակները, ծրագրերը և վստահելի կայքերը: Այլ տեղեկությունների համար դիմեք ադմինիստրատորին:\n\nԴուք նաև միացած եք VPN-ին («<xliff:g id="APPLICATION">%3$s</xliff:g>»): VPN ծառայություն մատուցողը նույնպես կարող է վերահսկել ցանցային գործունեությունը:"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ոչ, շնորհակալություն"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Կարգավորել"</string>
     <string name="muted_by" msgid="6147073845094180001">"Համրեցվել է <xliff:g id="THIRD_PARTY">%1$s</xliff:g>-ի կողմից"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 10c8e17..6c3502b 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Telusuri"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telepon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Buka kunci"</string>
     <string name="unlock_label" msgid="8779712358041029439">"buka kunci"</string>
     <string name="phone_label" msgid="2320074140205331708">"buka ponsel"</string>
     <string name="camera_label" msgid="7261107956054836961">"buka kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Perangkat aman."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Perangkat tidak aman."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Perangkat aman, agen tepercaya aktif."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Perangkat tidak aman, agen tepercaya aktif."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Deteksi wajah berjalan, agen tepercaya aktif."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Tombol beralih metode masukan."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tombol perbesar/perkecil kompatibilitas."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Perbesar dari layar kecil ke besar."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dua baris."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tiga baris."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sinyal penuh."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Aktif."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Nonaktif."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Tersambung."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Menyambung."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter diaktifkan."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Pendering bergetar."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Pendering senyap."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Menyingkirkan <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> disingkirkan."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Memulai <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Telusuri"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Geser ke atas untuk <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Geser ke kiri untuk <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Tanpa gangguan, termasuk alarm"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Tanpa gangguan, termasuk alarm."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Tidak ada interupsi"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Hanya interupsi prioritas"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Alarm Anda berikutnya pukul <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Mulai sekarang"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Tidak ada pemberitahuan"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Perangkat mungkin dipantau"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil dapat dipantau"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Jaringan mungkin dipantau"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Pemantauan perangkat"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Pemantauan profil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Pemantauan jaringan"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Nonaktifkan VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Putuskan sambungan VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Anda tersambung ke VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nPenyedia layanan VPN dapat memantau perangkat dan aktivitas jaringan termasuk email, aplikasi, dan situs web aman."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Perangkat ini dikelola oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan termasuk email, aplikasi, dan situs web aman. Untuk informasi selengkapnya, hubungi administrator Anda.\n\nAnda juga memberikan izin pada \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" untuk menyiapkan sambungan VPN. Aplikasi ini juga memantau aktivitas jaringan."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Perangkat ini dikelola oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan termasuk email, aplikasi, dan situs web aman. Untuk informasi selengkapnya, hubungi administrator Anda.\n\nAnda juga tersambung ke VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Penyedia layanan VPN Anda dapat memantau aktivitas jaringan juga."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profil ini dikelola oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan dan perangkat Anda, termasuk email, aplikasi, dan situs web aman.\n\nUntuk informasi selengkapnya, hubungi administrator Anda."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Perangkat ini dikelola oleh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil Anda dikelola oleh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan dan perangkat, termasuk email, aplikasi, dan situs web yang aman.\n\nUntuk informasi selengkapnya, hubungi administrator Anda."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profil ini dikelola oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan termasuk email, aplikasi, dan situs web aman. Untuk informasi selengkapnya, hubungi administrator Anda.\n\nSelain itu, Anda mengizinkan \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" menyiapkan sambungan VPN. Aplikasi juga dapat memantau aktivitas jaringan."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profil ini dikelola oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan termasuk email, aplikasi, dan situs web aman. Untuk informasi selengkapnya, hubungi administrator Anda.\n\nSelain itu, Anda tersambung ke VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Penyedia layanan VPN Anda juga dapat memantau aktivitas jaringan."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Perangkat ini dikelola oleh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil Anda dikelola oleh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrator dapat memantau aktivitas jaringan termasuk email, aplikasi, dan situs web aman. Untuk informasi selengkapnya, hubungi administrator.\n\nAnda juga mengizinkan \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" menyiapkan sambungan VPN. Aplikasi juga dapat memantau aktivitas jaringan."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Perangkat ini dikelola oleh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil Anda dikelola oleh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrator Anda dapat memantau aktivitas jaringan termasuk email, aplikasi &amp; situs web aman. Untuk info selengkapnya, hubungi administrator.\n\nSelain itu, Anda tersambung ke VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Penyedia layanan VPN juga dapat memantau aktivitas jaringan."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Perangkat akan tetap terkunci hingga Anda membukanya secara manual"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Dapatkan pemberitahuan lebih cepat"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Lihat sebelum membuka kunci"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Tidak"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Siapkan"</string>
     <string name="muted_by" msgid="6147073845094180001">"Dinonaktifkan oleh <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is-rIS/strings.xml
index ef67d1b..f98be45 100644
--- a/packages/SystemUI/res/values-is-rIS/strings.xml
+++ b/packages/SystemUI/res/values-is-rIS/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Leita"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Myndavél"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Sími"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Taka úr lás"</string>
     <string name="unlock_label" msgid="8779712358041029439">"taka úr lás"</string>
     <string name="phone_label" msgid="2320074140205331708">"opna síma"</string>
     <string name="camera_label" msgid="7261107956054836961">"opna myndavél"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Tæki öruggt."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Tæki ekki öruggt."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Tæki öruggt; traustfulltrúi virkur."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Tæki ekki öruggt; traustfulltrúi virkur."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Andlitsgreining í gangi; traustfulltrúi virkur."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Hnappur til að skipta um innsláttaraðferð."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Hnappur fyrir samhæfisaðdrátt."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Aðlaga forrit fyrir lítinn skjá að stærri skjá."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Tvö strik."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Þrjú strik."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Fullur sendistyrkur."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Kveikt."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Slökkt."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Tenging virk."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Tengist."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Fjarriti virkur."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Titrar við hringingu."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Engin hringing."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Hunsa <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> vísað frá."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Ræsir <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Leita"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Strjúktu upp til að <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Strjúktu til vinstri til að <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Engar truflanir, þ. á m. vekjarar"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Engar truflanir. Ekki einu sinni vekjarar."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Engin truflun"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Aðeins forgangstruflanir"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Næsti vekjari er kl. <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Byrja núna"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Engar tilkynningar"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Hugsanlega er fylgst með tækjum"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Hugsanlega er fylgst með þessu sniði"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Hugsanlega er fylgst með netinu"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Tækjaeftirlit"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Fylgst með sniði"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Neteftirlit"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Slökkva á VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Aftengja VPN-net"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Þú ert með tengingu við VPN-net („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nVPN-þjónustuaðilinn þinn getur fylgst með virkni þinni í tækinu og á netinu, þar á meðal tölvupósti, forritum og öruggum vefsvæðum."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Stjórnandi þessa tækis er:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nStjórnandinn getur fylgst með netvirkni þinni, þ. á m. tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við stjórnandann til að fá frekari upplýsingar.\n\nÞú veittir „<xliff:g id="APPLICATION">%2$s</xliff:g>“ einnig  heimild til að setja upp VPN-tengingu. Þetta forrit getur líka fylgst með netvirkni þinni."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Stjórnandi þessa tækis er:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nStjórnandinn getur fylgst með netvirkni þinni, þ. á m. tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við stjórnandann til að fá frekari upplýsingar.\n\nÞú ert einnig tengd(ur) VPN-neti („<xliff:g id="APPLICATION">%2$s</xliff:g>“). VPN-þjónustuaðilinn þinn getur líka fylgst með netvirkni þinni."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Þessu sniði er stjórnað af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með tækinu og netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum.\n\nHafðu samband við kerfisstjórann til að fá frekari upplýsingar."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Þessu tæki er stjórnað af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSniðinu þínu er stjórnað af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með tækinu og netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum.\n\nHafðu samband við kerfisstjórann til að fá frekari upplýsingar."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Þessu tæki er stjórnað af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við kerfisstjórann til að fá frekari upplýsingar.\n\nÞú hefur einnig gefið „<xliff:g id="APPLICATION">%2$s</xliff:g>“ heimild til að setja upp VPN-tengingu. Þetta forrit getur einnig fylgst með netnotkun."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Þessu sniði er stjórnað af:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við kerfisstjórann til að fá frekari upplýsingar.\n\nÞú ert einnig með tengingu við VPN-net („<xliff:g id="APPLICATION">%2$s</xliff:g>“). VPN-þjónustuaðilinn getur einnig fylgst með netnotkun."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Þessu tæki er stjórnað af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSniðinu þínu er stjórnað af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við kerfisstjórann til að fá frekari upplýsingar.\n\nÞú hefur einnig gefið „<xliff:g id="APPLICATION">%3$s</xliff:g>“ heimild til að setja upp VPN-tengingu. Þetta forrit getur einnig fylgst með netnotkun."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Þessu tæki er stjórnað af:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSniðinu þínu er stjórnað af:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nKerfisstjórinn þinn getur fylgst með netnotkun þinni, þar á meðal tölvupósti, forritum og öruggum vefsvæðum. Hafðu samband við kerfisstjórann til að fá frekari upplýsingar.\n\nÞú ert einnig með tengingu við VPN-net („<xliff:g id="APPLICATION">%3$s</xliff:g>“). VPN-þjónustuaðilinn getur einnig fylgst með netnotkun."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Tækið verður læst þar til þú opnar það handvirkt"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Fáðu tilkynningar hraðar"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Sjáðu þær áður en þú opnar"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nei, takk"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Setja upp"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> tók hljóðið af"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index f74c2c7..39dc3ee 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cerca"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotocamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefono"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Sblocca"</string>
     <string name="unlock_label" msgid="8779712358041029439">"sblocca"</string>
     <string name="phone_label" msgid="2320074140205331708">"apri telefono"</string>
     <string name="camera_label" msgid="7261107956054836961">"apri fotocamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispositivo protetto."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispositivo non protetto."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispositivo protetto, agente di attendibilità attivo."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispositivo non protetto, agente di attendibilità attivo."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Rilevamento del viso in esecuzione, agente di attendibilità attivo."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Pulsante per cambiare metodo di immissione."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Pulsante zoom compatibilità."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom inferiore per schermo più grande."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Due barre."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tre barre."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Massimo segnale."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"ON"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"OFF"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Connesso."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Connessione in corso."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Telescrivente abilitata."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Suoneria vibrazione."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Suoneria silenziosa."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Elimina <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> eliminata."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Avvio di <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Ricerca"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Su per <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"A sinistra per <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Nessuna interruzione, allarmi compresi"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Senza interruzioni. Neanche sveglie."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Nessuna interruzione"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Solo interruzioni con priorità"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Il tuo prossimo allarme è alle ore <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Avvia adesso"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nessuna notifica"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Il dispositivo potrebbe essere monitorato"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Il profilo potrebbe essere monitorato"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"La rete potrebbe essere monitorata"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Monitoraggio del dispositivo"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitoraggio del profilo"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Monitoraggio rete"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Disattiva VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Scollega VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Sei collegato a una rete VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nIl tuo provider di servizi VPN può monitorare la tua attività di rete e sul dispositivo, inclusi email, app e siti web protetti."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Il dispositivo è gestito da:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIl tuo amministratore può monitorare la tua attività di rete, inclusi email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nInoltre, hai autorizzato \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" a configurare una connessione VPN. Questa app può monitorare anche l\'attività di rete."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Il dispositivo è gestito da:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nIl tuo amministratore può monitorare la tua attività di rete, inclusi email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nInoltre, sei collegato a una rete VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Il tuo provider di servizi VPN può monitorare anche l\'attività di rete."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Questo profilo è gestito da:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'amministratore può monitorare il tuo dispositivo e l\'attività di rete, incluse email, app e siti web protetti.\n\nPer ulteriori informazioni, contatta l\'amministratore."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Questo dispositivo è gestito da:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIl tuo profilo è gestito da:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'amministratore può monitorare il tuo dispositivo e l\'attività di rete, incluse email, app e siti web protetti.\n\nPer ulteriori informazioni, contatta l\'amministratore."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Questo profilo è gestito da:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'amministratore può monitorare la tua attività di rete, incluse email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nHai autorizzato \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" a configurare una connessione VPN. Questa app può monitorare l\'attività di rete."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Questo profilo è gestito da:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nL\'amministratore può monitorare la tua attività di rete, incluse email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nSei collegato a una rete VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Anche il fornitore del servizio VPN può monitorare l\'attività di rete."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Il dispositivo è gestito da:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIl tuo profilo è gestito da:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'amministratore può monitorare la tua attività di rete, incluse email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nHai autorizzato \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" a configurare una connessione VPN. Questa app può monitorare l\'attività di rete."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Il dispositivo è gestito da:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIl tuo profilo è gestito da:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nL\'amministratore può monitorare l\'attività di rete, incluse email, app e siti web protetti. Per ulteriori informazioni, contatta l\'amministratore.\n\nSei collegato a una rete VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Anche il fornitore del servizio VPN può monitorare l\'attività di rete."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Il dispositivo resterà bloccato fino allo sblocco manuale"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Ricevi notifiche più velocemente"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Visualizza prima di sbloccare"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"No, grazie"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configura"</string>
     <string name="muted_by" msgid="6147073845094180001">"Audio disattivato da <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 124ddcb..74d1bcf 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"חפש"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"מצלמה"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"טלפון"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ביטול נעילה"</string>
     <string name="unlock_label" msgid="8779712358041029439">"בטל את הנעילה"</string>
     <string name="phone_label" msgid="2320074140205331708">"פתח את הטלפון"</string>
     <string name="camera_label" msgid="7261107956054836961">"פתח את המצלמה"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"המכשיר מאובטח."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"המכשיר אינו מאובטח."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"המכשיר מאובטח, סביבה אמינה פעילה."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"המכשיר אינו מאובטח, סביבה אמינה פעילה."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"זיהוי פנים פועל, סביבה אמינה פעילה."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"לחצן החלפת שיטת קלט."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"לחצן מרחק מתצוגה של תאימות."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"שנה מרחק מתצוגה של מסך קטן לגדול יותר."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"שני פסים."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"שלושה פסים."</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_connected" msgid="8366256693719499665">"מחובר."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"מתחבר."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"‎1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"‏TeleTypewriter מופעל"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"צלצול ורטט."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"צלצול שקט."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"סגור את <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> נדחה."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"מפעיל את <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"חיפוש"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"הסט למעלה כדי להציג <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"הסט שמאלה כדי להציג <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ללא הפרעות, כולל התראות"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ללא הפרעות. גם לא התראות."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ללא הפרעות"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"רק הפרעות בעדיפות גבוהה"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ההתראה הבאה שלך היא ב-<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"התחל כעת"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"אין הודעות"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ייתכן שהמכשיר נמצא במעקב"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ייתכן שהפרופיל נתון למעקב"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ייתכן שהרשת נמצאת במעקב"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"מעקב אחר מכשיר"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"מעקב אחר פרופיל"</string>
     <string name="monitoring_title" msgid="169206259253048106">"מעקב אחר פעילות ברשת"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"‏השבת VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"‏נתק את ה-VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"‏אתה מחובר ל-VPN ‏‏(\"<xliff:g id="APPLICATION">%1$s</xliff:g>\")‏‏.\n\nספק שירות ה-VPN שלך יכול לעקוב אחר המכשיר והפעילות שלך ברשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"‏מכשיר זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nמנהל המערכת שלך יכול לעקוב אחר הפעילות שלך ברשת, כולל הודעות דוא\"ל, אפליקציות, ואתרים מאובטחים. למידע נוסף, צור קשר עם מנהל המערכת שלך.\n\nכמו כן, נתת ל-\"<xliff:g id="APPLICATION">%2$s</xliff:g>\" הרשאה להגדרת חיבור VPN. גם אפליקציה זו יכולה לעקוב אחר הפעילות שלך ברשת."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"‏מכשיר זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nמנהל המערכת שלך יכול לעקוב אחר הפעילות שלך ברשת, כולל הודעות דוא\"ל, אפליקציות, ואתרים מאובטחים. למידע נוסף, צור קשר עם מנהל המערכת שלך.\n\nכמו כן, אתה מחובר ל-VPN ‏‏(\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). גם ספק שירות ה-VPN שלך יכול לעקוב אחר הפעילות שלך ברשת."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"פרופיל זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים.\n\nלמידע נוסף, פנה למנהל מערכת."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"מכשיר זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nהפרופיל שלך מנוהל על ידי:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים.\n\nלמידע נוסף, פנה למנהל מערכת."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"‏פרופיל זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים. למידע נוסף, פנה למנהל מערכת.\n\n בנוסף, הענקת הרשאת \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" כדי להגדיר חיבור VPN. אפליקציה זו יכולה גם לעקוב אחר פעילות הרשת."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"‏פרופיל זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים. למידע נוסף, פנה למנהל מערכת.\n\nבנוסף, אתה מחובר אל VPN ‏(\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). גם ספק השירות של VPN יכול לעקוב אחר פעילות הרשת."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"‏מכשיר זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nהפרופיל שלך מנוהל על ידי:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים. למידע נוסף, פנה למנהל מערכת.\n\nבנוסף, הענקת הרשאת \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" כדי להגדיר חיבור VPN. אפליקציה זו יכולה גם לעקוב אחר פעילות הרשת."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"‏מכשיר זה מנוהל על ידי:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nהפרופיל שלך מנוהל על ידי:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nמנהל המערכת יכול לעקוב אחר פעילות המכשיר והרשת, כולל הודעות דוא\"ל, אפליקציות ואתרים מאובטחים. למידע נוסף, פנה למנהל מערכת.\n\nבנוסף, אתה מחובר אל VPN‏ (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). גם ספק השירות של VPN יכול לעקוב אחר פעילות הרשת."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"לא, תודה"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"הגדר"</string>
     <string name="muted_by" msgid="6147073845094180001">"הושתק על ידי <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index edc7009..f1aa72c 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"検索"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"カメラ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"電話"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ロック解除"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ロック解除"</string>
     <string name="phone_label" msgid="2320074140205331708">"電話を起動"</string>
     <string name="camera_label" msgid="7261107956054836961">"カメラを起動"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"端末は保護されています。"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"端末は保護されていません。"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"端末は保護され、信頼できるエージェントがアクティブです。"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"端末は保護されておらず、信頼できるエージェントがアクティブです。"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"顔検出を実行しており、信頼できるエージェントがアクティブです。"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"入力方法の切り替えボタン。"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"互換ズームボタン。"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"小さい画面から大きい画面に拡大。"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"レベル2"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"レベル3"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"電波フル"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"ON"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"OFF"</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>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"テレタイプライターが有効です。"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"バイブレーション着信。"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"マナーモード着信。"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>を削除します。"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>は削除されました。"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>を開始しています。"</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"検索します"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"上にスライドして<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>を行います。"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"左にスライドして<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>を行います。"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"サイレント(アラームなど)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"サイレント(アラームも鳴りません)"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"サイレント"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"重要な通知のみ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"次のアラームは<xliff:g id="ALARM_TIME">%s</xliff:g>です"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"今すぐ開始"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"通知はありません"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"端末が監視されている可能性があります"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"プロフィールが監視されている可能性があります"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ネットワークが監視されている可能性があります"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"端末の監視"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"プロフィールの監視"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ネットワーク監視"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPNを無効にする"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPNを切断"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN(「<xliff:g id="APPLICATION">%1$s</xliff:g>」)に接続しています。\n\nVPNサービスプロバイダはあなたの端末やネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"この端末は<xliff:g id="ORGANIZATION">%1$s</xliff:g>によって管理されています。\n\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、「<xliff:g id="APPLICATION">%2$s</xliff:g>」にVPN接続のセットアップを許可しています。このアプリもネットワークアクティビティを監視できます。"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"この端末は<xliff:g id="ORGANIZATION">%1$s</xliff:g>によって管理されています。\n\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、VPN(「<xliff:g id="APPLICATION">%2$s</xliff:g>」)に接続しています。VPNサービスプロバイダーもネットワークアクティビティを監視できます。"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"このプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n管理者はあなたの端末やネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。\n\n詳しくは管理者にお問い合わせください。"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"この端末は次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nあなたのプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n管理者はあなたの端末やネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。\n\n詳しくは管理者にお問い合わせください。"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"このプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、VPN接続を設定する権限を「<xliff:g id="APPLICATION">%2$s</xliff:g>」に付与しているため、このアプリもネットワークアクティビティを監視できます。"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"このプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、VPN(「<xliff:g id="APPLICATION">%2$s</xliff:g>」)に接続しているため、VPNサービスプロバイダもネットワークアクティビティを監視できます。"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"この端末は次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nあなたのプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、VPN接続を設定する権限を「<xliff:g id="APPLICATION">%3$s</xliff:g>」に付与しているため、このアプリもネットワークアクティビティを監視できます。"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"この端末は次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nあなたのプロフィールは次の組織によって管理されています。\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n管理者はあなたのネットワークアクティビティ(メール、アプリ、保護されたウェブサイトなど)を監視できます。詳しくは管理者にお問い合わせください。\n\nまた、VPN(「<xliff:g id="APPLICATION">%3$s</xliff:g>」)に接続しているため、VPNサービスプロバイダもネットワークアクティビティを監視できます。"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"キャンセル"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"設定"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>によりミュートになっています"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index facbd12d..e7b272b 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ძიება"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"კამერა"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ტელეფონი"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"განბლოკვა"</string>
     <string name="unlock_label" msgid="8779712358041029439">"განბლოკვა"</string>
     <string name="phone_label" msgid="2320074140205331708">"ტელეფონის გახსნა"</string>
     <string name="camera_label" msgid="7261107956054836961">"კამერის გახსნა"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"მოწყობილობა დაცულია."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"მოწყობილობა არ არის დაცული."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"მოწყობილობა დაცულია, ნდობის აგენტი აქტიურია."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"მოწყობილობა არ არის დაცული, ნდობის აგენტი აქტიურია."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"მიმდინარეობს სახის ამოცნობა, ნდობის აგენტი აქტიურია."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"შეყვანის მეთოდის გადართვის ღილაკი."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"თავსებადი მასშტაბირების ღილაკი."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"შეცვალეთ პატარა ეკრანი უფრო დიდით."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"ორი სვეტი."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"სამი ზოლი."</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_connected" msgid="8366256693719499665">"დაკავშირებულია."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"უკავშირდება."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"ტელეტაიპი ჩართულია."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"ვიბრაციის რეჟიმი."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"უხმო რეჟიმი."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>-ის უგულებელყოფა."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ამოშლილია სიიდან."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> იწყება."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ძიება"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"გაასრიალეთ ზემოთ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>-თვის."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"გაასრიალეთ მარცხნივ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>-თვის."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"შეწყვეტების გარეშე, მაღვიძარების ჩათვლით"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"წყვეტების გარეშე. მაღვიძარების შემთხვევაშიც კი."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"შეწყვეტების გარეშე"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"მხოლოდ პრიორიტეტული შეწყვეტები"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"თქვენი შემდეგი მაღვიძარაა <xliff:g id="ALARM_TIME">%s</xliff:g>-ზე"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"დაწყება ახლავე"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"შეტყობინებები არ არის."</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"შესაძლოა მოწყობილობის მონიტორინგი არ ხორციელდება"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"შესაძლოა პროფილზე ხორციელდებოდეს მონიტორინგი"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"შესაძლოა ქსელზე ხორციელდება მონიტორინგი"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"მოწყობილობის მონიტორინგი"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"პროფილის მონიტორინგი"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ქსელის მონიტორინგი"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN-ის გაუქმება"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN-ის გათიშვა"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nთქვენი VPN სერვისის პროვაიდერს  შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით თქვენს ადმინისტრატორს.\n\nთქვენ მიეცით ნებართვა „<xliff:g id="APPLICATION">%2$s</xliff:g>“-ს დააყენოს VPN კავშირი. ამ აპს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ამ მოწყობილობის მმართველი არის:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით თქვენს ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%2$s</xliff:g>“). თქვენს VPN სერვისის პროვაიდერს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების.\n\nდამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების.\n\nდამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%2$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტორინგი."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ამ პროფილის მმართველია:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტების, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით თქვენს ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%2$s</xliff:g>“). თქვენს VPN სერვისის მომწოდებელს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ მიანიჭეთ „<xliff:g id="APPLICATION">%3$s</xliff:g>“-ს VPN კავშირის დაყენება. ამ აპს ასევე შეუძლია ქსელის მონიტორინგი."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ამ მოწყობილობის მმართველია:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nთქვენი პროფილის მმართველია:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nთქვენს ადმინისტრატორს შეუძლია თქვენი მოწყობილობისა და ქსელის აქტივობის მონიტორინგი, მათ შორის ელფოსტის, აპების და უსაფრთხო საიტების. დამატებითი ინფორმაციისათვის, დაუკავშირდით ადმინისტრატორს.\n\nასევე, თქვენ დაკავშირებული ხართ VPN-თან („<xliff:g id="APPLICATION">%3$s</xliff:g>“). თქვენს VPN სერვისის მომწოდებელს ასევე შეუძლია თქვენი ქსელის აქტივობის მონიტორინგი."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"არა, გმადლობთ"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"დაყენება"</string>
     <string name="muted_by" msgid="6147073845094180001">"დადუმებულია <xliff:g id="THIRD_PARTY">%1$s</xliff:g>-ის მიერ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk-rKZ/strings.xml
index acbe587..e7e7119 100644
--- a/packages/SystemUI/res/values-kk-rKZ/strings.xml
+++ b/packages/SystemUI/res/values-kk-rKZ/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Іздеу"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Бекітпесін ашу"</string>
     <string name="unlock_label" msgid="8779712358041029439">"бекітпесін ашу"</string>
     <string name="phone_label" msgid="2320074140205331708">"телефонды ашу"</string>
     <string name="camera_label" msgid="7261107956054836961">"камераны ашу"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Құрылғы қорғалған."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Құрылғы қорғалмаған."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Құрылғы қорғалған, сенімді агент белсенді."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Құрылғы қорғалмаған, сенімді агент белсенді."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Бетті анықтау орындалуда, сенімді агент белсенді."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Енгізу әдісі түймесін ауыстыру."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Үйлесімділік ұлғайту түймесі."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Үлкендеу экранда кішірейту."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Екі жолақ."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Үш жолақ."</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_connected" msgid="8366256693719499665">"Жалғанған."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Қосылуда."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS (жалпы деректердің радио қызметі)"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA (Дерекер жинағына жоғары жылдамдықпен кіру)"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Телетайп қосылған."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Қоңырау тербелісі."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Қоңырау үнсіз."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> қолданбасынан бас тарту."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> алынып тасталған."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> іске қосылуда."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Іздеу"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> үшін жоғары сырғыту."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> үшін солға сырғыту."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Үзілістерсіз, соның ішінде, дабылдарсыз"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Үзілулер болмайды. Тіпті дабылдар да."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Үзулерсіз"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Тек басым үзулер"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Келесі дабыл — <xliff:g id="ALARM_TIME">%s</xliff:g> уақытында"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Қазір бастау"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Хабарландырулар жоқ"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Құрылғы бақылануы мүмкін"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профиль бақылануы мүмкін"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Желі бақылауда болуы мүмкін"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Құрылғыны бақылау"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Профильді бақылау"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Желіні бақылау"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN функциясын өшіру"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN желісін ажырату"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Сіз VPN («<xliff:g id="APPLICATION">%1$s</xliff:g>») желісіне қосылғансыз.\n\nVPN қызмет жеткізушісі құрылғыңызды және желілік белсенділікті, соның ішінде, электрондық хабарларды, қолданбаларды және қорғалған веб-сайттарды бақылауы мүмкін."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Бұл құр. келесі ұйым бас.:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, электрондық хаб-ды, қолд-ды және қорғалған веб-сайттарды бақ. мүмкін. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз.\n\nСондай-ақ, сіз «<xliff:g id="APPLICATION">%2$s</xliff:g>» қолд-на VPN байланысын орнатуға рұқсат еттіңіз. Бұл қолд. да желілік белс-ті бақылауы мүмкін."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Бұл құрылғыны келесі ұйым басқарады:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, электрондық хабарларды, қолданбаларды және қорғалған веб-сайттарды бақылауы мүмкін. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз.\n\nСондай-ақ, сіз VPN («<xliff:g id="APPLICATION">%2$s</xliff:g>») желісіне қосылғансыз. VPN қызмет жет-сі де жел. белс-ті бақ. мүм."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Бұл профильді басқаратын:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, электрондық хабарларды, қолданбаларды және қорғалған веб-сайттарды бақылай алады.\n\nҚосымша ақпарат алу үшін әкімшіге хабарласыңыз."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Бұл құрылғыны басқаратын:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nБұл профильді басқаратын:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nӘкімші құрылғыны және желілік белсенділікті, соның ішінде, электрондық хабарларды, қолданбаларды және қорғалған веб-сайттарды бақылай алады.\n\nҚосымша ақпарат алу үшін әкімшіге хабарласыңыз."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Бұл профильді басқаратын:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, электрондық хабарларды, қолданбаларды және қорғалған веб-сайттарды бақылай алады. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз.\n\nСондай-ақ, сіз «<xliff:g id="APPLICATION">%2$s</xliff:g>» VPN байл. орнату рұқ. бердіңіз. Бұл қолданба да желілік белсенділікті бақылай алады."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Бұл профильді басқаратын:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, электрондық хабарларды, қол-ды және қорғалған веб-сайттарды бақылай алады. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз.\n\nСондай-ақ, сіз VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") қызметіне қосылғансыз. VPN қызметін жеткізуші де желілік белсенділікті бақылай алады."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Бұл құрылғыны басқаратын:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПрофиліңізді басқаратын:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nӘкімші желілік белс-ті, соның ішінде, эл. хаб-ды, қол-ды және қорғалған веб-сайттарды бақылай алады. Қосымша ақпар. алу үшін әкімшіге хаб-з.\n\nСондай-ақ, сіз «<xliff:g id="APPLICATION">%3$s</xliff:g>» VPN байланысын орнату рұқсатын бердіңіз. Бұл қолданба да желілік белсенділікті бақылай алады."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Бұл құр. басқаратын:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПрофиліңізді басқаратын:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nӘкімші желілік белсенділікті, соның ішінде, эл. хаб-ды, қолд-ды және қорғалған веб-сайттарды бақылай алады. Қосымша ақпарат алу үшін әкімшіге хаб-ңыз.\n\nСондай-ақ, VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") қызметіне қосылғансыз. VPN қызметін жеткізуші де желілік белсенділікті бақылай алады."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Жоқ, рақмет"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Реттеу"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> үнін өшірген"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km-rKH/strings.xml
index f8cf9ff..61d4289 100644
--- a/packages/SystemUI/res/values-km-rKH/strings.xml
+++ b/packages/SystemUI/res/values-km-rKH/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ស្វែងរក"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ម៉ាស៊ីន​ថត"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ទូរស័ព្ទ"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ដោះ​​សោ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ដោះ​សោ"</string>
     <string name="phone_label" msgid="2320074140205331708">"បើក​ទូរស័ព្ទ"</string>
     <string name="camera_label" msgid="7261107956054836961">"បើក​ម៉ាស៊ីន​ថត"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"ឧបករណ៍​មាន​សុវត្ថិភាព។"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"ឧបករណ៍​គ្មាន​សុវត្ថិភាព។"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"ឧបករណ៍​មាន​សុវត្ថិភាព, ភ្នាក់ងារ​ទុកចិត្ត​សកម្ម។"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"ឧបករណ៍​គ្មាន​សុវត្ថិភាព, ភ្នាក់ងារ​ទុកចិត្ត​សកម្ម។"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"កំពុង​ដំណើរការ​រក​ឃើញ​ទម្រង់​មុខ, ភ្នាក់ងារ​ទុកចិត្ត​សកម្ម។"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ប្ដូរ​ប៊ូតុង​វិធីសាស្ត្រ​បញ្ចូល។"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ប៊ូតុង​ពង្រីក​ត្រូវ​គ្នា។"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ពង្រីក/បង្រួម​​អេក្រង់​ពី​​ទៅធំ"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"ពីរ​កាំ។"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"បី​កាំ។"</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_connected" msgid="8366256693719499665">"បាន​តភ្ជាប់។"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"ការ​ភ្ជាប់​។"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"បាន​បើក​ម៉ាស៊ីន​អង្គុលីលេខ​"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"កម្មវិធី​រោទ៍​ញ័រ។"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"កម្មវិធី​រោទ៍​ស្ងាត់។"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"បោះបង់ <xliff:g id="APP">%s</xliff:g> ។"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> បដិសេធ។"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"ចាប់ផ្ដើម <xliff:g id="APP">%s</xliff:g> ។"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ស្វែងរក"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"រុញ​ឡើង​លើ​ដើម្បី <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ។"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"រុញ​ទៅ​ឆ្វេង​ដើម្បី <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ។"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"មិន​មានការ​ផ្អាក រួម​ទាំង​ការ​ជូនដំណឹង"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"គ្មាន​ការ​ផ្អាក។ គ្មាន​ការ​ជូនដំណឹង​ពី​ព្រឹត្តិការណ៍។"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"គ្មាន​ការ​ផ្អាក"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"តែ​ការ​ផ្អាក​អាទិភាព​ប៉ុណ្ណោះ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ការ​ជូនដំណឹង​បន្ទាប់​របស់​អ្នក​គឺនៅម៉ោង <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ចាប់ផ្ដើម​ឥឡូវ"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"គ្មាន​ការ​ជូនដំណឹង"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ឧបករណ៍​អាច​ត្រូវ​បាន​ត្រួតពិនិត្យ"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ប្រវត្តិរូបអាចត្រូវបានតាមដាន"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"បណ្ដាញ​អាច​ត្រូវ​បាន​ត្រួតពិនិត្យ"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ការ​ត្រួតពិនិត្យ​ឧបករណ៍"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"តាមដានប្រវត្ថិរូប"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ការ​ត្រួតពិនិត្យ​បណ្ដាញ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"បិទ VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"ផ្ដាច់ VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"អ្នក​​បាន​ភ្ជាប់​ទៅ VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\")។\n\nក្រុមហ៊ុន​ផ្ដល់​សេវាកម្ម VPN របស់​អ្នក​​អាច​ពិនិត្យ​ឧបករណ៍ និង​សកម្មភាព​បណ្ដាញ​របស់​អ្នក​​រួមមាន អ៊ីមែល, កម្មវិធី និង​តំបន់​បណ្ដាញ​មាន​សុវត្ថិភាព។"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ឧបករណ៍នេះត្រូវបានគ្រប់គ្រងដោយ​ \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n អ្នកគ្រប់គ្រងរបស់អ្នកមានសមត្ថភាពក្នុងការត្រួតពិនិត្យសកម្មភាពបណ្ដាញរបស់អ្នក រួមមានអ៊ីមែល​, កម្មវិធី​, និងតំបន់បណ្ដាញសុវត្ថិភាព​។ សម្រាប់ព័ត៌មានបន្ថែមសូមទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នក​។ \n\n អ្នកបានផ្ដល់សិទ្ធិ\"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ដើម្បីរៀបចំការតភ្ជាប់ VPN ។ កម្មវិធីនេះអាចតាមដានសកម្មភាពបណ្ដាញ។"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ឧបករណ៍នេះត្រូវបានគ្រប់គ្រងដោយ \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n អ្នកគ្រប់គ្រងរបស់អ្នកមានសមត្ថភាពក្នុងការត្រួតពិនិត្យសកម្មភាពបណ្ដាញរបស់អ្នករួមមានអ៊ីមែល​, កម្មវិធី និងតំបន់បណ្ដាញសុវត្ថិភាព។ សម្រាប់ព័ត៌មានបន្ថែមសូមទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នក។ \n\n ​អ្នកត្រូវបានតភ្ជាប់ទៅ VPN (\" <xliff:g id="APPLICATION">%2$s</xliff:g> \") ។ ក្រុមហ៊ុនផ្ដល់​សេវា VPN របស់អ្នកអាចតាមដានសកម្មភាពរបស់​អ្នក។"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ប្រវត្តិរូបនេះត្រូវបានគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nអ្នក​គ្រប់គ្រង​របស់​អ្នក​អាច​តាមដាន​ឧបករណ៍ និង​សកម្មភាព​បណ្ដាញ​របស់​អ្នក រួមមាន​កម្មវិធី និង​តំបន់​បណ្ដាញ​មាន​សុវត្ថិភាព។\n\nចំពោះ​ព័ត៌មាន ទាក់ទង​អ្នកគ្រប់គ្រង​របស់​អ្នក។"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ឧបករណ៍នេះត្រូវបានគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nប្រវត្តិរូបរបស់អ្នកត្រូវបានគ្រប់គ្រង​ដោយ៖\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nអ្នកគ្រប់គ្រងរបស់អ្នកអាចតាមដានឧបករណ៍​ និងសកម្មភាព​បណ្ដាញរបស់អ្នក រួមមានអ៊ីមែល, កម្មវិធី និងតំបន់បណ្ដាញមានសុវត្ថិភាព។\n\nចំពោះ​ព័ត៌មាន​បន្ថែម ទាក់ទង​អ្នក​គ្រប់គ្រង​របស់​អ្នក។"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ប្រវត្តិរូបនេះត្រូវបានគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nអ្នកគ្រប់គ្រងរបស់អ្នកអាចតាមដានសកម្មភាពបណ្ដាញរួមមាន អ៊ីមែល, កម្មវិធី និងតំបន់បណ្ដាញមានសុវត្ថិភាព។ ចំពោះព័ត៌មានបន្ថែម ទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នក។\n\nអ្នកបានផ្ដល់សិទ្ធិ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ឲ្យកំណត់ការភ្ជាប់ VPN ។ កម្មវិធីនេះអាចតាមដានសកម្មភាពបណ្ដាញផងដែរ។"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ប្រវត្តិ​រូបនេះត្រូវបានគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nអ្នកគ្រប់គ្រងរបស់អ្នកអាចតាមដាន​សកម្មភាពបណ្ដាញរបស់អ្នករួមមានអ៊ីមែល, កម្មវិធី និងតំបន់បណ្ដាញមានសុវត្ថិភាព។ ចំពោះព័ត៌មានបន្ថែម ទាក់ទង​អ្នកគ្រប់គ្រងរបស់​អ្នក។\n\nអ្នកត្រូវបាន​ភ្ជាប់ទៅ​ VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") ។ ក្រុមហ៊ុនផ្ដល់សេវាកម្ម VPN របស់អ្នកអាចតាមដានសកម្មភាពបណ្ដាញរបស់អ្នក​បានផងដែរ។"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ឧបករណ៍នេះត្រូវបានគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nប្រវត្តិរូបរបស់អ្នកត្រូវបានគ្រប់គ្រង៖\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nអ្នកគ្រប់គ្រងរបស់អ្នកអាចតាមដានសកម្មភាពបណ្ដាញ រួមមានអ៊ីមែល កម្មវិធី និងតំបន់បណ្ដាញមានសុវត្ថិភាព។ ចំពោះព័ត៌មានបន្ថែម ទាក់ទងអ្នកគ្រប់គ្រងរបស់អ្នក។\n\nអ្នកបានផ្ដល់សិទ្ធិ \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ឲ្យកំណត់ការភ្ជាប់ VPN ។ កម្មវិធីនេះអាចតាមដានសកម្មភាពបណ្ដាញផងដែរ។"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ឧបករណ៍នេះត្រូវបា​នគ្រប់គ្រងដោយ៖\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nប្រវត្តិរូបរបស់អ្នកត្រូវបានគ្រប់គ្រង​ដោយ៖\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nអ្នកគ្រប់គ្រងរបស់អ្នកអាចតាមដានសកម្មភាពបណ្ដាញរបស់អ្នក  រួមមានអ៊ីមែល, កម្មវិធី និងតំបន់បណ្ដាញមានសុវត្ថិភាព​​​។ ចំពោះព័ត៌មានបន្ថែម ទាក់ទង​អ្នកគ្រប់គ្រងរបស់​អ្នក។\n\nអ្នកក៏បានភ្ជាប់ទៅ​ VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") ។ ក្រុមហ៊ុនផ្ដល់សេវាកម្ម VPN របស់អ្នកអាចតាមដានសកម្មភាពបណ្ដាញបានផងដែរ។"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"ទេ អរគុណ!"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"រៀបចំ"</string>
     <string name="muted_by" msgid="6147073845094180001">"បាន​បិទ​សំឡេង​ដោយ <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 63b5156..f7b21c7 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ಹುಡುಕು"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ಕ್ಯಾಮರಾ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ಫೋನ್"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ಅನ್‌ಲಾಕ್"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ಅನ್‌ಲಾಕ್ ಮಾಡು"</string>
     <string name="phone_label" msgid="2320074140205331708">"ಫೋನ್ ತೆರೆಯಿರಿ"</string>
     <string name="camera_label" msgid="7261107956054836961">"ಕ್ಯಾಮರಾ ತೆರೆಯಿರಿ"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"ಸಾಧನವು ಸುರಕ್ಷಿತವಾಗಿದೆ."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"ಸಾಧನವು ಸುರಕ್ಷಿತವಾಗಿಲ್ಲ."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"ಸಾಧನವು ಸುರಕ್ಷಿತವಾಗಿದೆ, ವಿಶ್ವಾಸಾರ್ಹ ಏಜೆಂಟ್ ಸಕ್ರಿಯವಾಗಿದೆ."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"ಸಾಧನವು ಸುರಕ್ಷಿತವಾಗಿಲ್ಲ, ವಿಶ್ವಾಸಾರ್ಹ ಏಜೆಂಟ್ ಸಕ್ರಿಯವಾಗಿದೆ."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"ಮುಖ ಪತ್ತೆಹಚ್ಚುವಿಕೆಯು ರನ್‌ ಆಗುತ್ತಿದೆ, ವಿಶ್ವಾಸಾರ್ಹ ಏಜೆಂಟ್ ಸಕ್ರಿಯವಾಗಿದೆ."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ಇನ್‌ಪುಟ್ ವಿಧಾನ ಬದಲಿಸು ಬಟನ್."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ಹೊಂದಾಣಿಕೆಯ ಝೂಮ್ ಬಟನ್."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ಚಿಕ್ಕ ಪರದೆಯಿಂದ ದೊಡ್ಡ ಪರದೆಗೆ ಝೂಮ್ ಮಾಡು."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"ಎರಡು ಪಟ್ಟಿಗಳು."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"ಮೂರು ಪಟ್ಟಿಗಳು."</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_connected" msgid="8366256693719499665">"ಸಂಪರ್ಕಗೊಂಡಿದೆ."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"ಸಂಪರ್ಕಗೊಳ್ಳುತ್ತಿದೆ."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"ಟೆಲಿಟೈಪ್‌ರೈಟರ್ ಸಕ್ರಿಯವಾಗಿದೆ."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"ರಿಂಗರ್ ಕಂಪನ."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"ರಿಂಗರ್ ಶಾಂತ."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ವಜಾಗೊಳಿಸು."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ವಜಾಗೊಳಿಸಲಾಗಿದೆ."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> ಪ್ರಾರಂಭಿಸಲಾಗುತ್ತಿದೆ."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ಹುಡುಕಿ"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ಗಾಗಿ ಮೇಲಕ್ಕೆ ಸ್ಲೈಡ್ ಮಾಡಿ."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ಗಾಗಿ ಎಡಕ್ಕೆ ಸ್ಲೈಡ್ ಮಾಡಿ."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ಅಲಾರಂಗಳನ್ನು ಸೇರಿದಂತೆ, ಯಾವುದೇ ಅಡಚಣೆಗಳಿಲ್ಲ"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ಅಲಾರಂಗಳನ್ನು ಸೇರಿದಂತೆ ಯಾವುದೇ ಅಡಚಣೆಗಳಿಲ್ಲ."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ಯಾವುದೇ ಅಡಚಣೆಗಳಿಲ್ಲ"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ಆದ್ಯತೆಯ ಅಡಚಣೆಗಳು ಮಾತ್ರ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ನಿಮ್ಮ ಮುಂದಿನ ಅಲಾರಂ <xliff:g id="ALARM_TIME">%s</xliff:g> ಗೆ ಆಗಿದೆ"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ಈಗ ಪ್ರಾರಂಭಿಸಿ"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"ಯಾವುದೇ ಅಧಿಸೂಚನೆಗಳಿಲ್ಲ"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ಸಾಧನವನ್ನು ಪರಿವೀಕ್ಷಿಸಬಹುದಾಗಿದೆ"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ಪ್ರೊಫೈಲ್ ಅನ್ನು ಪರಿವೀಕ್ಷಿಸಬಹುದಾಗಿದೆ"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ವೀಕ್ಷಿಸಬಹುದಾಗಿ"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ಸಾಧನ ಪರಿವೀಕ್ಷಣೆ"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"ಪ್ರೊಫೈಲ್ ಮೇಲ್ವಿಚಾರಣೆ"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ನೆಟ್‌ವರ್ಕ್‌ ಪರಿವೀಕ್ಷಣೆ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN ಸಂಪರ್ಕಕಡಿತಗೊಳಿಸಿ"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"ನೀವು VPN ಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವಿರಿ (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nನಿಮ್ಮ VPN ಸೇವೆ ಒದಗಿಸುವವರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ಇವರು ಈ ಸಾಧನವನ್ನು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೇ, ನೀವು VPN ಸಂಪರ್ಕ ಹೊಂದಿಸಲು \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ಗೆ ಅನುಮತಿ ನೀಡಿರುವಿರಿ. ಈ ಅಪ್ಲಿಕೇಶನ್ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನು ಸಹ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ಇವರು ಈ ಸಾಧನವನ್ನು ಇವರು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೇ, ನೀವು VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") ಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವಿರಿ. ನಿಮ್ಮ VPN ಸೇವೆ ಒದಗಿಸುವವರು ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನು ಸಹ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ಈ ಪ್ರೊಫೈಲ್ ಅನ್ನು ಇವರು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ಸಾಧನ ಮತ್ತು ನೆಟ್‌ವರ್ಕ್‌ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು.\n\nಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿರಿ."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ಈ ಸಾಧನವನ್ನು ಇವರಿಂದ ನಿರ್ವಹಿಸಲಾಗಿದೆ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nನಿಮ್ಮ ಪ್ರೊಫೈಲ್ ಇವರಿಂದ ನಿರ್ವಹಿಸಲಾಗಿದೆ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ಸಾಧನ ಹಾಗೂ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು.\n\nಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ಇವರು ಈ ಪ್ರೊಫೈಲ್ ಅನ್ನು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n.ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್‌ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡುವ ಸಾಮರ್ಥ್ಯವನ್ನು ಹೊಂದಿದ್ದಾರೆ. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೆ, VPN ಗೆ ಸಂಪರ್ಕವನ್ನು ಹೊಂದಿಸಲು ನೀವು \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ಗೆ ಅನುಮತಿಸಿರುವಿರಿ. ಈ ಅಪ್ಲಿಕೇಶನ್ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನು ಸಹ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ಈ ಪ್ರೊಫೈಲ್ ಅನ್ನು ಇವರು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡುವ ಸಾಮರ್ಥ್ಯವನ್ನು ಹೊಂದಿದ್ದಾರೆ. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೆ, ನೀವು VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") ಗೆ ಗೆ ಸಂಪರ್ಕವನ್ನು ಹೊಂದಿರುವಿರಿ. ನಿಮ್ಮ VPN ಸೇವೆ ಪೂರೈಕೆದಾರರು ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನೂ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ಈ ಸಾಧನವನ್ನು ಇವರು ನಿರ್ವಹಿಸುತ್ತಾರೆ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nನಿಮ್ಮ ಪ್ರೊಫೈಲ್ ಇವರಿಂದ ನಿರ್ವಹಿಸಲಾಗಿದೆ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n.ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು, ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್‌ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡುವ ಸಾಮರ್ಥ್ಯವನ್ನು ಹೊಂದಿದ್ದಾರೆ. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೆ, VPN ಗೆ ಸಂಪರ್ಕವನ್ನು ಹೊಂದಿಸಲು ನೀವು \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ಗೆ ಅನುಮತಿಸಿರುವಿರಿ. ಈ ಅಪ್ಲಿಕೇಶನ್ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನು ಸಹ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ಈ ಸಾಧನವನ್ನು ಇವರಿಂದ ನಿರ್ವಹಿಸಲಾಗಿದೆ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nನಿಮ್ಮ ಪ್ರೊಫೈಲ್ ಅನ್ನು ಇವರಿಂದ ನಿರ್ವಹಿಸಲಾಗಿದೆ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಇಮೇಲ್‌ಗಳು, ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಮತ್ತು ಸುರಕ್ಷಿತ ವೆಬ್‌ಸೈಟ್‌ಗಳನ್ನು ಒಳಗೊಂಡಂತೆ ನಿಮ್ಮ ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡುವ ಸಾಮರ್ಥ್ಯವನ್ನು ಹೊಂದಿದ್ದಾರೆ. ಹೆಚ್ಚಿನ ಮಾಹಿತಿಗಾಗಿ, ನಿಮ್ಮ ನಿರ್ವಾಹಕರನ್ನು ಸಂಪರ್ಕಿಸಿ.\n\nಅಲ್ಲದೆ, ನೀವು VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") ಗೆ ಸಂಪರ್ಕವನ್ನು ಹೊಂದಿರುವಿರಿ. ನಿಮ್ಮ VPN ಸೇವೆ ಪೂರೈಕೆದಾರರು ನೆಟ್‌ವರ್ಕ್ ಚಟುವಟಿಕೆಯನ್ನೂ ಮೇಲ್ವಿಚಾರಣೆ ಮಾಡಬಹುದು."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"ಬೇಡ ಧನ್ಯವಾದಗಳು"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"ಹೊಂದಿಸು"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ಅವರಿಂದ ಮ್ಯೂಟ್‌ ಮಾಡಲಾಗಿದೆ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index c63d040..e73cbde 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -86,14 +86,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"검색"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"카메라"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"전화"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"잠금 해제"</string>
     <string name="unlock_label" msgid="8779712358041029439">"잠금 해제"</string>
     <string name="phone_label" msgid="2320074140205331708">"휴대전화 열기"</string>
     <string name="camera_label" msgid="7261107956054836961">"카메라 열기"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"기기에 보안 설정이 되어 있습니다."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"기기에 보안 설정이 되어 있지 않습니다."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"기기에 보안 설정이 되었으며 Trust Agent가 활성화되어 있습니다."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"기기에 보안 설정이 되어 있지 않으며 Trust Agent가 활성화되어 있습니다."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"얼굴 인식 기능이 실행 중이며 Trust Agent가 활성화되어 있습니다."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"입력 방법 버튼을 전환합니다."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"호환성 확대/축소 버튼입니다."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"작은 화면을 큰 화면으로 확대합니다."</string>
@@ -134,6 +130,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"신호 막대가 두 개입니다."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"신호 막대가 세 개입니다."</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_connected" msgid="8366256693719499665">"연결됨"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"연결 중..."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"전신 타자기(TTY)가 사용 설정되었습니다."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"벨소리가 진동입니다."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"벨소리가 무음입니다."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>을(를) 숨깁니다."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>이(가) 제거되었습니다."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>을(를) 시작하는 중입니다."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"검색"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>하려면 위로 슬라이드"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>하려면 왼쪽으로 슬라이드"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"방해 금지(알람 포함)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"어떤 방해도 받지 않습니다. 알람도 울리지 않습니다."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"모든 알림 차단"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"최우선 알림만 수신"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"다음 알람 시각: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"시작하기"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"알림 없음"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"기기가 모니터링될 수 있음"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"프로필이 모니터링될 수 있음"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"네트워크가 모니터링될 수 있음"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"기기 모니터링"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"프로필 모니터링"</string>
     <string name="monitoring_title" msgid="169206259253048106">"네트워크 모니터링"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN 사용 중지"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN 연결 해제"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN(\'<xliff:g id="APPLICATION">%1$s</xliff:g>\')에 연결되었습니다.\n\nVPN 서비스 제공업체에서 내 기기와 이메일, 앱, 보안 웹사이트 등의 네트워크 활동을 모니터링할 수 있습니다."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"이 기기는 \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>에서 관리합니다.\n\n관리자가 이메일, 앱, 보안 웹사이트 등의 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 \'<xliff:g id="APPLICATION">%2$s</xliff:g>\'에 VPN 연결을 설정할 수 있는 권한을 부여했습니다. 이 앱에서도 네트워크 활동을 모니터링할 수 있습니다."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"이 기기는 \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>에서 관리합니다.\n\n관리자가 이메일, 앱, 보안 웹사이트 등의 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 VPN에도 연결되었습니다(\'<xliff:g id="APPLICATION">%2$s</xliff:g>\'). VPN 서비스 제공업체에서도 네트워크 활동을 모니터링할 수 있습니다."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"프로필 관리자:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 네트워크 활동과 내 기기를 모니터링할 수 있습니다.\n\n자세한 정보는 관리자에게 문의하세요."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"기기 관리자:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n프로필 관리자:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 네트워크 활동과 내 기기를 모니터링할 수 있습니다.\n\n자세한 정보는 관리자에게 문의하세요."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"프로필 관리자:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 내 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 \'<xliff:g id="APPLICATION">%2$s</xliff:g>\'에 VPN 연결을 설정할 수 있는 권한을 부여했습니다. 이 앱에서도 네트워크 활동을 모니터링할 수 있습니다."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"프로필 관리자:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 내 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 현재 VPN(\'<xliff:g id="APPLICATION">%2$s</xliff:g>\')에 연결되어 있습니다. VPN 서비스 제공업체에서도 네트워크 활동을 모니터링할 수 있습니다."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"기기 관리자:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n프로필 관리자:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 내 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 \'<xliff:g id="APPLICATION">%3$s</xliff:g>\'에 VPN 연결을 설정할 수 있는 권한을 부여했습니다. 이 앱에서도 네트워크 활동을 모니터링할 수 있습니다."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"기기 관리자:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n프로필 관리자:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n관리자는 이메일, 앱, 보안 웹사이트를 비롯한 내 네트워크 활동을 모니터링할 수 있습니다. 자세한 정보는 관리자에게 문의하세요.\n\n또한 현재 VPN(\'<xliff:g id="APPLICATION">%3$s</xliff:g>\')에 연결되어 있습니다. VPN 서비스 제공업체에서도 네트워크 활동을 모니터링할 수 있습니다."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"사용 안함"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"설정"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>에서 알림음 음소거"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky-rKG/strings.xml
index d66f619..a96c88a 100644
--- a/packages/SystemUI/res/values-ky-rKG/strings.xml
+++ b/packages/SystemUI/res/values-ky-rKG/strings.xml
@@ -110,14 +110,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Издөө"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Кулпусун ачуу"</string>
     <string name="unlock_label" msgid="8779712358041029439">"кулпуну ачуу"</string>
     <string name="phone_label" msgid="2320074140205331708">"телефонду ачуу"</string>
     <string name="camera_label" msgid="7261107956054836961">"камераны ачуу"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Түзмөк корголгон."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Түзмөк кооптуу."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Түзмөк корголгон, ишеним агенти иштеп турат."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Түзмөк кооптуу, ишеним агенти иштеп турат."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Жүз аныктоо мүмкүнчүлүгү иштеп жатат, ишенимдүү агенти активдүү."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Киргизүү ыкмасын которуу баскычы."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Масштабды сыйыштыруу баскычы."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Кичинекейди чоң экранга масштабдоо."</string>
@@ -158,6 +154,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Эки таякча."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Үч таякча."</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_connected" msgid="8366256693719499665">"Туташтып турат."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Туташууда."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -181,6 +181,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"ТелеТайп терүүсү жандырылган."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Шыңгыраганда титирөө."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Үнсүз шыңгыроо."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> этибарга албоо."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> жок болду."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> иштеп баштоодо."</string>
@@ -310,7 +312,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Издөө"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> үчүн жогору жылмыштырыңыз."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> үчүн солго жылмыштырыңыз."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Үзгүлтүктөр, ошондой эле үн ишараттары болбойт"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Үзгүлтүктөр жок. Ойготкучтар дагы жок."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Үзгүлтүксүз"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Артыкчылыктуу үзгүлтүктөр гана"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Кийинки үн ишараты саат <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -360,8 +362,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Азыр баштоо"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Эскертмелер жок"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Түзмөктү көзөмөлдөсө болот"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профилди көзөмөлдөсө болот"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Тармак көзөмөлдөнүшү мүмкүн"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Түзмөккө көз салуу"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Профилди көзөмөлдөө"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Тармакка көз салуу"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN\'ди өчүрүү"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN\'ди ажыратуу"</string>
@@ -370,6 +374,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Сиз VPN-ге туташкансыз (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nVPN кызмат камсыздоочуңуз түзмөгүңүздү жана тармактагы аракетиңизди, анын ичинде email-дер, колдонмолор жана коопсуз вебсайттарды көзөмөлдөй алат."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Бул түзмөк төмөнкүчө башкарылат:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор электрондук почталар, колдонмолор жана коопсуз вебсайттар сыяктуу тармактгы аракеттрге көз салып турт. Көбүрөөк билүү үчн, администратрго кайрылңз.\n\nОшондой эле \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" VPN туташуусн орнотууга урукст бердиңз. Бул колдонмо тармактгы аракеттерңзге дагы көз салат."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Бул түзмөк төмөнкүчө башкарылат:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор электрондук почта, колдонмолор жана коопсуз вебсайттар сыяктуу тармактагы аракеттериңизге көз салып турат. Көбүрөөк билүү үчүн, администраторго кайрылыңыз.\n\nОшондой эле VPN\'ге туташып турасыз. (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). VPN кызмат көрсөтүүчү тармактагы аракетиңизге көз салат."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Бул профилди төмөнкү башкарат:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторңуз түзмөгүңүз жана тармактагы аракетиңизди, анын ичинде email-дер, колдонмолор жана коопсуз вебсайттарды, көзөмөлдөй алат.\n\nДагы маалымат үчүн, администраторуңузга кайрылыңыз."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Бул түзмөктү төмөнкү башкарат:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПрофилиңизди төмөнкү башкарат:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистраторуңуз түзмөгүңүз жана тармактагы аракетиңизди, анын ичинде email-дер, колдонмолор жана коопсуз вебсайттарды, көзөмөлдөй алат.\n\nДагы маалымат үчүн, администраторуңузга кайрылыңыз."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Бул профилди төмөнкү башкарат:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдмин-ңуздун тармак ар-ңизди, анын ичинде email-дер, колд-лор жана коопсуз вебсайттарды, көзөмөлдөө мүмкүнчүлүгү бар. Дагы маалымат үчүн, админ-ңузга кайрылыңыз.\n\n\"<xliff:g id="APPLICATION">%2$s</xliff:g>\" VPN туташуусун орнотуусуна да уруксат бердиңиз. Бул колдонмо тармак аракетин да көзөмөлдөй алат."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Бул профилди төмөнкү башкарат:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдмин-ңуздун тармак ар-ңизди, анын ичинде email-дер, колд-лор жана коопсуз вебсайттарды, көзөмөлдөө мүмкүнчүлүгү бар. Дагы маалымат үчүн, админ-ңузга кайрылыңыз.\n\nСиз VPN-ге (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") да туташкансыз. VPN тейлөөчүңүз да тармак аракетин көзөмөлдөй алат."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Бул түзмөктү төмөнкү башк-т:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПрофилиңизди төмөнкү башк-т:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдмин-ңуздун тармак ар-ңизди, анын ичинде email-дер, колд-лор жана коопсуз вебс-ды, көз-дөө мүмк-гү бар. Дагы маалымат үчүн, админ-ңузга кайр-з.\n\n\"<xliff:g id="APPLICATION">%3$s</xliff:g>\" VPN туташуусун орнотуусуна да уруксат бердиңиз. Бул колдонмо тармак аракетин да көзөмөлдөй алат."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Түзмөктү тө-кү башк-т:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nПрофилди тө-кү башк-т:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдмин-ңуздун тармак ар-ңизди, анын ичинде email-дер, колд-лор жана коопсуз вебс-ды, көзөмөлдөө мүмкүнчүлүгү бар. Дагы маалымат үчүн, админ-ңузга кайрылыңыз.\n\nСиз VPN-ге (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") да туташкансыз. VPN тейлөөчүңүз да тармак аракетин көзөмөлдөй алат."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Жок, рахмат"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Орнотуу"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> тарабынан үнсүздөлдү"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lo-rLA/strings.xml b/packages/SystemUI/res/values-lo-rLA/strings.xml
index 13cfbef..468f717 100644
--- a/packages/SystemUI/res/values-lo-rLA/strings.xml
+++ b/packages/SystemUI/res/values-lo-rLA/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ຊອກຫາ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ກ້ອງ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ໂທລະສັບ"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ປົດລັອກ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ປົດລັອກ"</string>
     <string name="phone_label" msgid="2320074140205331708">"​ເປີດ​​ແປ້ນ​ໂທ​ລະ​ສັບ"</string>
     <string name="camera_label" msgid="7261107956054836961">"ເປີດ​ກ້ອງ"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"ອຸ​ປະ​ກອນ​ປອດ​ໄພ​ແລ້ວ."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"ອ​ຸ​ປະ​ກອນບໍ່​ປອດ​ໄພ."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"ອຸ​ປະ​ກອນ​ປອດ​ໄພ​ແລ້ວ, ຕົວ​ແທນ​ທີ່​ເຊື່ອ​ຖື​ໄດ້​ຖືກ​ເປີດ​ໃຊ້."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"ອ​ຸ​ປະ​ກອນບໍ່​ປອດ​ໄພ, ຕົວ​ແທນ​ທີ່​ເຊື່ອ​ຖື​ໄດ້​ຖືກ​ເປີດ​ໃຊ້."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"ການກວດ​ສອບ​ຮູບ​ໜ້າ​ເຮັດ​ວຽກ​ຢູ່, ຕົວ​ແທນ​ທີ່​ເຊື່ອ​ຖື​ໄດ້​ຖືກ​ເປີດ​ໃຊ້."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ປຸ່ມສະລັບຮູບແບບການປ້ອນຂໍ້ມູນ."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ປຸ່ມຊູມທີ່ໃຊ້ຮ່ວມກັນໄດ້."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ຊູມຈໍນ້ອຍໄປເປັນຈໍຂະຫນາດໃຫຍ່."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"ສອງຂີດ."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"ສາມຂີດ."</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_connected" msgid="8366256693719499665">"ເຊື່ອມ​ຕໍ່ແລ້ວ."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"ກຳ​ລັງ​ເຊື່ອມ​ຕໍ່."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter ຖືກເປີດຢູ່."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"ສັ່ນເຕືອນພ້ອມສຽງເອີ້ນເຂົ້າ."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"ປິດສຽງ."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"ປິດ <xliff:g id="APP">%s</xliff:g> ໄວ້."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"ປິດ <xliff:g id="APP">%s</xliff:g> ແລ້ວ."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"ກຳ​ລັງ​ເປີດ <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ຊອກຫາ"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"ເລື່ອນຂຶ້ນເພື່ອ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"ເລື່ອນໄປທາງຊ້າຍເພື່ອ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ບໍ່​ມີ​ການ​ລົບ​ກວນດ ຮວມ​ເຖິງ​ໂມງ​ປຸກ​ນຳ"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ບໍ່​ມີ​ການ​ລົບ​ກວນ. ບໍ່​ວ່າ​ຈະ​ເປັນ​​ໂມງ​ປຸກ​ກໍ​ຕາມ."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ບໍ່​ມີ​ການ​ລົບກວນ"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ການ​ລົບກວນ​ທີ່​ສຳຄັນ​ເທົ່າ​ນັ້ນ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ໂມງ​ປຸກ​ຖັດ​ໄປ​ຂອງ​ທ່ານ​ແມ່ນ <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -327,15 +329,17 @@
     <string name="battery_saver_notification_text" msgid="820318788126672692">"ຫຼຸດ​ປະ​ສິ​ທິ​ພາບ​ແລະ​ການ​ນຳ​ໃຊ້​ຂໍ້​ມູນ​ພື້ນຫຼັງ"</string>
     <string name="battery_saver_notification_action_text" msgid="109158658238110382">"ປິດ​ໂຕ​ປະ​ຢັດ​ແບັດ​ເຕີ​ຣີ"</string>
     <string name="battery_level_template" msgid="1609636980292580020">"<xliff:g id="LEVEL">%d</xliff:g>%%"</string>
-    <string name="notification_hidden_text" msgid="1135169301897151909">"​ເນື້ອ​ຫາ​ຖືກ​ເຊື່ອງ​ແລ້ວ"</string>
+    <string name="notification_hidden_text" msgid="1135169301897151909">"ເນື້ອຫາ​ຖືກ​ເຊື່ອງ​ໄວ້"</string>
     <string name="media_projection_dialog_text" msgid="3071431025448218928">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> ​ຈະ​ເລີ່ມ​ບັນ​ທຶກ​ທຸກ​ຢ່າງ​ທີ່​ສະ​ແດງ​ຜົນ​ໃນ​ໜ້າ​ຈໍ​ທ່ານ."</string>
     <string name="media_projection_remember_text" msgid="3103510882172746752">"ບໍ່​ຕ້ອງ​ສະ​ແດງ​ອີກ"</string>
     <string name="clear_all_notifications_text" msgid="814192889771462828">"ລຶບລ້າງທັງໝົດ"</string>
     <string name="media_projection_action_text" msgid="8470872969457985954">"ເລີ່ມດຽວນີ້"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"ບໍ່ມີການແຈ້ງເຕືອນ"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ອຸ​ປະ​ກອນ​ອາດ​ມີ​ການ​ເຝົ້າ​ຕິດ​ຕາມ"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ໂປຣ​ໄຟລ໌​ອາດ​ຖືກ​ເຝົ້າ​ຕິດ​ຕາມ​ຢູ່"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"​ເຄືອ​ຂ່າຍ​ອາດ​ມີ​ການ​ເຝົ້າ​ຕິດ​ຕາມ"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ການກວດ​ສອບ​ຕິດ​ຕາມ​ອຸ​ປະ​ກອນ"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"ການ​ຕິດ​ຕາມ​ໂປຣ​ໄຟລ໌"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ການກວດ​ສອບ​ຕິດ​ຕາມ​ເຄືອ​ຂ່າຍ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"ປິດ​ການ​ໃຊ້ VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"ຕັດ​ການ​ເຊື່ອມ​ຕໍ່ VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"ທ່ານ​ເຊື່ອມ​ຕ​ໍ່​ຫາ VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") ແລ້ວ.\n\n​ຜູ່​ໃຫ້​ບໍ​ລິ​ການ VPN ຂອງ​ທ່ານ​ສາ​ມາດ​ເຝົ້າ​ຕິດ​ຕາມອຸ​ປະ​ກອນ​ແລະ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​ທີ່​ເຂົ້າ​ລະ​ຫັດ."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ອຸ​ປະ​ກອນ​ຂອງ​ທ່ານ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ​ສາ​ມາດ​ເຝົ້າ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​ທີ່​ເຂົ້າ​ລະ​​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nອີກ​ຢ່າງ​ນຶ່ງ, ທ່ານມອບ​ສິດ​ອະ​ນຸ​ຍາດໃຫ້ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ເພື່ອ​ຕັ້ງ​ຄ່າ​ການ​ເຊື່ອມ​ຕໍ່ VPN. ແອັບຯ​ນີ້​ສາ​ມາດ​ເຝົ້າ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ອຸ​ປະ​ກອນ​ຂອງ​ທ່ານ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ​ສາ​ມາດ​ເຝົ້າ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​ທີ່​ເຂົ້າ​ລະ​​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nນອກ​ຈາກ​ນັ້ນ, ທ່ານ​​ໄດ້​ເຊື່ອມ​ຕໍ່​ຫາ VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). ຜູ່​ໃຫ້​ບໍ​ລິ​ການ VPN ຂອງ​ທ່ານ​ສາ​ມາດ​ເຝົ້າ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້​ເຊັ່ນ​ກັນ."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ໂປຣ​ໄຟລ໌​ນີ້​ແມ່ນ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ຂອງ​ທ່ານ​ມີ​ຄວາມ​ສາ​ມາດ​ໃນ​ການ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ໃນ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ: ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​​ທີ່​ເຂົ້າ​ລະ​ຫັດ. \n\nສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ອຸ​ປະ​ກອນ​ນີ້​ເບິ່ງ​ແຍງ​ໂດຍ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nໂປຣ​ໄຟລ໌​ຂອງ​ທ່ານ​ແມ່​ນ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ​ສາ​​ມາດ​ຕິດ​ຕາມ​ອຸ​ປະ​ກອນ​ຂອງ​ທ່ານ ແລະ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​​ຂ່າຍ ຮວມ​ເຖິງ: ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​ທີ່​ເຂົ້າ​ລະ​ຫັດ.\n\nສຳ​ລັບ​ຂ​ໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ຂອງ​ທ່ານ​ມີ​ຄວາມ​ສາ​ມາດ​ໃນ​ການ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ໃນ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ: ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​​ທີ່​ເຂົ້າ​ລະ​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nນອກ​ຈາກ​ນັ້ນ, ທ່ານ​ໄດ້​ອະ​ນຸ​ຍາດ​ໃຫ້ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ສາ​ມາດ​ຕັ້ງ​ຄ່າ​ການ​ເຊື່ອມ​ຕໍ່ VPN ໄດ້. ແອັບຯ​ນີ້​​ສາ​ມາດ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້​ເຊັ່ນ​ກັນ."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ໂປຣ​ໄຟລ໌​ນີ້​ແມ່ນ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ຂອງ​ທ່ານ​ມີ​ຄວາມ​ສາ​ມາດ​ໃນ​ການ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ໃນ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ: ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​​ທີ່​ເຂົ້າ​ລະ​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nນອກ​ຈາກ​ນັ້ນ, ທ່ານ​ໄ​ດ້​ເຊື່ອມ​ຕໍ່​ຫາ VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). ຜູ່​ໃຫ້​ບໍ​ລິ​ການ VPN ​ຂອງ​ທ່ານ​ສາ​ມາດ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ໄດ້​ເຊັ່ນ​ກັນ."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ອຸ​ປະ​ກອນ​ນີ້​ແມ່ນ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nໂປຣ​ໄຟລ໌​ຂອງ​ທ່ານ​ແມ່ນ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ຂອງ​ທ່ານ​ມີ​ຄວາມ​ສາ​ມາດ​ໃນ​ການ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ໃນ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ: ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​​ທີ່​ເຂົ້າ​ລະ​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nນອກ​ຈາກ​ນັ້ນ, ທ່ານ​ໄດ້​ອະ​ນຸ​ຍາດ​ໃຫ້ \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ​ສາ​ມາດ​ຕັ້ງ​ຄ່າ​ການ​ເຊື່ອມ​ຕໍ່ VPN ໄດ້. ແອັບຯ​ນີ້​​ສາ​ມາດ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້​ເຊັ່ນ​ກັນ."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ອຸ​ປະ​ກອນ​ນີ້​ແມ່ນ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nໂປຣ​ໄຟລ໌​ຂອງ​ທ່ານ​ແມ່ນ​ຖືກ​ຈັດ​ການ​ໂດຍ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nຜູ່​ເບິ່ງ​ແຍງ​ຂອງ​ທ່ານ​ມີ​ຄວາມ​ສາ​ມາດ​ໃນ​ການ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ໃນ​ເຄືອ​ຂ່າຍ​ຂອງ​ທ່ານ​ໄດ້ ຮວມ​ເຖິງ: ​ອີ​ເມວ, ແອັບຯ ແລະ​ເວັບ​ໄຊ​​ທີ່​ເຂົ້າ​ລະ​ຫັດ. ສຳ​ລັບ​ຂໍ້​ມູນ​ເພີ່ມ​ເຕີມ, ໃຫ້​ຕິດ​ຕໍ່​ຜູ່​ເບິ່ງ​ແຍງ​ລະ​ບົບ​ຂອງ​ທ່ານ.\n\nນອກ​ຈາກ​ນັ້ນ, ທ່ານ​ໄ​ດ້​ເຊື່ອມ​ຕໍ່​ຫາ VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). ຜູ່​ໃຫ້​ບໍ​ລິ​ການ VPN ​ຂອງ​ທ່ານ​ສາ​ມາດ​ຕິດ​ຕາມ​ການ​ເຄື່ອນ​ໄຫວ​ເຄືອ​ຂ່າຍ​ໄດ້​ເຊັ່ນ​ກັນ."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Device will stay locked until you manually unlock"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"ຮັບເອົາການ​ແຈ້ງເຕືອນ​ໄວຂຶ້ນ"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"ເບິ່ງພວກ​ມັນກ່ອນ​ທ່ານຈະ​ປົດລັອກ"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"ບໍ່, ຂອບໃຈ"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"ຕັ້ງຄ່າ"</string>
     <string name="muted_by" msgid="6147073845094180001">"ຖືກ​ປິດ​ສຽງ​ໂດຍ <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index e9901d7..866c8dd 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Ieškoti"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparatas"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefonas"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Atrakinti"</string>
     <string name="unlock_label" msgid="8779712358041029439">"atrakinti"</string>
     <string name="phone_label" msgid="2320074140205331708">"atidaryti telefoną"</string>
     <string name="camera_label" msgid="7261107956054836961">"atidaryti fotoaparatą"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Įrenginys apsaugotas."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Įrenginys neapsaugotas."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Įrenginys apsaugotas, patikima priemonė aktyvi."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Įrenginys neapsaugotas, patikima priemonė aktyvi."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Veido atpažinimo funkcija vykdoma, patikima priemonė aktyvi."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Perjungti įvesties metodo mygtuką."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Suderinamumo priartinimo mygtukas."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Padidinti ekraną."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dvi juostos."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Trys juostos."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Stiprus signalas."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Įjungta."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Išjungta."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Prijungta."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Prisijungiama."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"„TeleTypewriter“ įgalinta."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibracija skambinant."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Skambutis tylus."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Atsisakyti <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Atsisakyta programos „<xliff:g id="APP">%s</xliff:g>“."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Paleidžiama <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Paieška"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Slyskite aukštyn link <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Slyskite į kairę link <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Jokių pertraukčių, įskaitant signalus"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Nėra trikdžių. Nėra net įspėjimų."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Jokių pertraukčių"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Tik prioritetinės pertrauktys"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Kito signalo laikas: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Pradėti dabar"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nėra įspėjimų"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Įrenginys gali būti stebimas"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilis gali būti stebimas"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Tinklas gali būti stebimas"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Įrenginio stebėjimas"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilio stebėjimas"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Tinklo stebėjimas"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Išjungti VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Atjungti VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Esate prisijungę prie VPN („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nVPN paslaugos teikėjas gali stebėti įrenginį ir tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Šį įrenginį tvarko:\n„<xliff:g id="ORGANIZATION">%1$s</xliff:g>“\n\nAdministratorius gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Kad gautumėte daugiau informacijos, susisiekite su administratoriumi.\n\nSuteikėte leidimą „<xliff:g id="APPLICATION">%2$s</xliff:g>“ užmegzti VPN ryšį. Ši programa taip pat gali stebėti tinklo veiklą."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Šį įrenginį tvarko:\n„<xliff:g id="ORGANIZATION">%1$s</xliff:g>“\n\nAdministratorius gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Kad gautumėte daugiau informacijos, susisiekite su administratoriumi.\n\nBe to, esate prisijungę prie VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>“). VPN paslaugos teikėjas taip pat gali stebėti tinklo veiklą."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Šį profilį tvarko:\n„<xliff:g id="ORGANIZATION">%1$s</xliff:g>“\n\nAdministratorius gali stebėti įrenginio ir tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines.\n\nJei reikia daugiau informacijos, susisiekite su administratoriumi."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Šį įrenginį tvarko:\n„<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>“\nJūsų profilį tvarko:\n„<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>“\n\nAdministratorius gali stebėti įrenginio ir tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines.\n\nJei reikia daugiau informacijos, susisiekite su administratoriumi."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Šį profilį tvarko:\n„<xliff:g id="ORGANIZATION">%1$s</xliff:g>“\n\nAdministratorius gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Jei reikia daugiau informacijos, susisiekite su administratoriumi.\n\nBe to, „<xliff:g id="APPLICATION">%2$s</xliff:g>“ suteikėte leidimą nustatyti VPN ryšį. Ši programa taip pat gali stebėti tinklo veiklą."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Šį profilį tvarko:\n„<xliff:g id="ORGANIZATION">%1$s</xliff:g>“\n\nAdministratorius gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Jei reikia daugiau informacijos, susisiekite su administratoriumi.\n\nBe to, esate prisijungę prie VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>“). VPN paslaugos teikėjas taip pat gali stebėti tinklo veiklą."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Šį įrenginį tvarko:\n„<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>“\nJūsų profilį tvarko:\n„<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>“\n\nAdmin. gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Jei reikia daugiau informacijos, susisiekite su administratoriumi.\n\nBe to, „<xliff:g id="APPLICATION">%3$s</xliff:g>“ suteikėte leidimą nustatyti VPN ryšį. Ši programa taip pat gali stebėti tinklo veiklą."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Šį įrenginį tvarko:\n„<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>“\nJūsų profilį tvarko:\n„<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>“\n\nAdmin. gali stebėti tinklo veiklą, įskaitant el. laiškus, programas ir saugias svetaines. Jei reikia daugiau informacijos, susisiekite su administratoriumi.\n\nBe to, esate prisijungę prie VPN („<xliff:g id="APPLICATION">%3$s</xliff:g>“). VPN paslaugos teikėjas taip pat gali stebėti tinklo veiklą."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Įrenginys liks užrakintas, kol neatrakinsite jo neautomatiniu būdu"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Greičiau gaukite pranešimus"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Peržiūrėti prieš atrakinant"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ne, ačiū"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Nustatyti"</string>
     <string name="muted_by" msgid="6147073845094180001">"Nutildė <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index fd38d6e..0e166b7 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Meklēt"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Tālruņa numurs"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Atbloķēt"</string>
     <string name="unlock_label" msgid="8779712358041029439">"atbloķēt"</string>
     <string name="phone_label" msgid="2320074140205331708">"atvērt tālruni"</string>
     <string name="camera_label" msgid="7261107956054836961">"atvērt kameru"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Ierīce ir aizsargāta."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Ierīce nav aizsargāta."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Ierīce ir aizsargāta, uzticamības pārbaudes programma ir aktīva."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Ierīce nav aizsargāta, uzticamības pārbaudes programma ir aktīva."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Sejas noteikšana darbojas, uzticamības pārbaudes programma ir aktīva."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Ievades metodes maiņas poga."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Saderības tālummaiņas poga."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Veikt tālummaiņu no mazāka ekrāna uz lielāku."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Divas joslas"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Trīs joslas"</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Pilna piekļuve signālam"</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Ieslēgts"</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Izslēgts"</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Savienojums ir izveidots."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Notiek savienojuma izveide..."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Teletaips ir iespējots."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Zvana signāls — vibrācija."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zvana signāls — kluss."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Nerādīt lietotni <xliff:g id="APP">%s</xliff:g>"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Lietotne <xliff:g id="APP">%s</xliff:g> vairs netiek rādīta."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Notiek lietotnes <xliff:g id="APP">%s</xliff:g> palaišana."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Meklēt"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Velciet uz augšu, lai veiktu šādu darbību: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Velciet pa kreisi, lai veiktu šādu darbību: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Bez pārtraukumiem, tostarp bez signāliem"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Bez traucējumiem. Pat bez brīdinājumiem"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Nepārtraukt"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Tikai prioritārie pārtraukumi"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Jūsu nākamā signāla laiks: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Sākt tūlīt"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nav paziņojumu"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Ierīci var pārraudzīt"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilu var pārraudzīt"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Iespējams, tīklā veiktās darbības tiek pārraudzītas."</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Ierīces pārraudzība"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profila pārraudzība"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Tīkla pārraudzība"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Atspējot VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Atvienot VPN tīklu"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Ir izveidots savienojums ar VPN tīklu (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nJūsu VPN pakalpojumu sniedzējs var pārraudzīt jūsu ierīcē un tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Šo ierīci pārvalda:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJūsu administrators var pārraudzīt tīklā veiktās darbības, arī e-pastus, lietotnes un drošās vietnes. Lai uzzinātu vairāk, sazinieties ar administratoru.\n\nJūs arī piešķīrāt atļauju izveidot savienojumu ar VPN tīklu lietotnei “<xliff:g id="APPLICATION">%2$s</xliff:g>”. Šī lietotne arī var pārraudzīt jūsu tīklā veiktās darbības."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Šo ierīci pārvalda:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJūsu administrators var pārraudzīt jūsu tīklā veiktās darbības, arī e-pastus, lietotnes un drošās vietnes. Lai uzzinātu vairāk, sazinieties ar administratoru.\n\nIr arī izveidots savienojums ar VPN tīklu (“<xliff:g id="APPLICATION">%2$s</xliff:g>”). Tīklā veiktās darbības var pārraudzīt arī jūsu VPN pakalpojumu sniedzējs."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Šo profilu pārvalda:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJūsu administrators var pārraudzīt jūsu ierīcē un tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes.\n\nLai iegūtu plašāku informāciju, sazinieties ar administratoru."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Šo ierīci pārvalda:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJūsu profilu pārvalda:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJūsu administrators var pārraudzīt jūsu ierīcē un tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes.\n\nLai iegūtu plašāku informāciju, sazinieties ar administratoru."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Šo profilu pārvalda:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJūsu administrators var pārraudzīt jūsu tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes. Papildinformāciju jautājiet administratoram.\n\nJūs piešķīrāt lietotnei “<xliff:g id="APPLICATION">%2$s</xliff:g>” atļauju izveidot savienojumu ar VPN tīklu. Arī šī lietotne var pārraudzīt tīklā veiktās darbības."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Šo profilu pārvalda:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nJūsu administrators var pārraudzīt jūsu tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes. Lai iegūtu plašāku informāciju, sazinieties ar administr.\n\nIr arī izveidots savienojums ar VPN tīklu (<xliff:g id="APPLICATION">%2$s</xliff:g>). Jūsu veiktās darbības var pārraudzīt arī VPN pakalpojumu sniedzējs."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Ierīci pārvalda:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJūsu profilu pārvalda:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nJūsu administr. var pārraudzīt jūsu tīklā veiktās darbības, tostarp e-pastu, liet. un dr. vietnes. Papildinform.: jautājiet administratoram.\n\nJūs piešķīrāt lietotnei “<xliff:g id="APPLICATION">%3$s</xliff:g>” atļauju izveidot savien. ar VPN tīklu. Arī šī lietotne var pārraudzīt tīklā veiktās darbības."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Ierīci pārvalda:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nJūsu profilu pārvalda:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministrators var pārraudzīt jūsu ierīcē un tīklā veiktās darbības, tostarp e-pastu, lietotnes un drošās vietnes. Papildinform.: jautājiet administratoram.\n\nIr arī izveidots savienojums ar VPN tīklu (<xliff:g id="APPLICATION">%3$s</xliff:g>). Jūsu veiktās darbības var pārraudzīt arī VPN pakalp. sniedz."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Ierīce būs bloķēta, līdz to manuāli atbloķēsiet."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Saņemiet paziņojumus ātrāk"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Skatiet tos pirms atbloķēšanas."</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nē"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Iestatīt"</string>
     <string name="muted_by" msgid="6147073845094180001">"Skaņu izslēdza <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mdpi/dimens.xml b/packages/SystemUI/res/values-mdpi/dimens.xml
new file mode 100644
index 0000000..aa85d69
--- /dev/null
+++ b/packages/SystemUI/res/values-mdpi/dimens.xml
@@ -0,0 +1,27 @@
+<?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>
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <fraction name="battery_button_height_fraction">12%</fraction>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">10%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">10%</fraction>
+
+    <dimen name="battery_margin_bottom">1px</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk-rMK/strings.xml
index 8e4704e..b6b5396 100644
--- a/packages/SystemUI/res/values-mk-rMK/strings.xml
+++ b/packages/SystemUI/res/values-mk-rMK/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пребарај"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Фотоапарат"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Отклучување"</string>
     <string name="unlock_label" msgid="8779712358041029439">"отклучи"</string>
     <string name="phone_label" msgid="2320074140205331708">"отвори телефон"</string>
     <string name="camera_label" msgid="7261107956054836961">"отвори камера"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Копче за префрање метод на внес."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Копче за компатибилност на зум."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Зумот е помал на поголем екран."</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Две цртички."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Три цртички."</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_connected" msgid="8366256693719499665">"Поврзана."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Се поврзува."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -162,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Овозможен е телепринтер."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Ѕвонче на вибрации."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ѕвонче на тивко."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Отфрли <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> е отфрлена."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Се стартува <xliff:g id="APP">%s</xliff:g>."</string>
@@ -291,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Пребарај"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Лизгај нагоре за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Лизгај налево за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Без прекини, вклучувајќи аларми"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Без прекини. Дури и без аларми."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Без прекини"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Само приоритетни прекини"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Следниот аларм е во <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -341,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Започни сега"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Нема известувања"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Уредот може да се следи"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профилот можеби се следи"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Мрежата може да се следи"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Следење на уредот"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Следење профил"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Следење на мрежата"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Оневозможи ВПН"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Исклучи ВПН"</string>
@@ -351,7 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Поврзани сте на ВПН („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nОператорот на услугата ВПН може да ги следи уредот и мрежната активност, заедно со е-пораките, апликациите и безбедните веб-локации."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Уредот е управуван од:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n}Администраторот е во состојба да ја следи вашата активност на мрежата, вклучувајќи ги е-пораките, апликациите и безбедните веб-локации.За повеќе информации, контактирајте со администраторот.\n\nДозволивте „<xliff:g id="APPLICATION">%2$s</xliff:g>“ да постави поврзување со ВПН.Оваа апликација може да ја следи вашата активност на мрежата исто така."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Уредот е управуван од:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторот е во состојба да ја следи вашата активност на мрежата, вклучувајќи ги е-пораките, апликациите и безбедните веб-локации.За повеќе информации, контактирајте со администраторот.\n\nПоврзани сте и на ВПН („<xliff:g id="APPLICATION">%2$s</xliff:g>“)Давателот на услуги на ВПН може да ја следи активноста на мрежата исто така."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Со овој профил управува:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторот може да ги следи вашиот уред и мрежната активност, вклучувајќи е-пошта, апликации и безбедни веб-локации.\n\nЗа повеќе информации, контактирајте со него."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Со овој уред управува:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nСо вашиот профил управува:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nВашиот администратор може да ги следи вашиот уред и мрежната активност, вклучувајќи ги е-поштата, апликациите и безбедните веб-локации.\n\nЗа повеќе информации, контактирајте со администраторот."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Со вашиот профил управува:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторот може да ја следи мрежната активност, вклучувајќи е-пошта, апликации и безбедни веб-локации. За повеќе информации, контактирајте со него.\n\n}Дадовте дозвола „<xliff:g id="APPLICATION">%2$s</xliff:g>}“ да постави ВПН-конекција. И оваа апликација може да ја следи мрежната активност."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Со овој профил управува:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистраторот може да ја следи мрежната активност, вклучувајќи е-пошта, апликации и безбедни веб-локации. За повеќе информации, контактирајте со него.\n\nИсто така, поврзани сте со ВПН („<xliff:g id="APPLICATION">%2$s</xliff:g>“). И операторот на ВПН-услуги може да ја следи мрежната активност."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Со овој уред управува:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nСо вашиот профил управува:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистраторот може да ја следи мрежната активност, вклучувајќи е-пошта, апликации и безбедни веб-локации. За повеќе информации, контактирајте со него.\n\nДадовте дозвола „<xliff:g id="APPLICATION">%3$s</xliff:g>“ да постави ВПН-конекција. И оваа апликација може да ја следи мрежната активност."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Со овој уред управува:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nСо вашиот профил управува:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистраторот може да ја следи мрежната активност, вклучувајќи е-пошта, апликации и безбедни веб-локации. За повеќе информации, контактирајте со него.\n\nИсто така, поврзани сте со ВПН („<xliff:g id="APPLICATION">%3$s</xliff:g>“). И операторот на ВПН-услуги може да ја следи мрежната активност."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Уредот ќе остане заклучен додека рачно не го отклучите"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Добивајте известувања побрзо"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Видете ги пред да отклучите"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Не, фала"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Постави"</string>
+    <string name="muted_by" msgid="6147073845094180001">"Звукот го исклучи <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ml-rIN/strings.xml b/packages/SystemUI/res/values-ml-rIN/strings.xml
index 7f12ebb..293b028 100644
--- a/packages/SystemUI/res/values-ml-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ml-rIN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"തിരയൽ"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ക്യാമറ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ഫോണ്‍"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"അണ്‍ലോക്ക് ചെയ്യുക"</string>
     <string name="unlock_label" msgid="8779712358041029439">"അൺലോക്കുചെയ്യുക"</string>
     <string name="phone_label" msgid="2320074140205331708">"ഫോൺ തുറക്കുക"</string>
     <string name="camera_label" msgid="7261107956054836961">"ക്യാമറ തുറക്കുക"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"ഉപകരണം സുരക്ഷിതമാണ്."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"ഉപകരണം സുരക്ഷിതമല്ല."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"ഉപകരണം സുരക്ഷിതമാണ്, പരിചിത ഏജന്റ് സജീവമാണ്."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"ഉപകരണം സുരക്ഷിതമല്ല, പരിചിത ഏജന്റ് സജീവമാണ്."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"മുഖം കണ്ടെത്തൽ പ്രവർത്തിക്കുന്നു, പരിചിത ഏജന്റ് സജീവമാണ്."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ടൈപ്പുചെയ്യൽ രീതി ബട്ടൺ മാറുക."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"അനുയോജ്യതാ സൂം ബട്ടൺ."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ചെറുതിൽ നിന്ന് വലിയ സ്‌ക്രീനിലേക്ക് സൂം ചെയ്യുക."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"രണ്ട് ബാറുകൾ."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"മൂന്ന് ബാറുകൾ."</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_connected" msgid="8366256693719499665">"കണക്റ്റുചെയ്‌തു."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"കണക്റ്റുചെയ്യുന്നു."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter പ്രവർത്തനക്ഷമമാണ്."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"റിംഗർ വൈബ്രേറ്റ് ചെയ്യുന്നു."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"റിംഗർ നിശ്ശബ്‌ദമാണ്."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> നിരസിക്കുക."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> നിരസിച്ചു."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> ആരംഭിക്കുന്നു."</string>
@@ -264,7 +266,7 @@
     <string name="quick_settings_tethering_label" msgid="7153452060448575549">"ടെതറിംഗ്"</string>
     <string name="quick_settings_hotspot_label" msgid="6046917934974004879">"ഹോട്ട്‌സ്‌പോട്ട്"</string>
     <string name="quick_settings_notifications_label" msgid="4818156442169154523">"അറിയിപ്പുകൾ"</string>
-    <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ഫ്‌ലാഷ്‌ലൈറ്റ്"</string>
+    <string name="quick_settings_flashlight_label" msgid="2133093497691661546">"ഫ്ലാഷ്‌ലൈറ്റ്"</string>
     <string name="quick_settings_cellular_detail_title" msgid="8575062783675171695">"സെല്ലുലാർ ഡാറ്റ"</string>
     <string name="quick_settings_cellular_detail_data_usage" msgid="1964260360259312002">"ഡാറ്റ ഉപയോഗം"</string>
     <string name="quick_settings_cellular_detail_remaining_data" msgid="722715415543541249">"ശേഷിക്കുന്ന ഡാറ്റ"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"തിരയൽ"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> എന്നതിനായി മുകളിലേയ്‌ക്ക് സ്ലൈഡുചെയ്യുക."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> എന്നതിനായി ഇടത്തേയ്‌ക്ക് സ്ലൈഡുചെയ്യുക."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"അലാറങ്ങൾ ഉൾപ്പടെ തടസ്സങ്ങളൊന്നുമില്ല"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"തടസ്സങ്ങളൊന്നുമില്ല. അലാറങ്ങൾ പോലുമില്ല."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"തടസ്സങ്ങളൊന്നുമില്ല"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"മുൻഗണനാ തടസ്സങ്ങൾ മാത്രം"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"നിങ്ങളുടെ അടുത്ത അലാറം <xliff:g id="ALARM_TIME">%s</xliff:g>-നാണ്"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ഇപ്പോൾ ആരംഭിക്കുക"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"അറിയിപ്പുകൾ ഒന്നുമില്ല"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ഉപകരണം നിരീക്ഷിക്കപ്പെടാം"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"പ്രൊഫൈൽ നിരീക്ഷിക്കപ്പെടാം"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"നെറ്റ്‌വർക്ക് നിരീക്ഷിക്കപ്പെടാം"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ഉപകരണം നിരീക്ഷിക്കൽ"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"പ്രൊഫൈൽ നിരീക്ഷിക്കൽ"</string>
     <string name="monitoring_title" msgid="169206259253048106">"നെറ്റ്‌വർക്ക് നിരീക്ഷിക്കൽ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN പ്രവർത്തനരഹിതമാക്കുക"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN വിച്‌ഛേദിക്കുക"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"നിങ്ങൾ VPN-ൽ (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") കണക്റ്റുചെയ്‌തിരിക്കുന്നു.\n\nഇമെയിലുകളും അപ്ലിക്കേഷനുകളും വെബ്‌സൈറ്റുകൾ സുരക്ഷിതമാക്കലും ഉൾപ്പെടെയുള്ള നെറ്റ്‌വർക്ക് പ്രവർത്തനങ്ങൾ നിരീക്ഷിക്കാൻ നിങ്ങളുടെ VPN സേവന ദാതാവിന് കഴിയും."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"നിങ്ങളുടെ ഉപകരണം നിയന്ത്രിക്കുന്നത് ഇതാണ്:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nനിങ്ങളുടെ അഡ്‌മിനിസ്ട്രേറ്റർ ഇമെയിലുകളും അപ്ലിക്കേഷനുകളും വെബ്‌സൈറ്റുകൾ സുരക്ഷിതമാക്കലും ഉൾപ്പെടെയുള്ള നിങ്ങളുടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനങ്ങൾ നിരീക്ഷിക്കുന്നതിന് പ്രാപ്‌തമാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് അഡ്‌മിനിസ്ട്രേറ്ററെ ബന്ധപ്പെടുക.\n\nഅതോടൊപ്പം, നിങ്ങൾ ഒരു VPN കണക്ഷൻ സജ്ജീകരിക്കാൻ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" എന്നതിന് അനുമതിയും നൽകി. ഈ അപ്ലിക്കേഷന് നെറ്റ്‌വർക്ക് പ്രവർത്തനവും നിരീക്ഷിക്കാനാകും."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"നിങ്ങളുടെ ഉപകരണം നിയന്ത്രിക്കുന്നത് ഇതാണ്:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nനിങ്ങളുടെ അഡ്‌മിനിസ്ട്രേറ്റർ ഇമെയിലുകളും അപ്ലിക്കേഷനുകളും വെബ്‌സൈറ്റുകൾ സുരക്ഷിതമാക്കലും ഉൾപ്പെടെയുള്ള നിങ്ങളുടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനങ്ങൾ നിരീക്ഷിക്കുന്നതിന് പ്രാപ്‌തമാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് അഡ്‌മിനിസ്ട്രേറ്ററെ ബന്ധപ്പെടുക.\n\nഅതോടൊപ്പം, നിങ്ങൾ ഒരു VPN-ലും (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") കണക്റ്റുചെയ്തിരിക്കുന്നു. നിങ്ങളുടെ VPN സേവന ദാതാവിന് നെറ്റ്‌വർക്ക് പ്രവർത്തനവും നിരീക്ഷിക്കാനാകും."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ഈ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നിങ്ങളുടെ ഉപകരണവും നെറ്റ്‌വർക്ക് പ്രവർത്തനവും അഡ്‌മിനിസ്‌ട്രേറ്റർക്ക് നിരീക്ഷിക്കാനാകും.\n\nകൂടുതൽ വിവരങ്ങൾക്ക് നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്ററെ ബന്ധപ്പെടുക."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ഈ ഉപകരണത്തെ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nനിങ്ങളുടെ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നിങ്ങളുടെ ഉപകരണവും നെറ്റ്‌വർക്ക് പ്രവർത്തനവും അഡ്‌മിനിസ്‌ട്രേറ്റർക്ക് നിരീക്ഷിക്കാനാകും.\n\nകൂടുതൽ വിവരങ്ങൾക്ക് അഡ്‌മിനിസ്‌ട്രേറ്ററെ ബന്ധപ്പെടുക."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ഈ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനം നിരീക്ഷിക്കാൻ നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്റർ പ്രാപ്‌തനാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് അഡ്‌മിനിസ്‌ട്രേറ്ററെ ബന്ധപ്പെടുക.\n\nഒരു VPN കണക്ഷൻ സജ്ജമാക്കാൻ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" അനുമതിയും നിങ്ങൾ നൽകി. നെറ്റ്‌വർക്കും പ്രവർത്തനവും നിരീക്ഷിക്കാൻ ഈ അപ്ലിക്കേഷനാകും."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ഈ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനം നിരീക്ഷിക്കാൻ നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്റർ പ്രാപ്‌തനാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്ററെ ബന്ധപ്പെടുക.\n\nഒരു VPN-ലേക്കും (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") കണക്‌റ്റുചെയ്‌തിരിക്കുന്നു. നിങ്ങളുടെ VPN സേവന ദാതാവിന് നെറ്റ്‌വർക്ക് പ്രവർത്തനവും നിരീക്ഷിക്കാനാകും."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ഈ ഉപകരണത്തെ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nനിങ്ങളുടെ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനം നിരീക്ഷിക്കാൻ നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്റർ പ്രാപ്‌തനാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് അഡ്‌മിനിസ്‌ട്രേറ്ററെ ബന്ധപ്പെടുക.\n\nഒരു VPN കണക്ഷൻ സജ്ജമാക്കാൻ \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" അനുമതിയും നിങ്ങൾ നൽകി. നെറ്റ്‌വർക്കും പ്രവർത്തനവും നിരീക്ഷിക്കാൻ ഈ അപ്ലിക്കേഷനാകും."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ഈ ഉപകരണത്തെ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nനിങ്ങളുടെ പ്രൊഫൈൽ നിയന്ത്രിക്കുന്നത്:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nഇമെയിലുകൾ, അപ്ലിക്കേഷനുകൾ, സുരക്ഷാ വെബ്‌സൈറ്റുകൾ എന്നിവ ഉൾപ്പെടെ നെറ്റ്‌വർക്ക് പ്രവർത്തനം നിരീക്ഷിക്കാൻ നിങ്ങളുടെ അഡ്‌മിനിസ്‌ട്രേറ്റർ പ്രാപ്‌തനാണ്.\n\nഒരു VPN-ലേക്കും (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\")കണക്‌റ്റുചെയ്‌തിരിക്കുന്നു. നിങ്ങളുടെ VPN സേവന ദാതാവിന് നെറ്റ്‌വർക്ക് പ്രവർത്തനവും നിരീക്ഷിക്കാനാകും."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"വേണ്ട, നന്ദി"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"സജ്ജീകരിക്കുക"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>, മ്യൂട്ടുചെയ്‌തു"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn-rMN/strings.xml
index 1d088d6..c5cf310 100644
--- a/packages/SystemUI/res/values-mn-rMN/strings.xml
+++ b/packages/SystemUI/res/values-mn-rMN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Хайх"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камер"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Утас"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Тайлах"</string>
     <string name="unlock_label" msgid="8779712358041029439">"тайлах"</string>
     <string name="phone_label" msgid="2320074140205331708">"утас нээх"</string>
     <string name="camera_label" msgid="7261107956054836961">"камер нээх"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Төхөөрөмжийн аюулгүй байдал хангагдсан."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Төхөөрөмжийн аюулгүй байдал хангагдаагүй."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Төхөөрөмжийн аюулгүй байдал хангагдсан, итгэмжлэгдсэн агент идэвхжсэн."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Төхөөрөмжийн аюулгүй байдал хангагдаагүй, итгэмжлэгдсэн агент идэвхжсэн."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Царай танигч ажиллаж байна, итгэмжлэгдсэн агент идэвхжсэн."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Оруулах аргыг сэлгэх товч."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Тохиромжтой өсгөх товч."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Жижгээс том дэлгэцрүү өсгөх."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Хоёр багана."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Гурван баганатай."</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_connected" msgid="8366256693719499665">"Холбогдсон."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Холбож байна."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter идэвхтэй болов."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Хонхны чичиргээ."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Хонхыг хаах."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>-г хаах."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> байхгүй."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>-г эхлүүлж байна."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Хайх"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>-г гулсуулах."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> хийх зүүнлүү гулсуулах."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Саад болохгүй, сэрүүлгийг бас"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Тасалдал байхгүй. Сэрүүлэг ч байхгүй."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Ямар ч тасалдалгүй"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Зөвхөн нэн тэргүүний тасалдалд"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Таны дараагийн сэрүүлгийн цаг <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Одоо эхлүүлэх"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Мэдэгдэл байхгүй"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Төхөөрөмжийг хянах боломжтой"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профайлыг хянаж байж болзошгүй"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Сүлжээ хянагдаж байж болзошгүй"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Төхөөрөмжийн хяналт"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Профайл хяналт"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Сүлжээний хяналт"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN идэвхгүйжүүлэх"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN таслах"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Та VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") холбогдсон байна.\n\nТаны VPN үйлчилгээ үзүүлэгч нь таны төхөөрөмж болон имэйл, апп-ууд болон аюулгүй вэбсайтууд зэрэг таны сүлжээний үйл ажиллагааг хянах боломжтой."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Энэ төхөөрөмжийг \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n удирдаж байна \n Танай админ имэйл, апп-ууд, аюулгүй вэбсайтууд зэргийг оруулан таны сүлжээний үйл ажиллагааг хянах боломжтой. Дэлгэрэнгүй мэдээллийг админаас авна уу.\n\nМөн та <xliff:g id="APPLICATION">%2$s</xliff:g>-д VPN холболт үүсгэх зөвшөөрөл өгсөн байна. Энэ апп мөн сүлжээний үйл ажиллагааг хянах боломжтой."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Энэ төхөөрөмжийг \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n удирдаж байна \nТанай админ имэйл, апп-ууд, аюулгүй вэбсайтууд зэргийг оруулан таны сүлжээний үйл ажиллагааг хянах боломжтой. Дэлгэрэнгүй мэдээллийг админаас авна уу.\n\nМөн та VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\")-д холбогдсон байна. VPN үйлчилгээ үзүүлэгч таны сүлжээний үйл ажиллагааг мөн хянах боломжтой."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Энэ профайлыг \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\nудирдаж байна\nТаны админ таны төхөөрөмж, сүлжээний идэвхжилт, имэйл, апп-ууд болон аюулгүй вебсайтуудыг хянах боломжтой.\n\nДэлгэрэнгүй мэдээллийг админаасаа авна уу."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Энэ төхөөрөмжийг \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n удирддаг. Таны профайлыг \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n удирддаг\nТаны админ таны төхөөрөмж, сүлжээний идэвхжилт, имэйл, апп-ууд болон аюулгүй вебсайтуудыг хянах боломжтой.\n\nДэлгэрэнгүй мэдээллийг админаасаа авна уу."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Энэ профайлыг \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\nудирдаж байна\nТаны админ сүлжээний идэвхжилт, имэйл, апп-ууд болон аюулгүй вебсайтуудыг хянах боломжтой. Дэлгэрэнгүй мэдээллийг админаасаа авна уу.\n\nМөн та \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"-д VPN холболт үүсгэх зөвшөөрөл өгсөн. Энэ апп сүлжээний идэвхжилтийг хянах боломжтой."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Энэ профайлыг \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\nудирдаж байна\nТаны админ таны сүлжээний үйл ажиллагаа, имэйл, апп-ууд, аюулгүй вебсайтуудыг хянах боломжтой. Дэлгэрэнгүй мэдээллийг админаасаа авна уу.\n\nМөн та VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\")-д холбогдсон байна. Таны VPN үйлчилгээ үзүүлэгч таны сүлжээний идэвхжилтийг хянах боломжтой."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Энэ төхөөрөмжийг \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n удирдаж байна. Таны профайлыг \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\nудирдаж байна\nТаны админ таны сүлжээний идэвхжилт, имэйл, апп-ууд, аюулгүй вэбсайтуудыг хянах боломжтой. Дэлгэрэнгүй мэдээллийг админаасаа авна уу.\n\nМөн та \"<xliff:g id="APPLICATION">%3$s</xliff:g>\"-д VPN холболт үүсгэх зөвшөөрөл өгсөн. Энэ апп нь таны сүлжээний идэвхжилтийг хянах боломжтой."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Энэ төхөөрөмжийг \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n удирддаг. Таны профайлыг \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n удирддаг\nТаны админ таны төхөөрөмж, сүлжээний идэвхжилт, имэйл, апп-ууд болон аюулгүй вебсайтуудыг хянах боломжтой.Дэлгэрэнгүй мэдээллийг админаасаа авна уу.\n\nМөн та VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\")-д холбогдсон байна. Таны VPN үйлчилгээ үзүүлэгч таны сүлжээний идэвхжилтийг хянах боломжтой."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Үгүй"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Тохируулах"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>-с хаасан"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr-rIN/strings.xml
index 0667c32..f6c6f8a 100644
--- a/packages/SystemUI/res/values-mr-rIN/strings.xml
+++ b/packages/SystemUI/res/values-mr-rIN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"शोधा"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"कॅमेरा"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"फोन"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"अनलॉक करा"</string>
     <string name="unlock_label" msgid="8779712358041029439">"अनलॉक करा"</string>
     <string name="phone_label" msgid="2320074140205331708">"फोन उघडा"</string>
     <string name="camera_label" msgid="7261107956054836961">"कॅमेरा उघडा"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"डिव्‍हाइस सुरक्षित केले."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"डिव्‍हाइस सुरक्षित केले नाही."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"डिव्‍हाइस सुरक्षित केले, विश्वासू एजंट सक्रिय."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"डिव्‍हाइस सुरक्षित केले नाही, विश्वासू एजंट सक्रिय."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"चेहरा ओळख चालू आहे, विश्वासू एजंट सक्रिय."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"इनपुट पद्धत स्‍विच करा बटण."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"सुसंगतता झूम बटण."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"लहानपासून मोठ्‍या स्‍क्रीनवर झूम करा."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"दोन बार."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"तीन बार."</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_connected" msgid="8366256693719499665">"कनेक्‍ट केले."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"कनेक्ट करीत आहे."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter सक्षम केले."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"रिंगर कंपन."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"रिंगर मूक."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> डिसमिस करा."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> डिसमिस केला."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> प्रारंभ करीत आहे."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"शोध"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> साठी वर स्लाइड करा."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> साठी डावीकडे स्लाइड करा."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"अलार्मसह, कोणतेही व्‍यत्यय नाही"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"कोणतेही व्यत्यय नाहीत. अगदी अलार्मचे देखील नाहीत."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"कोणतेही व्यत्यय नाही"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"प्राधान्य व्‍यत्यय केवळ"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"आपला पुढील अलार्म <xliff:g id="ALARM_TIME">%s</xliff:g> वाजता आहे"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"आता प्रारंभ करा"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"सूचना नाहीत"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"डिव्हाइसचे परीक्षण केले जाऊ शकते"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"प्रोफाईलचे परीक्षण केले जाऊ शकते"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"नेटवर्कचे परीक्षण केले जाऊ शकते"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"डिव्हाइस परीक्षण"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"प्रोफाईल परीक्षण"</string>
     <string name="monitoring_title" msgid="169206259253048106">"नेटवर्क परीक्षण"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN अक्षम करा"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN डिस्कनेक्ट करा"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"आपण VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") कनेक्ट केले आहे.\n\nआपला VPN सेवा प्रदाता ईमेल, अॅप्स आणि सुरक्षित वेबसाइट यासह, आपल्या डिव्हाइस आणि नेटवर्क क्रियाकलापाचे परीक्षण करू शकतो."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"हे डिव्हाइस याद्वारे व्यवस्थापित केले जाते:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइट, यासह आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, आपण VPN कनेक्शन सेट करण्यासाठी \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ला परवानगी दिली आहे. हा अॅप नेटवर्क क्रियाकलापाचे देखील परीक्षण करू शकतो."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"हे डिव्हाइस याद्वारे व्यवस्थापित केले जाते:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइट यासह आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, आपण एका VPN शी कनेक्ट केले आहे (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). आपला VPN सेवा प्रदाता नेटवर्क क्रियाकलापाचे देखील परीक्षण करू शकतो."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"हे प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या डिव्हाइसचे आणि नेटवर्क क्रियाकलापाचे परीक्षण करू शकतो.\n\nअधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"हे डिव्हाइस याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nआपले प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या डिव्हाइसचे आणि नेटवर्क क्रियाकलापाचे परीक्षण करू शकतो.\n\nअधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"हे प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, VPN कनेक्शन सेट करण्यासाठी आपण \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ला परवानगी दिली आहे. हा अॅप नेटवर्क क्रियाकलापाचे देखील परीक्षण करू शकतो."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"हे प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, आपण एका VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") शी कनेक्ट केलेले आहे. आपला VPN सेवा प्रदाता नेटवर्क क्रियाकलापाचे देखील परीक्षण करू शकतो."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"हे डिव्हाइस याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nआपले प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, VPN कनेक्शन सेट करण्यासाठी आपण \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ला परवानगी दिली आहे. हा अॅप नेटवर्क क्रियाकलापाचे परीक्षण देखील करू शकतो."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"हे डिव्हाइस याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nआपले प्रोफाईल याद्वारे व्यवस्थापित केले आहे:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nआपला प्रशासक ईमेल, अॅप्स आणि सुरक्षित वेबसाइटसह, आपल्या नेटवर्क क्रियाकलापाचे परीक्षण करण्यास सक्षम आहे. अधिक माहितीसाठी, आपल्या प्रशासकाशी संपर्क साधा.\n\nतसेच, आपण एका VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") शी कनेक्ट केलेले आहे. आपला VPN सेवा प्रदाता नेटवर्क क्रियाकलापाचे देखील परीक्षण करू शकतो."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"नाही धन्यवाद"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"सेट अप"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> द्वारे नि:शब्द केले"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index 02204560..0c0efb3 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Cari"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Buka kunci"</string>
     <string name="unlock_label" msgid="8779712358041029439">"buka kunci"</string>
     <string name="phone_label" msgid="2320074140205331708">"buka telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"buka kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Peranti selamat."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Peranti tidak selamat."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Peranti selamat, ejen amanah aktif."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Peranti tidak selamat, ejen amanah aktif."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Pengecaman muka sedang berjalan, ejen amanah aktif."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Butang tukar kaedah input."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Butang zum keserasian."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Skrin zum lebih kecil kepada lebih besar."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dua bar."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tiga bar."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Isyarat penuh."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Dihidupkan."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Dimatikan."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Disambungkan."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Menyambung."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Mesin Teletaip didayakan."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Pendering bergetar."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Pendering senyap."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ketepikan <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ditolak."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Memulakan <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Carian"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Luncurkan ke atas untuk <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Luncurkan ke kiri untuk <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Tiada gangguan, termasuk penggera"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Tiada gangguan, walau penggera sekalipun."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Tiada gangguan"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Gangguan keutamaan sahaja"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Penggera anda yang seterusnya pada <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Mulakan sekarang"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Tiada pemberitahuan"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Peranti mungkin dipantau"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil mungkin dipantau"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Rangkaian mungkin dipantau"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Pemantauan peranti"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Pemantauan profil"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Pemantauan rangkaian"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Lumpuhkan VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Putuskan sambungan VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Anda disambungkan ke VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nPembekal perkhidmatan VPN anda boleh memantau aktiviti peranti dan rangkaian anda termasuk e-mel, apl dan tapak web selamat."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Peranti ini diuruskan oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nPentadbir anda berkemampuan memantau aktiviti rangkaian anda termasuk e-mel, apl dan tapak web yang selamat. Untuk maklumat lanjut, hubungi pentadbir anda.\n\nAnda juga memberikan \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" kebenaran untuk menyediakan rangkaian VPN. Apl ini juga boleh memantau aktiviti rangkaian."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Peranti ini diuruskan oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nPentadbir anda berkemampuan memantau aktiviti rangkaian anda termasuk e-mel, apl dan tapak web yang selamat. Untuk maklumat lanjut, hubungi pentadbir anda.\n\nAnda juga disambungkan ke VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Pembekal perkhidmatan VPN anda juga boleh memantau aktiviti rangkaian."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profil ini diurus oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nPentadbir anda boleh mengawasi aktiviti peranti dan rangkaian anda, termasuk e-mel, apl dan tapak web selamat.\n\nUntuk mdptkn maklumat lanjut, hubungi pentadbir anda."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Peranti ini diurus oleh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil anda diurus oleh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nPentadbir anda boleh memantau peranti dan aktiviti rangkaian anda, termasuk e-mel, apl dan tapak web yg selamat.\n\nUtk mndapatkan mklumat lanjut, hubungi pentadbir anda."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profil ini diurus oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nPentadbir anda berkemampuan memantau aktiviti rangkaian anda termasuk e-mel, apl dan tapak web yang selamat. Untuk mdptkn maklumat lanjut, hubungi pentadbir anda.\n\nAnda juga memberi \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"kebenaran untuk menyediakan rangkaian VPN. Apl ini juga boleh memantau aktiviti rangkaian."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profil ini diurus oleh:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nPentadbir anda berkemampuan memantau aktibiti rangkaian anda termasuk e-mel, apl dan tapak web yang selamat. Untuk mdptkn maklumat lanjut, hubungi pentadbir anda.\n\nAnda jg disambung ke VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Pmbekal pkhidmatn VPN anda juga boleh memantau aktiviti rangkaian."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Peranti ini diurus olh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil anda diurus olh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nPentadbir anda bkemampuan mmantau aktiviti rgkaian anda tmasuk e-mel, apl dan tapak web yg slmt. Untuk mdptkn maklumat lanjut, hubungi pentadbir anda.\n\nAnda jg mberi \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" kebenaran utk menyediakan smbungn VPN. Apl ini jg blh mmantau aktiviti rngkaian."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Peranti ini diurus olh:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil anda diurus olh:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nPentadbir anda blh mmantau pranti dn aktiviti rgkaian anda, tmasuk e-mel, apl dan tapak web yg slmt. Utk mdapatkan mklumat lanjut, hubungi pentadbir anda.\n\nAnda juga disambungkn ke VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Pmbekal perkhidmatan VPN anda jg blh memantau rangkaian aktiviti."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Peranti akan kekal terkunci sehingga anda membuka kunci secara manual"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Dapatkan pemberitahuan lebih cepat"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Lihat sebelum anda membuka kunci"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Tidak, terima kasih"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Sediakan"</string>
     <string name="muted_by" msgid="6147073845094180001">"Diredam oleh <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-my-rMM/strings.xml b/packages/SystemUI/res/values-my-rMM/strings.xml
index 301b7a5..5ac9d27 100644
--- a/packages/SystemUI/res/values-my-rMM/strings.xml
+++ b/packages/SystemUI/res/values-my-rMM/strings.xml
@@ -82,14 +82,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ရှာဖွေရန်"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"ကင်မရာ"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ဖုန်း"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"သော့ဖွင့်ရန်"</string>
     <string name="unlock_label" msgid="8779712358041029439">"သော့ဖွင့်ရန်"</string>
     <string name="phone_label" msgid="2320074140205331708">"ဖုန်းကို ဖွင့်ရန်"</string>
     <string name="camera_label" msgid="7261107956054836961">"ကင်မရာ ဖွင့်ရန်"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"စက် လုံခြုံသည်။"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"စက် မလုံခြုံပါ။"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"စက် လုံခြုံပြီး၊ ယုံကြည်မှု အေးဂျင့် အလုပ်လုပ်သည်။"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"စက် မလုံခြုံပါ၊ ယုံကြည်မှု အေးဂျင့် အလုပ်လုပ်သည်။"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"မျက်နှာ စိစစ်မှု စတင်ပြီး၊ ယုံကြည်မှု အေးဂျင့် အလုပ်လုပ်သည်။"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ထည့်သွင်းခြင်းခလုတ်အား ပြောင်းခြင်း"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"အံ့ဝင်သောချုံ့ချဲ့ခလုတ်"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ဖန်သားပြင်ပေါ်တွင် အသေးမှအကြီးသို့ချဲ့ခြင်း"</string>
@@ -130,6 +126,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"၂ ဘား"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"၃ ဘား"</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_connected" msgid="8366256693719499665">"ဆက်သွယ်ထားပြီး"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"ချိတ်ဆက်နေ။"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"၁ အိတ်ဇ်"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"မြန်နှုန်းမြင့်အချက်အလက်ပို့လွှတ်ချက် (HSPA)"</string>
@@ -153,6 +153,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter ရရှိသည်။"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"တုန်ခါခြင်း ဖုန်းမြည်သံ"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"ဖုန်းမြည်သံပိတ်သည်။"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>ကို ပယ်လိုက်ရန်"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ထုတ်ထားသည်။"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>ကို စတင်နေသည်။"</string>
@@ -282,7 +284,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ရှာဖွေရန်"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> အတွက် အပေါ်ကို ပွတ်ဆွဲပါ"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> အတွက် ဖယ်ဘက်ကို ပွတ်ဆွဲပါ"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"နှိုးစက်များ အပါအဝင် ကြားဖြတ်ဝင်မှုများ မလို"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ကြားဖြတ်ဝင်မှုများ မရှိခဲ့။ နှိုးစက်ပင် မရှိခဲ့။"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ကြားဖြတ်ဝင်မှု ခွင့်မပြုရန်"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ဦးစားပေး ကြားဖြတ်ဝင်မှုများ သာလျှင်"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"သင်၏ နောက် နှိုးစက်၏ အချိန်မှာ<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -330,8 +332,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ယခု စတင်ပါ"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"အကြောင်းကြားချက်များ မရှိ"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ကိရိယာကို စောင့်ကြပ် နိုင်ပါသည်"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ပရိုဖိုင်ကို စောင့်ကြပ်နိုင်သည်"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ကွန်ရက်ကို ကို စောင့်ကြပ် နိုင်ပါသည်"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"ကိရိယာကို စောင့်ကြပ်ခြင်း"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"ပရိုဖိုင် စောင့်ကြပ်မှု"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ကွန်ရက်ကို စောင့်ကြပ်ခြင်း"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN ကို ပိတ်ထားရန်"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN ကို အဆက်ဖြတ်ရန်"</string>
@@ -340,6 +344,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") ကို သင်ချိတ်ဆက်မိ၏။\n\nသင့် VPN ဝန်ဆောင်မှုပေးသူသည် သင့်စက်ပစ္စည်းနှင့် အီးမေးများ၊ app များ နှင့် လုံခြုံသည့်ဝက်ဘ်ဆိုက် အပါအဝင် ကွန်ယက် လှုပ်ှရားမှုများကို စောင့်ကြည့်နိုင်သည်။"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ဒီကိရိယာကို စီမံကွပ်ကဲသူမှာ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nသင်၏ စီမံအုပ်ချုပ်သူက သင်၏ ကွန်ရက် လှုပ်ရှားမှုကို၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို၊ စောင့်ကြပ် နိုင်ပါသည်။ အချက်အလက်များ ပိုပြီး ရယူရန်၊ သင်၏ စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။\n\n ထို့အပြင် သင်သည် \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" အား VPN ချိတ်ဆက်မှု စဖွင့်လုပ်ကိုင်ရန် ခွင့်ပြုခဲ့သည်။ ဒီ  appကပါ သင်၏ ကွန်ရက် လှုပ်ရှားမှုကို စောင့်ကြပ် နိုင်ပါသည်။"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ဒီကိရိယာကို စီမံကွပ်ကဲသူမှာ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nသင်၏  စီမံအုပ်ချုပ်သူက သင်၏ ကွန်ရက် လှုပ်ရှားမှုကို၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို၊ စောင့်ကြပ် နိုင်ပါသည်။ အချက်အလက်များ ပိုပြီး ရယူရန်၊ သင်၏ စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။\n\nထို့အပြင်၊ သင်သည် VPN  (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") သို့ ချိတ်ဆက်ထားသည်။ သင်၏ VPN ဝန်ဆောင်မှုကို စီမံပေးသူကပါ ကွန်ရက် လှုပ်ရှားမှုများကို စောင့်ကြပ်နိုင်သေးသည်။"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ဒီပရိုဖိုင်ကို စီမံကွပ်ကဲပေးသူ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nသင်၏ စီမံအုပ်ချုပ်သူသည် သင်၏ ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှုများကို၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို၊ စောင့်ကြပ်နိုင်သည်။ \n\n နောက်ထပ် သိလိုလျှင်၊ သင်၏ စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ဒီကိရိယာကို စီမံကွပ်ကဲပေးသူ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nသင့် ပရိုဖိုင်ကို စီမံကွပ်ကဲပေးသူ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nသင်၏ စီမံအုပ်ချုပ်သူသည် သင်၏ ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှုများကို၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို၊ စောင့်ကြပ်နိုင်သည်။\n\nနောက်ထပ် သိလိုလျှင်၊ သင်၏ စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ပရိုဖိုင်ကို စီမံပေးသူ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nသင့် စီမံအုပ်ချုပ်သူက သင့် ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှုကို၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်၊ စောင့်ကြပ်နိုင်သည်။ ထပ် သိလိုလျှင်၊ သင့် စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။\n\n သင်သည် \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" အား VPN ချိတ်ဆက်မှု ထူထောင်ခွင့် ပေးခဲ့သည်။ ဒီappကပါ ကွန်ရက် လှုပ်ရှားမှုကို စောင့်ကြပ်နိုင်သည်။"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ပရိုဖိုင်ကို စီမံပေးသူ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nသင့်စီမံအုပ်ချုပ်သူက သင့် ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှု၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို စောင့်ကြပ်နိုင်သည်။ ထပ် သိလိုလျှင်၊ သင့်စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။\n\nသင်သည် VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") သို့ပါ ချိတ်ထားသည်။ သင်၏ VPN စီမံပေးသူကပါ ကွန်ရက် လှုပ်ရှားမှုကို စောင့်ကြပ်နိုင်သည်။"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ကိရိယာကို စီမံပေးသူ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nသင့်ပရိုဖိုင်ကို စီမံပေးသူ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nသင့်စီမံအုပ်ချုပ်သူသည် သင့် ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှု၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို စောင့်ကြပ်နိုင်သည်။\n\nသင်သည် \"<xliff:g id="APPLICATION">%3$s</xliff:g>\"အား VPN ချိတ်ဆက်မှု ထူထောင်ခွင့် ပေးခဲ့သည်။ ဒီappကပါ ကွန်ရက် လှုပ်ရှားမှုကို စောင့်ကြပ်နိုင်သည်။"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ဒီကိရိယာ စီမံပေးသူ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nသင့် ပရိုဖိုင် စီမံပေးသူ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n စီမံအုပ်ချုပ်သူသည် သင့် ကိရိယာ နှင့် ကွန်ရက် လှုပ်ရှားမှု၊ အီးမေးလ်များ၊ appများ နှင့် လုံခြုံသည့် ဝက်ဘ်ဆိုက်များ အပါအဝင်ကို စောင့်ကြပ်နိုင်သည်။\n\nထပ် သိလိုလျှင်၊ သင့်စီမံအုပ်ချုပ်သူကို ဆက်သွယ်ပါ။ သင်သည် VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") သို့ပါ ချိတ်ထားသည်။ သင်၏ VPN စီမံပေးသူကပါ ကွန်ရက် လှုပ်ရှားမှုကို စောင့်ကြပ်နိုင်သည်။"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"မလိုအပ်ပါ"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"သတ်မှတ်ရန်"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> အသံပိတ်သည်"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index e10fde7..440fef3 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Søk"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefonnummer"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås opp"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås opp"</string>
     <string name="phone_label" msgid="2320074140205331708">"åpne telefonen"</string>
     <string name="camera_label" msgid="7261107956054836961">"åpne kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Enheten er sikker."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Enheten er ikke sikker."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Enheten er sikker – pålitelig agent er aktiv."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Enheten er ikke sikker – pålitelig agent er aktiv."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Ansiktsgjenkjennelse kjører – pålitelig agent er aktiv."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Bytt knapp for inndatametode."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Zoomknapp for kompatibilitet."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom fra mindre til større skjerm."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"To stolper."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tre stolper."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Full signalstyrke."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"På."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Av."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Tilkoblet."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Kobler til."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter er aktivert."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibreringsmodus."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Stille modus."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Avvis <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> avvist."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Starter <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Søk"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Dra opp for å <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Dra til venstre for å <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Ingen forstyrrelser – inkludert alarmer"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Ingen forstyrrelser, ikke engang alarmer."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Ingen forstyrrelser"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Bare prioriterte forstyrrelser"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Den neste alarmen din er stilt inn kl. <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Start nå"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ingen varsler"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Enheten kan være overvåket"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilen kan overvåkes"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Nettverket kan være overvåket"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Enhetsovervåking"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilovervåking"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Nettverksovervåking"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Deaktiver VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Koble fra VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Enheten er koblet til et VPN-nettverk («<xliff:g id="APPLICATION">%1$s</xliff:g>»).\n\nVPN-tjenesteleverandøren din kan overvåke nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Denne enheten administreres av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoren din kan overvåke nettverksaktiviteten din, inkludert e-poster, apper og sikre nettsteder. Ta kontakt med administratoren din for mer om dette.\n\nI tillegg ga du «<xliff:g id="APPLICATION">%2$s</xliff:g>» tillatelse til å konfigurere en VPN-tilkobling. Denne appen kan også overvåke nettverksaktiviteten din."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Denne enheten administreres av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoren din kan overvåke nettverksaktiviteten din, inkludert e-poster, apper og sikre nettsteder. Ta kontakt med administratoren din for mer om dette.\n\nI tillegg er enheten koblet til et VPN-nettverk («<xliff:g id="APPLICATION">%2$s</xliff:g>»). VPN-tjenesteleverandøren kan også overvåke nettverksaktiviteten din."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Denne profilen administreres av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoren din kan overvåke enheten og nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder.\n\nHvis du vil ha mer informasjon, kan du kontakte administratoren."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Denne enheten administreres av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilen din administreres av:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoren din kan overvåke enheten og nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder.\n\nHvis du vil ha mer informasjon, kan du kontakte administratoren."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Denne profilen administreres av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoren din kan overvåke enheten og nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder. Hvis du vil ha mer informasjon, kan du kontakte administratoren.\n\n Du har også gitt «<xliff:g id="APPLICATION">%2$s</xliff:g>» tillatelse til å konfigurere en VPN-tilkobling. Denne appen kan også overvåke nettverksaktiviteten."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Denne profilen administreres av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoren din kan overvåke nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder. Hvis du vil ha mer informasjon, kan du kontakte administratoren.\n\nDu er også koblet til et VPN («<xliff:g id="APPLICATION">%2$s</xliff:g>»). VPN-leverandøren din kan også overvåke nettverksaktiviteten."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Denne enheten administreres av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilen din administreres av:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoren din kan overvåke nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder. Hvis du vil ha mer informasjon, kan du kontakte administratoren.\n\nDu har også gitt «<xliff:g id="APPLICATION">%3$s</xliff:g>» tillatelse til å konfigurere en VPN-tilkobling. Denne appen kan også overvåke nettverksaktiviteten."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Denne enheten administreres av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n Profilen din administreres av: \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoren din kan overvåke enheten og nettverksaktiviteten din, inkludert e-post, apper og sikre nettsteder. Hvis du vil ha mer informasjon, kan du kontakte administratoren.\n\nDu er også koblet til et VPN («<xliff:g id="APPLICATION">%3$s</xliff:g>»). VPN-leverandøren din kan også overvåke nettverksaktiviteten."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Enheten forblir låst til du låser den opp manuelt"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Motta varsler raskere"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Se dem før du låser opp"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nei takk"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Konfigurer"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> har kuttet lyden"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ne-rNP/strings.xml b/packages/SystemUI/res/values-ne-rNP/strings.xml
index be4a0e0..df555a6 100644
--- a/packages/SystemUI/res/values-ne-rNP/strings.xml
+++ b/packages/SystemUI/res/values-ne-rNP/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"खोज्नुहोस्"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"क्यामेरा"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"फोन"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"खोल्नुहोस्"</string>
     <string name="unlock_label" msgid="8779712358041029439">"खोल्नुहोस्"</string>
     <string name="phone_label" msgid="2320074140205331708">"फोन खोल्नुहोस्"</string>
     <string name="camera_label" msgid="7261107956054836961">"क्यामेरा खोल्नुहोस्"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"इनपुट विधि बटन स्विच गर्नुहोस्।"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"मिलाउने जुम बटन।"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"स्क्रिनलाई सानोबाट ठूलो पार्नुहोस्।"</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"दुई पट्टिहरू।"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"तिनवटा पट्टिहरू"</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_connected" msgid="8366256693719499665">"जडान गरिएको।"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"जडान हुँदै।"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -160,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"टेलि टाइपराइटर सक्षम गरियो।"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"बज्ने कम्पन हुन्छ।"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"घन्टी मौन।"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> खारेज गर्नुहोस्।"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> खारेज गरिएको छ।"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>सुरु गर्दै।"</string>
@@ -289,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"खोज्नुहोस्"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>को लागि माथि धिसार्नुहोस्"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"स्लाइड <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>को लागि बायाँ।"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"बिना रोकटोक, सचेतक सहित"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"कुनै रुकावट छैन। चेतावनी समेत छैन।"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"कुनै रुकावटहरू छैन"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"प्राथमिकता रुकावटहरूमा मात्र"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"तपाईंको अर्को सचेतक <xliff:g id="ALARM_TIME">%s</xliff:g> मा छ"</string>
@@ -339,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"अहिले सुरु गर्नुहोस्"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"कुनै सूचनाहरू छैनन्"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"उपकरण अनुगमन हुन सक्छ"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"प्रोफाइल अनुगमन हुन सक्छ"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"सञ्जाल अनुगमित हुन सक्छ"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"उपकरण अनुगमन"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"प्रोफाइल अनुगमन गर्दै"</string>
     <string name="monitoring_title" msgid="169206259253048106">"सञ्जाल अनुगमन"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN असक्षम गर्नुहोस्"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"विच्छेद VPN"</string>
@@ -349,7 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"तपाईं VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") मा जडित हुनुहुन्छ।\n\nतपाईंको VPN सेवा प्रदायकले इमेल, अनुप्रयोगहरू, र सुरक्षित वेबसाइट सहित आफ्नो उपकरण र सञ्जाल गतिविधि निगरानी गर्न सक्छन्।"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"यो उपकरण व्यवस्थित गरिएको छ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nतपाईंको प्रशासनले इमेल, अनुप्रयोग र सुरक्षित वेबसाइटहरू सहित आफ्नो सञ्जाल गतिविधि निगरानी गर्न सक्षम छ। थप जानकारीको लागि, आफ्नो प्रशासन सँग सम्पर्क गर्नुहोस्।\n\nसाथै, तपाईंले एउटा VPN जडान स्थापित गर्न \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" अनुमति दिनुभयो। यो अनुप्रयोगले सञ्जाल गतिविधि पनि निगरानी गर्न सक्छन्।"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"यो उपकरण व्यवस्थित गरिएको छ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nतपाईंको प्रशासनले इमेल, अनुप्रयोग र सुरक्षित वेबसाइटहरू सहित आफ्नो सञ्जाल गतिविधि निगरानी गर्न सक्षम छ। थप जानकारीको लागि, आफ्नो प्रशासन सँग सम्पर्क गर्नुहोस्।\n\nतपाईं VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") मा जडित हुनुहुन्छ। तपाईंको VPN सेवा प्रदायकले आफ्नो सञ्जाल गतिविधि पनि निगरानी गर्न सक्छन्।"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"यो प्रोफाइल व्यवस्थित गरिएकोछ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n तपाईँको प्रशासकले इमेल, अनुप्रयोग र सुरक्षित वेबसाइट सहित, तपाईँको उपकरण र सञ्जाल गतिविधि निगरानी गर्न सक्छ।\n\nथप जानकारीको लागि, आफ्नो प्रशासक संग सम्पर्क गर्नुहोस्।"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"यो उपकरण व्यवस्थित गरिएको छ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n तपाईँको प्रोफाइल व्यवस्थित गरिएको छ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n तपाईँको प्रशासकले इमेल, अनुप्रयोग र सुरक्षित वेबसाइट सहित, तपाईँको उपकरण र सञ्जाल गतिविधि निगरानी गर्न सक्छ।\n\n थप जानकारीको लागि, आफ्नो प्रशासक संग सम्पर्क गर्नुहोस्।"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"यो प्रोफाइल व्यवस्थित गरिएको छ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nतपाईँको प्रशासकले इमेल, अनुप्रयोग र सुरक्षित वेबसाइट सहित तपाईँको सञ्जाल गतिविधि निगरानी गर्न सक्षम छ। थप जानकारीको लागि, आफ्नो प्रशासक संग सम्पर्क गर्नुहोस्।\n\nसाथै, तपाईँले एउटा VPN जडान स्थापित गर्न \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" अनुमति दिनुभयो। यो अनुप्रयोगले सञ्जाल गतिविधि पनि निगरानी गर्न सक्छ।"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"यो प्रोफाइल व्यवस्थित गरिएकोछ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n तपाईँको प्रशासकले इमेल, अनुप्रयोग र सुरक्षित वेबसाइट सहित, तपाईँको सञ्जाल गतिविधि निगरानी गर्न सक्षम छ। थप जानकारीको लागि, आफ्नो प्रशासक संग सम्पर्क गर्नुहोस्।\n\nसाथै, तपाईँ एउटा VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") मा जडित हुनुहुन्छ। तपाईँको VPN सेवा प्रदायकले सञ्जाल गतिविधि पनि निगरानी गर्न सक्छ।"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"यस उपकरण र तपाईँको प्रोफाइल \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n र \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n ले व्यवस्थित गरिएको छ। तपाईँको प्रशासकले सञ्जाल गतिविधि निगरानी गर्न सक्षम छन् जस्तै इमेल, अनुप्रयोग र सुरक्षित वेबसाइट। थप जान्न प्रशासकलाई सम्पर्क गर्नुहोला।\n\nसाथै, तपाईँले VPN जडान स्थापित गर्न \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" अनुमति दिनुभयो। यो अनुप्रयोगले संजालको निगरानी पनि गर्न सक्छ।"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"यो उपकरणको व्यवस्थित \n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n ले गरेको छ। तपाईँको प्रोफाइल \n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n ले व्यवस्थित गरिएको छ। तपाईँको प्रशासकले सञ्जाल गतिविधि निगरानी गर्न सक्षम छन् जसमा इमेल, अनुप्रयोग र सुरक्षित वेबसाइट छ। थप जान्न प्रशासकलाई सम्पर्क गर्नुहोला।\n\nसाथै, तपाईँ VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") मा जडित हुनुहुन्छ। जुन सेवा प्रदायकले निगरानी गर्न सक्ने छन्।"</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"तपाईँले नखोले सम्म उपकरण बन्द रहनेछ"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"छिटो सूचनाहरू प्राप्त गर्नुहोस्"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"तपाईँले अनलक गर्नअघि तिनीहरूलाई हेर्नुहोस्"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"धन्यवाद पर्दैन"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"सेटअप गर्नुहोस्"</string>
+    <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> द्वारा मौन गरिएको"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 5a87938..4d5307c 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Zoeken"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefoon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Ontgrendelen"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ontgrendelen"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefoon openen"</string>
     <string name="camera_label" msgid="7261107956054836961">"camera openen"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Apparaat is beveiligd."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Apparaat is niet beveiligd."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Apparaat is beveiligd, trust agent is actief."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Apparaat is niet beveiligd, trust agent is actief."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Gezichtsherkenning wordt uitgevoerd, trust agent is actief."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Knop voor wijzigen invoermethode."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knop voor compatibiliteitszoom."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kleiner scherm uitzoomen naar groter scherm."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Twee streepjes."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Drie streepjes."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signaal is op volledige sterkte."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Ingeschakeld."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Uitgeschakeld."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Verbonden."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Verbinden."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter ingeschakeld."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Belsoftware trilt."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Belsoftware stil."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> sluiten."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> verwijderd."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> starten."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Zoeken"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Veeg omhoog voor <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Veeg naar links voor <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Geen onderbrekingen, waaronder alarmen"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Geen onderbrekingen. Zelfs geen alarm."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Geen onderbrekingen"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Alleen prioriteitsonderbrekingen"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Uw volgende alarm is om <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Nu starten"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Geen meldingen"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Apparaat wordt mogelijk gecontroleerd"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profiel kan worden gecontroleerd"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Netwerk kan worden gecontroleerd"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Apparaatcontrole"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profielcontrole"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Netwerkcontrole"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN uitschakelen"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Verbinding met VPN verbreken"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"U heeft verbinding met een VPN (\'<xliff:g id="APPLICATION">%1$s</xliff:g>\').\n\nUw VPN-provider kan uw apparaat- en netwerkactiviteit bijhouden, waaronder e-mails, apps en beveiligde websites."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Dit apparaat wordt beheerd door:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUw beheerder kan uw netwerkactiviteit beheren, waaronder e-mails, apps en beveiligde websites. Neem voor meer informatie contact op met uw beheerder.\n\nDaarnaast heeft u \'<xliff:g id="APPLICATION">%2$s</xliff:g>\' toestemming gegeven een VPN-verbinding in te stellen. Deze app kan uw netwerkactiviteit ook controleren."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Dit apparaat wordt beheerd door:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUw beheerder kan uw netwerkactiviteit beheren, waaronder e-mails, apps en beveiligde websites. Neem voor meer informatie contact op met uw beheerder.\n\nDaarnaast bent u verbonden met een VPN (\'<xliff:g id="APPLICATION">%2$s</xliff:g>\'). Uw VPN-serviceprovider kan uw netwerkactiviteit ook controleren."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Dit profiel wordt beheer door:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites.\n\nNeem contact op met uw beheerder voor meer informatie."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Dit apparaat wordt beheerd door:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nUw profiel wordt beheerd door:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites.\n\nNeem contact op met uw beheerder voor meer informatie."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Dit profiel wordt beheerd door:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites. Neem contact op met uw beheerder voor meer informatie.\n\nU heeft \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ook toestemming gegeven een VPN-verbinding in te stellen. Deze app kan ook netwerkactiviteit controleren."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Dit profiel wordt beheerd door:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites. Neem contact op met uw beheerder voor meer informatie.\n\nDaarnaast bent u verbonden met een VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Uw VPN-serviceprovider kan ook netwerkactiviteit controleren."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Dit apparaat wordt beheerd door:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nUw profiel wordt beheerd door:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites. Neem contact op met uw beheerder voor meer informatie.\n\nU heeft \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ook toestemming gegeven een VPN-verbinding in te stellen. Deze app kan ook netwerkactiviteit controleren."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Dit apparaat wordt beheerd door:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nUw profiel wordt beheerd door:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUw beheerder kan uw apparaat en netwerkactiviteit controleren, inclusief e-mails, apps en veilige websites. Neem contact op met uw beheerder voor meer informatie.\n\nDaarnaast bent u verbonden met een VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Uw VPN-serviceprovider kan ook netwerkactiviteit controleren."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Het apparaat blijft vergrendeld totdat u het handmatig ontgrendelt"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Sneller meldingen ontvangen"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Weergeven voordat u ontgrendelt"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nee, bedankt"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configureren"</string>
     <string name="muted_by" msgid="6147073845094180001">"Gedempt door <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 28368ea..51fe321 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Szukaj"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Aparat"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Odblokuj"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odblokuj"</string>
     <string name="phone_label" msgid="2320074140205331708">"otwórz telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"otwórz aparat"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Urządzenie jest zabezpieczone."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Urządzenie nie jest zabezpieczone."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Urządzenie jest zabezpieczone. Agent zaufania jest aktywny."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Urządzenie nie jest zabezpieczone. Agent zaufania jest aktywny."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Wykrywanie twarzy jest włączone. Agent zaufania jest aktywny."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Przycisk przełączania metody wprowadzania."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Przycisk powiększenia na potrzeby zgodności."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Powiększa mniejszy ekran do większego."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dwa paski."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Trzy paski."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Pełna moc sygnału."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Wł."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Wył."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Połączono."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Łączę..."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Dalekopis (TTY) włączony."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Dzwonek z wibracjami."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Dzwonek wyciszony."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Usuń stąd <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g>: zamknięto."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Uruchamiam <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Szukaj"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Przesuń w górę: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Przesuń w lewo: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Żadnego przeszkadzania, w tym alarmów"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Żadnych powiadomień. Nawet alarmów."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Bez przerw"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Tylko priorytetowe przerwy"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Następny alarm o <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Rozpocznij teraz"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Brak powiadomień"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Urządzenie może być monitorowane"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil może być monitorowany"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Sieć może być monitorowana"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Monitorowanie urządzeń"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitorowanie profilu"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Monitorowanie sieci"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Wyłącz VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Rozłącz z VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Łączysz się z siecią VPN („<xliff:g id="APPLICATION">%1$s</xliff:g>”).\n\nDostawca usługi VPN może monitorować Twoją aktywność na urządzeniu i w sieci, w tym e-maile, aplikacje i bezpieczne strony internetowe."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Urządzeniem zarządza:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator ma możliwość monitorowania Twojej aktywności w sieci, w tym e-maili, aplikacji i bezpiecznych witryn. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nDałeś też aplikacji „<xliff:g id="APPLICATION">%2$s</xliff:g>” uprawnienia do skonfigurowania połączenia VPN. Ona również może monitorować aktywność sieciową."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Urządzeniem zarządza:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministrator ma możliwość monitorowania Twojej aktywności w sieci, w tym e-maili, aplikacji i bezpiecznych witryn. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nŁączysz się też z siecią VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>”). Dostawca usługi VPN również może monitorować aktywność sieciową."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Ten profil jest zarządzany przez:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nTwój administrator może monitorować Twoje urządzenie i aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony internetowe.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"To urządzenie jest zarządzane przez:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nTwój profil jest zarządzany przez:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nTwój administrator może monitorować Twoje urządzenie i aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony internetowe.\n\nAby dowiedzieć się więcej, skontaktuj się z administratorem."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Ten profil jest zarządzany przez:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nTwój administrator może monitorować aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nPozwalasz też aplikacji „<xliff:g id="APPLICATION">%2$s</xliff:g>” na nawiązanie połączenia VPN. Ona również może monitorować aktywność w sieci."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profil jest zarządzany przez:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nTwój administrator może monitorować aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nUżywasz też połączenia VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Twój operator VPN również może monitorować aktywność w sieci."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Urządzenie jest zarządzane przez:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil jest zarządzany przez:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nTwój administrator może monitorować aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nPozwalasz też aplikacji „<xliff:g id="APPLICATION">%3$s</xliff:g>” na nawiązanie połączenia VPN. Ona również może monitorować aktywność w sieci."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Urządzenie jest zarządzane przez:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil jest zarządzany przez:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nTwój administrator może monitorować aktywność w sieci, w tym e-maile, aplikacje i bezpieczne strony. Skontaktuj się z nim, by dowiedzieć się więcej.\n\nUżywasz też połączenia VPN („<xliff:g id="APPLICATION">%3$s</xliff:g>”). Twój operator VPN również może monitorować aktywność w sieci."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Urządzenie pozostanie zablokowane, aż odblokujesz je ręcznie"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Szybszy dostęp do powiadomień"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Zobacz powiadomienia, jeszcze zanim odblokujesz ekran"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nie, dziękuję"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Skonfiguruj"</string>
     <string name="muted_by" msgid="6147073845094180001">"Ściszone przez: <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index a9ad1c8..88ce23a 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Câmara"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telemóvel"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir telemóvel"</string>
     <string name="camera_label" msgid="7261107956054836961">"abrir câmara"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispositivo protegido."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispositivo não protegido."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispositivo protegido, agente fidedigno ativo."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispositivo não protegido, agente fidedigno ativo."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Deteção de rosto em execução, agente fidedigno ativo."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Alternar botão de método de introdução."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botão zoom de compatibilidade."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zoom menor para ecrã maior."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Duas barras."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Três barras."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sinal completo."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Ativado."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desativado."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Ligado."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"A ligar..."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Teletipo ativado."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Campainha em vibração."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Campainha em silêncio."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ignorar <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ignorado."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"A iniciar <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Pesquisar"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Deslize para cima para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Deslize para a esquerda para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sem interrupções, incluindo alarmes"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Sem interrupções. Nem mesmo alarmes."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Sem interrupções"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Apenas interrupções com prioridade"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"O próximo alarme é à(s) <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Começar agora"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Sem notificações"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"O dispositivo pode ser monitorizado"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"O perfil pode ser monitorizado"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"A rede pode ser monitorizada"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Monitorização de dispositivos"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitorização de perfis"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Monitorização da rede"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Desativar a VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desligar VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Está ligado a uma VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nO fornecedor de serviços VPN pode monitorizar a atividade do dispositivo e da rede, incluindo emails, aplicações e Websites seguros."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Este dispositivo é gerido por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\no admin. pode monitorizar a atividade da rede, incluindo emails, aplicações e Websites seguros. Para mais informações, contacte o administrador.\n\nAlém disso, deu permissão a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" para configurar uma ligação VPN. Esta aplicação pode também monitorizar a atividade da rede."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Este dispositivo é gerido por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\no administrador pode monitorizar a atividade da rede, incluindo emails, aplicações e Websites seguros. Para mais informações, contacte o administrador.\n\nAlém disso, está ligado a uma VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). O fornecedor de serviços VPN pode também monitorizar a atividade da rede."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Este perfil é gerido por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO seu administrador pode monitorizar o seu dispositivo e a atividade de rede, incluindo emails, aplicações e Websites seguros.\n\nPara obter mais informações, contacte o seu administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Este dispositivo é gerido por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO seu perfil é gerido por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO seu administrador pode monitorizar o seu dispositivo e a atividade de rede, incluindo emails, aplicações e Websites seguros.\n\nPara obter mais informações, contacte o seu administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Este perfil é gerido por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO seu admin. pode monitorizar a sua atividade de rede, incluindo emails, aplic. e Websites seguros. Para obter mais informações, contacte o seu admin.\n\nPara além disso, deu autorização a \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" para configurar uma ligação VPN. Esta aplic. também pode monitorizar a ativ. de rede."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Este perfil é gerido por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO seu admin. pode monitorizar a sua atividade de rede, incluindo emails, aplicações e Websites seguros. Para obter mais informações, contacte o seu admin.\n\nPara além disso, está ligado a uma VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). O seu fornecedor de serviço VPN também pode monitorizar a ativ. de rede."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Este disp. é gerido por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO seu perfil é gerido por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO seu admin. pode monitorizar a sua ativ. de rede, incluindo emails, aplicações e Websites seguros. Para obter mais informações, contacte o seu admin.\n\nPara além disso, deu autorização a \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" para configurar uma ligação VPN. Esta aplicação também pode monitorizar a ativ. de rede."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Este dispositivo é gerido por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nO seu perfil é gerido por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO seu admin. pode monitorizar a sua ativ. de rede, incluindo emails, aplic. e Websites seguros. Para obter mais informações, contacte o seu admin.\n\nPara além disso, está ligado a uma VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). O seu forn. de serviço VPN também pode monitorizar a ativ. de rede."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"O dispositivo permanecerá bloqueado até ser desbloqueado manualmente"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Receber notificações mais rapidamente"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ver antes de desbloquear"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Não, obrigado"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurar"</string>
     <string name="muted_by" msgid="6147073845094180001">"Som desativado por <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 0b22039..4180640 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Pesquisar"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Câmera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefone"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir smartphone"</string>
     <string name="camera_label" msgid="7261107956054836961">"abrir câmera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispositivo protegido."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispositivo não protegido."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispositivo protegido, agente de confiança ativo."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispositivo não protegido, agente de confiança ativo."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Reconhecimento facial em execução, agente de confiança ativo."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Alterar botão do método de entrada."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Botão de zoom da compatibilidade."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Aumentar a tela com zoom."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Duas barras."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Três barras."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sinal cheio."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Ligado."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Desligado."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Conectado."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Conectando."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTYpewriter ativado."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibração da campainha."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Campainha silenciosa."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Descartar <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> descartado."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Iniciando <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Pesquisar"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>, deslize para cima."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Para <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>, deslize para a esquerda."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Sem interrupções, incluindo alarmes"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Sem interrupções. Nem mesmo alarmes."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Sem interrupções"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Apenas interrupções prioritárias"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Seu próximo alarme será às <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Iniciar agora"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Sem notificações"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"O dispositivo pode ser monitorado"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"O perfil pode ser monitorado"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"A rede pode ser monitorada"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Monitoramento de dispositivos"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitoramento de perfis"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Monitoramento de rede"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Desativar VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Desconectar VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Você está conectado a uma VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nO provedor de serviços de VPN pode monitorar seu dispositivo e a atividade na rede, incluindo e-mails, apps e websites seguros."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Este dispositivo é gerenciado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, incluindo e-mails, apps e websites seguros. Para mais informações, entre em contato com o administrador.\n\nAlém disso, você autorizou \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" a configurar uma conexão VPN. Esse app também pode monitorar a atividade na rede."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Este dispositivo é gerenciado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, incluindo e-mails, apps e websites seguros. Para mais informações, entre em contato com o administrador.\n\nAlém disso, você está conectado a uma VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). O provedor de serviços de VPN também pode monitorar a atividade na rede."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Este perfil é gerenciado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO administrador pode monitorar seu dispositivo e a atividade na rede, incluindo e-mails, apps e sites seguros.\n\nPara mais informações, entre em contato com o administrador."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Este dispositivo é gerenciado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSeu perfil é gerenciado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO administrador pode monitorar sua atividade no dispositivo e na rede, incluindo e-mails, apps e sites seguros.\n\nPara mais informações, contate o administrador."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Este perfil é gerenciado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, incluindo e-mails, apps e sites seguros. Para mais informações, entre em contato com o administrador.\n\nVocê autorizou \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" a fazer conexões VPN e este app também pode monitorar atividades de rede."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Este perfil é gerenciado por:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, incluindo e-mails, apps e sites seguros. Para mais informações, contate o administrador.\n\nVocê está conectado a uma VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") e o provedor de serviços de VPN também pode monitorar atividades de rede."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Este dispositivo é gerenciado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSeu perfil é gerenciado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, como e-mails, apps e sites seguros. Para mais informações, contate o administrador.\n\nVocê autorizou \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" a fazer conexões VPN e o provedor de serviços de VPN também pode monitorar atividades de rede."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Este dispositivo é gerenciado por:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nSeu perfil é gerenciado por:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nO administrador pode monitorar sua atividade na rede, como e-mails, apps e sites seguros. Para mais informações, contate o administrador.\n\nVocê está conectado a uma VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") e o provedor de serviços de VPN também pode monitorar atividades de rede."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"O dispositivo permanecerá bloqueado até que você o desbloqueie manualmente"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Receba notificações mais rápido"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Veja-as antes de desbloquear"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Não, obrigado"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Configurar"</string>
     <string name="muted_by" msgid="6147073845094180001">"Som desativado por <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index a911586..8995c15 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Căutați"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Cameră foto"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Deblocați"</string>
     <string name="unlock_label" msgid="8779712358041029439">"deblocați"</string>
     <string name="phone_label" msgid="2320074140205331708">"deschideți telefonul"</string>
     <string name="camera_label" msgid="7261107956054836961">"deschideți camera foto"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Dispozitivul este securizat."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Dispozitivul nu este securizat."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Dispozitivul este securizat. Agentul de încredere este activ."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Dispozitivul nu este securizat. Agentul de încredere este activ."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Se execută detectarea feței. Agentul de încredere este activ."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Buton pentru comutarea metodei de introducere."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Buton zoom pentru compatibilitate."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Faceţi zoom de la o imagine mai mică la una mai mare."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Două bare."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Trei bare."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Semnal complet."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Activat."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Dezactivat."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Conectat."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Se conectează."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter activat."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibrare sonerie."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Sonerie silenţioasă."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Închideți <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> a fost eliminată."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Se inițiază <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Căutaţi"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Glisaţi în sus pentru <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Glisaţi spre stânga pentru <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Fără întreruperi, inclusiv alarme"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Fără întreruperi. Nici măcar alarme."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Fără întreruperi"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Numai întreruperi cu prioritate"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Următoarea alarmă este setată la <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -335,8 +337,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Începeți acum"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Nicio notificare"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Dispozitivul poate fi monitorizat"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profilul poate fi monitorizat"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Rețeaua poate fi monitorizată"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Monitorizarea dispozitivului"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitorizarea profilului"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Monitorizarea rețelei"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Dezactivați conexiunea prin VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Deconectați rețeaua VPN"</string>
@@ -345,6 +349,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Sunteți conectat(ă) la o rețea VPN („<xliff:g id="APPLICATION">%1$s</xliff:g>”).\n\nFurnizorul de servicii VPN vă poate monitoriza activitatea pe dispozitiv și în rețea, inclusiv email-urile, aplicațiile și site-urile securizate."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Dispozitiv administrat de:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratorul vă poate monitoriza activitatea în rețea, inclusiv e-mailurile, aplicațiile și site-urile securizate. Pentru detalii, contactați administratorul.\n\nAți permis aplicației „<xliff:g id="APPLICATION">%2$s</xliff:g>” să configureze o conexiune VPN. Aplicația vă poate monitoriza activitatea în rețea."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Dispozitiv administrat de:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratorul vă poate monitoriza activitatea în rețea, inclusiv e-mailurile, aplicațiile și site-urile securizate. Pentru detalii, contactați administratorul.\n\nSunteți conectat(ă) la o rețea VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>”). Furnizorul de servicii VPN vă poate monitoriza activitatea în rețea."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profilul este gestionat de:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratorul poate monitoriza dispozitivul și activitatea în rețea, inclusiv e-mailurile, aplicațiile și site-urile securizate.\n\nPentru mai multe informații, contactați administratorul."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Dispozitivul este gestionat de:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilul este gestionat de:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratorul poate monitoriza dispozitivul și activitatea în rețea, inclusiv e-mailurile, aplicațiile și site-urile securizate.\n\nPentru mai multe informații, contactați administratorul."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Profilul este gestionat de:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratorul poate monitoriza activitatea în rețea (e-mailurile, aplicațiile și site-urile securizate). Pentru mai multe informații, contactați admin.\n\nÎn plus, ați permis aplicației „<xliff:g id="APPLICATION">%2$s</xliff:g>” să configureze o conexiune VPN. Și aceasta poate monitoriza activitatea în rețea."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Profilul este gestionat de:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratorul poate monitoriza activitatea în rețea (e-mailurile, aplicațiile și site-urile securizate). Pentru mai multe informații, contactați administratorul.\n\nSunteți conectat(ă) și la VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>”). Și furnizorul de servicii VPN poate monitoriza activitatea în rețea."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Disp. este gestionat de:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilul este gestionat de:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdm. poate monitoriza activitatea în rețea (e-mailurile, aplicațiile și site-urile securizate). Pt. mai multe informații, contactați adm.\n\nÎn plus, ați permis aplicației „<xliff:g id="APPLICATION">%3$s</xliff:g>” să config. o conexiune VPN. Și aceasta poate monitoriza activitatea în rețea."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Dispozitivul este gestionat de:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilul este gestionat de:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdm. poate monitoriza activitatea în rețea (e-mailurile, aplicațiile și site-urile securizate). Pt. mai multe informații, contactați adm.\n\nSunteți conectat(ă) și la VPN („<xliff:g id="APPLICATION">%3$s</xliff:g>”). Și furnizorul de servicii VPN poate monitoriza activitatea în rețea."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Dispozitivul va rămâne blocat până când îl deblocați manual"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Obțineți notificări mai rapid"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Doresc să se afișeze înainte de deblocare"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nu, mulț."</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Config."</string>
     <string name="muted_by" msgid="6147073845094180001">"Dezactivate de <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 354da5a..84cfff4 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Поиск"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон."</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Разблокировать."</string>
     <string name="unlock_label" msgid="8779712358041029439">"Разблокировать."</string>
     <string name="phone_label" msgid="2320074140205331708">"Открыть телефон."</string>
     <string name="camera_label" msgid="7261107956054836961">"Открыть камеру."</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Устройство защищено."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Устройство не защищено."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Устройство защищено, промежуточный агент активирован."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Устройство не защищено, промежуточный агент активирован."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Распознавание лица включено, промежуточный агент активирован."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Кнопка переключения способа ввода."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка масштабирования (режим совместимости)"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Уменьшение изображения для увеличения свободного места на экране."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"два деления"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"три деления"</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_connected" msgid="8366256693719499665">"Подключено"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Соединение."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Телетайп включен."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Вибровызов."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Беззвучный режим."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Удаление приложения <xliff:g id="APP">%s</xliff:g> из списка."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Приложение \"<xliff:g id="APP">%s</xliff:g>\" удалено из списка."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Запуск приложения <xliff:g id="APP">%s</xliff:g>."</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Поиск"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Проведите вверх, чтобы <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Проведите влево, чтобы <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Режим \"Не беспокоить\" (звук будильника отключен)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Режим \"Не беспокоить\": будильник отключен"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Не беспокоить"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Только приоритетные оповещения"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Следующий будильник: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Начать"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Нет уведомлений"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Устройство может контролироваться"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Действия в профиле могут отслеживаться"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Сеть может отслеживаться"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Отслеживание устройств"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Мониторинг профиля"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Отслеживание сетей"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Отключить VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Отключить VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Устройство подключено к сети VPN (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nПоставщик услуг VPN может отслеживать ваши действия в Интернете, включая работу с электронной почтой, приложениями и защищенными веб-сайтами."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Этим устройством управляет организация:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор может отслеживать вашу работу с электронной почтой, приложениями и защищенными веб-сайтами. Обратитесь к нему за дополнительной информацией.\n\nВаши действия в сети также доступны приложению \"<xliff:g id="APPLICATION">%2$s</xliff:g>\", которому вы разрешили подключаться к сети VPN."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Этим устройством управляет организация:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор может отслеживать вашу работу с электронной почтой, приложениями и защищенными веб-сайтами. Обратитесь к нему за дополнительной информацией.\n\nУстройство подключено к сети VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Ваши действия также доступны поставщику услуг VPN."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Этим профилем управляет организация:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор может отслеживать ваши действия в Интернете, включая работу с электронной почтой, приложениями и защищенными веб-сайтами.\n\nЗа дополнительной информацией обращайтесь к администратору."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Устройством управляет организация:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилем управляет организация:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор может отслеживать ваши действия в Интернете, включая работу с электронной почтой, приложениями и защищенными веб-сайтами.\n\nЗа дополнительной информацией обращайтесь к администратору."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Этим профилем управляет организация:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор может отслеживать ваши действия в Интернете, включая работу с эл. почтой, приложениями и защищенными веб-сайтами. Обратитесь к нему за дополнительной информацией.\n\nВы разрешили приложению \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" подключаться к VPN, и ему также доступны эти сведения."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Этим профилем управляет организация:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор может отслеживать ваши действия в Сети, включая работу с эл. почтой, приложениями и защищенными веб-сайтами Обратитесь к нему за дополнительной информацией.\n\nУстройство подключено к сети VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Поставщику услуг VPN также видны ваши действия в Сети."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Устройством управляет организация:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилем управляет организация:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор может отслеживать вашу работу с эл. почтой, приложениями и защищенными веб-сайтами. Обратитесь к нему за дополнительной информацией.\n\nВы разрешили приложению \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" подключаться к VPN, и ему также доступны эти сведения."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Устройством управляет организация:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилем управляет организация:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор может отслеживать вашу работу с почтой, приложениями и защищенными веб-сайтами. Обратитесь к нему за дополнительной информацией.\n\nУстройство подключено к сети VPN (<xliff:g id="APPLICATION">%3$s</xliff:g>). Поставщику услуг VPN видны ваши действия в Сети."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Закрыть"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Настроить"</string>
     <string name="muted_by" msgid="6147073845094180001">"Звук отключен приложением \"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>\""</string>
 </resources>
diff --git a/packages/SystemUI/res/values-si-rLK/strings.xml b/packages/SystemUI/res/values-si-rLK/strings.xml
index 8b8dbd4..321ecb9 100644
--- a/packages/SystemUI/res/values-si-rLK/strings.xml
+++ b/packages/SystemUI/res/values-si-rLK/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"සොයන්න"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"කැමරාව"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"දුරකථනය"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"අඟුල අරින්න"</string>
     <string name="unlock_label" msgid="8779712358041029439">"අඟුල අරින්න"</string>
     <string name="phone_label" msgid="2320074140205331708">"දුරකථනය විවෘත කරන්න"</string>
     <string name="camera_label" msgid="7261107956054836961">"කැමරාව විවෘත කරන්න"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ආදාන ක්‍රමය මාරු කිරීමේ බොත්තම."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ගැළපෙන විශාලන බොත්තම."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"විශාල තිරය වෙත කුඩාව විශාලනය කරන්න."</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"තීරු දෙකයි."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"තීරු තුනයි."</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_connected" msgid="8366256693719499665">"සම්බන්ධිතයි."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"සම්බන්ධ වෙමින්."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -160,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter ක්‍රියාත්මකයි."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"හඬ නඟනය කම්පනය වේ."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"හඬ නඟනය නිශ්ශබ්දයි."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ඉවතලන්න."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> අස් කර ඇත."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> ආරම්භ කරමින්."</string>
@@ -289,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"සෙවීම"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> සඳහා උඩට සර්පණය කරන්න."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> සඳහා වමට සර්පණය කරන්න."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"සීනු ඇතුළුව, අතුරු බිඳීම් නැත"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"අතුරු බිඳීම් නැත. අඩුම තරමේ අනතුරු ඇඟවීමක්වත් නැත."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"අතුරු බිදුම් නැත"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ප්‍රමුඛ අතුරු බිඳීම් පමණයි"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"ඔබගේ ඊළඟ සීනුව <xliff:g id="ALARM_TIME">%s</xliff:g> තිබේ"</string>
@@ -306,7 +303,7 @@
     <string name="interruption_level_priority" msgid="6517366750688942030">"ප්‍රමුඛතාව"</string>
     <string name="interruption_level_all" msgid="1330581184930945764">"සියලු"</string>
     <string name="keyguard_indication_charging_time" msgid="1757251776872835768">"ආරෝපණය වෙමින් (සම්පුර්ණ වන තෙක් <xliff:g id="CHARGING_TIME_LEFT">%s</xliff:g>)"</string>
-    <string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"පරිශීලක මං මාරුව"</string>
+    <string name="accessibility_multi_user_switch_switcher" msgid="7305948938141024937">"පරිශීලක මාරුව"</string>
     <string name="accessibility_multi_user_switch_quick_contact" msgid="3020367729287990475">"පැතිකඩ පෙන්වන්න"</string>
     <string name="user_add_user" msgid="5110251524486079492">"පරිශීලකයෙක් එක් කරන්න"</string>
     <string name="user_new_user_name" msgid="426540612051178753">"නව පරිශීලකයා"</string>
@@ -339,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"දැන් අරඹන්න"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"දැනුම්දීම් නැත"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"ඇතැම් විට උපාංගය නිරීක්ෂණය විය හැක"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ඇතැම් විට පැතිකඩ නිරීක්ෂණය කරන ලදි"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"ඇතැම් විට ජාලය නිරීක්ෂණය විය හැක"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"උපාංගය නිරීක්ෂණය"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"පැතිකඩ නිරීක්ෂණය කිරීම"</string>
     <string name="monitoring_title" msgid="169206259253048106">"ජාල නිරීක්ෂණය"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN අබල කරන්න."</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN විසන්ධි කරන්න"</string>
@@ -349,7 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") වෙත ඔබ සම්බන්ධ වී තිබේ.\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ VPN සේවාවේ සපයන්නාට ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කළ හැක."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"මෙම උපාංගය පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ ජාලයේ ක්‍රියාකාරකම් නිරීක්ෂණය කිරීමට ඔබගේ පාලකයාට හැකියාව තිබේ. වැඩිපුර තොරතුරු සඳහා ඔබගේ පාලකයා සම්බන්ධ කර ගන්න.\n\nතවද, VPN සම්බන්ධතාව සකස් කරගැනීමට \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" අවසර ඔබ දෙන ලදි. මෙම යෙදුම ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කරයි."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"මෙම උපාංගය පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ ජාලයේ ක්‍රියාකාරකම් නිරීක්ෂණය කිරීමට ඔබගේ පාලකයාට හැකියාව තිබේ. වැඩිපුර තොරතුරු සඳහා ඔබගේ පාලකයා සම්බන්ධ කර ගන්න.\n\nතවද, VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") වෙත ඔබ සම්බන්ධ වී තිබේ. තවද ඔබගේ VPN සේවාවේ සපයන්නාට ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කළ හැක."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"මෙම පැතිකඩ කළමනාකරණය කරනු ලබන්නේ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nඊ-මේල්, යෙදුම්, සහ ආරක්ෂාකාරී වෙබ් අඩවි ඇතුළු, ඔබගේ ජාල ක්‍රියාකාරකම නිරීක්ෂණය කිරීමට ඔබගේ පරිපාලකට හැක.\n\nවැඩිදුර විස්තර සඳහා, ඔබගේ පරිපාලක අමතන්න."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"මෙම උපාංගය කළමනාකරණය කරනු ලබන්නේ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nමෙම පැතිකඩ කළමනාකරණය කරනු ලබන්නේ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nඊ-මේල්, යෙදුම්, සහ ආරක්ෂාකාරී වෙබ් අඩවි ඇතුළු, ඔබගේ ජාල ක්‍රියාකාරකම නිරීක්ෂණය කිරීමට ඔබගේ පරිපාලකට හැක.\n\nවැඩිදුර විස්තර සඳහා, ඔබගේ පරිපාලක අමතන්න."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"මෙම පැතිකඩ පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ ජාලයේ ක්‍රියාකාරකම් නිරීක්ෂණය කිරීමට ඔබගේ පාලකයාට හැකියාව තිබේ. වැඩිපුර තොරතුරු සඳහා ඔබගේ පාලකයා සම්බන්ධ කර ගන්න.\n\nතවද, VPN සම්බන්ධතාව සකස් කරගැනීමට \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" අවසර ඔබ දෙන ලදි. මෙම යෙදුම ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කරයි."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"මෙම පැතිකඩ පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ ජාලයේ ක්‍රියාකාරකම් නිරීක්ෂණය කිරීමට ඔබගේ පාලකයාට හැකියාව තිබේ. වැඩිපුර තොරතුරු සඳහා ඔබගේ පාලකයා සම්බන්ධ කර ගන්න.\n\nතවද, VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") වෙත ඔබ සම්බන්ධ වී තිබේ. තවද ඔබගේ VPN සේවාවේ සපයන්නාට ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කළ හැක."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"මෙම උපාංගය පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nමෙම පැතිකඩ පාලනය කරන්නේ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nඊ-තැපැල්, යෙදුම්, සහ අරක්ෂිත වෙබ් අඩවි ඇතුළුව ඔබගේ ජාලයේ ක්‍රියාකාරකම් නිරීක්ෂණය කිරීමට ඔබගේ පාලකයාට හැකියාව තිබේ. වැඩිපුර තොරතුරු සඳහා ඔබගේ පාලකයා සම්බන්ධ කර ගන්න.\n\nතවද, VPN සම්බන්ධතාව සකස් කරගැනීමට \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" අවසර ඔබ දෙන ලදි. මෙම යෙදුම ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කරයි."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"මෙම උපාංගය කළමනාකරණය කරනු ලබන්නේ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nමෙම පැතිකඩ කළමනාකරණය කරනු ලබන්නේ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nඊ-මේල්, යෙදුම්, සහ ආරක්ෂාකාරී වෙබ් අඩවි ඇතුළු, ඔබගේ ජාල ක්‍රියාකාරකම නිරීක්ෂණය කිරීමට ඔබගේ පරිපාලකට හැක. වැඩිදුර විස්තර සඳහා, ඔබගේ පරිපාලක අමතන්න.\n\nතවද,VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") වෙත ඔබ සම්බන්ධ වී තිබේ. තවද ඔබගේ VPN සේවාවේ සපයන්නාට ජාල ක්‍රියාකාරකම් නිරීක්ෂණය කළ හැක."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"ඔබ අතින් අගුළු අරින තුරු උපකරණය අගුළු වැටි තිබේ"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"දැනුම්දීම් ඉක්මනින් ලබාගන්න"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"ඔබ අඟුළු හැරීමට කලින් ඒවා බලන්න"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"එපා ස්තූතියි"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"සකසන්න"</string>
+    <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> විසින් නිශ්ශබ්ද කරන ලදි"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 86222bc..da1bb4c 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hľadať"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparát"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefón"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Odomknúť"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odomknúť"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvoriť telefón"</string>
     <string name="camera_label" msgid="7261107956054836961">"spustiť fotoaparát"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Zariadenie je zabezpečené."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Zariadenie nie je zabezpečené."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Zariadenie je zabezpečené, funkcia agent dôvery je aktívna."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Zariadenie nie je zabezpečené, funkcia agent dôvery je aktívna."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Prebieha rozpoznávanie tváre, funkcia agent dôvery je aktívna."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Tlačidlo prepnutia metódy vstupu."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Tlačidlo úpravy veľkosti z dôvodu kompatibility."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zväčšiť menší obrázok na väčšiu obrazovku."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dve čiarky."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tri čiarky."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Plný signál."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Zapnuté."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Vypnuté."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Pripojené."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Pripája sa"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Rozhranie TeleTypewriter je povolené."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibračné zvonenie."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tiché zvonenie."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Zrušiť aplikáciu <xliff:g id="APP">%s</xliff:g>"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Aplikácia <xliff:g id="APP">%s</xliff:g> bola zrušená."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Spúšťa sa aplikácia <xliff:g id="APP">%s</xliff:g>"</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Vyhľadávanie"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Prejdite prstom nahor: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Prejdite prstom doľava: <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Žiadne prerušenia vrátane budíkov"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Žiadne prerušenia. Dokonca ani budíky"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Žiadne prerušenia"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Iba prioritné prerušenia"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Ďalší budík: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Spustiť"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Žiadne upozornenia"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Zariadenie môže byť sledované"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil môže byť monitorovaný"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Sieť môže byť sledovaná"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Sledovanie zariadenia"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Monitorovanie profilu"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Sledovanie siete"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Deaktivovať VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Odpojiť sieť VPN"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Ste pripojený/-á k sieti VPN (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nPoskytovateľ služby VPN môže sledovať vaše zariadenie a aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Toto zariadenie spravuje organizácia:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane e-mailov, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste aplikácii <xliff:g id="APPLICATION">%2$s</xliff:g> povolili nastaviť pripojenie VPN. Táto aplikácia môže tiež sledovať vašu aktivitu v sieti."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Toto zariadenie spravuje organizácia:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane e-mailov, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste pripojený/-á aj k sieti VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Poskytovateľ služby VPN môže tiež sledovať vašu aktivitu v sieti."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Tento profil spravuje organizácia:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávca môže sledovať vaše zariadenie a aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok.\n\nĎalšie informácie získate od svojho správcu."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Toto zariadenie spravuje organizácia:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizácia:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nSprávca môže sledovať vaše zariadenie a aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok.\n\nĎalšie informácie získate od svojho správcu."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Tento profil spravuje organizácia:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste aplikácii <xliff:g id="APPLICATION">%2$s</xliff:g> povolili možnosť nastaviť pripojenie VPN. Táto aplikácia tiež môže sledovať vašu aktivitu v sieti."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Tento profil spravuje organizácia:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste pripojený/-á k sieti VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Poskytovateľ služby VPN môže tiež sledovať vašu aktivitu v sieti."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Toto zariadenie spravuje organizácia:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizácia:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste aplikácii <xliff:g id="APPLICATION">%3$s</xliff:g> povolili možnosť nastaviť pripojenie VPN. Táto aplikácia tiež môže sledovať vašu aktivitu v sieti."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Toto zariadenie spravuje organizácia:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVáš profil spravuje organizácia:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nSprávca môže sledovať vašu aktivitu v sieti vrátane správ, aplikácií a zabezpečených webových stránok. Ďalšie informácie získate od svojho správcu.\n\nZároveň ste pripojený/-á k sieti VPN (<xliff:g id="APPLICATION">%3$s</xliff:g>). Poskytovateľ služby VPN môže tiež sledovať vašu aktivitu v sieti."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Zariadenie zostane uzamknuté, dokým ho ručne neodomknete."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Získavať upozornenia rýchlejšie"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Zobraziť pred odomknutím"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nie, vďaka"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Nastaviť"</string>
     <string name="muted_by" msgid="6147073845094180001">"Stlmené aplikáciou <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index bf0162c..5b0442a 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Iskanje"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Fotoaparat"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Odkleni"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odkleni"</string>
     <string name="phone_label" msgid="2320074140205331708">"odpri telefon"</string>
     <string name="camera_label" msgid="7261107956054836961">"odpri fotoaparat"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Naprava zavarovana."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Naprava ni zavarovana."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Naprava zavarovana, posrednik zaupanja aktiven."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Naprava ni zavarovana, posrednik zaupanja aktiven."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Prepoznavanje obraza vklopljeno, posrednik zaupanja aktiven."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Gumb za preklop načina vnosa."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Gumb povečave za združljivost."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Povečava manjšega na večji zaslon."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dve črtici."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tri črtice."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Poln signal."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Vklopljen."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Izklopljen."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Povezan."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Povezovanje."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter omogočen."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Zvonjenje z vibriranjem."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Zvonjenje izklopljeno."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Opusti aplikacijo <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Program <xliff:g id="APP">%s</xliff:g> je bil odstranjen."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Zaganjanje aplikacije <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Iskanje"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Povlecite navzgor za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Povlecite v levo za <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Brez prekinitev, vključno z alarmi"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Brez motenj. Celo brez alarmov."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Brez prekinitev"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Samo prednostne prekinitve"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Vaš naslednji alarm je ob <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Začni zdaj"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Ni obvestil"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Naprava je morda nadzorovana"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil je morda nadziran"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Omrežje je lahko nadzorovano"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Nadzor naprave"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Nadzor nad profilom"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Nadzor omrežja"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Onemogoči VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Prekini povezavo z VPN-jem"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Povezani ste v omrežje VPN (»<xliff:g id="APPLICATION">%1$s</xliff:g>«).\n\nPonudnik omrežja VPN lahko nadzira vašo napravo in dejavnost v omrežju, vključno z e-pošto, aplikacijami in varnimi spletnimi mesti."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"To napravo upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSkrbnik lahko nadzira vašo dejavnost v omrežju, vključno z e-pošto, aplikacijami in varnimi spletnimi mesti. Če želite več informacij, se obrnite na skrbnika.\n\nPoleg tega ste aplikaciji »<xliff:g id="APPLICATION">%2$s</xliff:g>« dovolili vzpostavitev povezave z omrežjem VPN. Vašo dejavnost v omrežju lahko nadzoruje tudi ta aplikacija."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"To napravo upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nSkrbnik lahko nadzira vašo dejavnost v omrežju, vključno z e-pošto, aplikacijami in varnimi spletnimi mesti. Če želite več informacij, se obrnite na skrbnika.\n\nPoleg tega ste povezani v omrežje VPN (»<xliff:g id="APPLICATION">%2$s</xliff:g>«). Vašo dejavnost v omrežju lahko nadzira tudi ponudnik omrežja VPN."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Ta profil upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo napravo in omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti.\n\nZa več informacij se obrnite na skrbnika."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"To napravo upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVaš profil upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo napravo in omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti.\n\nZa več informacij se obrnite na skrbnika."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Ta profil upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti. Za več informacij se obrnite na skrbnika.\n\nAplikaciji »<xliff:g id="APPLICATION">%2$s</xliff:g>« ste dovolili vzpostavitev povezave VPN. Tudi ta aplikacija lahko nadzira omrežno dejavnost."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Ta profil upravlja:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti. Za več informacij se obrnite na skrbnika.\n\nPovezani ste tudi v VPN (»<xliff:g id="APPLICATION">%2$s</xliff:g>«). Tudi ponudnik storitve VPN lahko nadzira omrežno dejavnost."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"To napravo upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVaš profil upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti. Za več informacij se obrnite na skrbnika.\n\n. Aplikaciji »<xliff:g id="APPLICATION">%3$s</xliff:g>« ste dovolili vzpostavitev povezave VPN. Tudi ta aplikacija lahko nadzira omrežno dejavnost."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"To napravo upravlja:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nVaš profil upravlja:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nVaš skrbnik lahko nadzira vašo omrežno dejavnost, vključno z e-poštnimi sporočili, aplikacijami in varnimi spletnimi mesti. Za več informacij se obrnite na skrbnika.\n\nPovezani ste tudi v VPN (»<xliff:g id="APPLICATION">%3$s</xliff:g>«). Tudi ponudnik storitve VPN lahko nadzira omrežno dejavnost."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Naprava bo ostala zaklenjena, dokler je ročno ne odklenete."</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Hitrejše prejemanje obvestil"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Oglejte si jih pred odklepanjem"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ne, hvala"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Nastavitev"</string>
     <string name="muted_by" msgid="6147073845094180001">"Izklop zvoka: <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 780bb42..4552926 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Претражите"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Телефон"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Откључајте"</string>
     <string name="unlock_label" msgid="8779712358041029439">"откључај"</string>
     <string name="phone_label" msgid="2320074140205331708">"отвори телефон"</string>
     <string name="camera_label" msgid="7261107956054836961">"отвори камеру"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Уређај је заштићен."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Уређај није заштићен."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Уређај је заштићен, поуздани агент је активан."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Уређај није заштићен, поуздани агент је активан."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Покренуто је препознавање лица, поуздани агент је активан."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Дугме Промени метод уноса."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Дугме Зум компатибилности."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Зумирање са мањег на већи екран."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Две црте."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Три црте."</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_connected" msgid="8366256693719499665">"Повезано је."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Повезивање."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter је омогућен."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Вибрација звона."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Нечујно звоно."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Одбаците <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Апликација <xliff:g id="APP">%s</xliff:g> је одбачена."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Покрећемо <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Претрага"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Превуците нагоре за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Превуците улево за <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Без прекида, укључујући аларме"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Нема прекида. Чак ни аларма."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Без прекида"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Само приоритетни прекиди"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Следећи аларм је у <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Започни одмах"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Нема обавештења"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Уређај се можда надгледа"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профил се можда надгледа"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Мрежа се можда надгледа"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Надгледање уређаја"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Надгледање профила"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Надгледање мреже"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Онемогући VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Прекини везу са VPN-ом"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Повезани сте са VPN-ом („<xliff:g id="APPLICATION">%1$s</xliff:g>“).\n\nДобављач VPN услуге може да надгледа уређај и мрежне активности, укључујући имејлове, апликације и безбедне веб-сајтове."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Овим уређајем управља:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор може да надгледа мрежне активности, укључујући имејлове, апликације и безбедне веб-сајтове. Више информација потражите од администратора.\n\nДали сте и дозволу апликацији <xliff:g id="APPLICATION">%2$s</xliff:g> да подешава VPN везу. И та апликација може да надгледа мрежне активности."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Овим уређајем управља:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор може да надгледа мрежне активности, укључујући имејлове, апликације и безбедне веб-сајтове. Више информација потражите од администратора.\n\nПовезани сте и са VPN-ом („<xliff:g id="APPLICATION">%2$s</xliff:g>“). И добављач VPN услуге може да надгледа мрежне активности."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Овим профилом управља:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор може да надгледа уређај и мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове.\n\nЗа више информација контактирајте администратора."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Овим уређајем управља:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилом управља:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор може да надгледа уређај и мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове.\n\nЗа више информација контактирајте администратора."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Овим профилом управља:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор може да надгледа мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове. За више информација контактирајте администратора.\n\nТакође сте дали дозволу да „<xliff:g id="APPLICATION">%2$s</xliff:g>“ подеси VPN везу. Ова апликација такође може да надгледа мрежну активност."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Овим профилом управља:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдминистратор може да надгледа мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове. За више информација контактирајте администратора.\n\nТакође, повезани сте на VPN („<xliff:g id="APPLICATION">%2$s</xliff:g>“). Добављач услуге за VPN такође може да надгледа мрежну активност."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Овим уређајем управља:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилом управља:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор може да надгледа мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове. За више информација контактирајте администратора.\n\nТакође сте дали дозволу да „<xliff:g id="APPLICATION">%3$s</xliff:g>“ подеси VPN везу. Ова апликација такође може да надгледа мрежну активност."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Овим уређајем управља:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профилом управља:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдминистратор може да надгледа мрежну активност, укључујући имејлове, апликације и безбедне веб-сајтове. За више информација контактирајте администратора.\n\nТакође, повезани сте на VPN („<xliff:g id="APPLICATION">%3$s</xliff:g>“). Добављач услуге за VPN такође може да надгледа мрежну активност."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Не, хвала"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Подеси"</string>
     <string name="muted_by" msgid="6147073845094180001">"Звук је искључио/ла <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 5494edc..f99c4ef 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Sök"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Mobil"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås upp"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås upp"</string>
     <string name="phone_label" msgid="2320074140205331708">"öppna mobilen"</string>
     <string name="camera_label" msgid="7261107956054836961">"öppna kameran"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Enheten är skyddad."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Enheten är inte skyddad."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Enheten är skyddad, den betrodda agenten är aktiv."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Enheten är inte skyddad, den betrodda agenten är aktiv."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Ansiktsigenkänning körs, den betrodda agenten är aktiv."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Knapp för byte av inmatningsmetod."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Knapp för kompatibilitetszoom."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Zooma mindre skärm till större."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Två staplar."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tre staplar."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Full signalstyrka."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Aktiverad."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Inaktiverad."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Ansluten."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Ansluter."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter aktiverad."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibrerande ringsignal."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Tyst ringsignal."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ta bort <xliff:g id="APP">%s</xliff:g> från listan."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> togs bort permanent."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Startar <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Sök"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Dra uppåt för <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Dra åt vänster för <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Inga avbrott, inklusive alarm"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Inga avbrott. Inte ens alarm."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Inga avbrott"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Endast prioriterade avbrott"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Nästa alarm är kl. <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Starta nu"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Inga aviseringar"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Enheten kan övervakas"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Det kan hända att profilen övervakas"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Nätverket kan vara övervakat"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Enhetsövervakning"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilövervakning"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Nätverksövervakning"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Inaktivera VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Koppla från VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Du är ansluten till ett VPN (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nVPN-tjänsteleverantören kan övervaka enheten och din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Den här enheten administreras av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administratör kan övervaka din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser. Kontakta din administratör för mer information.\n\nDu har också gett <xliff:g id="APPLICATION">%2$s</xliff:g> tillåtelse att skapa en VPN-anslutning. Även den här appen kan övervaka nätverksaktivitet."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Den här enheten administreras av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administratör kan övervaka din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser. Kontakta din administratör för mer information.\n\nDu är även ansluten till VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Även din VPN-tjänsteleverantör kan övervaka nätverksaktiviteten."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Den här profilen hanteras av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratören kan övervaka enheten och din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser.\n\nKontakta administratören för mer information."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Den här enheten hanteras av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil hanteras av:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratören kan övervaka enheten och nätverksaktiviteten, inklusive e-post, appar och säkra webbplatser.\n\nKontakta administratören för mer information."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Den här profilen hanteras av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administratör kan övervaka din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser. Kontakta din administratör för mer information.\n\nDu har också gett <xliff:g id="APPLICATION">%2$s</xliff:g> tillåtelse att konfigurera en VPN-anslutning. Även den här appen kan övervaka nätverksaktivitet."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Den här profilen hanteras av:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nDin administratör kan övervaka din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser. Kontakta din administratör för mer information.\n\nDu är även ansluten till VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Även din VPN-tjänsteleverantör kan övervaka nätverksaktiviteten."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Den här enheten hanteras av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil hanteras av:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratören kan övervaka din nätverksaktivitet, inklusive e-post, appar och säkra webbplatser. Kontakta administratören för mer information.\n\nDu har också gett <xliff:g id="APPLICATION">%3$s</xliff:g> tillåtelse att konfigurera en VPN-anslutning. Även den här appen kan övervaka nätverksaktivitet."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Den här enheten hanteras av:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nDin profil hanteras av:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratören kan övervaka din nätverksaktivitet, till exempel e-post, appar och säkra webbplatser. Kontakta administratören för mer information.\n\nDu är även ansluten till VPN (<xliff:g id="APPLICATION">%3$s</xliff:g>). Även din VPN-tjänsteleverantör kan övervaka nätverksaktiviteten."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Enheten förblir låst tills du låser upp den manuellt"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Få aviseringar snabbare"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Visa dem innan du låser upp"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Nej tack"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Konfig."</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> har stängt av ljudet"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 3f44b63..c0b1b12 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -82,14 +82,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Tafuta"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Simu"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Fungua"</string>
     <string name="unlock_label" msgid="8779712358041029439">"fungua"</string>
     <string name="phone_label" msgid="2320074140205331708">"fungua simu"</string>
     <string name="camera_label" msgid="7261107956054836961">"fungua kamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Kifaa kimewekewa ulinzi."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Kifaa hakijawekewa ulinzi."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Kifaa kimewekewa ulinzi, kipengele cha kutathmini hali ya kuaminika kimewashwa."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Kifaa hakijawekewa ulinzi, kipengele cha kutathmini hali ya kuaminika kimewashwa."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Utambuzi wa uso unaendeshwa, kipengele cha kutathmini hali ya kuaminika kimewashwa."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Swichi kitufe cha mbinu ingizi."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kichupo cha kukuza kwa utangamanifu"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kuza kidogo kwa skrini kubwa."</string>
@@ -130,6 +126,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Vipima mtandao mbili."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Vipima mtandao vitatu."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Nguvu kamili ya mtandao."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Imewashwa."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Imezimwa."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Imeunganishwa."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Inaunganisha."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -153,6 +153,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Kichapishaji cha Tele kimewezeshwa."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Mtetemo wa mlio"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Mlio wa simu uko kimya."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Ondoa <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> imeondolewa."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Inaanzisha <xliff:g id="APP">%s</xliff:g>."</string>
@@ -282,7 +284,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Tafuta"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Sogeza juu kwa <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Sogeza kushoto kwa <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> ."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Hakuna kukatizwa, hata kutoka kwenye kengele"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Hamna usumbufu. Hata wa kengele."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Hakuna katizo"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Katizo za kipaumbele pekee"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Kengele yako inayofuata itakuwa saa <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -332,8 +334,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Anza sasa"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Hakuna arifa"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Huenda kifaa kinafuatiliwa"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Huenda wasifu ukafuatiliwa"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Huenda mtandao unafuatiliwa"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Ufuatiliaji wa kifaa"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Ufuatiliaji wasifu"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Ufuatiliaji wa mtandao"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Zima VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Ondoa VPN"</string>
@@ -342,6 +346,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Umeunganishwa kwenye VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nMtoa huduma wako wa VPN anaweza kufuatilia kifaa na shughuli za kifaa na mtandao wako, ikiwa ni pamoja na barua pepe, programu na tovuti salama."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMsimamizi anaweza kufuatilia shughuli za mtandao wako ikiwa ni pamoja na barua pepe, programu na tovuti salama. Kwa maelezo zaidi, wasiliana na msimamizi wako.\n\nPia, umeruhusu \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" isanidi muunganisho wa VPN. Programu hii pia inaweza kufuatilia shughuli za mtandao wako."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMsimamizi anaweza kufuatilia shughuli za mtandao wako ikiwa ni pamoja na barua pepe, programu na tovuti salama. Kwa maelezo zaidi, wasiliana na msimamizi wako.\n\nPia, umeunganishwa kwenye VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Mtoa huduma wako wa VPN pia anaweza kufuatilia shughuli za mtandao."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Wasifu huu unasimamiwa na:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia kifaa chako na shughuli kwenye mtandao, ikiwa ni pamoja na barua pepe na tovuti salama.\n\nKwa maelezo zaidi, wasiliana na msimamizi wako."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nWasifu wako unasimamiwa na:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia kifaa chako na shughuli kwenye mtandao, ikiwa ni pamoja na barua pepe na tovuti salama.\n\nKwa maelezo zaidi, wasiliana na msimamizi wako."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Wasifu huu unasimamiwa na:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia shughuli zako kwenye mtandao, ikiwa ni pamoja na barua pepe, programu na na tovuti salama. Kwa maelezo zaidi, wasiliana na msimamizi wako.\n\nPia, uliruhusu \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" isanidi muunganisho wa VPN. Programu hii pia inaweza kufuatilia shughuli kwenye mtandao."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia shughuli zako kwenye mtandao ikiwa ni pamoja na barua pepe, programu na tovuti salama. Kwa maelezo zaidi, wasiliana na msimamizi wako.\n\nPia, umeunganishwa kwenye VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Mtoa huduma wako wa VPN pia anaweza kufuatilia shughuli kwenye mtandao."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nWasifu wako unasimamiwa na:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia shughuli zako kwenye mtandao, ikiwa ni pamoja na barua pepe, programu na na tovuti salama\n\nPia, uliruhusu \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" isanidi muunganisho wa VPN. Programu hii pia inaweza kufuatilia shughuli kwenye mtandao."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Kifaa hiki kinasimamiwa na:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nWasifu wako unasimamiwa na:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nMsimamizi wako anaweza kufuatilia shughuli zako kwenye mtandao, ikiwa ni pamoja na barua pepe, programu na tovuti salama. Kwa maelezo zaidi, wasiliana na msimamizi wako.\n\nPia, umeunganishwa kwenye VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Mtoa huduma wako wa VPN pia anaweza kufuatilia shughuli kwenye mtandao."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Kifaa kitaendelea kuwa katika hali ya kufungwa hadi utakapokifungua mwenyewe"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Pata arifa kwa haraka"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Zitazame kabla hujafungua"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"La, asante"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Sanidi"</string>
     <string name="muted_by" msgid="6147073845094180001">"Sauti imezimwa na <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-sw600dp/config.xml b/packages/SystemUI/res/values-sw600dp/config.xml
index 4f6d209..83477c0 100644
--- a/packages/SystemUI/res/values-sw600dp/config.xml
+++ b/packages/SystemUI/res/values-sw600dp/config.xml
@@ -32,4 +32,9 @@
 
     <!-- Set to true to enable the user switcher on the keyguard. -->
     <bool name="config_keyguardUserSwitcher">true</bool>
+
+    <!-- Transposes the search bar layout in landscape. -->
+    <bool name="recents_has_transposed_search_bar">true</bool>
+    <!-- Transposes the nav bar in landscape (only used for purposes of layout). -->
+    <bool name="recents_has_transposed_nav_bar">false</bool>
 </resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 9901e44..d3b5580 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -46,6 +46,9 @@
     <!-- The side padding for the task stack as a percentage of the width. -->
     <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.075</item>
 
+    <!-- The height of the search bar space. -->
+    <dimen name="recents_search_bar_space_height">72dp</dimen>
+
     <!-- The fraction of the screen height where the clock on the Keyguard has its center. The
          max value is used when no notifications are displaying, and the min value is when the
          highest possible number of notifications are showing. -->
@@ -81,4 +84,7 @@
     <dimen name="edge_tap_area_width">80dp</dimen>
 
     <dimen name="keyguard_indication_margin_bottom">90dp</dimen>
+
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values-sw720dp/config.xml b/packages/SystemUI/res/values-sw720dp/config.xml
index fbc0d1d..fbeadcd 100644
--- a/packages/SystemUI/res/values-sw720dp/config.xml
+++ b/packages/SystemUI/res/values-sw720dp/config.xml
@@ -40,7 +40,9 @@
          card. -->
     <integer name="keyguard_max_notification_count">5</integer>
 
-    <!-- Transposes the recents layout in landscape. -->
-    <bool name="recents_transpose_layout_with_orientation">false</bool>
+    <!-- Transposes the search bar layout in landscape. -->
+    <bool name="recents_has_transposed_search_bar">false</bool>
+    <!-- Transposes the nav bar in landscape (only used for purposes of layout). -->
+    <bool name="recents_has_transposed_nav_bar">false</bool>
 </resources>
 
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta-rIN/strings.xml
index 7762f34..52700cc 100644
--- a/packages/SystemUI/res/values-ta-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ta-rIN/strings.xml
@@ -83,15 +83,11 @@
     <string name="accessibility_recent" msgid="1606470783629913980">"சமீபத்திய திரைகள்"</string>
     <string name="accessibility_search_light" msgid="1103867596330271848">"தேடு"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"கேமரா"</string>
-    <string name="accessibility_phone_button" msgid="6738112589538563574">"மொபைல்"</string>
+    <string name="accessibility_phone_button" msgid="6738112589538563574">"ஃபோன்"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"திற"</string>
     <string name="unlock_label" msgid="8779712358041029439">"திற"</string>
     <string name="phone_label" msgid="2320074140205331708">"ஃபோனைத் திற"</string>
     <string name="camera_label" msgid="7261107956054836961">"கேமராவைத் திற"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"சாதனம் பாதுகாப்பாக உள்ளது."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"சாதனம் பாதுகாப்பாக இல்லை."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"சாதனம் பாதுகாப்பாக உள்ளது, நம்பகமான ஏஜென்ட் இயக்கத்தில் உள்ளது."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"சாதனம் பாதுகாப்பாக இல்லை, நம்பகமான ஏஜென்ட் இயக்கத்தில் உள்ளது."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"முகம் கண்டறிதல் இயங்குகிறது, நம்பகமான ஏஜென்ட் இயக்கத்தில் உள்ளது."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"உள்ளீட்டு முறையை மாற்றும் பொத்தான்."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"பொருந்துமாறு அளவை மாற்றும் பொத்தான்."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"சிறியதிலிருந்து பெரிய திரைக்கு அளவை மாற்றும்."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"இரண்டு கோடுகள்."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"மூன்று கோடுகள்."</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_connected" msgid="8366256693719499665">"இணைக்கப்பட்டது."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"இணைக்கிறது."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -143,7 +143,7 @@
     <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"ரோமிங்"</string>
     <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
     <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"வைஃபை"</string>
-    <string name="accessibility_no_sim" msgid="8274017118472455155">"SIM இல்லை."</string>
+    <string name="accessibility_no_sim" msgid="8274017118472455155">"சிம் இல்லை."</string>
     <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"புளூடூத் இணைப்பு முறை."</string>
     <string name="accessibility_airplane_mode" msgid="834748999790763092">"விமானப் பயன்முறை."</string>
     <string name="accessibility_battery_level" msgid="7451474187113371965">"பேட்டரி சக்தி <xliff:g id="NUMBER">%d</xliff:g> சதவிகிதம் உள்ளது."</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter இயக்கப்பட்டது."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"ரிங்கர் அதிர்வு."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"ரிங்கர் நிசப்தம்."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> ஐ நிராகரி."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> விலக்கப்பட்டது."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> ஐத் தொடங்குகிறது."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"தேடு"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> க்கு மேலாக இழுக்கவும்."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> க்கு இடதுபக்கமாக இழுக்கவும்."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"அலாரம் உட்பட குறுக்கீடுகள் வேண்டாம்"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"குறுக்கீடுகளும் இல்லை. அலாரங்களும் இல்லை."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"குறுக்கீடுகள் இல்லை"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"முதன்மையான குறுக்கீடுகள் மட்டும்"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"அடுத்த அலாரம் - <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"இப்போது தொடங்கு"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"அறிவிப்புகள் இல்லை"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"சாதனம் கண்காணிக்கப்படலாம்"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"சுயவிவரம் கண்காணிக்கப்படலாம்"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"நெட்வொர்க் கண்காணிக்கப்படலாம்"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"சாதனத்தைக் கண்காணித்தல்"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"சுயவிவரத்தைக் கண்காணித்தல்"</string>
     <string name="monitoring_title" msgid="169206259253048106">"நெட்வொர்க்கைக் கண்காணித்தல்"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPNஐ முடக்கு"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPNஐத் துண்டி"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") உடன் இணைக்கப்பட்டீர்கள்.\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பான இணையதளங்கள் உள்ளிட்ட சாதனம் மற்றும் நெட்வொர்க் செயல்பாட்டை உங்கள் VPN சேவை வழங்குநரால் கண்காணிக்க முடியும்."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"சாதனத்தை நிர்வகிப்பது:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பான இணையதளங்கள் உட்பட நெட்வொர்க் செயல்பாட்டை உங்கள் நிர்வாகியால் கண்காணிக்க முடியும். மேலும் தகவலுக்கு உங்கள் நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும் VPN இணைப்பை அமைக்க, \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"க்கு அனுமதி வழங்கியுள்ளீர்கள். இந்தப் பயன்பாட்டினால் நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"சாதனத்தை நிர்வகிப்பது:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பான இணையதளங்கள் உட்பட நெட்வொர்க் செயல்பாட்டை உங்கள் நிர்வாகியால் கண்காணிக்க முடியும். மேலும் தகவலுக்கு உங்கள் நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும் (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") உடன் இணைக்கப்பட்டீர்கள். VPN சேவை வழங்குநரும் நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"உங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் உங்கள் நிர்வாகியால் கண்காணிக்க முடியும்.\n\nமேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"சாதனத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nஉங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் உங்கள் நிர்வாகியால் கண்காணிக்க முடியும்.\n\nமேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"உங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் கண்காணிக்கும் திறன் உங்கள் நிர்வாகியிடம் உள்ளது. மேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும் VPN இணைப்பிற்காக \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" அனுமதியைக் கொடுத்துள்ளீர்கள். இந்தப் பயன்பாட்டால் நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"உங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் கண்காணிக்கும் திறன் உங்கள் நிர்வாகியிடம் உள்ளது. மேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும், VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") இல் இணைக்கப்பட்டுள்ளீர்கள். உங்கள் VPN சேவை வழங்குநராலும், நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"சாதனத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nஉங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் கண்காணிக்கும் திறன் உங்கள் நிர்வாகியிடம் உள்ளது. மேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும் VPN இணைப்பிற்காக \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" அனுமதியைக் கொடுத்துள்ளீர்கள். இந்தப் பயன்பாட்டால் நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"சாதனத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nஉங்கள் சுயவிவரத்தை நிர்வகிப்பவர்:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nமின்னஞ்சல்கள், பயன்பாடுகள் மற்றும் பாதுகாப்பு இணையதளங்கள் உட்பட உங்கள் சாதனத்தையும், நெட்வொர்க் செயல்பாட்டையும் கண்காணிக்கும் திறன் உங்கள் நிர்வாகியிடம் உள்ளது. மேலும் தகவலுக்கு, நிர்வாகியைத் தொடர்புகொள்ளவும்.\n\nமேலும், VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") இல் இணைக்கப்பட்டுள்ளீர்கள். உங்கள் VPN சேவை வழங்குநராலும், நெட்வொர்க் செயல்பாட்டைக் கண்காணிக்க முடியும்."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"வேண்டாம்"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"அமை"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ஒலியடக்கினார்"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-te-rIN/strings.xml b/packages/SystemUI/res/values-te-rIN/strings.xml
index 0ce5e6a..3740172 100644
--- a/packages/SystemUI/res/values-te-rIN/strings.xml
+++ b/packages/SystemUI/res/values-te-rIN/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"శోధించు"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"కెమెరా"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"ఫోన్"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"అన్‌లాక్ చేయి"</string>
     <string name="unlock_label" msgid="8779712358041029439">"అన్‌లాక్ చేయి"</string>
     <string name="phone_label" msgid="2320074140205331708">"ఫోన్‌ను తెరువు"</string>
     <string name="camera_label" msgid="7261107956054836961">"కెమెరాను తెరువు"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"పరికరం సురక్షితంగా ఉంది."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"పరికరం సురక్షితంగా లేదు."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"పరికరం సురక్షితంగా ఉంది, విశ్వసనీయ ఏజెంట్ సక్రియంగా ఉంది."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"పరికరం సురక్షితంగా లేదు, విశ్వసనీయ ఏజెంట్ సక్రియంగా ఉంది."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"ముఖం గుర్తింపు అమలవుతోంది, విశ్వసనీయ ఏజెంట్ సక్రియంగా ఉంది."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ఇన్‌పుట్ పద్ధతి మార్చే బటన్."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"అనుకూలత జూమ్ బటన్."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"చిన్న స్క్రీన్ నుండి పెద్దదానికి జూమ్ చేయండి."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"రెండు బార్‌లు కలిగి ఉంది."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"మూడు బార్‌లు కలిగి ఉంది."</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_connected" msgid="8366256693719499665">"కనెక్ట్ చేయబడింది."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"కనెక్ట్ అవుతోంది."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"టెలిటైప్‌రైటర్ ప్రారంభించబడింది."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"రింగర్ వైబ్రేట్‌లో ఉంది."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"రింగర్ నిశ్శబ్దంలో ఉంది."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g>ని తీసివేయండి."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> తీసివేయబడింది."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g>ని ప్రారంభిస్తోంది."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"శోధించండి"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> కోసం పైకి స్లైడ్ చేయండి."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> కోసం ఎడమవైపుకు స్లైడ్ చేయండి."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"అలారాలతో సహా ఎటువంటి అంతరాయాలు ఉండవు"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"అంతరాయాలు లేవు. అలారాలు కూడా లేవు."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"అంతరాయాలు లేకుండా"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"ప్రాధాన్య అంతరాయాలు మాత్రమే"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"మీ తదుపరి అలారం <xliff:g id="ALARM_TIME">%s</xliff:g>కి ఉంది"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ఇప్పుడే ప్రారంభించు"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"నోటిఫికేషన్‌లు లేవు"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"పరికరం పర్యవేక్షించబడవచ్చు"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"ప్రొఫైల్‌ని పర్యవేక్షించవచ్చు"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"నెట్‌వర్క్ పర్యవేక్షించబడవచ్చు"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"పరికర పర్యవేక్షణ"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"ప్రొఫైల్ పర్యవేక్షణ"</string>
     <string name="monitoring_title" msgid="169206259253048106">"నెట్‌వర్క్ పర్యవేక్షణ"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPNని నిలిపివేయి"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPNను డిస్‌కనెక్ట్ చేయి"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"మీరు VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\")కి కనెక్ట్ చేయబడ్డారు.\n\nమీ VPN సేవా ప్రదాత ఇమెయిల్‌లు, అనువర్తనాలు మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ పరికరాన్ని మరియు నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"ఈ పరికరం దీని నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nమీ నిర్వాహకుడు ఇమెయిల్‌లు, అనువర్తనాలు మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు. మరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి.\n\nఅలాగే, మీరు VPN కనెక్షన్‌ను సెటప్ చేయడానికి \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"ని అనుమతించారు. కనుక ఈ అనువర్తనం కూడా నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలదు."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"ఈ పరికరం దీని నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nమీ నిర్వాహకుడు ఇమెయిల్‌లు, అనువర్తనాలు మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు. మరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి.\n\nఅలాగే, మీరు VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\")కి కనెక్ట్ చేయబడ్డారు. కనుక మీ VPN సేవా ప్రదాత కూడా నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"ఈ ప్రొఫైల్ వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nమీ నిర్వాహకుడు ఇమెయిల్‌లు, అనువర్తనాలు మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ పరికరం మరియు నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు.\n\nమరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"ఈ పరికరం వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nమీ ప్రొఫైల్ వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nమీ నిర్వాహకుడు ఇమెయిల్‌లు, అనువర్తనాలు మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ పరికరం మరియు నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు.\n\nమరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"ఈ ప్రొఫైల్ వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nమీ నిర్వాహ. ఇమెయి., అనువ. మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ నెట్‌వ. కార్యాచరణను పర్యవేక్షించగలరు. మరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి.\n\nఅలాగే, మీరు VPN కనెక్షన్‌ని సెటప్ చేయడానికి \"<xliff:g id="APPLICATION">%2$s</xliff:g>\"కి అనుమతి ఇచ్చారు. కాబట్టి, ఈ అనువ. కూడా నెట్‌. కార్యా. పర్యవేక్షించగలదు."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"ఈ ప్రొఫైల్ వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nమీ నిర్వా. ఇమెయి., అనువ. మరియు సురక్షిత వెబ్‌సైట్‌లతో సహా మీ నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు. మరింత సమాచారం కోసం, మీ నిర్వాహకుడిని సంప్రదించండి.\n\nఅలాగే, మీరు VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\")కి కనెక్ట్ చేయబడ్డారు. కాబట్టి, మీ VPN సేవ ప్రదాత కూడా నెట్‌వర్క్ కార్యాచరణను పర్యవేక్షించగలరు."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"ఈ పరి. వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nమీ ప్రొఫైల్ వీరి నిర్వ. ఉంది:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nమీ నిర్వాహ. ఇమెయి., అనువ. మరియు సురక్షిత వెబ్‌సై. సహా మీ నెట్‌. కార్యా. పర్యవేక్షించగలరు. మరింత సమా. కోసం, మీ నిర్వాహ. సంప్ర..\n\nఅలాగే, మీరు VPN కనెక్షన్ సెటప్ చేయడా. \"<xliff:g id="APPLICATION">%3$s</xliff:g>\"కి అనుమతి ఇచ్చారు. కాబట్టి, ఈ అనువ. కూడా నెట్‌వర్క్ కార్యా. పర్యవేక్షించగలదు."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"ఈ పరి. వీరి నిర్వహణలో ఉంది:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nమీ ప్రొఫైల్ వీరి నిర్వ. ఉంది:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nమీ నిర్వా. ఇమెయి., అనువ. మరియు సురక్షిత వెబ్‌‌సైట్‌లతో సహా మీ నెట్‌వ. కార్యా. పర్యవేక్షించగలరు. మరింత సమా. కోసం, మీ నిర్వాహ. సంప్రదించండి.\n\nఅలాగే, మీరు VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\")కి కనెక్ట్ చేయబ.. కాబట్టి, మీ VPN సేవ ప్రదాత కూడా నెట్‌వర్క్ కార్యా. పర్యవేక్షించగలరు."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"వద్దు, ధన్యవాదాలు"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"సెటప్ చేయి"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ద్వారా మ్యూట్ చేయబడింది"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index cba6fd6..59579bc 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"ค้นหา"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"กล้องถ่ายรูป"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"โทรศัพท์"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"ปลดล็อก"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ปลดล็อก"</string>
     <string name="phone_label" msgid="2320074140205331708">"เปิดโทรศัพท์"</string>
     <string name="camera_label" msgid="7261107956054836961">"เปิดกล้อง"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"อุปกรณ์ปลอดภัยแล้ว"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"อุปกรณ์ไม่มีการรักษาความปลอดภัย"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"อุปกรณ์ปลอดภัยแล้ว ใช้งานเอเจนต์ความน่าเชื่อถืออยู่"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"อุปกรณ์ไม่มีการรักษาความปลอดภัย ใช้งานเอเจนต์ความน่าเชื่อถืออยู่"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"กำลังตรวจจับใบหน้า ใช้งานเอเจนต์ความน่าเชื่อถืออยู่"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"ปุ่มสลับวิธีการป้อนข้อมูล"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"ปุ่มซูมที่ใช้งานร่วมกันได้"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"ซูมหน้าจอให้มีขนาดใหญ่ขึ้น"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"สองขีด"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"สามขีด"</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_connected" msgid="8366256693719499665">"เชื่อมต่อแล้ว"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"กำลังเชื่อมต่อ"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"เปิดใช้งาน TeleTypewriter อยู่"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"เสียงเรียกเข้าแบบสั่น"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"เสียงเรียกเข้าแบบปิดเสียง"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"ยกเลิก <xliff:g id="APP">%s</xliff:g>"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ถูกลบไปแล้ว"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"กำลังเริ่มต้น <xliff:g id="APP">%s</xliff:g>"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"ค้นหา"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"เลื่อนขึ้นเพื่อ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"เลื่อนไปทางซ้ายเพื่อ <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"ไม่มีการรบกวนรวมถึงเสียงปลุก"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"ไม่มีการรบกวน แม้แต่นาฬิกาปลุก"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"ไม่มีการรบกวน"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"เฉพาะเรื่องสำคัญเท่านั้น"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"การปลุกครั้งถัดไปของคุณคือเวลา <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -327,15 +329,17 @@
     <string name="battery_saver_notification_text" msgid="820318788126672692">"ลดการใช้แบตเตอรี่และข้อมูลแบ็กกราวด์"</string>
     <string name="battery_saver_notification_action_text" msgid="109158658238110382">"ปิดโหมดประหยัดแบตเตอรี่"</string>
     <string name="battery_level_template" msgid="1609636980292580020">"<xliff:g id="LEVEL">%d</xliff:g>%%"</string>
-    <string name="notification_hidden_text" msgid="1135169301897151909">"เนื้อหาที่ซ่อน"</string>
+    <string name="notification_hidden_text" msgid="1135169301897151909">"เนื้อหาถูกซ่อนไว้"</string>
     <string name="media_projection_dialog_text" msgid="3071431025448218928">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> จะเริ่มจับภาพทุกอย่างที่แสดงบนหน้าจอ"</string>
     <string name="media_projection_remember_text" msgid="3103510882172746752">"ไม่ต้องแสดงข้อความนี้อีก"</string>
     <string name="clear_all_notifications_text" msgid="814192889771462828">"ล้างทั้งหมด"</string>
     <string name="media_projection_action_text" msgid="8470872969457985954">"เริ่มเลย"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"ไม่มีการแจ้งเตือน"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"อาจมีการตรวจสอบอุปกรณ์"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"อาจมีการตรวจสอบโปรไฟล์"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"เครือข่ายอาจได้รับการตรวจสอบ"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"การตรวจสอบอุปกรณ์"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"การตรวจสอบโปรไฟล์"</string>
     <string name="monitoring_title" msgid="169206259253048106">"การตรวจสอบเครือข่าย"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"ปิดใช้ VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"ยกเลิกการเชื่อมต่อ VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"คุณเชื่อมต่อกับ VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") อยู่\n\nผู้ให้บริการ VPN สามารถตรวจสอบอุปกรณ์และกิจกรรมเครือข่าย รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัยได้"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"อุปกรณ์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nผู้ดูแลระบบของคุณสามารถตรวจสอบกิจกรรมในเครือข่ายของคุณได้ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบของคุณ\n\nนอกจากนี้ คุณได้ให้สิทธิ์ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" เพื่อตั้งค่าการเชื่อมต่อ VPN แอปนี้สามารถตรวจสอบกิจกรรมในเครือข่ายได้เช่นกัน"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"อุปกรณ์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nผู้ดูแลระบบของคุณสามารถตรวจสอบกิจกรรมในเครือข่ายของคุณได้ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบของคุณ\n\nนอกจากนี้ คุณเชื่อมต่อกับ VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") ผู้ให้บริการ VPN ของคุณสามารถตรวจสอบกิจกรรมในเครือข่ายของคุณได้เช่นกัน"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"โปรไฟล์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nผู้ดูแลระบบสามารถตรวจสอบอุปกรณ์และกิจกรรมเครือข่ายของคุณ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย\n\nสำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบ"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"อุปกรณ์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nโปรไฟล์ของคุณได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nผู้ดูแลระบบของคุณสามารถตรวจสอบอุปกรณ์และกิจกรรมเครือข่าย รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย\n\nสำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบ"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"โปร์ไฟล์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nผู้ดูแลระบบสามารถตรวจสอบกิจกรรมเครือข่ายของคุณได้ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบของคุณ\n\nนอกจากนี้ คุณได้ให้สิทธิ์ \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" ในการตั้งค่าการเชื่อมต่อ VPN แอปนี้สามารถตรวจสอบกิจกรรมเครือข่ายได้เช่นกัน"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"โปรไฟล์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nผู้ดูแลระบบสามารถตรวจสอบกิจกรรมเครือข่ายของคุณได้ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบของคุณ\n\nคุณยังได้เชื่อมต่อกับ VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") ผู้ให้บริการ VPN สามารถตรวจสอบกิจกรรมเครือข่ายของคุณได้เช่นกัน"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"อุปกรณ์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nโปรไฟล์ของคุณได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nผู้ดูแลระบบสามารถตรวจสอบอุปกรณ์และกิจกรรมเครือข่าย รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบ\n\nคุณยังได้ให้สิทธิ์ \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" ในการตั้งค่าการเชื่อมต่อ VPN แอปนี้จะสามารถตรวจสอบกิจกรรมเครือข่ายได้เช่นกัน"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"อุปกรณ์นี้ได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nโปรไฟล์ของคุณได้รับการจัดการโดย:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nผู้ดูแลระบบสามารถตรวจสอบกิจกรรมเครือข่ายของคุณ รวมถึงอีเมล แอป และเว็บไซต์ที่ปลอดภัย สำหรับข้อมูลเพิ่มเติม โปรดติดต่อผู้ดูแลระบบของคุณ\n\nคุณยังได้เชื่อมต่อกับ VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") ผู้ให้บริการ VPN สามารถตรวจสอบกิจกรรมเครือข่ายของคุณได้เช่นกัน"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"ไม่เป็นไร"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"ตั้งค่า"</string>
     <string name="muted_by" msgid="6147073845094180001">"ปิดเสียงโดย <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 696c227..a421a84 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Hanapin"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Camera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telepono"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"I-unlock"</string>
     <string name="unlock_label" msgid="8779712358041029439">"i-unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"buksan ang telepono"</string>
     <string name="camera_label" msgid="7261107956054836961">"buksan ang camera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Naka-secure ang device."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Hindi naka-secure ang device."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Hindi naka-secure ang device, aktibo ang trust agent."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Hind naka-secure ang device, aktibo ang trust agent."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Gumagana ang face detection, aktibo ang trust agent."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Ilipat ang button na pamamaraan ng pag-input."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Button ng zoom ng pagiging tugma."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Mag-zoom nang mas maliit sa mas malaking screen."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Dalawang bar."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Tatlong bar."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Puno ang signal."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Naka-on."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Naka-off."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Nakakonekta."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Kumokonekta."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Pinapagana ang TeleTypewriter."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Pag-vibrate ng ringer."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Naka-silent ang ringer."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"I-dismiss ang <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Hindi pinansin ang <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Sinisimulan ang <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Maghanap"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Mag-slide pataas para sa <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Mag-slide pakaliwa para sa <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Walang mga pagkaantala, kabilang na ang mga alarma"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Walang mga pagkaantala. Kahit mga alarma."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Walang mga paggambala"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Mga may priyoridad na paggambala lang"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Ang susunod mong alarma ay sa <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Magsimula ngayon"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Walang mga notification"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Maaaring subaybayan ang device"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Maaaring subaybayan ang profile"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Maaaring sinusubaybayan ang network"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Pagsubaybay sa device"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Pagsubaybay sa Profile"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Pagsubaybay sa network"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"I-disable ang VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Idiskonekta ang VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Nakakonekta ka sa isang VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nMaaaring subaybayan ng iyong VPN service provider ang iyong device at aktibidad sa network kabilang ang mga email, app at secure na website."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Ang device ay pinapamahalaan ng:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMay kakayahan ang iyong administrator na subaybayan ang iyong aktibidad sa network kabilang ang mga email, apps at secure na website. Para sa higit pang impormasyon, makipag-ugnayan sa iyong administrator.\n\nGayundin, pinahintulutan mo ang \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" na mag-set up ng koneksyon sa VPN. Maaari ding subaybayan ng app na ito ang aktibidad sa network."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Ang device ay pinapamahalaan ng:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMay kakayahan ang iyong administrator na subaybayan ang iyong aktibidad sa network kabilang ang mga email, apps at secure na website. Para sa higit pang impormasyon, makipag-ugnayan sa iyong administrator.\n\nGayundin, nakakonekta ka sa isang VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Maaari ding subaybayan ng iyong VPN service provider ang mga aktibidad sa network."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Ang profile na ito ay pinamamahalaan ng:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMaaaring subaybayan ng administrator mo ang iyong device at aktibidad sa network, kabilang na ang mga email, app at secure na website.\n\nPara sa higit pang impormasyon, makipag-ugnayan sa iyong administrator."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Ang device na ito ay pinamamahalaan ng:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAng iyong profile ay pinamamahalaan ng:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nMaaaring subaybayan ng administrator ang iyong device at aktibidad sa network, kabilang na ang mga email, app at secure na website.\n\nPara sa higit pang impormasyon, makipag-ugnayan sa iyong administrator."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"This profile is managed by:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps, and secure websites. For more information, contact your administrator.\n\nAlso, you gave \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" permission to set up a VPN connection. This app can monitor network activity too."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Ang profile na ito ay pinamamahalaan ng:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nMay kakayahan ang iyong administrator na subaybayan ang iyong aktibidad sa network kabilang na ang mga email, app, at secure na website. Para sa higit pang impormasyon, makipag-ugnayan sa iyong administrator.\n\nGayundin, nakakonekta ka sa isang VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Magagawa rin ng iyong VPN service provider na subaybayan ang aktibidad sa network."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Ang device na ito ay pinamamahalaan ng\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nAng profile mo ay pinamamahalaan ng:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nMay kakayahan ang iyong administrator na subaybayan ang iyong aktibidad sa network, kabilang na ang mga email, app at secure na website. Para sa higit pang impormasyon, makipag-ugnayan sa iyong administrator.\n\nGayundin, binigyan mo ng pahintulot ang \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" na mag-set up ng koneksyong VPN. Maaari ring sumubaybay ng aktibidad sa network ang app na ito."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"This device is managed by:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nYour profile is managed by:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps, and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Your VPN service provider can monitor network activity too."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Mananatiling naka-lock ang device hanggang sa manu-mano mong i-unlock"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Kunin ang notification nang mas mabilis"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Tingnan ang mga ito bago ka mag-unlock"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Hindi"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"I-set up"</string>
     <string name="muted_by" msgid="6147073845094180001">"Na-mute ng <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 94033fb..0c0149c 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Ara"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Kilidi aç"</string>
     <string name="unlock_label" msgid="8779712358041029439">"kilidi aç"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefonu aç"</string>
     <string name="camera_label" msgid="7261107956054836961">"kamerayı aç"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Giriş yöntemini değiştirme düğmesi."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Uyumluluk zum düğmesi."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Daha büyük ekrana daha küçük yakınlaştır."</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"İki çubuk."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Üç çubuk."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Sinyal tam."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Açık."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Kapalı."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Bağlandı."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Bağlanıyor."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -160,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter etkin."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Telefon zili titreşim."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Telefon zili sessiz."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> uygulamasını kapat."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> kaldırıldı."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> başlatılıyor."</string>
@@ -289,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Ara"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> için yukarı kaydırın."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> için sola kaydırın."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Alarmlar dahil hiç kesinti yok"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Kesinti yok. Uyarı bile yok."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Kesinti yok"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Sadece öncelikli kesintiler"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Bir sonraki alarmın saati: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -339,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Şimdi başla"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Bildirim yok"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Cihaz izlenebilir"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil izlenebilir"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Ağ etkinliği izlenebilir"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Cihaz izleme"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profil izleme"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Ağ izleme"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN\'yi devre dışı bırak"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN bağlantısını kes"</string>
@@ -349,7 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Bir VPN\'ye (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\") bağlısınız.\n\nVPN servis sağlayıcınız e-postalar, uygulamalar ve güvenli web siteleri dahil olmak üzere ağ etkinliğinizi izleyebilir."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Bu cihazı yöneten kuruluş:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYöneticiniz e-postalar, uygulamalar ve güvenli web siteleri dahil olmak üzere ağ etkinliğinizi izleyebilir.\n\nAyrıca \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" uygulamasına VPN bağlantısı kurma izni de verdiniz. Bu uygulama da ağ etkinliğini izleyebilir."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Bu cihazı yöneten kuruluş:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n.Yöneticiniz e-postalar, uygulamalar ve güvenli web siteleri dahil olmak üzere ağ etkinliğinizi izleyebilir. Daha fazla bilgi için yöneticinizle iletişim kurun.\n\n Ayrıca bir VPN\'ye de (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") bağlısınız. VPN servis sağlayıcınız da ağ etkinliğini izleyebilir."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Bu profili yöneten kuruluş:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYöneticiniz; e-postalar, uygulamalar ve güvenli web siteleri de dahil olmak üzere ağ etkinliğinizi izleyebilir.\n\nDaha fazla bilgi için yöneticinize başvurun."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Bu cihazı yöneten kuruluş:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilinizi yöneten kuruluş:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYöneticiniz; e-postalar, uygulamalar ve güvenli web siteleri de dahil olmak üzere cihazınızı ve ağ etkinliğinizi izleyebilir.\n\nDaha fazla bilgi için yöneticinize başvurun."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Bu profili yöneten kuruluş:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYöneticiniz e-postalar, uygulamalar ve güvenli web siteleri dahil olmak üzere ağ etkinliğinizi izleyebilir.\n\nAyrıca \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" uygulamasına VPN bağlantısı kurma izni de verdiniz. Bu uygulama da ağ etkinliğini izleyebilir."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Bu profili yöneten kuruluş:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nYöneticiniz; e-postalar, uygulamalar ve güvenli web siteleri de dahil olmak üzere ağ etkinliğinizi izleyebilir. Daha fazla bilgi için yöneticinize başvurun.\n\nAyrıca, bir VPN\'ye (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") bağlısınız. VPN hizmet sağlayıcınız da ağ etkinliğini izleyebilir."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Bu cihazı yöneten kuruluş:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilinizi yöneten kuruluş:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYöneticiniz; e-postalar, uygulamalar ve güvenli web siteleri de dahil olmak üzere ağ etkinliğinizi izleyebilir. Daha fazla bilgi için yöneticinize başvurun.\n\nAyrıca \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" uygulamasına VPN kurma izni verdiniz. Bu uygulama da ağ etkinliğini izleyebilir."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Bu cihazı yöneten kuruluş:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilinizi yöneten kuruluş:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nYöneticiniz; e-postalar, uygulamalar ve güvenli web siteleri de dahil olmak üzere ağ etkinliğinizi izleyebilir. Daha fazla bilgi için yöneticinize başvurun.\n\nAyrıca, bir VPN\'ye (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") bağlısınız. VPN hizmet sağlayıcınız da ağ etkinliğini izleyebilir."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Cihazınızın kilidini manuel olarak açmadıkça cihaz kilitli kalacak"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Bildirimleri daha hızlı alın"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Kilidi açmadan bildirimleri görün"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Hayır, teşekkürler"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Kur"</string>
+    <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> tarafından kapatıldı"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-tvdpi/dimens.xml b/packages/SystemUI/res/values-tvdpi/dimens.xml
new file mode 100644
index 0000000..5327cee
--- /dev/null
+++ b/packages/SystemUI/res/values-tvdpi/dimens.xml
@@ -0,0 +1,27 @@
+<?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>
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <fraction name="battery_button_height_fraction">12%</fraction>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+     fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">10%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">10%</fraction>
+
+    <dimen name="battery_margin_bottom">1px</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 1e10f29..162a280 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Пошук"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Камера"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Номер телефону"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Розблокувати"</string>
     <string name="unlock_label" msgid="8779712358041029439">"розблокувати"</string>
     <string name="phone_label" msgid="2320074140205331708">"відкрити телефон"</string>
     <string name="camera_label" msgid="7261107956054836961">"відкрити камеру"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Пристрій захищено."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Пристрій не захищено."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Пристрій захищено, довірчий агент активний."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Пристрій не захищено, довірчий агент активний."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Запущено функцію розпізнавання обличчя, довірчий агент активний."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Кнопка перемикання методу введення."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Кнопка масштабування сумісності."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Збільшення екрана."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Дві смужки сигналу."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Три смужки сигналу."</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_connected" msgid="8366256693719499665">"Під’єднано."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"З’єднання."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Телетайп увімкнено."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Дзвінок на вібросигналі."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Дзвінок беззвучний."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Видалити додаток <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"Програму <xliff:g id="APP">%s</xliff:g> закрито."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Запуск додатка <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Пошук"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Проведіть пальцем угору, щоб <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Проведіть пальцем ліворуч, щоб <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Без сповіщень, зокрема сигналів будильника"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Без сповіщень і сигналів будильника."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Без сповіщень"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Лише пріоритетні сповіщення"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Наступний сигнал: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Почати зараз"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Сповіщень немає"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Дії на пристрої можуть відстежуватися"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Профіль може відстежуватись"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Дії в мережі можуть відстежуватися"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Відстеження дій на пристрої"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Відстеження профілю"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Відстеження дій у мережі"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Вимкнути VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Від’єднатися від мережі VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Ви під’єднані до мережі VPN (<xliff:g id="APPLICATION">%1$s</xliff:g>).\n\nПостачальник послуг VPN може відстежувати пристрій та дії в мережі, зокрема листування, роботу в додатках і на захищених веб-сайтах."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Цим пристроєм керує \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених веб-сайтах. Щоб дізнатися більше, зверніться до адміністратора.\n\nВи також дозволили додатку <xliff:g id="APPLICATION">%2$s</xliff:g> під’єднатися до мережі VPN. Цей додаток теж може відстежувати ваші дії в мережі."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Цим пристроєм керує \n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених веб-сайтах. Щоб дізнатися більше, зверніться до адміністратора.\n\nВаш пристрій також під’єднаний до мережі VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Постачальник послуг VPN може відстежувати ваші дії в мережі."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Цим профілем керує\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії на пристрої та в мережі, зокрема листування, роботу в додатках і на захищених сайтах.\n\nЗв’яжіться з адміністратором, щоб дізнатися більше."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Цим пристроєм керує\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профілем керує\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії на пристрої та в мережі, зокрема листування, роботу в додатках і на захищених сайтах.\n\nЗв’яжіться з адміністратором, щоб дізнатися більше."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Цим профілем керує\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених сайтах. Зв’яжіться з адміністратором, щоб дізнатися більше.\n\nВи дозволили додатку <xliff:g id="APPLICATION">%2$s</xliff:g> під’єднатися до мережі VPN. Цей додаток може відстежувати ваші дії в мережі."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Цим профілем керує\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених сайтах. Зв’яжіться з адміністратором, щоб дізнатися більше.\n\nПристрій під’єднано до мережі VPN (<xliff:g id="APPLICATION">%2$s</xliff:g>). Постачальник послуг VPN може відстежувати ваші дії в мережі."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Цим пристроєм керує\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профілем керує\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених сайтах. Зв’яжіться з адміністратором, щоб дізнатися більше.\n\nВи дозволили додатку <xliff:g id="APPLICATION">%3$s</xliff:g> під’єднатися до мережі VPN. Цей додаток може відстежувати ваші дії в мережі."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Цим пристроєм керує\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nВашим профілем керує\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nАдміністратор може відстежувати ваші дії в мережі, зокрема листування, роботу в додатках і на захищених сайтах. Зв’яжіться з адміністратором, щоб дізнатися більше.\n\nПристрій під’єднано до мережі VPN (<xliff:g id="APPLICATION">%3$s</xliff:g>). Постачальник послуг VPN може відстежувати ваші дії в мережі."</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ні, дякую"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Налаштув."</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> вимикає звук"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ur-rPK/strings.xml b/packages/SystemUI/res/values-ur-rPK/strings.xml
index c46bd28..708607c 100644
--- a/packages/SystemUI/res/values-ur-rPK/strings.xml
+++ b/packages/SystemUI/res/values-ur-rPK/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"تلاش کریں"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"کیمرا"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"فون"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"غیر مقفل کریں"</string>
     <string name="unlock_label" msgid="8779712358041029439">"غیر مقفل کریں"</string>
     <string name="phone_label" msgid="2320074140205331708">"فون کھولیں"</string>
     <string name="camera_label" msgid="7261107956054836961">"کیمرا کھولیں"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"آلہ محفوظ ہے۔"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"آلہ محفوظ نہیں ہے۔"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"آلہ محفوظ ہے، ٹرسٹ ایجنٹ فعال ہے۔"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"آلہ محفوظ نہیں ہے، ٹرسٹ ایجنٹ فعال ہے۔"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"چہرے کی شناخت چل رہی ہے، ٹرسٹ ایجنٹ فعال ہے۔"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"اندراج کا طریقہ سوئچ کرنے کا بٹن۔"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"مطابقت پذیری زوم بٹن۔"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"چھوٹی سے بڑی اسکرین پر زوم کریں۔"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"دو بارز۔"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"تین بارز۔"</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_connected" msgid="8366256693719499665">"مربوط۔"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"مربوط ہو رہا ہے۔"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"‎1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"ٹیلی ٹائپ رائٹر فعال ہے۔"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"رنگر وائبریٹ۔"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"رنگر خاموش۔"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"<xliff:g id="APP">%s</xliff:g> کو مسترد کریں۔"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> کو ہٹا دیا گیا۔"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> شروع ہو رہی ہے۔"</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"تلاش کریں"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> کیلئے اوپر سلائیڈ کریں۔"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g> کیلئے بائیں سلائیڈ کریں۔"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"الارمز کے بشمول، کوئی مداخلتیں نہیں ہیں"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"کوئی مداخلتیں نہیں ہیں۔ یہاں تک کہ الارمز بھی نہیں ہیں۔"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"کوئی مداخلتیں نہیں ہیں"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"صرف ترجیحی مداخلتیں"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"آپ کا اگلا الارم <xliff:g id="ALARM_TIME">%s</xliff:g> بجے ہے"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"ابھی شروع کریں"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"کوئی اطلاعات نہیں ہیں"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"آلہ کو مانیٹر کیا جا سکتا ہے"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"پروفائل کو مانیٹر کیا جا سکتا ہے"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"نیٹ ورک کو مانیٹر کیا جا سکتا ہے"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"آلہ کو مانیٹر کرنا"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"پروفائل کو مانیٹر کرنا"</string>
     <string name="monitoring_title" msgid="169206259253048106">"نیٹ ورک کو مانیٹر کرنا"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"‏VPN کو غیر فعال کریں"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"‏VPN کو غیر منسلک کریں"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"‏آپ ایک VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\")‎ سے منسلک ہیں۔\n\nآپ کا VPN سروس فراہم کنندہ ای میلز، ایپس اور محفوظ ویب سائٹس کے بشمول آپ کے آلہ اور نیٹ ورک کی سرگرمی کو مانیٹر کر سکتا ہے۔"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"‏اس آلہ کا نظم مندرجہ ذیل کے ذریعے کیا جاتا ہے:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی بشمول ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کرنے کا اہل ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ نے \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" کو ایک VPN کنکشن ترتیب دینے کی اجازت دی ہے۔ یہ ایپ نیٹ ورک کی سرگرمی بھی مانیٹر کر سکتی ہے۔"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"‏اس آلہ کا نظم مندرجہ ذیل کے ذریعے کیا جاتا ہے:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی بشمول ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کرنے کا اہل ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ ایک VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") سے منسلک ہیں۔ آپ کی VPN سروس کا فراہم کنندہ نیٹورک کی سرگرمی کو بھی مانیٹر کر سکتا ہے۔"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"اس پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nآپ کا منتظم آپ کا آلہ اور نیٹ ورک کی سرگرمی بشمول، ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔\n\nمزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"اس آلہ کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nآپ کے پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nآپ کا منتظم آپ کے آلہ اور نیٹ ورک کی سرگرمی، بشمول ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔\n\nمزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"‏اس پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی بشمول، ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ نے \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" کو ایک VPN کنکشن کو ترتیب دینے کی اجازت دی ہے۔ یہ ایپ نیٹ ورک کی سرگرمی بھی مانیٹر کر سکتی ہے۔"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"‏اس پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی بشمول، ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ ایک VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\") سے منسلک ہیں۔ آپ کا VPN سروس فراہم کنندہ نیٹ ورک کی سرگرمی بھی مانیٹر کر سکتا ہے۔"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"‏اس آلہ کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nآپ کے پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی بشمول، ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ نے \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" کو ایک VPN کنکشن ترتیب دینے کی اجازت دی ہے۔ یہ ایپ نیٹ ورک کی سرگرمی بھی مانیٹر کر سکتی ہے۔"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"‏اس آلہ کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nآپ کے پروفائل کا نظم کیا جاتا ہے بذریعہ:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nآپ کا منتظم آپ کے نیٹ ورک کی سرگرمی، بشمول ای میلز، ایپس اور محفوظ ویب سائٹس کو مانیٹر کر سکتا ہے۔ مزید معلومات کیلئے، اپنے منتظم سے رابطہ کریں۔\n\nنیز، آپ ایک VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\") سے منسلک ہیں۔ آپ کا VPN سروس فراہم کنندہ نیٹ ورک کی سرگرمی کو بھی مانیٹر کر سکتا ہے۔"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"نہیں شکریہ"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"ترتیب دیں"</string>
     <string name="muted_by" msgid="6147073845094180001">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> کے ذریعے خاموش کردہ"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz-rUZ/strings.xml
index 5a53f63..7776269 100644
--- a/packages/SystemUI/res/values-uz-rUZ/strings.xml
+++ b/packages/SystemUI/res/values-uz-rUZ/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Izlash"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Kamera"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Telefon"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Qulfdan chiqarish"</string>
     <string name="unlock_label" msgid="8779712358041029439">"qulfdan chiqarish"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefonni ochish"</string>
     <string name="camera_label" msgid="7261107956054836961">"kamerani ochish"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Qurilma himoyalangan."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Qurilma himoyalanmagan."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Qurilma himoyalangan, ishonchli agent ishlab turibdi."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Qurilma himoyalanmagan, ishonchli agent ishlab turibdi."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Yuzingiz tekshirilmoqda, ishonchli agent ishlab turibdi."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Kiritish uslubi tugmasini almashtirish."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Kattalashtirish tugmasi mosligi."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Kattaroq ekran uchun kichikroqni kattalashtirish."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Ikkita ustun."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Uchta ustun."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Signal to‘liq."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Yoqilgan."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"O‘chirilgan."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Ulangan."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Ulanmoqda…"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter yoqildi."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Vibratsiyali qo‘ng‘iroq"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Ovozsiz qo‘ng‘iroq."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Olib tashlash: <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> olib tashlangan."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"<xliff:g id="APP">%s</xliff:g> ishga tushirilmoqda."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Izlash"</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_no_interruptions_with_warning" msgid="2522931836819051293">"“Bezovta qilmaslik” rejimi (uyg‘otkich ovozi o‘chirilgan)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Hech narsa bezovta qilmaydi, hatto uyg‘otkichlar ham."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Tanaffuslarsiz"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Faqat ustuvor tanaffuslar"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Keyingi uyg‘otkich: <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Boshlash"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Bildirishnomalar yo‘q"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Qurilma kuzatilishi mumkin"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Profil kuzatilishi mumkin"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Tarmoq kuzatuv ostida bo‘lishi mumkin"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Qurilmalarni kuzatish"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Profilni kuzatish"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Tarmoqlarni kuzatish"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"VPN tarmog‘ini o‘chirish"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"VPN ulanishini uzish"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Qurilma VPN tarmog‘iga ulangan (“<xliff:g id="APPLICATION">%1$s</xliff:g>”).\n\nXatti-harakatlaringiz VPN xizmati ta’minotchisiga ham ko‘rinadi."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakat-ni kuzatishi m-n. Qo‘shimcha ma’lumot olish u-n admin-ga murojaat qiling.\n\nSiz “<xliff:g id="APPLICATION">%2$s</xliff:g>” ilovasiga VPN ulanishini sozlash u-n ruxsat berdingiz. U ham tarmoqdagi faolligingizni kuzatishi mumkin."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakat-ni kuzatishi m-n. Qo‘shimcha ma’lumot olish u-n admin-ga murojaat qiling.\n\nSiz VPN tarmog‘iga ham ulangansiz (“<xliff:g id="APPLICATION">%2$s</xliff:g>”). VPN xizmati ta’minotchingiz ham tarmoqdagi faollingizni kuzatishi m-n."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Profil boshqaruvchisi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdministratoringiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakatlaringizni kuzatishi mumkin.\n\nQo‘shimcha ma’lumot olish uchun administratoringizga murojaat qiling."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfilingiz boshqaruvchisi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdministratoringiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakatlaringizni kuzatishi mumkin.\n\nQo‘shimcha ma’lumot olish uchun administratoringizga murojaat qiling."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Bu profil boshqaruvchisi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakatlaringizni kuzatishi mumkin. Qo‘shimcha ma’lumot olish uchun admin-ga murojaat qiling.\n\nSiz “<xliff:g id="APPLICATION">%2$s</xliff:g>” ilovasiga VPN ulanishini sozlash u-n ruxsat bergansiz. U ham tarmoqdagi faollikni kuzatishi m-n."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi harakatlaringizni kuzatishi mumkin. Qo‘shimcha ma’lumot olish u-n admin-ga murojaat qiling.\n\nSiz VPN tarmog‘iga (“<xliff:g id="APPLICATION">%2$s</xliff:g>”) ulangansiz. VPN xizmati ta’minotchingiz ham tarmoqdagi faollikni kuzatishi m-n."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil boshqaruvchisi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi har-ni kuzatishi m-n. Qo‘sh. ma’l. olish u-n admin-ga murojaat qiling.\n\nSiz “<xliff:g id="APPLICATION">%3$s</xliff:g>” ilovasiga VPN ulanishini sozlash u-n ruxsat bergansiz. U ham tarmoqdagi faollikni kuzatishi m-n."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Bu qurilma boshqaruvchisi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nProfil boshqaruvchisi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nAdmin-ngiz tarmoqdagi faollik – e-pochta, ilova va xavfsiz veb-saytlardagi har-ni kuzatishi m-n.\n\nQo‘sh. ma’l. olish u-n admin-ga murojaat qiling. Siz VPN tarmog‘iga (“<xliff:g id="APPLICATION">%3$s</xliff:g>”) ulangansiz. VPN xizmati ta’minotchingiz ham tarmoqdagi faollikni kuzatishi m-n."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Qurilma qo‘lda qulfdan chiqarilmaguncha qulflangan holatda qoladi"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Bildirishnomalarni tezroq oling"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ularni qulfdan chiqarishdan oldin ko‘ring"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Yo‘q, kerak emas"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Sozlash"</string>
     <string name="muted_by" msgid="6147073845094180001">"“<xliff:g id="THIRD_PARTY">%1$s</xliff:g>” tomonidan ovozsiz qilingan"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 61345bb..80fdc46 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Tìm kiếm"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Máy ảnh"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Điện thoại"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Mở khóa"</string>
     <string name="unlock_label" msgid="8779712358041029439">"mở khóa"</string>
     <string name="phone_label" msgid="2320074140205331708">"mở điện thoại"</string>
     <string name="camera_label" msgid="7261107956054836961">"mở máy ảnh"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Thiết bị được bảo mật."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Thiết bị chưa được bảo mật."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Thiết bị được bảo mật, tác nhân đáng tin cậy đang hoạt động."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Thiết bị chưa được bảo mật, tác nhân đáng tin cậy đang hoạt động."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Đang chạy chức năng nhận diện khuôn mặt, tác nhân đáng tin cậy đang hoạt động."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Nút chuyển phương thức nhập."</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Nút thu phóng khả năng tương thích."</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Thu phóng màn hình lớn hơn hoặc nhỏ hơn."</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Hai vạch."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Ba vạch."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Tín hiệu đầy đủ."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Bật."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Tắt."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Đã kết nối."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Đang kết nối."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"Đã bật TeleTypewriter."</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Chuông rung."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Chuông im lặng."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Xóa bỏ <xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> đã bị loại bỏ."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Bắt đầu <xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Tìm kiếm"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Trượt lên để <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Trượt sang trái để <xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Không có gián đoạn, bao gồm báo thức"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Không có gián đoạn. Thậm chí không có cảnh báo."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Không có gián đoạn nào"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Chỉ các gián đoạn ưu tiên"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"Lần báo thức tiếp theo của bạn vào lúc <xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Bắt đầu ngay"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Không có thông báo nào"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Thiết bị có thể được giám sát"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Hồ sơ có thể được giám sát"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Mạng có thể được giám sát"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Giám sát thiết bị"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Giám sát hồ sơ"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Giám sát mạng"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Tắt VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Ngắt kết nối VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Bạn đang kết nối với VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nNhà cung cấp dịch vụ VPN có thể giám sát hoạt động mạng và thiết bị của bạn bao gồm email, ứng dụng và các trang web an toàn."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Thiết bị này được quản lý bởi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nQuản trị viên có thể giám sát hoạt động mạng gồm email, ứng dụng và trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên.\n\nNgoài ra, bạn đã cấp cho \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" quyền thiết lập kết nối VPN. Ứng dụng này có thể giám sát hoạt động mạng."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Thiết bị này được quản lý bởi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nQuản trị viên có thể giám sát hoạt động mạng của bạn bao gồm email, ứng dụng và các trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên của bạn.\n\nNgoài ra, bạn được kết nối với VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Nhà cung cấp dịch vụ VPN cũng có thể giám sát hoạt động mạng."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Hồ sơ này được quản lý bởi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nQuản trị viên có thể giám sát thiết bị và hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn.\n\nĐể biết thêm thông tin, hãy liên hệ với quản trị viên của bạn."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Thiết bị này được quản lý bởi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHồ sơ của bạn được quản lý bởi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nQuản trị viên có thể giám sát thiết bị và hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn.\n\nĐể biết thêm thông tin, hãy liên hệ với quản trị viên của bạn."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Hồ sơ này được quản lý bởi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nQuản trị viên có thể giám sát hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên của bạn.\n\nNgoài ra, bạn đã cấp cho \"<xliff:g id="APPLICATION">%2$s</xliff:g>\" quyền thiết lập kết nối VPN. Ứng dụng này cũng có thể giám sát hoạt động mạng."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Hồ sơ này được quản lý bởi:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nQuản trị viên có thể giám sát hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên của bạn.\n\nNgoài ra, bạn được kết nối với VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Nhà cung cấp dịch vụ VPN của bạn cũng có thể giám sát hoạt động mạng."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Thiết bị này được quản lý bởi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHồ sơ của bạn được quản lý bởi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nQuản trị viên có thể giám sát hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên của bạn.\n\nNgoài ra, bạn đã cấp cho \"<xliff:g id="APPLICATION">%3$s</xliff:g>\" quyền thiết lập kết nối VPN. Ứng dụng này cũng có thể giám sát hoạt động mạng."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Thiết bị này được quản lý bởi:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nHồ sơ của bạn được quản lý bởi:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nQuản trị viên có thể giám sát thiết bị và hoạt động mạng của bạn, bao gồm email, ứng dụng và các trang web an toàn. Để biết thêm thông tin, hãy liên hệ với quản trị viên của bạn.\n\nNgoài ra, bạn được kết nối với VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Nhà cung cấp dịch vụ VPN của bạn cũng có thể giám sát hoạt động mạng."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Thiết bị sẽ vẫn bị khóa cho tới khi bạn mở khóa theo cách thủ công"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Nhận thông báo nhanh hơn"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Xem thông báo trước khi bạn mở khóa"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Ko, cảm ơn"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Thiết lập"</string>
     <string name="muted_by" msgid="6147073845094180001">"Do <xliff:g id="THIRD_PARTY">%1$s</xliff:g> tắt tiếng"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-xhdpi/dimens.xml b/packages/SystemUI/res/values-xhdpi/dimens.xml
new file mode 100644
index 0000000..144b225
--- /dev/null
+++ b/packages/SystemUI/res/values-xhdpi/dimens.xml
@@ -0,0 +1,27 @@
+<?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>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">25%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">12.5%</fraction>
+
+    <dimen name="battery_margin_bottom">0dp</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-xxhdpi/dimens.xml b/packages/SystemUI/res/values-xxhdpi/dimens.xml
new file mode 100644
index 0000000..26c8437
--- /dev/null
+++ b/packages/SystemUI/res/values-xxhdpi/dimens.xml
@@ -0,0 +1,25 @@
+<?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>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">33%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">33%</fraction>
+</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 3cf2f23..06cebb3 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -84,19 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜索"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相机"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"电话"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"解锁"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解锁"</string>
     <string name="phone_label" msgid="2320074140205331708">"打开电话"</string>
     <string name="camera_label" msgid="7261107956054836961">"打开相机"</string>
-    <!-- no translation found for accessibility_unlock_button_secured (8165840811789635668) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured (7905679894326511625) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_secured_trust_managed (6463973986970587223) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_not_secured_trust_managed (419377005316443992) -->
-    <skip />
-    <!-- no translation found for accessibility_unlock_button_face_unlock_running (1144920873023669283) -->
-    <skip />
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"输入法切换按钮。"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"兼容性缩放按钮。"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"将小屏幕的图片放大在较大屏幕上显示。"</string>
@@ -137,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"信号强度为两格。"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"信号强度为三格。"</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_connected" msgid="8366256693719499665">"已连接。"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"正在连接。"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -162,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"电传打字机已启用。"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"振铃器振动。"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"振铃器静音。"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"移除<xliff:g id="APP">%s</xliff:g>。"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"已删除<xliff:g id="APP">%s</xliff:g>"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"正在启动<xliff:g id="APP">%s</xliff:g>。"</string>
@@ -291,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"搜索"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"向上滑动以<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"向左滑动以<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"禁止打扰(包括闹钟)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"零打扰(甚至不发出闹钟提醒)。"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"禁止打扰"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"仅限优先打扰内容"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"下次闹钟响铃时间:<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -341,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"立即开始"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"没有通知"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"设备可能会受到监控"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"资料可能会受到监控"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"网络可能会受到监控"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"设备监测"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"资料监控"</string>
     <string name="monitoring_title" msgid="169206259253048106">"网络监控"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"关闭VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"断开VPN连接"</string>
@@ -351,7 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"您已连接到VPN(“<xliff:g id="APPLICATION">%1$s</xliff:g>”)。\n\n您的VPN服务提供商可以监控您的设备和网络活动,包括收发电子邮件、使用应用和浏览安全网站。"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"此设备由以下单位管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已授权“<xliff:g id="APPLICATION">%2$s</xliff:g>”设置VPN连接。此应用也可以监控网络活动。"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"此设备由以下单位管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已连接到VPN(“<xliff:g id="APPLICATION">%2$s</xliff:g>”)。您的VPN服务提供商也可以监控您的网络活动。"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"此资料由以下单位管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理员可以监控您的设备和网络活动,包括收发电子邮件、使用应用和浏览安全网站。\n\n若要了解详情,请与您的管理员联系。"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"此设备由以下单位管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的资料由以下单位管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理员可以监控您的设备和网络活动,包括收发电子邮件、使用应用和浏览安全网站。\n\n若要了解详情,请与您的管理员联系。"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"此资料由以下单位管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已授权“<xliff:g id="APPLICATION">%2$s</xliff:g>”设置VPN连接。此应用也可以监控网络活动。"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"此资料由以下单位管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已连接到VPN(“<xliff:g id="APPLICATION">%2$s</xliff:g>”)。您的VPN服务提供商也可以监控您的网络活动。"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"此设备由以下单位管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的资料由以下单位管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已授权“<xliff:g id="APPLICATION">%3$s</xliff:g>”设置VPN连接。此应用也可以监控网络活动。"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"此设备由以下单位管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的资料由以下单位管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理员可以监控您的网络活动,包括收发电子邮件、使用应用和浏览安全网站。若要了解详情,请与您的管理员联系。\n\n此外,您已连接到VPN(“<xliff:g id="APPLICATION">%3$s</xliff:g>”)。您的VPN服务提供商也可以监控您的网络活动。"</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"在您手动解锁之前,设备会保持锁定状态"</string>
-    <!-- no translation found for muted_by (6147073845094180001) -->
-    <skip />
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"更快捷地查看通知"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"无需解锁即可查看通知"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"不用了"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"设置"</string>
+    <string name="muted_by" msgid="6147073845094180001">"已被<xliff:g id="THIRD_PARTY">%1$s</xliff:g>设为静音"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 41518a0..9b0bde1 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"電話"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"解鎖"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解鎖"</string>
     <string name="phone_label" msgid="2320074140205331708">"開啟電話"</string>
     <string name="camera_label" msgid="7261107956054836961">"開啟相機"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"裝置安全。"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"裝置不安全。"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"裝置安全,信任代理程式已啟用。"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"裝置不安全,信任代理程式已啟用。"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"臉孔偵測正在執行,信任代理程式已啟用。"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"切換輸入法按鈕。"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"相容性縮放按鈕。"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"將較小螢幕的畫面放大在較大螢幕上顯示。"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"訊號強度為兩格。"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"訊號強度為三格。"</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_connected" msgid="8366256693719499665">"已連線。"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"連線中。"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter (TTY) 已啟用。"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"鈴聲震動。"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"鈴聲靜音。"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"關閉「<xliff:g id="APP">%s</xliff:g>」。"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"「<xliff:g id="APP">%s</xliff:g>」已關閉。"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"正在啟動「<xliff:g id="APP">%s</xliff:g>」。"</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"搜尋"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"向上滑動即可<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"向左滑動即可<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"不允許干擾 (包含鬧鐘)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"不干擾 (即使鬧鐘也不例外)。"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"不允許干擾"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"僅限優先干擾"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"下次鬧鐘時間:<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"立即開始"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"沒有通知"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"裝置可能會受到監控"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"個人檔案可能受到監控"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"網絡可能會受到監控"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"裝置監控"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"個人檔案監控"</string>
     <string name="monitoring_title" msgid="169206259253048106">"網絡監控"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"停用 VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"中斷 VPN 連線"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"您已連線至 VPN (「<xliff:g id="APPLICATION">%1$s</xliff:g>」)。\n\n您的 VPN 服務供應商可以監控您的裝置和網絡活動,包括收發電郵、使用應用程式和瀏覽安全網站。"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"這部裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網絡活動,包括收發電郵、使用應用程式和瀏覽安全網站。如需更多資料,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網絡活動。"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"這部裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網絡活動,包括收發電郵、使用應用程式和瀏覽安全網站。如需更多資料,請與您的管理員聯絡。\n\n同時,您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網絡活動。"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"這個個人檔案的管理機構:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的裝置和網絡活動,包括電郵、應用程式及安全網站。\n\n如需瞭解詳情,請聯絡您的管理員。"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"這部裝置的管理機構:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的個人檔案的管理機構:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的裝置和網絡活動,包括電郵、應用程式及安全網站。\n\n如需瞭解詳情,請聯絡您的管理員。"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"這個個人檔案的管理機構:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網絡活動。"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"這個個人檔案的管理機構:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您的裝置已與 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」) 連線,因此您的 VPN 服務供應商也能監控您的網絡活動。"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"這部裝置的管理機構:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的個人檔案的管理機構:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%3$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網絡活動。"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"這部裝置的管理機構:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的個人檔案的管理機構:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網絡活動,包括電郵、應用程式及安全網站。如需瞭解詳情,請聯絡您的管理員。\n\n同時,由於您的裝置已與 VPN (「<xliff:g id="APPLICATION">%3$s</xliff:g>」) 連線,因此您的 VPN 服務供應商也能監控您的網絡活動。"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"不用了,謝謝"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"設定"</string>
     <string name="muted_by" msgid="6147073845094180001">"靜音設定者:<xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index b47d766..d57845b 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"搜尋"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"相機"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"電話"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"解除鎖定"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解除鎖定"</string>
     <string name="phone_label" msgid="2320074140205331708">"開啟電話"</string>
     <string name="camera_label" msgid="7261107956054836961">"開啟攝影機"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"裝置安全。"</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"裝置不安全。"</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"裝置安全,信任的代理程式已啟用。"</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"裝置不安全,信任的代理程式已啟用。"</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"正在執行臉孔偵測,信任的代理程式已啟用。"</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"切換輸入法按鈕。"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"相容性縮放按鈕。"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"將較小螢幕的畫面放大在較大螢幕上顯示。"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"訊號強度兩格。"</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"訊號強度三格。"</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_connected" msgid="8366256693719499665">"已連線。"</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"連線中。"</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"HSPA"</string>
@@ -157,6 +157,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter (TTY) 已啟用。"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"鈴聲震動。"</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"鈴聲靜音。"</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"關閉「<xliff:g id="APP">%s</xliff:g>」。"</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"「<xliff:g id="APP">%s</xliff:g>」已關閉。"</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"正在啟動「<xliff:g id="APP">%s</xliff:g>」。"</string>
@@ -286,7 +288,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"搜尋"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"向上滑動即可<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
     <string name="description_direction_left" msgid="7207478719805562165">"向左滑動即可<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>。"</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"不允許干擾 (包含鬧鐘)"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"不干擾 (即使鬧鐘也不例外)。"</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"不允許干擾"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"僅限優先干擾"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"下次鬧鐘時間:<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -336,8 +338,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"立即開始"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"沒有通知"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"裝置可能會受到監控"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"設定檔可能會受到監控"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"網路可能會受到監控"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"裝置監控"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"設定檔監控"</string>
     <string name="monitoring_title" msgid="169206259253048106">"網路監控"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"停用 VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"中斷 VPN 連線"</string>
@@ -346,6 +350,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"您已連線至 VPN (「<xliff:g id="APPLICATION">%1$s</xliff:g>」)。\n\n您的 VPN 服務供應商可以監控您的裝置和網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。"</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"這個裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"這個裝置由下列網域管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>。\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的裝置和網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請與您的管理員聯絡。"</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。\n\n如需詳細資訊,請與您的管理員聯絡。"</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%2$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"這個設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%2$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由下列機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您已授權「<xliff:g id="APPLICATION">%3$s</xliff:g>」設定 VPN 連線,因此這個應用程式也能監控您的網路活動。"</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"這個裝置由下列機構管理:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\n您的設定檔由以下機構管理:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\n您的管理員可以監控您的網路活動,包括收發電子郵件、使用應用程式和瀏覽安全網站。如需詳細資訊,請與您的管理員聯絡。\n\n同時,由於您的裝置已連線至 VPN (「<xliff:g id="APPLICATION">%3$s</xliff:g>」),因此您的 VPN 服務供應商也能監控您的網路活動。"</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>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"不用了,謝謝"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"設定"</string>
     <string name="muted_by" msgid="6147073845094180001">"由 <xliff:g id="THIRD_PARTY">%1$s</xliff:g> 設為靜音"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 63c1ac3..edf51a1 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -84,14 +84,10 @@
     <string name="accessibility_search_light" msgid="1103867596330271848">"Sesha"</string>
     <string name="accessibility_camera_button" msgid="8064671582820358152">"Ikhamela"</string>
     <string name="accessibility_phone_button" msgid="6738112589538563574">"Ifoni"</string>
+    <string name="accessibility_unlock_button" msgid="128158454631118828">"Vula"</string>
     <string name="unlock_label" msgid="8779712358041029439">"vula"</string>
     <string name="phone_label" msgid="2320074140205331708">"vula ifoni"</string>
     <string name="camera_label" msgid="7261107956054836961">"vula ikhamera"</string>
-    <string name="accessibility_unlock_button_secured" msgid="8165840811789635668">"Idivayisi ivikelekile."</string>
-    <string name="accessibility_unlock_button_not_secured" msgid="7905679894326511625">"Idivayisi ayivikelekile."</string>
-    <string name="accessibility_unlock_button_secured_trust_managed" msgid="6463973986970587223">"Idivayisi ivikelekile, isisebenzeli esethembekile siyasebenza."</string>
-    <string name="accessibility_unlock_button_not_secured_trust_managed" msgid="419377005316443992">"Idivayisi ayivikelekile, isisebenzeli esethembekile siyasebenza.."</string>
-    <string name="accessibility_unlock_button_face_unlock_running" msgid="1144920873023669283">"Ukutholakala kobuso kuyasebenza, isisebenzeli esethembekile siyasebenza."</string>
     <string name="accessibility_ime_switch_button" msgid="5032926134740456424">"Vula indlela yokungena yenkinobho"</string>
     <string name="accessibility_compatibility_zoom_button" msgid="8461115318742350699">"Inkinobho evumelekile yokusondeza"</string>
     <string name="accessibility_compatibility_zoom_example" msgid="4220687294564945780">"Sondeza kancane esikrinini esikhudlwana"</string>
@@ -132,6 +128,10 @@
     <string name="accessibility_two_bars" msgid="6437363648385206679">"Amabha amabili."</string>
     <string name="accessibility_three_bars" msgid="2648241415119396648">"Amabha amathathu."</string>
     <string name="accessibility_signal_full" msgid="9122922886519676839">"Isiginali egcwele."</string>
+    <string name="accessibility_desc_on" msgid="2385254693624345265">"Vula."</string>
+    <string name="accessibility_desc_off" msgid="6475508157786853157">"Vala."</string>
+    <string name="accessibility_desc_connected" msgid="8366256693719499665">"Ixhunyiwe."</string>
+    <string name="accessibility_desc_connecting" msgid="3812924520316280149">"Iyaxhuma."</string>
     <string name="accessibility_data_connection_gprs" msgid="1606477224486747751">"GPRS"</string>
     <string name="accessibility_data_connection_1x" msgid="994133468120244018">"1 X"</string>
     <string name="accessibility_data_connection_hspa" msgid="2032328855462645198">"I-HSPA"</string>
@@ -155,6 +155,8 @@
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"i-TeleTypewriter inikwe amandla"</string>
     <string name="accessibility_ringer_vibrate" msgid="666585363364155055">"Ukudlidliza kweringa."</string>
     <string name="accessibility_ringer_silent" msgid="9061243307939135383">"Isikhali sithulile."</string>
+    <!-- no translation found for accessibility_casting (6887382141726543668) -->
+    <skip />
     <string name="accessibility_recents_item_will_be_dismissed" msgid="395770242498031481">"Cashisa i-<xliff:g id="APP">%s</xliff:g>."</string>
     <string name="accessibility_recents_item_dismissed" msgid="6803574935084867070">"<xliff:g id="APP">%s</xliff:g> ivaliwe."</string>
     <string name="accessibility_recents_item_launched" msgid="7616039892382525203">"Iqala i-<xliff:g id="APP">%s</xliff:g>."</string>
@@ -284,7 +286,7 @@
     <string name="description_target_search" msgid="3091587249776033139">"Sesha"</string>
     <string name="description_direction_up" msgid="7169032478259485180">"Shelelisela ngenhla ku-<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
     <string name="description_direction_left" msgid="7207478719805562165">"Shelelisela ngakwesokunxele ku-<xliff:g id="TARGET_DESCRIPTION">%s</xliff:g>."</string>
-    <string name="zen_no_interruptions_with_warning" msgid="2522931836819051293">"Akukho ukuphazamisa, kufaka phakathi ama-alamu"</string>
+    <string name="zen_no_interruptions_with_warning" msgid="4396898053735625287">"Akukho ukuphazamiseka. Nama-alamu imbala."</string>
     <string name="zen_no_interruptions" msgid="7970973750143632592">"Azikho iziphazamiso"</string>
     <string name="zen_important_interruptions" msgid="3477041776609757628">"Iziphazamiso ezibalulekile kuphela"</string>
     <string name="zen_alarm_information_time" msgid="5235772206174372272">"I-alamu yakho elandelayo ingo<xliff:g id="ALARM_TIME">%s</xliff:g>"</string>
@@ -334,8 +336,10 @@
     <string name="media_projection_action_text" msgid="8470872969457985954">"Qala manje"</string>
     <string name="empty_shade_text" msgid="708135716272867002">"Azikho izaziso"</string>
     <string name="device_owned_footer" msgid="3802752663326030053">"Idivayisi inganganyelwa"</string>
+    <string name="profile_owned_footer" msgid="8021888108553696069">"Iphrofayela ingaqashwa"</string>
     <string name="vpn_footer" msgid="2388611096129106812">"Inethiwekhi kungenzeka iqashiwe"</string>
     <string name="monitoring_title_device_owned" msgid="7121079311903859610">"Ukwengamela idivayisi"</string>
+    <string name="monitoring_title_profile_owned" msgid="6790109874733501487">"Ukuqapha iphrofayela"</string>
     <string name="monitoring_title" msgid="169206259253048106">"Ukuqashwa kwenethiwekhi"</string>
     <string name="disable_vpn" msgid="4435534311510272506">"Khubaza i-VPN"</string>
     <string name="disconnect_vpn" msgid="1324915059568548655">"Nqamula i-VPN"</string>
@@ -344,6 +348,16 @@
     <string name="monitoring_description_legacy_vpn" msgid="4740349017929725435">"Uxhumekile ku-VPN (\"<xliff:g id="APPLICATION">%1$s</xliff:g>\").\n\nUmhlinzeki wakho wesevisi ye-VPN angangamela idivayisi yakho nomsebenzi wenethiwekhi kufaka phakathi ama-imeyili, izinhlelo zokusebenza, namawebhusayithi aphephile."</string>
     <string name="monitoring_description_vpn_device_owned" msgid="696121105616356493">"Le divayisi iphethwe i-:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUmqondisi wakho uyakwazi ukwengamela umsebenzi wakho wenethiwekhi kufaka phakathi ama-imeyili, izinhlelo zokusebenza, namawebhusayithi aphephile. Ngolwazi olubanzi, xhumana nomqondisi wakho.\n\nFuthi, unike i-\"<xliff:g id="APPLICATION">%2$s</xliff:g>\" imvume yokusetha uxhumo le-VPN. Lolu hlelo lokusebenza lungangamela futhi umsebenzi wenethiwekhi."</string>
     <string name="monitoring_description_legacy_vpn_device_owned" msgid="649791650224064248">"Le divayisi iphathwe i-:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUmqondisi wakho uyakwazi ukwengamela umsebenzi wenethiwekhi yakho kufaka phakathi ama-imeyili, izinhlelo zokusebenza, namawebhusayithi aphephile. Ngolwazi olubanzi, xhumana nomqondisi wakho.\n\nFuthi, uxhumekile ku-VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Umhlinzeki wakho wesevisi ye-VPN angangamela futhi umsebenzi wenethiwekhi."</string>
+    <string name="monitoring_description_profile_owned" msgid="2370062794285691713">"Le phrofayela iphethwe yi-:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUmlawuli wakho angaqapha idivayisi yakho nomsebenzi wenethiwekhi, ofaka ama-imeyili, izinhlelo zokusebenza namawebhusayithi avikelekile.\n\nUkuze uthole olunye ulwazi, xhumana nomlawuli wakho."</string>
+    <string name="monitoring_description_device_and_profile_owned" msgid="8685301493845456293">"Le divayisi iphethwe yi-:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIphrofayela yakho iphethwe yi-:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUmlawuli wakho angaqapha idivayisi yakho kanye nomsebenzi wenethiwekhi, okufaka ama-imeyili, izinhlelo zokusebenza namawebhusayithi avikelekile.\n\nUkuze uthole olunye ulwazi, xhumana nomlawuli wakho."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="847491346263295767">"Le phrofayela iphethwe yi-:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUmlawuli wakho uyakwazi ukuqapha umsebenzi wakho wenethiwekhi ofaka ama-imeyili, izinhlelo zokusebenza, namawebhusayithi avikelekile. Ukuze uthole olunye ulwazi, xhumana nomlawuli wakho.\n\nFuthi, unikeze i-\"<xliff:g id="APPLICATION">%2$s</xliff:g>\" imvume yokusetha ukuxhumeka kwe-VPN. Lolu hlelo lokusebenza lungaphinda luqaphe umsebenzi wakho."</string>
+    <string name="monitoring_description_legacy_vpn_profile_owned" msgid="4095516964132237051">"Le phrofayela iphethwe yi-:\n<xliff:g id="ORGANIZATION">%1$s</xliff:g>\n\nUmlawuli wakho uyakwazi ukuqapha umsebenzi wenethiwekhi yakho ofaka ama-imeyili, izinhlelo zokusebenza, namawebhusayithi avikelekile. Ukuze uthole ulwazi olungeziwe, xhumana nomlawuli wakho.\n\nFuthi, uxhumeke ku-VPN (\"<xliff:g id="APPLICATION">%2$s</xliff:g>\"). Umhlinzeki wakho wesevisi ye-VPN angaphinda aqaphele nomsebenzi wenethiwekhi."</string>
+    <string name="monitoring_description_vpn_device_and_profile_owned" msgid="9193588924767232909">"Le divayisi iphethwe yi-:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIphrofayela yakho iphethwe yi-:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUmlawuli wakho uyakwazi ukuqapha umsebenzi wakho wenethiwekhi ofaka ama-imeyili, izinhlelo zokusebenza namawebhusayithi avikelekile. Ukuze uthole olunye ulwazi, xhumana nomlawuli wakho.\n\nFuthi unikeze i-\"<xliff:g id="APPLICATION">%3$s</xliff:g>\" imvume yokusetha ukuxhumeka kwe-VPN. Lolu hlelo lokusebenza lungaqapha nomsebenzi wenethiwekhi."</string>
+    <string name="monitoring_description_legacy_vpn_device_and_profile_owned" msgid="6935475023447698473">"Le divayisi iphethwe yi-:\n<xliff:g id="ORGANIZATION_0">%1$s</xliff:g>\nIphrofayela yakho iphethwe yi-:\n<xliff:g id="ORGANIZATION_1">%2$s</xliff:g>\n\nUmlawuli wakho uyakwazi ukuqapha umsebenzi wakho wenethiwekhi ofaka ama-imeyili, izinhlelo zokusebenza, namawebhusayithi avikelekile. Ukuze uthole olunye ulwazi, xhumana nomlawuli wakho.\n\nFuthi, uxhumeke ku-VPN (\"<xliff:g id="APPLICATION">%3$s</xliff:g>\"). Umhlinzeki wakho wesevisi ye-VPN angaqapha nomsebenzi wenethiwekhi."</string>
     <string name="keyguard_indication_trust_disabled" msgid="7412534203633528135">"Idivayisi izohlala ikhiyekile uze uyivule ngokwenza"</string>
+    <string name="hidden_notifications_title" msgid="7139628534207443290">"Thola izaziso ngokushesha"</string>
+    <string name="hidden_notifications_text" msgid="2326409389088668981">"Ibone ngaphambi kokuthi uyivule"</string>
+    <string name="hidden_notifications_cancel" msgid="3690709735122344913">"Cha ngiyabonga"</string>
+    <string name="hidden_notifications_setup" msgid="41079514801976810">"Lungisa"</string>
     <string name="muted_by" msgid="6147073845094180001">"Ithuliswe ngu-<xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string>
 </resources>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index 75ed81e..6da811f 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -85,8 +85,15 @@
     <!-- The color of the material notification background when low priority -->
     <color name="notification_material_background_low_priority_color">#ffe0e0e0</color>
 
+    <!-- The color of the material notification background for media notifications when no custom
+         color is specified -->
+    <color name="notification_material_background_media_default_color">#ff424242</color>
+
     <!-- The color of the ripples on the untinted notifications -->
-    <color name="notification_ripple_untinted_color">#20000000</color>
+    <color name="notification_ripple_untinted_color">#28000000</color>
+
+    <!-- The color of the ripples on the low priority notifications -->
+    <color name="notification_ripple_color_low_priority">#30000000</color>
 
     <!-- The color of the ripples on the tinted notifications -->
     <color name="notification_ripple_tinted_color">#30ffffff</color>
@@ -97,9 +104,9 @@
     <color name="segmented_button_text_inactive">#99afbdc4</color><!-- 60% -->
 
     <!-- The "inside" of a notification, reached via longpress -->
-    <color name="notification_guts_bg_color">#ff424242</color><!-- grey 800 -->
+    <color name="notification_guts_bg_color">@color/system_secondary_color</color>
     <color name="notification_guts_title_color">#FFFFFFFF</color>
-    <color name="notification_guts_text_color">#99FFFFFF</color>
+    <color name="notification_guts_text_color">#b2FFFFFF</color>
     <color name="notification_guts_btn_color">#FFFFFFFF</color>
 
     <color name="search_panel_card_color">#ffffff</color>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 0e18979..5a1c318 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -134,10 +134,13 @@
     <integer name="recents_animate_task_exit_to_home_duration">225</integer>
     <!-- The min animation duration for animating the task bar out. -->
     <integer name="recents_animate_task_bar_exit_duration">125</integer>
+    <!-- The animation delay for animating the first task in. This should roughly be the animation
+     duration of the transition in to recents from home. -->
+    <integer name="recents_animate_task_enter_from_home_delay">150</integer>
     <!-- The min animation duration for animating the task in when transitioning from home. -->
     <integer name="recents_animate_task_enter_from_home_duration">275</integer>
     <!-- The animation stagger to apply to each task animation when transitioning from home. -->
-    <integer name="recents_animate_task_enter_from_home_delay">10</integer>
+    <integer name="recents_animate_task_enter_from_home_stagger_delay">10</integer>
     <!-- The short duration when animating in/out the lock to app button. -->
     <integer name="recents_animate_lock_to_app_button_short_duration">150</integer>
     <!-- The long duration when animating in/out the lock to app button. -->
@@ -152,8 +155,10 @@
     <integer name="recents_max_task_stack_view_dim">96</integer>
     <!-- The delay to enforce between each alt-tab key press. -->
     <integer name="recents_alt_tab_key_delay">200</integer>
-    <!-- Transposes the recents layout in landscape. -->
-    <bool name="recents_transpose_layout_with_orientation">true</bool>
+    <!-- Transposes the search bar layout in landscape. -->
+    <bool name="recents_has_transposed_search_bar">true</bool>
+    <!-- Transposes the nav bar in landscape (only used for purposes of layout). -->
+    <bool name="recents_has_transposed_nav_bar">true</bool>
 
     <!-- Whether to enable KeyguardService or not -->
     <bool name="config_enableKeyguardService">true</bool>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 162c277..4495318 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -73,6 +73,9 @@
     <!-- Height of notification icons in the status bar -->
     <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
 
+    <!-- The font size for the clock -->
+    <dimen name="status_bar_clock_size">14sp</dimen>
+
     <!-- Height of a small notification in the status bar -->
     <dimen name="notification_min_height">64dp</dimen>
 
@@ -86,10 +89,10 @@
     <dimen name="notification_summary_height">44dp</dimen>
 
     <!-- size at which Notification icons will be drawn in the status bar -->
-    <dimen name="status_bar_icon_drawing_size">18dip</dimen>
+    <dimen name="status_bar_icon_drawing_size">17dip</dimen>
 
     <!-- opacity at which Notification icons will be drawn in the status bar -->
-    <item type="dimen" name="status_bar_icon_drawing_alpha">75%</item>
+    <item type="dimen" name="status_bar_icon_drawing_alpha">90%</item>
 
     <!-- gap on either side of status bar notification icons -->
     <dimen name="status_bar_icon_padding">0dp</dimen>
@@ -165,7 +168,7 @@
     <dimen name="qs_dual_tile_height">112dp</dimen>
     <dimen name="qs_dual_tile_padding_vertical">8dp</dimen>
     <dimen name="qs_dual_tile_padding_horizontal">6dp</dimen>
-    <dimen name="qs_tile_padding_top">16dp</dimen>
+    <dimen name="qs_tile_padding_top">14dp</dimen>
     <dimen name="qs_tile_padding_top_large_text">4dp</dimen>
     <dimen name="qs_tile_padding_below_icon">12dp</dimen>
     <dimen name="qs_tile_padding_bottom">16dp</dimen>
@@ -286,13 +289,13 @@
     <dimen name="speed_bump_height">16dp</dimen>
 
     <!-- Lockscreen unlocking falsing threshold. -->
-    <dimen name="unlock_falsing_threshold">100dp</dimen>
+    <dimen name="unlock_falsing_threshold">80dp</dimen>
 
     <!-- Lockscreen falsing threshold for quick settings. -->
-    <dimen name="qs_falsing_threshold">60dp</dimen>
+    <dimen name="qs_falsing_threshold">80dp</dimen>
 
     <!-- Falsing threshold used when dismissing notifications from the lockscreen. -->
-    <dimen name="swipe_helper_falsing_threshold">100dp</dimen>
+    <dimen name="swipe_helper_falsing_threshold">70dp</dimen>
 
     <dimen name="notifications_top_padding">8dp</dimen>
     
@@ -312,7 +315,7 @@
     <dimen name="heads_up_window_height">250dp</dimen>
 
     <!-- The minimum amount the user needs to swipe to go to the camera / phone. -->
-    <dimen name="keyguard_min_swipe_amount">85dp</dimen>
+    <dimen name="keyguard_min_swipe_amount">90dp</dimen>
 
     <!-- The minimum background radius when swiping to a side for the camera / phone affordances. -->
     <dimen name="keyguard_affordance_min_background_radius">30dp</dimen>
@@ -405,8 +408,8 @@
     <!-- The font size of the date in QS -->
     <dimen name="qs_date_collapsed_size">14sp</dimen>
 
-    <!-- Battery level padding end when in expanded QS (but not on Keyguard) -->
-    <dimen name="battery_level_padding_end">4dp</dimen>
+    <!-- Battery level text padding end when in expanded QS and on Keyguard -->
+    <dimen name="battery_level_padding_end">2dp</dimen>
 
     <!-- The top padding of the clear all button -->
     <dimen name="clear_all_padding_top">12dp</dimen>
@@ -419,11 +422,14 @@
     <dimen name="keyguard_carrier_text_margin">16dp</dimen>
 
     <!-- Margin on the left side of the battery % in the header. -->
-    <dimen name="header_battery_margin_expanded">8dp</dimen>
+    <dimen name="header_battery_margin_expanded">6dp</dimen>
 
     <!-- Margin on the left side of the battery % when on Keyguard. -->
     <dimen name="header_battery_margin_keyguard">6dp</dimen>
 
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
+
     <!-- Additional translation (downwards) for appearing notifications when going to the full shade
          from Keyguard. -->
     <dimen name="go_to_full_shade_appearing_translation">200dp</dimen>
@@ -461,4 +467,21 @@
     <!-- TrustDrawable: Thickness of the circle -->
     <dimen name="trust_circle_thickness">2dp</dimen>
 
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <fraction name="battery_button_height_fraction">10.5%</fraction>
+
+    <!-- Fraction value to smooth the edges of the battery icon. The path will be inset by this
+         fraction of a pixel.-->
+    <fraction name="battery_subpixel_smoothing_left">0%</fraction>
+    <fraction name="battery_subpixel_smoothing_right">0%</fraction>
+
+    <dimen name="battery_margin_bottom">0dp</dimen>
+
+    <!-- Extra padding between the mobile data type icon and the strength indicator when the data
+         type icon is wide. -->
+    <dimen name="wide_type_icon_start_padding">2dp</dimen>
+
+    <!-- Extra padding between the mobile data type icon and the strength indicator when the data
+         type icon is wide for the tile in quick settings. -->
+    <dimen name="wide_type_icon_start_padding_qs">3dp</dimen>
 </resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index b488c56..0445fe8 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -522,9 +522,13 @@
     <!-- Content description of the clear button in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_clear_all">Clear all notifications.</string>
 
-    <!-- Title shown in notification popup for inspecting the responsible
-         application [CHAR LIMIT=30] -->
-    <string name="status_bar_notification_inspect_item_title">Settings</string>
+    <!-- Content description of button in notification inspector for system settings relating to
+         notifications from this application [CHAR LIMIT=NONE] -->
+    <string name="status_bar_notification_inspect_item_title">Notification settings</string>
+
+    <!-- Content description of button in notification inspetor for application-provided settings
+         for its own notifications [CHAR LIMIT=NONE] -->
+    <string name="status_bar_notification_app_settings_title"><xliff:g id="app_name" example="Calendar">%s</xliff:g> settings</string>
 
     <!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is on. [CHAR LIMIT=NONE] -->
     <string name="accessibility_rotation_lock_off">Screen will rotate automatically.</string>
@@ -732,9 +736,6 @@
     <!-- Shows when people have clicked at the right edge of the screen to explain how to open the phone. In right-to-left languages, this is the opposite direction. [CHAR LIMIT=60] -->
     <string name="camera_hint">Swipe left for camera</string>
 
-    <!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] -->
-    <string name="zen_mode_forever">Indefinitely</string>
-
     <!-- Interruption level: None. [CHAR LIMIT=20] -->
     <string name="interruption_level_none">None</string>
 
@@ -752,6 +753,9 @@
     <!-- Accessibility label for the button that opens the user switcher. -->
     <string name="accessibility_multi_user_switch_switcher">Switch user</string>
 
+    <!-- Accessibility label for the button that opens the user switcher and announces the current user. -->
+    <string name="accessibility_multi_user_switch_switcher_with_current">Switch user, current user <xliff:g id="current_user_name" example="John Doe">%s</xliff:g></string>
+
     <!-- Accessibility label for the button that opens the quick contact of the user. -->
     <string name="accessibility_multi_user_switch_quick_contact">Show profile</string>
 
@@ -791,18 +795,12 @@
     <!-- Notification when resuming an existing guest session: Action that continues with the current session [CHAR LIMIT=35] -->
     <string name="guest_wipe_session_dontwipe">Yes, continue</string>
 
+    <!-- Title for add user confirmation dialog [CHAR LIMIT=30] -->
+    <string name="user_add_user_title" msgid="2108112641783146007">Add new user?</string>
 
-    <!-- Zen mode condition: time duration in minutes. [CHAR LIMIT=NONE] -->
-    <plurals name="zen_mode_duration_minutes">
-        <item quantity="one">For one minute</item>
-        <item quantity="other">For %d minutes</item>
-    </plurals>
+    <!-- Message for add user confirmation dialog - short version. [CHAR LIMIT=none] -->
+    <string name="user_add_user_message_short" msgid="1511354412249044381">When you add a new user, that person needs to set up their space.\n\nAny user can update apps for all other users. </string>
 
-    <!-- Zen mode condition: time duration in hours. [CHAR LIMIT=NONE] -->
-    <plurals name="zen_mode_duration_hours">
-        <item quantity="one">For one hour</item>
-        <item quantity="other">For %d hours</item>
-    </plurals>
 
     <!-- Battery saver notification title. [CHAR LIMIT=60]-->
     <string name="battery_saver_notification_title">Battery saver is on</string>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index efd4fb4..cb66e7a 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -69,8 +69,7 @@
     </style>
 
     <style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
-        <!-- Note: must be dp to fit in status bar -->
-        <item name="android:textSize">16dp</item>
+        <item name="android:textSize">@dimen/status_bar_clock_size</item>
         <item name="android:fontFamily">sans-serif-medium</item>
         <item name="android:textColor">@color/status_bar_clock_color</item>
     </style>
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 5e2f784..7bdbd0a 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -46,12 +46,14 @@
 
     private static final int FULL = 96;
 
-    private static final float SUBPIXEL = 0.4f;  // inset rects for softer edges
     private static final float BOLT_LEVEL_THRESHOLD = 0.3f;  // opaque bolt below this fraction
 
     private final int[] mColors;
 
     boolean mShowPercent = true;
+    private float mButtonHeightFraction;
+    private float mSubpixelSmoothingLeft;
+    private float mSubpixelSmoothingRight;
     private final Paint mFramePaint, mBatteryPaint, mWarningTextPaint, mTextPaint, mBoltPaint;
     private float mTextHeight, mWarningTextHeight;
 
@@ -205,6 +207,12 @@
         mWarningString = context.getString(R.string.battery_meter_very_low_overlay_symbol);
         mCriticalLevel = mContext.getResources().getInteger(
                 com.android.internal.R.integer.config_criticalBatteryWarningLevel);
+        mButtonHeightFraction = context.getResources().getFraction(
+                R.fraction.battery_button_height_fraction, 1, 1);
+        mSubpixelSmoothingLeft = context.getResources().getFraction(
+                R.fraction.battery_subpixel_smoothing_left, 1, 1);
+        mSubpixelSmoothingRight = context.getResources().getFraction(
+                R.fraction.battery_subpixel_smoothing_right, 1, 1);
 
         mFramePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
         mFramePaint.setColor(frameColor);
@@ -304,28 +312,28 @@
         final int height = mHeight - pt - pb;
         final int width = mWidth - pl - pr;
 
-        final int buttonHeight = (int) (height * 0.12f);
+        final int buttonHeight = (int) (height * mButtonHeightFraction);
 
         mFrame.set(0, 0, width, height);
         mFrame.offset(pl, pt);
 
         // button-frame: area above the battery body
         mButtonFrame.set(
-                mFrame.left + width * 0.25f,
+                mFrame.left + Math.round(width * 0.25f),
                 mFrame.top,
-                mFrame.right - width * 0.25f,
+                mFrame.right - Math.round(width * 0.25f),
                 mFrame.top + buttonHeight);
 
-        mButtonFrame.top += SUBPIXEL;
-        mButtonFrame.left += SUBPIXEL;
-        mButtonFrame.right -= SUBPIXEL;
+        mButtonFrame.top += mSubpixelSmoothingLeft;
+        mButtonFrame.left += mSubpixelSmoothingLeft;
+        mButtonFrame.right -= mSubpixelSmoothingRight;
 
         // frame: battery body area
         mFrame.top += buttonHeight;
-        mFrame.left += SUBPIXEL;
-        mFrame.top += SUBPIXEL;
-        mFrame.right -= SUBPIXEL;
-        mFrame.bottom -= SUBPIXEL;
+        mFrame.left += mSubpixelSmoothingLeft;
+        mFrame.top += mSubpixelSmoothingLeft;
+        mFrame.right -= mSubpixelSmoothingRight;
+        mFrame.bottom -= mSubpixelSmoothingRight;
 
         // set the battery charging color
         mBatteryPaint.setColor(tracker.plugged ? mChargeColor : getColorForLevel(level));
diff --git a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
index 7f5ed6a..714b0a8 100644
--- a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
+++ b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
@@ -112,17 +112,23 @@
             return;
         }
 
-        userManager.removeUser(currentUser.id);
+        boolean marked = userManager.markGuestForDeletion(currentUser.id);
+        if (!marked) {
+            Log.w(TAG, "Couldn't mark the guest for deletion for user " + userId);
+            return;
+        }
         UserInfo newGuest = userManager.createGuest(context, currentUser.name);
 
         try {
             if (newGuest == null) {
                 Log.e(TAG, "Could not create new guest, switching back to owner");
                 ActivityManagerNative.getDefault().switchUser(UserHandle.USER_OWNER);
+                userManager.removeUser(currentUser.id);
                 WindowManagerGlobal.getWindowManagerService().lockNow(null /* options */);
                 return;
             }
             ActivityManagerNative.getDefault().switchUser(newGuest.id);
+            userManager.removeUser(currentUser.id);
         } catch (RemoteException e) {
             Log.e(TAG, "Couldn't wipe session because ActivityManager or WindowManager is dead");
             return;
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index f4d0669..50ba68e 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -17,6 +17,7 @@
 package com.android.systemui.keyguard;
 
 import android.app.Activity;
+import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
 import android.app.AlarmManager;
 import android.app.PendingIntent;
@@ -27,6 +28,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.UserInfo;
 import android.media.AudioManager;
 import android.media.SoundPool;
 import android.os.Bundle;
@@ -302,6 +304,13 @@
         @Override
         public void onUserSwitchComplete(int userId) {
             mSwitchingUser = false;
+            if (userId != UserHandle.USER_OWNER) {
+                UserInfo info = UserManager.get(mContext).getUserInfo(userId);
+                if (info != null && info.isGuest()) {
+                    // If we just switched to a guest, try to dismiss keyguard.
+                    dismiss();
+                }
+            }
         }
 
         @Override
@@ -479,7 +488,7 @@
         mUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
 
         mLockPatternUtils = new LockPatternUtils(mContext);
-        mLockPatternUtils.setCurrentUser(UserHandle.USER_OWNER);
+        mLockPatternUtils.setCurrentUser(ActivityManager.getCurrentUser());
 
         // Assume keyguard is showing (unless it's disabled) until we know for sure...
         mShowing = (mUpdateMonitor.isDeviceProvisioned() || mLockPatternUtils.isSecure())
@@ -581,6 +590,8 @@
             final boolean lockImmediately =
                 mLockPatternUtils.getPowerButtonInstantlyLocks() || !mLockPatternUtils.isSecure();
 
+            notifyScreenOffLocked();
+
             if (mExitSecureCallback != null) {
                 if (DEBUG) Log.d(TAG, "pending exit secure callback cancelled");
                 try {
@@ -593,7 +604,6 @@
                     hideLocked();
                 }
             } else if (mShowing) {
-                notifyScreenOffLocked();
                 resetStateLocked();
             } else if (why == WindowManagerPolicy.OFF_BECAUSE_OF_TIMEOUT
                    || (why == WindowManagerPolicy.OFF_BECAUSE_OF_USER && !lockImmediately)) {
@@ -1133,7 +1143,6 @@
         }
 
         handleHide();
-        sendUserPresentBroadcast();
     }
 
     private void sendUserPresentBroadcast() {
@@ -1304,6 +1313,7 @@
             mHideAnimationRun = false;
             updateActivityLockScreenState();
             adjustStatusBarLocked();
+            sendUserPresentBroadcast();
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java b/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java
index 377fcc0..a9fdc86 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDualTileLabel.java
@@ -23,7 +23,6 @@
 import android.text.TextUtils.TruncateAt;
 import android.view.Gravity;
 import android.view.View;
-import android.widget.FrameLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -41,7 +40,7 @@
  *               truncate.
  *   Second line: ellipsis if necessary
  */
-public class QSDualTileLabel extends FrameLayout {
+public class QSDualTileLabel extends LinearLayout {
 
     private final Context mContext;
     private final TextView mFirstLine;
@@ -54,12 +53,13 @@
     public QSDualTileLabel(Context context) {
         super(context);
         mContext = context;
+        setOrientation(LinearLayout.VERTICAL);
 
         mHorizontalPaddingPx = mContext.getResources()
                 .getDimensionPixelSize(R.dimen.qs_dual_tile_padding_horizontal);
 
         mFirstLine = initTextView();
-        mFirstLine.setPadding(mHorizontalPaddingPx, 0, 0, 0);
+        mFirstLine.setPadding(mHorizontalPaddingPx, 0, mHorizontalPaddingPx, 0);
         final LinearLayout firstLineLayout = new LinearLayout(mContext);
         firstLineLayout.setPadding(0, 0, 0, 0);
         firstLineLayout.setOrientation(LinearLayout.HORIZONTAL);
@@ -70,13 +70,13 @@
         mFirstLineCaret.setScaleType(ImageView.ScaleType.MATRIX);
         mFirstLineCaret.setClickable(false);
         firstLineLayout.addView(mFirstLineCaret);
-        addView(firstLineLayout, newFrameLayoutParams());
+        addView(firstLineLayout, newLinearLayoutParams());
 
         mSecondLine = initTextView();
         mSecondLine.setPadding(mHorizontalPaddingPx, 0, mHorizontalPaddingPx, 0);
         mSecondLine.setEllipsize(TruncateAt.END);
         mSecondLine.setVisibility(GONE);
-        addView(mSecondLine, newFrameLayoutParams());
+        addView(mSecondLine, newLinearLayoutParams());
 
         addOnLayoutChangeListener(new OnLayoutChangeListener() {
             @Override
@@ -89,7 +89,7 @@
         });
     }
 
-    private static LayoutParams newFrameLayoutParams() {
+    private static LayoutParams newLinearLayoutParams() {
         final LayoutParams lp =
                 new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
         lp.gravity = Gravity.CENTER_HORIZONTAL;
@@ -104,6 +104,7 @@
             lp.topMargin = h * 4 / 5;
             mSecondLine.setLayoutParams(lp);
             mFirstLine.setMinHeight(h);
+            mFirstLine.setPadding(mHorizontalPaddingPx, 0, 0, 0);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 6bfe0a4..2fafb2c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -89,6 +89,7 @@
         mDetailContent = (ViewGroup) mDetail.findViewById(android.R.id.content);
         mDetailSettingsButton = (TextView) mDetail.findViewById(android.R.id.button2);
         mDetailDoneButton = (TextView) mDetail.findViewById(android.R.id.button1);
+        updateDetailText();
         mDetail.setVisibility(GONE);
         mDetail.setClickable(true);
         mBrightnessView = LayoutInflater.from(context).inflate(
@@ -112,6 +113,11 @@
         });
     }
 
+    private void updateDetailText() {
+        mDetailDoneButton.setText(R.string.quick_settings_done);
+        mDetailSettingsButton.setText(R.string.quick_settings_more_settings);
+    }
+
     public void setBrightnessMirror(BrightnessMirrorController c) {
         super.onFinishInflate();
         ToggleSlider brightnessSlider = (ToggleSlider) findViewById(R.id.brightness_slider);
@@ -150,6 +156,7 @@
         if (mListening) {
             refreshAllTiles();
         }
+        updateDetailText();
     }
 
     @Override
@@ -525,6 +532,12 @@
     };
 
     private final AnimatorListenerAdapter mHideGridContentWhenDone = new AnimatorListenerAdapter() {
+        public void onAnimationCancel(Animator animation) {
+            // If we have been cancelled, remove the listener so that onAnimationEnd doesn't get
+            // called, this will avoid accidentally turning off the grid when we don't want to.
+            animation.removeListener(this);
+        };
+
         @Override
         public void onAnimationEnd(Animator animation) {
             setGridContentVisibility(false);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index 2b071cc..cb685fe 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -373,6 +373,7 @@
         public boolean activityOut;
         public int overlayIconId;
         public boolean filter;
+        public boolean isOverlayIconWide;
 
         @Override
         public boolean copyTo(State other) {
@@ -380,13 +381,15 @@
             final boolean changed = o.enabled != enabled
                     || o.connected != connected || o.activityIn != activityIn
                     || o.activityOut != activityOut
-                    || o.overlayIconId != overlayIconId;
+                    || o.overlayIconId != overlayIconId
+                    || o.isOverlayIconWide != isOverlayIconWide;
             o.enabled = enabled;
             o.connected = connected;
             o.activityIn = activityIn;
             o.activityOut = activityOut;
             o.overlayIconId = overlayIconId;
             o.filter = filter;
+            o.isOverlayIconWide = isOverlayIconWide;
             return super.copyTo(other) || changed;
         }
 
@@ -399,6 +402,7 @@
             rt.insert(rt.length() - 1, ",activityOut=" + activityOut);
             rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId);
             rt.insert(rt.length() - 1, ",filter=" + filter);
+            rt.insert(rt.length() - 1, ",wideOverlayIcon=" + isOverlayIconWide);
             return rt;
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
index e6175d2..8d7edb9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
@@ -230,7 +230,7 @@
         final int w = MeasureSpec.getSize(widthMeasureSpec);
         final int h = MeasureSpec.getSize(heightMeasureSpec);
         final int iconSpec = exactly(mIconSizePx);
-        mIcon.measure(iconSpec, iconSpec);
+        mIcon.measure(MeasureSpec.makeMeasureSpec(w, MeasureSpec.AT_MOST), iconSpec);
         labelView().measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(h, MeasureSpec.AT_MOST));
         if (mDual) {
             mDivider.measure(widthMeasureSpec, exactly(mDivider.getLayoutParams().height));
diff --git a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
index 0ecdeaa..cfcd74e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
@@ -37,11 +37,16 @@
     private ImageView mIn;
     private ImageView mOut;
 
+    private int mWideOverlayIconStartPadding;
+
     public SignalTileView(Context context) {
         super(context);
 
         mIn = addTrafficView(R.drawable.ic_qs_signal_in);
         mOut = addTrafficView(R.drawable.ic_qs_signal_out);
+
+        mWideOverlayIconStartPadding = context.getResources().getDimensionPixelSize(
+                R.dimen.wide_type_icon_start_padding_qs);
     }
 
     private ImageView addTrafficView(int icon) {
@@ -106,6 +111,11 @@
         } else {
             mOverlay.setVisibility(GONE);
         }
+        if (s.overlayIconId > 0 && s.isOverlayIconWide) {
+            mSignal.setPaddingRelative(mWideOverlayIconStartPadding, 0, 0, 0);
+        } else {
+            mSignal.setPaddingRelative(0, 0, 0, 0);
+        }
         Drawable drawable = mSignal.getDrawable();
         if (state.autoMirrorDrawable && drawable != null) {
             drawable.setAutoMirrored(true);
@@ -122,10 +132,9 @@
             view.animate()
                 .setDuration(visible ? SHORT_DURATION : DEFAULT_DURATION)
                 .alpha(newAlpha)
-                .withLayer()
                 .start();
         } else {
             view.setAlpha(newAlpha);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index 98adf81..359a259 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -23,10 +23,8 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.TextView;
 
 import com.android.systemui.R;
-import com.android.systemui.qs.DataUsageGraph;
 import com.android.systemui.qs.QSTile;
 import com.android.systemui.qs.QSTileView;
 import com.android.systemui.qs.SignalTileView;
@@ -34,8 +32,6 @@
 import com.android.systemui.statusbar.policy.NetworkController.DataUsageInfo;
 import com.android.systemui.statusbar.policy.NetworkController.NetworkSignalChangedCallback;
 
-import java.text.DecimalFormat;
-
 /** Quick settings tile: Cellular **/
 public class CellularTile extends QSTile<QSTile.SignalState> {
     private static final Intent CELLULAR_SETTINGS = new Intent().setComponent(new ComponentName(
@@ -91,15 +87,16 @@
         if (cb == null) return;
 
         final Resources r = mContext.getResources();
-        state.iconId = cb.noSim ? R.drawable.stat_sys_no_sim
+        state.iconId = cb.noSim ? R.drawable.ic_qs_no_sim
                 : !cb.enabled || cb.airplaneModeEnabled ? R.drawable.ic_qs_signal_disabled
                 : cb.mobileSignalIconId > 0 ? cb.mobileSignalIconId
                 : R.drawable.ic_qs_signal_no_signal;
+        state.isOverlayIconWide = cb.isDataTypeIconWide;
         state.autoMirrorDrawable = !cb.noSim;
         state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) && !cb.wifiConnected
                 ? cb.dataTypeIconId
                 : 0;
-        state.filter = state.iconId != R.drawable.stat_sys_no_sim;
+        state.filter = state.iconId != R.drawable.ic_qs_no_sim;
         state.activityIn = cb.enabled && cb.activityIn;
         state.activityOut = cb.enabled && cb.activityOut;
 
@@ -142,6 +139,7 @@
         boolean activityOut;
         String enabledDesc;
         boolean noSim;
+        boolean isDataTypeIconWide;
     }
 
     private final NetworkSignalChangedCallback mCallback = new NetworkSignalChangedCallback() {
@@ -162,7 +160,8 @@
                 int mobileSignalIconId,
                 String mobileSignalContentDescriptionId, int dataTypeIconId,
                 boolean activityIn, boolean activityOut,
-                String dataTypeContentDescriptionId, String description, boolean noSim) {
+                String dataTypeContentDescriptionId, String description, boolean noSim,
+                boolean isDataTypeIconWide) {
             final CallbackInfo info = new CallbackInfo();  // TODO pool?
             info.enabled = enabled;
             info.wifiEnabled = mWifiEnabled;
@@ -176,6 +175,7 @@
             info.activityOut = activityOut;
             info.enabledDesc = description;
             info.noSim = noSim;
+            info.isDataTypeIconWide = isDataTypeIconWide;
             refreshState(info);
         }
 
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
index 46d8a9b..d1dc5d2 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java
@@ -60,7 +60,11 @@
     @Override
     protected void handleUpdateState(BooleanState state, Object arg) {
         final boolean locationEnabled =  mController.isLocationEnabled();
-        state.visible = !(mKeyguard.isSecure() && mKeyguard.isShowing());
+
+        // Work around for bug 15916487: don't show location tile on top of lock screen. After the
+        // bug is fixed, this should be reverted to only hiding it on secure lock screens:
+        // state.visible = !(mKeyguard.isSecure() && mKeyguard.isShowing());
+        state.visible = !mKeyguard.isShowing();
         state.value = locationEnabled;
         if (locationEnabled) {
             state.iconId = R.drawable.ic_qs_location_on;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
index 4fc2ee4..0985812 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java
@@ -206,7 +206,8 @@
                 int mobileSignalIconId,
                 String mobileSignalContentDescriptionId, int dataTypeIconId,
                 boolean activityIn, boolean activityOut,
-                String dataTypeContentDescriptionId, String description, boolean noSim) {
+                String dataTypeContentDescriptionId, String description, boolean noSim,
+                boolean isDataTypeIconWide) {
             // noop
         }
 
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java b/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
index 3e2ef94..34430d9 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentTasksLoader.java
@@ -34,14 +34,12 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.UserHandle;
-import android.os.UserManager;
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.View;
 
 import com.android.systemui.R;
 import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.recents.misc.Utilities;
 import com.android.systemui.statusbar.phone.PhoneStatusBar;
 
 import java.util.ArrayList;
@@ -205,8 +203,7 @@
         Drawable icon = getFullResIcon(td.resolveInfo, pm);
         if (td.userId != UserHandle.myUserId()) {
             // Need to badge the icon
-            final UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
-            icon = um.getBadgedDrawableForUser(icon, new UserHandle(td.userId));
+            icon = mContext.getPackageManager().getUserBadgedIcon(icon, new UserHandle(td.userId));
         }
         if (DEBUG) Log.v(TAG, "Loaded bitmap for task "
                 + td + ": " + thumbnail);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
index ec39d77..787de4e 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
@@ -16,9 +16,12 @@
 
 package com.android.systemui.recents;
 
+import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.ActivityOptions;
+import android.appwidget.AppWidgetProviderInfo;
 import android.content.ActivityNotFoundException;
+import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -52,6 +55,7 @@
 public class AlternateRecentsComponent implements ActivityOptions.OnAnimationStartedListener {
 
     final public static String EXTRA_FROM_HOME = "recents.triggeredOverHome";
+    final public static String EXTRA_FROM_SEARCH_HOME = "recents.triggeredOverSearchHome";
     final public static String EXTRA_FROM_APP_THUMBNAIL = "recents.animatingWithThumbnail";
     final public static String EXTRA_FROM_APP_FULL_SCREENSHOT = "recents.thumbnail";
     final public static String EXTRA_FROM_TASK_ID = "recents.activeTaskId";
@@ -62,7 +66,7 @@
     final public static String ACTION_TOGGLE_RECENTS_ACTIVITY = "action_toggle_recents_activity";
     final public static String ACTION_HIDE_RECENTS_ACTIVITY = "action_hide_recents_activity";
 
-    final static int sMinToggleDelay = 425;
+    final static int sMinToggleDelay = 350;
 
     final static String sToggleRecentsAction = "com.android.systemui.recents.SHOW_RECENTS";
     final static String sRecentsPackage = "com.android.systemui";
@@ -135,7 +139,8 @@
                 // Notify recents to hide itself
                 Intent intent = new Intent(ACTION_HIDE_RECENTS_ACTIVITY);
                 intent.setPackage(mContext.getPackageName());
-                intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+                intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT |
+                        Intent.FLAG_RECEIVER_FOREGROUND);
                 intent.putExtra(EXTRA_TRIGGERED_FROM_ALT_TAB, triggeredFromAltTab);
                 intent.putExtra(EXTRA_TRIGGERED_FROM_HOME_KEY, triggeredFromHomeKey);
                 mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
@@ -186,10 +191,14 @@
                 Task.TaskKey toTaskKey;
                 if (showNextTask) {
                     toTaskKey = group.getNextTaskInGroup(task);
-                    // XXX: We will actually set the appropriate launch animations here
+                    launchOpts = ActivityOptions.makeCustomAnimation(mContext,
+                            R.anim.recents_launch_next_affiliated_task_target,
+                            R.anim.recents_launch_next_affiliated_task_source);
                 } else {
                     toTaskKey = group.getPrevTaskInGroup(task);
-                    // XXX: We will actually set the appropriate launch animations here
+                    launchOpts = ActivityOptions.makeCustomAnimation(mContext,
+                            R.anim.recents_launch_prev_affiliated_task_target,
+                            R.anim.recents_launch_prev_affiliated_task_source);
                 }
                 if (toTaskKey != null) {
                     toTask = stack.findTaskWithId(toTaskKey.id);
@@ -200,7 +209,11 @@
 
         // Return early if there is no next task
         if (toTask == null) {
-            // XXX: We will actually show a bounce animation here
+            if (showNextTask) {
+                // XXX: Show the next-task bounce animation
+            } else {
+                // XXX: Show the prev-task bounce animation
+            }
             return;
         }
 
@@ -224,6 +237,7 @@
     }
 
     public void onConfigurationChanged(Configuration newConfig) {
+        // Reload the header bar layout
         reloadHeaderBarLayout();
         sLastScreenshot = null;
     }
@@ -238,8 +252,8 @@
         mConfig = RecentsConfiguration.reinitialize(mContext, mSystemServicesProxy);
         mConfig.updateOnConfigurationChange();
         mConfig.getTaskStackBounds(mWindowRect.width(), mWindowRect.height(), mStatusBarHeight,
-                mNavBarWidth, mTaskStackBounds);
-        if (mConfig.isLandscape && mConfig.transposeRecentsLayoutWithOrientation) {
+                (mConfig.hasTransposedNavBar ? mNavBarWidth : 0), mTaskStackBounds);
+        if (mConfig.isLandscape && mConfig.hasTransposedNavBar) {
             mSystemInsets.set(0, mStatusBarHeight, mNavBarWidth, 0);
         } else {
             mSystemInsets.set(0, mStatusBarHeight, 0, mNavBarHeight);
@@ -311,7 +325,8 @@
             // Notify recents to toggle itself
             Intent intent = new Intent(ACTION_TOGGLE_RECENTS_ACTIVITY);
             intent.setPackage(mContext.getPackageName());
-            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT |
+                    Intent.FLAG_RECEIVER_FOREGROUND);
             mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
             mLastToggleTime = System.currentTimeMillis();
             return;
@@ -344,8 +359,13 @@
     /**
      * Creates the activity options for a home->recents transition.
      */
-    ActivityOptions getHomeTransitionActivityOptions() {
+    ActivityOptions getHomeTransitionActivityOptions(boolean fromSearchHome) {
         mStartAnimationTriggered = false;
+        if (fromSearchHome) {
+            return ActivityOptions.makeCustomAnimation(mContext,
+                    R.anim.recents_from_search_launcher_enter,
+                    R.anim.recents_from_search_launcher_exit, mHandler, this);
+        }
         return ActivityOptions.makeCustomAnimation(mContext,
                 R.anim.recents_from_launcher_enter,
                 R.anim.recents_from_launcher_exit, mHandler, this);
@@ -377,9 +397,9 @@
                 toTask);
         if (toTransform != null && toTask.key != null) {
             Rect toTaskRect = toTransform.rect;
-
-            // XXX: Reduce the memory usage the to the task bar height
-            Bitmap thumbnail = Bitmap.createBitmap(toTaskRect.width(), toTaskRect.height(),
+            int toHeaderWidth = (int) (mHeaderBar.getMeasuredWidth() * toTransform.scale);
+            int toHeaderHeight = (int) (mHeaderBar.getMeasuredHeight() * toTransform.scale);
+            Bitmap thumbnail = Bitmap.createBitmap(toHeaderWidth, toHeaderHeight,
                     Bitmap.Config.ARGB_8888);
             if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
                 thumbnail.eraseColor(0xFFff0000);
@@ -393,7 +413,8 @@
 
             mStartAnimationTriggered = false;
             return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mStatusBarView,
-                    thumbnail, toTaskRect.left, toTaskRect.top, this);
+                    thumbnail, toTaskRect.left, toTaskRect.top, toTaskRect.width(),
+                    toTaskRect.height(), this);
         }
 
         // If both the screenshot and thumbnail fails, then just fall back to the default transition
@@ -470,8 +491,30 @@
             // If there is no thumbnail transition, but is launching from home into recents, then
             // use a quick home transition and do the animation from home
             if (hasRecentTasks) {
-                ActivityOptions opts = getHomeTransitionActivityOptions();
-                startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_HOME);
+                // Get the home activity info
+                String homeActivityPackage = mSystemServicesProxy.getHomeActivityPackageName();
+                // Get the search widget info
+                AppWidgetProviderInfo searchWidget = null;
+                String searchWidgetPackage = null;
+                if (mConfig.hasSearchBarAppWidget()) {
+                    searchWidget = mSystemServicesProxy.getAppWidgetInfo(
+                            mConfig.searchBarAppWidgetId);
+                } else {
+                    searchWidget = mSystemServicesProxy.resolveSearchAppWidget();
+                }
+                if (searchWidget != null && searchWidget.provider != null) {
+                    searchWidgetPackage = searchWidget.provider.getPackageName();
+                }
+                // Determine whether we are coming from a search owned home activity
+                boolean fromSearchHome = false;
+                if (homeActivityPackage != null && searchWidgetPackage != null &&
+                        homeActivityPackage.equals(searchWidgetPackage)) {
+                    fromSearchHome = true;
+                }
+
+                ActivityOptions opts = getHomeTransitionActivityOptions(fromSearchHome);
+                startAlternateRecentsActivity(topTask, opts,
+                        fromSearchHome ? EXTRA_FROM_SEARCH_HOME : EXTRA_FROM_HOME);
             } else {
                 // Otherwise we do the normal fade from an unknown source
                 ActivityOptions opts = getUnknownTransitionActivityOptions();
@@ -532,11 +575,35 @@
     public void onAnimationStarted() {
         // Notify recents to start the enter animation
         if (!mStartAnimationTriggered) {
+            // There can be a race condition between the start animation callback and
+            // the start of the new activity (where we register the receiver that listens
+            // to this broadcast, so we add our own receiver and if that gets called, then
+            // we know the activity has not yet started and we can retry sending the broadcast.
+            BroadcastReceiver fallbackReceiver = new BroadcastReceiver() {
+                @Override
+                public void onReceive(Context context, Intent intent) {
+                    if (getResultCode() == Activity.RESULT_OK) {
+                        mStartAnimationTriggered = true;
+                        return;
+                    }
+
+                    // Schedule for the broadcast to be sent again after some time
+                    mHandler.postDelayed(new Runnable() {
+                        @Override
+                        public void run() {
+                            onAnimationStarted();
+                        }
+                    }, 75);
+                }
+            };
+
+            // Send the broadcast to notify Recents that the animation has started
             Intent intent = new Intent(ACTION_START_ENTER_ANIMATION);
             intent.setPackage(mContext.getPackageName());
-            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
-            mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
-            mStartAnimationTriggered = true;
+            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT |
+                    Intent.FLAG_RECEIVER_FOREGROUND);
+            mContext.sendOrderedBroadcastAsUser(intent, UserHandle.CURRENT, null,
+                    fallbackReceiver, null, Activity.RESULT_CANCELED, null, null);
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
index 2f9715f..8f92027 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
@@ -107,9 +107,9 @@
             // Finish Recents
             if (mLaunchIntent != null) {
                 if (mLaunchOpts != null) {
-                    startActivityAsUser(mLaunchIntent, UserHandle.CURRENT);
-                } else {
                     startActivityAsUser(mLaunchIntent, mLaunchOpts.toBundle(), UserHandle.CURRENT);
+                } else {
+                    startActivityAsUser(mLaunchIntent, UserHandle.CURRENT);
                 }
             } else {
                 finish();
@@ -146,6 +146,9 @@
                 ReferenceCountedTrigger t = new ReferenceCountedTrigger(context, null, null, null);
                 mRecentsView.startEnterRecentsAnimation(new ViewAnimation.TaskViewEnterContext(t));
                 onEnterAnimationTriggered();
+                // Notify the fallback receiver that we have successfully got the broadcast
+                // See AlternateRecentsComponent.onAnimationStarted()
+                setResultCode(Activity.RESULT_OK);
             }
         }
     };
@@ -188,7 +191,9 @@
         }
 
         // Update the configuration based on the launch intent
-        mConfig.launchedFromHome = launchIntent.getBooleanExtra(
+        boolean fromSearchHome = launchIntent.getBooleanExtra(
+                AlternateRecentsComponent.EXTRA_FROM_SEARCH_HOME, false);
+        mConfig.launchedFromHome = fromSearchHome || launchIntent.getBooleanExtra(
                 AlternateRecentsComponent.EXTRA_FROM_HOME, false);
         mConfig.launchedFromAppWithThumbnail = launchIntent.getBooleanExtra(
                 AlternateRecentsComponent.EXTRA_FROM_APP_THUMBNAIL, false);
@@ -200,6 +205,18 @@
                 AlternateRecentsComponent.EXTRA_TRIGGERED_FROM_ALT_TAB, false);
         mConfig.launchedWithNoRecentTasks = !root.hasTasks();
 
+        // Create the home intent runnable
+        Intent homeIntent = new Intent(Intent.ACTION_MAIN, null);
+        homeIntent.addCategory(Intent.CATEGORY_HOME);
+        homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
+                Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+        mFinishLaunchHomeRunnable = new FinishRecentsRunnable(homeIntent,
+            ActivityOptions.makeCustomAnimation(this,
+                fromSearchHome ? R.anim.recents_to_search_launcher_enter :
+                        R.anim.recents_to_launcher_enter,
+                fromSearchHome ? R.anim.recents_to_search_launcher_exit :
+                        R.anim.recents_to_launcher_exit));
+
         // Mark the task that is the launch target
         int taskStackCount = stacks.size();
         if (mConfig.launchedToTaskId != -1) {
@@ -282,7 +299,7 @@
                         mSearchAppWidgetInfo);
                 Bundle opts = new Bundle();
                 opts.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
-                        AppWidgetProviderInfo.WIDGET_CATEGORY_RECENTS);
+                        AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX);
                 mSearchAppWidgetHostView.updateAppWidgetOptions(opts);
                 // Set the padding to 0 for this search widget
                 mSearchAppWidgetHostView.setPadding(0, 0, 0, 0);
@@ -341,20 +358,13 @@
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        // For the non-primary user, ensure that the SystemSericesProxy is initialized
+        RecentsTaskLoader.initialize(this);
 
         // Initialize the loader and the configuration
         mConfig = RecentsConfiguration.reinitialize(this,
                 RecentsTaskLoader.getInstance().getSystemServicesProxy());
 
-        // Create the home intent runnable
-        Intent homeIntent = new Intent(Intent.ACTION_MAIN, null);
-        homeIntent.addCategory(Intent.CATEGORY_HOME);
-        homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
-                            Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
-        mFinishLaunchHomeRunnable = new FinishRecentsRunnable(homeIntent,
-                ActivityOptions.makeCustomAnimation(this, R.anim.recents_to_launcher_enter,
-                        R.anim.recents_to_launcher_exit));
-
         // Initialize the widget host (the host id is static and does not change)
         mAppWidgetHost = new RecentsAppWidgetHost(this, Constants.Values.App.AppWidgetHostId);
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
index 5d8181c..ed5c126 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -57,7 +57,8 @@
 
     /** Layout */
     boolean isLandscape;
-    boolean transposeRecentsLayoutWithOrientation;
+    boolean hasTransposedSearchBar;
+    boolean hasTransposedNavBar;
 
     /** Loading */
     public int maxNumTasksToLoad;
@@ -74,8 +75,9 @@
     public float taskStackOverscrollPct;
 
     /** Task view animation and styles */
-    public int taskViewEnterFromHomeDuration;
     public int taskViewEnterFromHomeDelay;
+    public int taskViewEnterFromHomeDuration;
+    public int taskViewEnterFromHomeStaggerDelay;
     public int taskViewExitToHomeDuration;
     public int taskViewRemoveAnimDuration;
     public int taskViewRemoveAnimTranslationXPx;
@@ -173,8 +175,8 @@
 
         // Layout
         isLandscape = res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
-        transposeRecentsLayoutWithOrientation =
-                res.getBoolean(R.bool.recents_transpose_layout_with_orientation);
+        hasTransposedSearchBar = res.getBoolean(R.bool.recents_has_transposed_search_bar);
+        hasTransposedNavBar = res.getBoolean(R.bool.recents_has_transposed_nav_bar);
 
         // Insets
         displayRect.set(0, 0, dm.widthPixels, dm.heightPixels);
@@ -209,10 +211,12 @@
         taskStackTopPaddingPx = res.getDimensionPixelSize(R.dimen.recents_stack_top_padding);
 
         // Task view animation and styles
-        taskViewEnterFromHomeDuration =
-                res.getInteger(R.integer.recents_animate_task_enter_from_home_duration);
         taskViewEnterFromHomeDelay =
                 res.getInteger(R.integer.recents_animate_task_enter_from_home_delay);
+        taskViewEnterFromHomeDuration =
+                res.getInteger(R.integer.recents_animate_task_enter_from_home_duration);
+        taskViewEnterFromHomeStaggerDelay =
+                res.getInteger(R.integer.recents_animate_task_enter_from_home_stagger_delay);
         taskViewExitToHomeDuration =
                 res.getInteger(R.integer.recents_animate_task_exit_to_home_duration);
         taskViewRemoveAnimDuration =
@@ -326,13 +330,12 @@
     /** Returns whether the nav bar scrim should be visible. */
     public boolean hasNavBarScrim() {
         // Only show the scrim if we have recent tasks, and if the nav bar is not transposed
-        return !launchedWithNoRecentTasks &&
-                (!transposeRecentsLayoutWithOrientation || !isLandscape);
+        return !launchedWithNoRecentTasks && (!hasTransposedNavBar || !isLandscape);
     }
 
     /** Returns whether the current layout is horizontal. */
     public boolean hasHorizontalLayout() {
-        return isLandscape && transposeRecentsLayoutWithOrientation;
+        return isLandscape && hasTransposedSearchBar;
     }
 
     /**
@@ -343,7 +346,7 @@
                                    Rect taskStackBounds) {
         Rect searchBarBounds = new Rect();
         getSearchBarBounds(windowWidth, windowHeight, topInset, searchBarBounds);
-        if (isLandscape && transposeRecentsLayoutWithOrientation) {
+        if (isLandscape && hasTransposedSearchBar) {
             // In landscape, the search bar appears on the left
             taskStackBounds.set(searchBarBounds.right, topInset, windowWidth - rightInset, windowHeight);
         } else {
@@ -364,7 +367,7 @@
             searchBarSize = 0;
         }
 
-        if (isLandscape && transposeRecentsLayoutWithOrientation) {
+        if (isLandscape && hasTransposedSearchBar) {
             // In landscape, the search bar appears on the left
             searchBarSpaceBounds.set(0, topInset, searchBarSize, windowHeight);
         } else {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index b29f3780..bbd0a0d 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -32,6 +32,7 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
@@ -48,7 +49,6 @@
 import android.os.ParcelFileDescriptor;
 import android.os.RemoteException;
 import android.os.UserHandle;
-import android.os.UserManager;
 import android.provider.Settings;
 import android.util.Log;
 import android.util.Pair;
@@ -56,6 +56,7 @@
 import android.view.DisplayInfo;
 import android.view.SurfaceControl;
 import android.view.WindowManager;
+import android.view.accessibility.AccessibilityManager;
 import com.android.systemui.recents.Constants;
 
 import java.io.IOException;
@@ -73,12 +74,12 @@
 
     final static BitmapFactory.Options sBitmapOptions;
 
+    AccessibilityManager mAccm;
     ActivityManager mAm;
     IActivityManager mIam;
     AppWidgetManager mAwm;
     PackageManager mPm;
     IPackageManager mIpm;
-    UserManager mUm;
     SearchManager mSm;
     WindowManager mWm;
     Display mDisplay;
@@ -98,11 +99,11 @@
 
     /** Private constructor */
     public SystemServicesProxy(Context context) {
+        mAccm = AccessibilityManager.getInstance(context);
         mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
         mIam = ActivityManagerNative.getDefault();
         mAwm = AppWidgetManager.getInstance(context);
         mPm = context.getPackageManager();
-        mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mIpm = AppGlobals.getPackageManager();
         mSm = (SearchManager) context.getSystemService(Context.SEARCH_SERVICE);
         mWm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
@@ -342,7 +343,7 @@
      * necessary.
      */
     public Drawable getActivityIcon(ActivityInfo info, int userId) {
-        if (mPm == null || mUm == null) return null;
+        if (mPm == null) return null;
 
         // If we are mocking, then return a mock label
         if (Constants.DebugFlags.App.EnableSystemServicesProxy) {
@@ -358,11 +359,48 @@
      */
     public Drawable getBadgedIcon(Drawable icon, int userId) {
         if (userId != UserHandle.myUserId()) {
-            icon = mUm.getBadgedDrawableForUser(icon, new UserHandle(userId));
+            icon = mPm.getUserBadgedIcon(icon, new UserHandle(userId));
         }
         return icon;
     }
 
+    /** Returns the package name of the home activity. */
+    public String getHomeActivityPackageName() {
+        if (mPm == null) return null;
+        if (Constants.DebugFlags.App.EnableSystemServicesProxy) return null;
+
+        ArrayList<ResolveInfo> homeActivities = new ArrayList<ResolveInfo>();
+        ComponentName defaultHomeActivity = mPm.getHomeActivities(homeActivities);
+        if (defaultHomeActivity != null) {
+            return defaultHomeActivity.getPackageName();
+        } else if (homeActivities.size() == 1) {
+            ResolveInfo info = homeActivities.get(0);
+            if (info.activityInfo != null) {
+                return info.activityInfo.packageName;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Resolves and returns the first Recents widget from the same package as the global
+     * assist activity.
+     */
+    public AppWidgetProviderInfo resolveSearchAppWidget() {
+        if (mAwm == null) return null;
+        if (mAssistComponent == null) return null;
+
+        // Find the first Recents widget from the same package as the global assist activity
+        List<AppWidgetProviderInfo> widgets = mAwm.getInstalledProviders(
+                AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX);
+        for (AppWidgetProviderInfo info : widgets) {
+            if (info.provider.getPackageName().equals(mAssistComponent.getPackageName())) {
+                return info;
+            }
+        }
+        return null;
+    }
+
     /**
      * Resolves and binds the search app widget that is to appear in the recents.
      */
@@ -371,15 +409,7 @@
         if (mAssistComponent == null) return null;
 
         // Find the first Recents widget from the same package as the global assist activity
-        List<AppWidgetProviderInfo> widgets = mAwm.getInstalledProviders(
-                AppWidgetProviderInfo.WIDGET_CATEGORY_RECENTS);
-        AppWidgetProviderInfo searchWidgetInfo = null;
-        for (AppWidgetProviderInfo info : widgets) {
-            if (info.provider.getPackageName().equals(mAssistComponent.getPackageName())) {
-                searchWidgetInfo = info;
-                break;
-            }
-        }
+        AppWidgetProviderInfo searchWidgetInfo = resolveSearchAppWidget();
 
         // Return early if there is no search widget
         if (searchWidgetInfo == null) return null;
@@ -388,7 +418,7 @@
         int searchWidgetId = host.allocateAppWidgetId();
         Bundle opts = new Bundle();
         opts.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
-                AppWidgetProviderInfo.WIDGET_CATEGORY_RECENTS);
+                AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX);
         if (!mAwm.bindAppWidgetIdIfAllowed(searchWidgetId, searchWidgetInfo.provider, opts)) {
             return null;
         }
@@ -415,6 +445,15 @@
     }
 
     /**
+     * Returns whether touch exploration is currently enabled.
+     */
+    public boolean isTouchExplorationEnabled() {
+        if (mAccm == null) return false;
+
+        return mAccm.isEnabled() && mAccm.isTouchExplorationEnabled();
+    }
+
+    /**
      * Returns a global setting.
      */
     public int getGlobalSetting(Context context, String setting) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
index 0c6e7b6..1bfb41f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
@@ -413,10 +413,8 @@
         final SystemServicesProxy ssp =
                 RecentsTaskLoader.getInstance().getSystemServicesProxy();
         ActivityOptions opts = null;
-        int thumbnailWidth = transform.rect.width();
-        int thumbnailHeight = transform.rect.height();
-        if (task.thumbnail != null && thumbnailWidth > 0 && thumbnailHeight > 0 &&
-                task.thumbnail.getWidth() > 0 && task.thumbnail.getHeight() > 0) {
+        if (task.thumbnail != null && task.thumbnail.getWidth() > 0 &&
+                task.thumbnail.getHeight() > 0) {
             Bitmap b;
             if (tv != null) {
                 // Disable any focused state before we draw the header
@@ -424,7 +422,11 @@
                     tv.unsetFocusedTask();
                 }
 
-                b = Bitmap.createBitmap(thumbnailWidth, thumbnailHeight, Bitmap.Config.ARGB_8888);
+                float scale = tv.getScaleX();
+                int fromHeaderWidth = (int) (tv.mHeaderView.getMeasuredWidth() * scale);
+                int fromHeaderHeight = (int) (tv.mHeaderView.getMeasuredHeight() * scale);
+                b = Bitmap.createBitmap(fromHeaderWidth, fromHeaderHeight,
+                        Bitmap.Config.ARGB_8888);
                 if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
                     b.eraseColor(0xFFff0000);
                 } else {
@@ -435,7 +437,7 @@
                 }
             } else {
                 // Notify the system to skip the thumbnail layer by using an ALPHA_8 bitmap
-                b = Bitmap.createBitmap(thumbnailWidth, thumbnailHeight, Bitmap.Config.ALPHA_8);
+                b = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
             }
             ActivityOptions.OnAnimationStartedListener animStartedListener = null;
             if (lockToTask) {
@@ -456,7 +458,8 @@
                 };
             }
             opts = ActivityOptions.makeThumbnailAspectScaleUpAnimation(sourceView,
-                    b, offsetX, offsetY, animStartedListener);
+                    b, offsetX, offsetY, transform.rect.width(), transform.rect.height(),
+                    animStartedListener);
         }
 
         final ActivityOptions launchOpts = opts;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java b/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
index 5b17b41..162897e 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
@@ -97,6 +97,14 @@
      * going home).
      */
     public void startExitRecentsAnimation() {
+        if (mHasStatusBarScrim && mShouldAnimateStatusBarScrim) {
+            mStatusBarScrimView.animate()
+                    .translationY(-mStatusBarScrimView.getMeasuredHeight())
+                    .setStartDelay(0)
+                    .setDuration(mConfig.taskBarExitAnimDuration)
+                    .setInterpolator(mConfig.fastOutSlowInInterpolator)
+                    .start();
+        }
         if (mHasNavBarScrim && mShouldAnimateNavBarScrim) {
             mNavBarScrimView.animate()
                     .translationY(mNavBarScrimView.getMeasuredHeight())
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 dbed136..895b9d1 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -22,11 +22,15 @@
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
+import android.view.accessibility.AccessibilityNodeInfo;
 import android.widget.FrameLayout;
 import com.android.systemui.R;
 import com.android.systemui.recents.Constants;
 import com.android.systemui.recents.RecentsConfiguration;
 import com.android.systemui.recents.misc.DozeTrigger;
+import com.android.systemui.recents.misc.SystemServicesProxy;
 import com.android.systemui.recents.model.RecentsPackageMonitor;
 import com.android.systemui.recents.model.RecentsTaskLoader;
 import com.android.systemui.recents.model.Task;
@@ -67,6 +71,7 @@
     DebugOverlayView mDebugOverlay;
     Rect mTaskStackBounds = new Rect();
     int mFocusedTaskIndex = -1;
+    int mPrevAccessibilityFocusedIndex = -1;
 
     // Optimizations
     int mStackViewsAnimationDuration;
@@ -244,6 +249,9 @@
     /** Synchronizes the views with the model */
     boolean synchronizeStackViewsWithModel() {
         if (mStackViewsDirty) {
+            RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
+            SystemServicesProxy ssp = loader.getSystemServicesProxy();
+
             // Get all the task transforms
             ArrayList<Task> tasks = mStack.getTasks();
             float stackScroll = mStackScroller.getStackScroll();
@@ -293,6 +301,18 @@
                 // Animate the task into place
                 tv.updateViewPropertiesToTaskTransform(mCurrentTaskTransforms.get(taskIndex),
                         mStackViewsAnimationDuration);
+
+                // Request accessibility focus on the next view if we removed the task
+                // that previously held accessibility focus
+                childCount = getChildCount();
+                if (childCount > 0 && ssp.isTouchExplorationEnabled()) {
+                    TaskView atv = (TaskView) getChildAt(childCount - 1);
+                    int indexOfTask = mStack.indexOfTask(atv.getTask());
+                    if (mPrevAccessibilityFocusedIndex != indexOfTask) {
+                        tv.requestAccessibilityFocus();
+                        mPrevAccessibilityFocusedIndex = indexOfTask;
+                    }
+                }
             }
 
             // Reset the request-synchronize params
@@ -432,6 +452,22 @@
     }
 
     @Override
+    public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+        super.onInitializeAccessibilityEvent(event);
+        int childCount = getChildCount();
+        if (childCount > 0) {
+            TaskView backMostTask = (TaskView) getChildAt(0);
+            TaskView frontMostTask = (TaskView) getChildAt(childCount - 1);
+            event.setFromIndex(mStack.indexOfTask(backMostTask.getTask()));
+            event.setToIndex(mStack.indexOfTask(frontMostTask.getTask()));
+            event.setContentDescription(frontMostTask.getTask().activityLabel);
+        }
+        event.setItemCount(mStack.getTaskCount());
+        event.setScrollY(mStackScroller.mScroller.getCurrY());
+        event.setMaxScrollY(mStackScroller.progressToScrollRange(mLayoutAlgorithm.mMaxScrollP));
+    }
+
+    @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
         return mTouchHandler.onInterceptTouchEvent(ev);
     }
@@ -447,6 +483,8 @@
         // Synchronize the views
         synchronizeStackViewsWithModel();
         clipTaskViews();
+        // Notify accessibility
+        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SCROLLED);
     }
 
     /** Computes the stack and task rects */
@@ -623,6 +661,15 @@
                     mStartEnterAnimationCompleted = true;
                     // Start dozing
                     mUIDozeTrigger.startDozing();
+                    // Focus the first view if accessibility is enabled
+                    RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
+                    SystemServicesProxy ssp = loader.getSystemServicesProxy();
+                    int childCount = getChildCount();
+                    if (childCount > 0 && ssp.isTouchExplorationEnabled()) {
+                        TaskView tv = ((TaskView) getChildAt(childCount - 1));
+                        tv.requestAccessibilityFocus();
+                        mPrevAccessibilityFocusedIndex = mStack.indexOfTask(tv.getTask());
+                    }
                 }
             });
         }
@@ -812,6 +859,11 @@
     public void prepareViewToEnterPool(TaskView tv) {
         Task task = tv.getTask();
 
+        // Clear the accessibility focus for that view
+        if (tv.isAccessibilityFocused()) {
+            tv.clearAccessibilityFocus();
+        }
+
         // Report that this tasks's data is no longer being used
         RecentsTaskLoader.getInstance().unloadTaskData(task);
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
index eecc170..4563597 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
@@ -284,7 +284,7 @@
                 float scaledWindowInsetTop = (int) (taskScale * windowInsetTop);
                 float scaledTranslationY = taskRect.top + transform.translationY -
                         (scaledWindowInsetTop + scaledYOffset);
-                startDelay = mConfig.taskViewEnterFromHomeDelay;
+                startDelay = mConfig.taskViewEnterFromHomeStaggerDelay;
 
                 // Animate the top clip
                 mViewBounds.animateClipTop(windowInsetTop, duration,
@@ -410,8 +410,8 @@
         } else if (mConfig.launchedFromHome) {
             // Animate the tasks up
             int frontIndex = (ctx.currentStackViewCount - ctx.currentStackViewIndex - 1);
-            int delay = mConfig.taskBarEnterAnimDelay +
-                    frontIndex * mConfig.taskViewEnterFromHomeDelay;
+            int delay = mConfig.taskViewEnterFromHomeDelay +
+                    frontIndex * mConfig.taskViewEnterFromHomeStaggerDelay;
             if (Constants.DebugFlags.App.EnableShadows) {
                 animate().translationZ(transform.translationZ);
             }
@@ -839,25 +839,28 @@
 
     @Override
      public void onClick(final View v) {
-        // We purposely post the handler delayed to allow for the touch feedback to draw
         final TaskView tv = this;
-        postDelayed(new Runnable() {
-            @Override
-            public void run() {
-                if (Constants.DebugFlags.App.EnableTaskFiltering && v == mHeaderView.mApplicationIcon) {
-                    mCb.onTaskViewAppIconClicked(tv);
-                } else if (v == mHeaderView.mDismissButton) {
-                    dismissTask();
-                } else {
-                    if (v == mActionButtonView) {
-                        // Reset the translation of the action button before we animate it out
-                        mActionButtonView.setTranslationZ(0f);
+        final boolean delayViewClick = (v != this) && (v != mActionButtonView);
+        if (delayViewClick) {
+            // We purposely post the handler delayed to allow for the touch feedback to draw
+            postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    if (Constants.DebugFlags.App.EnableTaskFiltering && v == mHeaderView.mApplicationIcon) {
+                        mCb.onTaskViewAppIconClicked(tv);
+                    } else if (v == mHeaderView.mDismissButton) {
+                        dismissTask();
                     }
-                    mCb.onTaskViewClicked(tv, tv.getTask(),
-                            (v == mFooterView || v == mActionButtonView));
                 }
+            }, 125);
+        } else {
+            if (v == mActionButtonView) {
+                // Reset the translation of the action button before we animate it out
+                mActionButtonView.setTranslationZ(0f);
             }
-        }, 125);
+            mCb.onTaskViewClicked(tv, tv.getTask(),
+                    (v == mFooterView || v == mActionButtonView));
+        }
     }
 
     /**** View.OnLongClickListener Implementation ****/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
index 500bf45..c869ba4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
@@ -88,6 +88,9 @@
             = new PathInterpolator(0.6f, 0, 0.5f, 1);
     private static final Interpolator ACTIVATE_INVERSE_ALPHA_INTERPOLATOR
             = new PathInterpolator(0, 0, 0.5f, 1);
+    private final int mTintedRippleColor;
+    private final int mLowPriorityRippleColor;
+    private final int mNormalRippleColor;
 
     private boolean mDimmed;
     private boolean mDark;
@@ -118,7 +121,6 @@
 
     private NotificationBackgroundView mBackgroundNormal;
     private NotificationBackgroundView mBackgroundDimmed;
-    private NotificationScrimView mScrimView;
     private ObjectAnimator mBackgroundAnimator;
     private RectF mAppearAnimationRect = new RectF();
     private PorterDuffColorFilter mAppearAnimationFilter;
@@ -153,6 +155,12 @@
         mNormalColor = getResources().getColor(R.color.notification_material_background_color);
         mLowPriorityColor = getResources().getColor(
                 R.color.notification_material_background_low_priority_color);
+        mTintedRippleColor = context.getResources().getColor(
+                R.color.notification_ripple_tinted_color);
+        mLowPriorityRippleColor = context.getResources().getColor(
+                R.color.notification_ripple_color_low_priority);
+        mNormalRippleColor = context.getResources().getColor(
+                R.color.notification_ripple_untinted_color);
     }
 
     @Override
@@ -164,8 +172,6 @@
         mBackgroundDimmed.setCustomBackground(R.drawable.notification_material_bg_dim);
         updateBackground();
         updateBackgroundTint();
-        mScrimView = (NotificationScrimView) findViewById(R.id.scrim_view);
-        setScrimAmount(0);
     }
 
     private final Runnable mTapTimeoutRunnable = new Runnable() {
@@ -191,6 +197,16 @@
         }
     }
 
+    @Override
+    protected void drawableStateChanged() {
+        super.drawableStateChanged();
+        if (mDimmed) {
+            mBackgroundDimmed.setState(getDrawableState());
+        } else {
+            mBackgroundNormal.setState(getDrawableState());
+        }
+    }
+
     private boolean handleTouchEventDimmed(MotionEvent event) {
         int action = event.getActionMasked();
         switch (action) {
@@ -372,12 +388,15 @@
 
     private void updateBackgroundTint() {
         int color = getBackgroundColor();
+        int rippleColor = getRippleColor();
         if (color == mNormalColor) {
             // We don't need to tint a normal notification
             color = 0;
         }
         mBackgroundDimmed.setTint(color);
         mBackgroundNormal.setTint(color);
+        mBackgroundDimmed.setRippleColor(rippleColor);
+        mBackgroundNormal.setRippleColor(rippleColor);
     }
 
     private void fadeBackground() {
@@ -443,7 +462,6 @@
         setPivotY(actualHeight / 2);
         mBackgroundNormal.setActualHeight(actualHeight);
         mBackgroundDimmed.setActualHeight(actualHeight);
-        mScrimView.setActualHeight(actualHeight);
     }
 
     @Override
@@ -451,7 +469,6 @@
         super.setClipTopAmount(clipTopAmount);
         mBackgroundNormal.setClipTopAmount(clipTopAmount);
         mBackgroundDimmed.setClipTopAmount(clipTopAmount);
-        mScrimView.setClipTopAmount(clipTopAmount);
     }
 
     @Override
@@ -474,11 +491,6 @@
         }
     }
 
-    @Override
-    public void setScrimAmount(float scrimAmount) {
-        mScrimView.setAlpha(scrimAmount);
-    }
-
     private void startAppearAnimation(boolean isAppearing, float translationDirection, long delay,
             long duration, final Runnable onFinishedRunnable) {
         if (mAppearAnimator != null) {
@@ -618,6 +630,18 @@
         }
     }
 
+    private int getRippleColor() {
+        if (mBgTint != 0) {
+            return mTintedRippleColor;
+        } else if (mShowingLegacyBackground) {
+            return mTintedRippleColor;
+        } else if (mIsBelowSpeedBump) {
+            return mLowPriorityRippleColor;
+        } else {
+            return mNormalRippleColor;
+        }
+    }
+
     /**
      * When we draw the appear animation, we render the view in a bitmap and render this bitmap
      * as a shader of a rect. This call creates the Bitmap and switches the drawing mode,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index f04c8c8..907a13f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -34,13 +34,12 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.database.ContentObserver;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Color;
+import android.graphics.PorterDuff;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
 import android.os.Build;
@@ -70,8 +69,10 @@
 import android.view.ViewAnimationUtils;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
+import android.view.ViewStub;
 import android.view.WindowManager;
 import android.view.WindowManagerGlobal;
+import android.view.accessibility.AccessibilityManager;
 import android.view.animation.AnimationUtils;
 import android.widget.DateTimeView;
 import android.widget.ImageView;
@@ -93,9 +94,11 @@
 import com.android.systemui.statusbar.phone.KeyguardTouchDelegate;
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.statusbar.policy.HeadsUpNotificationView;
+import com.android.systemui.statusbar.policy.PreviewInflater;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 
 import java.util.ArrayList;
+import java.util.List;
 import java.util.Locale;
 
 import static com.android.keyguard.KeyguardHostView.OnDismissAction;
@@ -160,6 +163,7 @@
     final protected SparseArray<UserInfo> mCurrentProfiles = new SparseArray<UserInfo>();
 
     protected int mLayoutDirection = -1; // invalid
+    protected AccessibilityManager mAccessibilityManager;
     private Locale mLocale;
     private float mFontScale;
 
@@ -177,7 +181,7 @@
     // public mode, private notifications, etc
     private boolean mLockscreenPublicMode = false;
     private final SparseBooleanArray mUsersAllowingPrivateNotifications = new SparseBooleanArray();
-    private NotificationColorUtil mNotificationColorUtil = NotificationColorUtil.getInstance();
+    private NotificationColorUtil mNotificationColorUtil;
 
     private UserManager mUserManager;
 
@@ -203,7 +207,7 @@
     protected int mZenMode;
 
     // which notification is currently being longpress-examined by the user
-    private View mNotificationGutsExposed;
+    private NotificationGuts mNotificationGutsExposed;
 
     private TimeInterpolator mLinearOutSlowIn, mFastOutLinearIn;
 
@@ -261,10 +265,12 @@
             final boolean isActivity = pendingIntent.isActivity();
             if (isActivity) {
                 final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
+                final boolean afterKeyguardGone = PreviewInflater.wouldLaunchResolverActivity(
+                        mContext, pendingIntent.getIntent(), mCurrentUserId);
                 dismissKeyguardThenExecute(new OnDismissAction() {
                     @Override
                     public boolean onDismiss() {
-                        if (keyguardShowing) {
+                        if (keyguardShowing && !afterKeyguardGone) {
                             try {
                                 ActivityManagerNative.getDefault()
                                         .keyguardWaitingForActivityDrawn();
@@ -278,7 +284,7 @@
                         }
 
                         boolean handled = superOnClickHandler(view, pendingIntent, fillInIntent);
-                        overrideActivityPendingAppTransition(keyguardShowing);
+                        overrideActivityPendingAppTransition(keyguardShowing && !afterKeyguardGone);
 
                         // close the shade if it was open
                         if (handled) {
@@ -288,7 +294,7 @@
                         // Wait for activity start.
                         return handled;
                     }
-                }, false /* afterKeyguardGone */);
+                }, afterKeyguardGone);
                 return true;
             } else {
                 return super.onClickHandler(view, pendingIntent, fillInIntent);
@@ -365,6 +371,24 @@
                     Notification n = sbn.getNotification();
                     boolean isUpdate = mNotificationData.get(sbn.getKey()) != null
                             || isHeadsUp(sbn.getKey());
+
+                    // Ignore children of notifications that have a summary, since we're not
+                    // going to show them anyway. This is true also when the summary is canceled,
+                    // because children are automatically canceled by NoMan in that case.
+                    if (n.isGroupChild() &&
+                            mNotificationData.isGroupWithSummary(sbn.getGroupKey())) {
+                        if (DEBUG) {
+                            Log.d(TAG, "Ignoring group child due to existing summary: " + sbn);
+                        }
+
+                        // Remove existing notification to avoid stale data.
+                        if (isUpdate) {
+                            removeNotification(sbn.getKey(), rankingMap);
+                        } else {
+                            mNotificationData.updateRanking(rankingMap);
+                        }
+                        return;
+                    }
                     if (isUpdate) {
                         updateNotification(sbn, rankingMap);
                     } else {
@@ -417,8 +441,13 @@
         mDevicePolicyManager = (DevicePolicyManager)mContext.getSystemService(
                 Context.DEVICE_POLICY_SERVICE);
 
+        mNotificationColorUtil = NotificationColorUtil.getInstance(mContext);
+
         mNotificationData = new NotificationData(this);
 
+        mAccessibilityManager = (AccessibilityManager)
+                mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
+
         mDreamManager = IDreamManager.Stub.asInterface(
                 ServiceManager.checkService(DreamService.DREAM_SERVICE));
         mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
@@ -539,6 +568,8 @@
             // disable lockscreen notifications until user acts on the banner.
             Settings.Secure.putInt(mContext.getContentResolver(),
                     Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0);
+            Settings.Secure.putInt(mContext.getContentResolver(),
+                    Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, 0);
 
             final String packageName = mContext.getPackageName();
             PendingIntent cancelIntent = PendingIntent.getBroadcast(mContext, 0,
@@ -657,19 +688,11 @@
 
     protected void applyColorsAndBackgrounds(StatusBarNotification sbn,
             NotificationData.Entry entry) {
-        PackageManager pmUser = getPackageManagerForUser(
-                entry.notification.getUser().getIdentifier());
-        int version = 0;
-        try {
-            ApplicationInfo info = pmUser.getApplicationInfo(sbn.getPackageName(), 0);
-            version = info.targetSdkVersion;
-        } catch (NameNotFoundException ex) {
-            Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex);
-        }
 
         if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) {
             // Using custom RemoteViews
-            if (version >= Build.VERSION_CODES.GINGERBREAD && version < Build.VERSION_CODES.L) {
+            if (entry.targetSdk >= Build.VERSION_CODES.GINGERBREAD
+                    && entry.targetSdk < Build.VERSION_CODES.L) {
                 entry.row.setShowingLegacyBackground(true);
                 entry.legacy = true;
             }
@@ -677,12 +700,15 @@
             // Using platform templates
             final int color = sbn.getNotification().color;
             if (isMediaNotification(entry)) {
-                entry.row.setTintColor(color);
+                entry.row.setTintColor(color == Notification.COLOR_DEFAULT
+                        ? mContext.getResources().getColor(
+                                R.color.notification_material_background_media_default_color)
+                        : color);
             }
         }
 
         if (entry.icon != null) {
-            if (version >= Build.VERSION_CODES.L) {
+            if (entry.targetSdk >= Build.VERSION_CODES.L) {
                 entry.icon.setColorFilter(mContext.getResources().getColor(android.R.color.white));
             } else {
                 entry.icon.setColorFilter(null);
@@ -693,14 +719,26 @@
     public boolean isMediaNotification(NotificationData.Entry entry) {
         // TODO: confirm that there's a valid media key
         return entry.expandedBig != null &&
-               entry.expandedBig.findViewById(com.android.internal.R.id.media_action_area) != null;
+               entry.expandedBig.findViewById(com.android.internal.R.id.media_actions) != null;
     }
 
+    // The gear button in the guts that links to the app's own notification settings
+    private void startAppOwnNotificationSettingsActivity(Intent intent,
+            final int notificationId, final String notificationTag, final int appUid) {
+        intent.putExtra("notification_id", notificationId);
+        intent.putExtra("notification_tag", notificationTag);
+        startNotificationGutsIntent(intent, appUid);
+    }
+
+    // The (i) button in the guts that links to the system notification settings for that app
     private void startAppNotificationSettingsActivity(String packageName, final int appUid) {
         final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
         intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName);
         intent.putExtra(Settings.EXTRA_APP_UID, appUid);
+        startNotificationGutsIntent(intent, appUid);
+    }
 
+    private void startNotificationGutsIntent(final Intent intent, final int appUid) {
         final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
         dismissKeyguardThenExecute(new OnDismissAction() {
             @Override
@@ -727,24 +765,108 @@
         }, false /* afterKeyguardGone */);
     }
 
+    private void inflateGuts(ExpandableNotificationRow row) {
+        ViewStub stub = (ViewStub) row.findViewById(R.id.notification_guts_stub);
+        if (stub != null) {
+            stub.inflate();
+        }
+        final StatusBarNotification sbn = row.getStatusBarNotification();
+        PackageManager pmUser = getPackageManagerForUser(
+                sbn.getUser().getIdentifier());
+        row.setTag(sbn.getPackageName());
+        final View guts = row.findViewById(R.id.notification_guts);
+        final String pkg = sbn.getPackageName();
+        String appname = pkg;
+        Drawable pkgicon = null;
+        int appUid = -1;
+        try {
+            final ApplicationInfo info = pmUser.getApplicationInfo(pkg,
+                    PackageManager.GET_UNINSTALLED_PACKAGES
+                            | PackageManager.GET_DISABLED_COMPONENTS);
+            if (info != null) {
+                appname = String.valueOf(pmUser.getApplicationLabel(info));
+                pkgicon = pmUser.getApplicationIcon(info);
+                appUid = info.uid;
+            }
+        } catch (NameNotFoundException e) {
+            // app is gone, just show package name and generic icon
+            pkgicon = pmUser.getDefaultActivityIcon();
+        }
+        ((ImageView) row.findViewById(android.R.id.icon)).setImageDrawable(pkgicon);
+        ((DateTimeView) row.findViewById(R.id.timestamp)).setTime(sbn.getPostTime());
+        ((TextView) row.findViewById(R.id.pkgname)).setText(appname);
+        final View settingsButton = guts.findViewById(R.id.notification_inspect_item);
+        final View appSettingsButton
+                = guts.findViewById(R.id.notification_inspect_app_provided_settings);
+        if (appUid >= 0) {
+            final int appUidF = appUid;
+            settingsButton.setOnClickListener(new View.OnClickListener() {
+                public void onClick(View v) {
+                    startAppNotificationSettingsActivity(pkg, appUidF);
+                }
+            });
+
+            final Intent appSettingsQueryIntent
+                    = new Intent(Intent.ACTION_MAIN)
+                    .addCategory(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES)
+                    .setPackage(pkg);
+            List<ResolveInfo> infos = pmUser.queryIntentActivities(appSettingsQueryIntent, 0);
+            if (infos.size() > 0) {
+                appSettingsButton.setVisibility(View.VISIBLE);
+                appSettingsButton.setContentDescription(
+                        mContext.getResources().getString(
+                                R.string.status_bar_notification_app_settings_title,
+                                appname
+                        ));
+                final Intent appSettingsLaunchIntent = new Intent(appSettingsQueryIntent)
+                        .setClassName(pkg, infos.get(0).activityInfo.name);
+                appSettingsButton.setOnClickListener(new View.OnClickListener() {
+                    public void onClick(View v) {
+                        startAppOwnNotificationSettingsActivity(appSettingsLaunchIntent,
+                                sbn.getId(),
+                                sbn.getTag(),
+                                appUidF);
+                    }
+                });
+            } else {
+                appSettingsButton.setVisibility(View.GONE);
+            }
+        } else {
+            settingsButton.setVisibility(View.GONE);
+            appSettingsButton.setVisibility(View.GONE);
+        }
+
+    }
+
     protected SwipeHelper.LongPressListener getNotificationLongClicker() {
         return new SwipeHelper.LongPressListener() {
             @Override
             public boolean onLongPress(View v, int x, int y) {
                 dismissPopups();
 
-                if (v.getWindowToken() == null) return false;
+                if (!(v instanceof ExpandableNotificationRow)) {
+                    return false;
+                }
+                if (v.getWindowToken() == null) {
+                    Log.e(TAG, "Trying to show notification guts, but not attached to window");
+                    return false;
+                }
+
+                inflateGuts((ExpandableNotificationRow) v);
 
                 // Assume we are a status_bar_notification_row
-                final View guts = v.findViewById(R.id.notification_guts);
-                if (guts == null) return false;
+                final NotificationGuts guts = (NotificationGuts) v.findViewById(
+                        R.id.notification_guts);
 
                 // Already showing?
-                if (guts.getVisibility() == View.VISIBLE) return false;
+                if (guts.getVisibility() == View.VISIBLE) {
+                    Log.e(TAG, "Trying to show notification guts, but already visible");
+                    return false;
+                }
 
                 guts.setVisibility(View.VISIBLE);
-                final double horz = Math.max(v.getWidth() - x, x);
-                final double vert = Math.max(v.getHeight() - y, y);
+                final double horz = Math.max(guts.getWidth() - x, x);
+                final double vert = Math.max(guts.getActualHeight() - y, y);
                 final float r = (float) Math.hypot(horz, vert);
                 final Animator a
                         = ViewAnimationUtils.createCircularReveal(guts, x, y, 0, r);
@@ -761,11 +883,13 @@
 
     public void dismissPopups() {
         if (mNotificationGutsExposed != null) {
-            final View v = mNotificationGutsExposed;
+            final NotificationGuts v = mNotificationGutsExposed;
             mNotificationGutsExposed = null;
 
+            if (v.getWindowToken() == null) return;
+
             final int x = (v.getLeft() + v.getRight()) / 2;
-            final int y = (v.getTop() + v.getBottom()) / 2;
+            final int y = (v.getTop() + v.getActualHeight() / 2);
             final Animator a = ViewAnimationUtils.createCircularReveal(v,
                     x, y, x, 0);
             a.setDuration(200);
@@ -1099,7 +1223,7 @@
                 entry.notification.getUser().getIdentifier());
 
         int maxHeight = mRowMaxHeight;
-        StatusBarNotification sbn = entry.notification;
+        final StatusBarNotification sbn = entry.notification;
         RemoteViews contentView = sbn.getNotification().contentView;
         RemoteViews bigContentView = sbn.getNotification().bigContentView;
 
@@ -1145,40 +1269,6 @@
             row.setExpansionLogger(this, entry.notification.getKey());
         }
 
-        // the notification inspector (see SwipeHelper.setLongPressListener)
-        row.setTag(sbn.getPackageName());
-        final View guts = row.findViewById(R.id.notification_guts);
-        final String pkg = entry.notification.getPackageName();
-        String appname = pkg;
-        Drawable pkgicon = null;
-        int appUid = -1;
-        try {
-            final ApplicationInfo info = pmUser.getApplicationInfo(pkg,
-                PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS);
-            if (info != null) {
-                appname = String.valueOf(pmUser.getApplicationLabel(info));
-                pkgicon = pmUser.getApplicationIcon(info);
-                appUid = info.uid;
-            }
-        } catch (NameNotFoundException e) {
-            // app is gone, just show package name and generic icon
-            pkgicon = pmUser.getDefaultActivityIcon();
-        }
-        ((ImageView) row.findViewById(android.R.id.icon)).setImageDrawable(pkgicon);
-        ((DateTimeView) row.findViewById(R.id.timestamp)).setTime(entry.notification.getPostTime());
-        ((TextView) row.findViewById(R.id.pkgname)).setText(appname);
-        final View settingsButton = guts.findViewById(R.id.notification_inspect_item);
-        if (appUid >= 0) {
-            final int appUidF = appUid;
-            settingsButton.setOnClickListener(new View.OnClickListener() {
-                public void onClick(View v) {
-                    startAppNotificationSettingsActivity(pkg, appUidF);
-                }
-            });
-        } else {
-            settingsButton.setVisibility(View.GONE);
-        }
-
         workAroundBadLayerDrawableOpacity(row);
         View vetoButton = updateNotificationVetoButton(row, sbn);
         vetoButton.setContentDescription(mContext.getString(
@@ -1248,13 +1338,23 @@
             }
         }
 
+        // Extract target SDK version.
+        try {
+            ApplicationInfo info = pmUser.getApplicationInfo(sbn.getPackageName(), 0);
+            entry.targetSdk = info.targetSdkVersion;
+        } catch (NameNotFoundException ex) {
+            Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex);
+        }
+
         if (publicViewLocal == null) {
             // Add a basic notification template
             publicViewLocal = LayoutInflater.from(mContext).inflate(
-                    com.android.internal.R.layout.notification_template_material_base,
-                    expandedPublic, true);
+                    R.layout.notification_public_default,
+                    expandedPublic, false);
+            publicViewLocal.setIsRootNamespace(true);
+            expandedPublic.setContractedChild(publicViewLocal);
 
-            final TextView title = (TextView) publicViewLocal.findViewById(com.android.internal.R.id.title);
+            final TextView title = (TextView) publicViewLocal.findViewById(R.id.title);
             try {
                 title.setText(pmUser.getApplicationLabel(
                         pmUser.getApplicationInfo(entry.notification.getPackageName(), 0)));
@@ -1262,10 +1362,9 @@
                 title.setText(entry.notification.getPackageName());
             }
 
-            final ImageView icon = (ImageView) publicViewLocal.findViewById(
-                    com.android.internal.R.id.icon);
+            final ImageView icon = (ImageView) publicViewLocal.findViewById(R.id.icon);
             final ImageView profileBadge = (ImageView) publicViewLocal.findViewById(
-                    com.android.internal.R.id.profile_badge_line3);
+                    R.id.profile_badge_line3);
 
             final StatusBarIcon ic = new StatusBarIcon(entry.notification.getPackageName(),
                     entry.notification.getUser(),
@@ -1276,17 +1375,22 @@
 
             Drawable iconDrawable = StatusBarIconView.getIcon(mContext, ic);
             icon.setImageDrawable(iconDrawable);
-            if (mNotificationColorUtil.isGrayscale(iconDrawable)) {
+            if (entry.targetSdk >= Build.VERSION_CODES.L
+                    || mNotificationColorUtil.isGrayscaleIcon(iconDrawable)) {
                 icon.setBackgroundResource(
                         com.android.internal.R.drawable.notification_icon_legacy_bg);
                 int padding = mContext.getResources().getDimensionPixelSize(
                         com.android.internal.R.dimen.notification_large_icon_circle_padding);
                 icon.setPadding(padding, padding, padding, padding);
+                if (sbn.getNotification().color != Notification.COLOR_DEFAULT) {
+                    icon.getBackground().setColorFilter(
+                            sbn.getNotification().color, PorterDuff.Mode.SRC_ATOP);
+                }
             }
 
             if (profileBadge != null) {
-                Drawable profileDrawable
-                        = mUserManager.getBadgeForUser(entry.notification.getUser(), 0);
+                Drawable profileDrawable = mContext.getPackageManager().getUserBadgeForDensity(
+                        entry.notification.getUser(), 0);
                 if (profileDrawable != null) {
                     profileBadge.setImageDrawable(profileDrawable);
                     profileBadge.setVisibility(View.VISIBLE);
@@ -1296,16 +1400,13 @@
             }
 
             final View privateTime = contentViewLocal.findViewById(com.android.internal.R.id.time);
+            final DateTimeView time = (DateTimeView) publicViewLocal.findViewById(R.id.time);
             if (privateTime != null && privateTime.getVisibility() == View.VISIBLE) {
-                final View timeStub = publicViewLocal.findViewById(com.android.internal.R.id.time);
-                timeStub.setVisibility(View.VISIBLE);
-                final DateTimeView dateTimeView = (DateTimeView)
-                        publicViewLocal.findViewById(com.android.internal.R.id.time);
-                dateTimeView.setTime(entry.notification.getNotification().when);
+                time.setVisibility(View.VISIBLE);
+                time.setTime(entry.notification.getNotification().when);
             }
 
-            final TextView text = (TextView) publicViewLocal.findViewById(
-                com.android.internal.R.id.text);
+            final TextView text = (TextView) publicViewLocal.findViewById(R.id.text);
             if (text != null) {
                 text.setText(R.string.notification_hidden_text);
                 text.setTextAppearance(mContext,
@@ -1345,7 +1446,7 @@
             row.setUserExpanded(userExpanded);
         }
         row.setUserLocked(userLocked);
-
+        row.setStatusBarNotification(entry.notification);
         return true;
     }
 
@@ -1367,6 +1468,9 @@
 
         public void onClick(final View v) {
             final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
+            final boolean afterKeyguardGone = mIntent.isActivity()
+                    && PreviewInflater.wouldLaunchResolverActivity(mContext, mIntent.getIntent(),
+                            mCurrentUserId);
             dismissKeyguardThenExecute(new OnDismissAction() {
                 public boolean onDismiss() {
                     if (mIsHeadsUp) {
@@ -1375,7 +1479,7 @@
                     AsyncTask.execute(new Runnable() {
                         @Override
                         public void run() {
-                            if (keyguardShowing) {
+                            if (keyguardShowing && !afterKeyguardGone) {
                                 try {
                                     ActivityManagerNative.getDefault()
                                             .keyguardWaitingForActivityDrawn();
@@ -1399,7 +1503,8 @@
                                     // TODO: Dismiss Keyguard.
                                 }
                                 if (mIntent.isActivity()) {
-                                    overrideActivityPendingAppTransition(keyguardShowing);
+                                    overrideActivityPendingAppTransition(keyguardShowing
+                                            && !afterKeyguardGone);
                                 }
                             }
 
@@ -1417,7 +1522,7 @@
 
                     return mIntent != null && mIntent.isActivity();
                 }
-            }, false /* afterKeyguardGone */);
+            }, afterKeyguardGone);
         }
     }
 
@@ -1552,10 +1657,11 @@
                 }
             }
             boolean showOnKeyguard = shouldShowOnKeyguard(entry.notification);
-            if (onKeyguard && (visibleNotifications >= maxKeyguardNotifications
-                    || !showOnKeyguard)) {
+            if ((isLockscreenPublicMode() && !mShowLockscreenNotifications) ||
+                    (onKeyguard && (visibleNotifications >= maxKeyguardNotifications
+                            || !showOnKeyguard))) {
                 entry.row.setVisibility(View.GONE);
-                if (showOnKeyguard) {
+                if (onKeyguard && showOnKeyguard) {
                     mKeyguardIconOverflowContainer.getIconsView().addNotification(entry);
                 }
             } else {
@@ -1702,7 +1808,7 @@
                 oldEntry.notification.getNotification().tickerText);
 
         final boolean shouldInterrupt = shouldInterrupt(notification);
-        final boolean alertAgain = alertAgain(oldEntry);
+        final boolean alertAgain = alertAgain(oldEntry, n);
         boolean updateSuccessful = false;
         if (contentsUnchanged && bigContentsUnchanged && headsUpContentsUnchanged
                 && publicUnchanged) {
@@ -1837,9 +1943,6 @@
                 : null;
 
         // Reapply the RemoteViews
-        if (entry.row != null) {
-            entry.row.resetHeight();
-        }
         contentView.reapply(mContext, entry.expanded, mOnClickHandler);
         if (bigContentView != null && entry.getBigContentView() != null) {
             bigContentView.reapply(mContext, entry.getBigContentView(),
@@ -1857,7 +1960,9 @@
         } else {
             entry.row.setOnClickListener(null);
         }
+        entry.row.setStatusBarNotification(notification);
         entry.row.notifyContentUpdated();
+        entry.row.resetHeight();
     }
 
     protected void notifyHeadsUpScreenOn(boolean screenOn) {
@@ -1866,13 +1971,19 @@
         }
     }
 
-    private boolean alertAgain(Entry entry) {
-        final StatusBarNotification sbn = entry.notification;
-        return entry == null || !entry.hasInterrupted()
-                || (sbn.getNotification().flags & Notification.FLAG_ONLY_ALERT_ONCE) == 0;
+    private boolean alertAgain(Entry oldEntry, Notification newNotification) {
+        return oldEntry == null || !oldEntry.hasInterrupted()
+                || (newNotification.flags & Notification.FLAG_ONLY_ALERT_ONCE) == 0;
     }
 
     protected boolean shouldInterrupt(StatusBarNotification sbn) {
+        if (mNotificationData.shouldFilterOut(sbn)) {
+            if (DEBUG) {
+                Log.d(TAG, "Skipping HUN check for " + sbn.getKey() + " since it's filtered out.");
+            }
+            return false;
+        }
+
         Notification notification = sbn.getNotification();
         // some predicates to make the boolean logic legible
         boolean isNoisy = (notification.defaults & Notification.DEFAULT_SOUND) != 0
@@ -1884,10 +1995,13 @@
         boolean hasTicker = mHeadsUpTicker && !TextUtils.isEmpty(notification.tickerText);
         boolean isAllowed = notification.extras.getInt(Notification.EXTRA_AS_HEADS_UP,
                 Notification.HEADS_UP_ALLOWED) != Notification.HEADS_UP_NEVER;
+        boolean accessibilityForcesLaunch = isFullscreen
+                && mAccessibilityManager.isTouchExplorationEnabled();
 
         final KeyguardTouchDelegate keyguard = KeyguardTouchDelegate.getInstance(mContext);
         boolean interrupt = (isFullscreen || (isHighPriority && (isNoisy || hasTicker)))
                 && isAllowed
+                && !accessibilityForcesLaunch
                 && mPowerManager.isScreenOn()
                 && !keyguard.isShowingAndNotOccluded()
                 && !keyguard.isInputRestricted();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 7d64325..2ad6859 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -17,10 +17,17 @@
 package com.android.systemui.statusbar;
 
 import android.content.Context;
+import android.graphics.drawable.AnimatedVectorDrawable;
+import android.graphics.drawable.AnimationDrawable;
+import android.graphics.drawable.Drawable;
+import android.service.notification.StatusBarNotification;
 import android.util.AttributeSet;
 import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
 import android.view.accessibility.AccessibilityEvent;
 
+import android.widget.ImageView;
 import com.android.systemui.R;
 
 public class ExpandableNotificationRow extends ActivatableNotificationView {
@@ -60,6 +67,62 @@
     private ExpansionLogger mLogger;
     private String mLoggingKey;
     private boolean mWasReset;
+    private NotificationGuts mGuts;
+
+    private StatusBarNotification mStatusBarNotification;
+
+    public void setIconAnimationRunning(boolean running) {
+        setIconAnimationRunning(running, mPublicLayout);
+        setIconAnimationRunning(running, mPrivateLayout);
+    }
+
+    private void setIconAnimationRunning(boolean running, NotificationContentView layout) {
+        if (layout != null) {
+            View contractedChild = layout.getContractedChild();
+            View expandedChild = layout.getExpandedChild();
+            setIconAnimationRunningForChild(running, contractedChild);
+            setIconAnimationRunningForChild(running, expandedChild);
+        }
+    }
+
+    private void setIconAnimationRunningForChild(boolean running, View child) {
+        if (child != null) {
+            ImageView icon = (ImageView) child.findViewById(com.android.internal.R.id.icon);
+            setIconRunning(icon, running);
+            ImageView rightIcon = (ImageView) child.findViewById(
+                    com.android.internal.R.id.right_icon);
+            setIconRunning(rightIcon, running);
+        }
+    }
+
+    private void setIconRunning(ImageView imageView, boolean running) {
+        if (imageView != null) {
+            Drawable drawable = imageView.getDrawable();
+            if (drawable instanceof AnimationDrawable) {
+                AnimationDrawable animationDrawable = (AnimationDrawable) drawable;
+                if (running) {
+                    animationDrawable.start();
+                } else {
+                    animationDrawable.stop();
+                }
+            } else if (drawable instanceof AnimatedVectorDrawable) {
+                AnimatedVectorDrawable animationDrawable = (AnimatedVectorDrawable) drawable;
+                if (running) {
+                    animationDrawable.start();
+                } else {
+                    animationDrawable.stop();
+                }
+            }
+        }
+    }
+
+    public void setStatusBarNotification(StatusBarNotification statusBarNotification) {
+        mStatusBarNotification = statusBarNotification;
+    }
+
+    public StatusBarNotification getStatusBarNotification() {
+        return mStatusBarNotification;
+    }
 
     public interface ExpansionLogger {
         public void logNotificationExpansion(String key, boolean userAction, boolean expanded);
@@ -96,6 +159,7 @@
         mMaxExpandHeight = 0;
         mWasReset = true;
         onHeightReset();
+        requestLayout();
     }
 
     @Override
@@ -103,6 +167,15 @@
         super.onFinishInflate();
         mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic);
         mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded);
+        ViewStub gutsStub = (ViewStub) findViewById(R.id.notification_guts_stub);
+        gutsStub.setOnInflateListener(new ViewStub.OnInflateListener() {
+            @Override
+            public void onInflate(ViewStub stub, View inflated) {
+                mGuts = (NotificationGuts) inflated;
+                mGuts.setClipTopAmount(getClipTopAmount());
+                mGuts.setActualHeight(getActualHeight());
+            }
+        });
         mVetoButton = findViewById(R.id.veto);
     }
 
@@ -274,13 +347,21 @@
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
         boolean updateExpandHeight = mMaxExpandHeight == 0 && !mWasReset;
-        mMaxExpandHeight = mPrivateLayout.getMaxHeight();
+        updateMaxExpandHeight();
         if (updateExpandHeight) {
             applyExpansionToLayout();
         }
         mWasReset = false;
     }
 
+    private void updateMaxExpandHeight() {
+        int intrinsicBefore = getIntrinsicHeight();
+        mMaxExpandHeight = mPrivateLayout.getMaxHeight();
+        if (intrinsicBefore != getIntrinsicHeight()) {
+            notifyHeightChanged();
+        }
+    }
+
     public void setSensitive(boolean sensitive) {
         mSensitive = sensitive;
     }
@@ -360,6 +441,9 @@
     public void setActualHeight(int height, boolean notifyListeners) {
         mPrivateLayout.setActualHeight(height);
         mPublicLayout.setActualHeight(height);
+        if (mGuts != null) {
+            mGuts.setActualHeight(height);
+        }
         invalidate();
         super.setActualHeight(height, notifyListeners);
     }
@@ -381,6 +465,9 @@
         super.setClipTopAmount(clipTopAmount);
         mPrivateLayout.setClipTopAmount(clipTopAmount);
         mPublicLayout.setClipTopAmount(clipTopAmount);
+        if (mGuts != null) {
+            mGuts.setClipTopAmount(clipTopAmount);
+        }
     }
 
     public void notifyContentUpdated() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
index d882a87..f85d32b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
@@ -31,11 +31,9 @@
 
     private final Rect mOutlineRect = new Rect();
     private boolean mCustomOutline;
-    private float mDensity;
 
     public ExpandableOutlineView(Context context, AttributeSet attrs) {
         super(context, attrs);
-        mDensity = getResources().getDisplayMetrics().density;
         setOutlineProvider(new ViewOutlineProvider() {
             @Override
             public void getOutline(View view, Outline outline) {
@@ -78,8 +76,8 @@
         mOutlineRect.set((int) left, (int) top, (int) right, (int) bottom);
 
         // Outlines need to be at least 1 dp
-        mOutlineRect.bottom = (int) Math.max(top + mDensity, mOutlineRect.bottom);
-        mOutlineRect.right = (int) Math.max(left + mDensity, mOutlineRect.right);
+        mOutlineRect.bottom = (int) Math.max(top, mOutlineRect.bottom);
+        mOutlineRect.right = (int) Math.max(left, mOutlineRect.right);
 
         invalidateOutline();
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
index 5c66660..c8f756e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
@@ -96,7 +96,10 @@
     protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
         super.onLayout(changed, left, top, right, bottom);
         if (!mActualHeightInitialized && mActualHeight == 0) {
-            setActualHeight(getInitialHeight());
+            int initialHeight = getInitialHeight();
+            if (initialHeight != 0) {
+                setActualHeight(initialHeight);
+            }
         }
     }
 
@@ -252,8 +255,6 @@
 
     public abstract void performAddAnimation(long delay, long duration);
 
-    public abstract void setScrimAmount(float scrimAmount);
-
     public void setBelowSpeedBump(boolean below) {
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
index 5878ae1..a4161f9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
@@ -251,15 +251,19 @@
     }
 
     public void setCircleRadius(float circleRadius) {
-        setCircleRadius(circleRadius, false);
+        setCircleRadius(circleRadius, false, false);
+    }
+
+    public void setCircleRadius(float circleRadius, boolean slowAnimation) {
+        setCircleRadius(circleRadius, slowAnimation, false);
     }
 
     public void setCircleRadiusWithoutAnimation(float circleRadius) {
         cancelAnimator(mCircleAnimator);
-        setCircleRadius(circleRadius, true);
+        setCircleRadius(circleRadius, false ,true);
     }
 
-    private void setCircleRadius(float circleRadius, boolean noAnimation) {
+    private void setCircleRadius(float circleRadius, boolean slowAnimation, boolean noAnimation) {
 
         // Check if we need a new animation
         boolean radiusHidden = (mCircleAnimator != null && mCircleWillBeHidden)
@@ -292,10 +296,13 @@
                     ? mDisappearInterpolator
                     : mAppearInterpolator;
             animator.setInterpolator(interpolator);
-            float durationFactor = Math.abs(mCircleRadius - circleRadius)
-                    / (float) mMinBackgroundRadius;
-            long duration = (long) (CIRCLE_APPEAR_DURATION * durationFactor);
-            duration = Math.min(duration, CIRCLE_DISAPPEAR_MAX_DURATION);
+            long duration = 250;
+            if (!slowAnimation) {
+                float durationFactor = Math.abs(mCircleRadius - circleRadius)
+                        / (float) mMinBackgroundRadius;
+                duration = (long) (CIRCLE_APPEAR_DURATION * durationFactor);
+                duration = Math.min(duration, CIRCLE_DISAPPEAR_MAX_DURATION);
+            }
             animator.setDuration(duration);
             animator.start();
             if (mPreviewView != null && mPreviewView.getVisibility() == View.VISIBLE) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/MirrorView.java b/packages/SystemUI/src/com/android/systemui/statusbar/MirrorView.java
deleted file mode 100644
index 8b0df06..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/MirrorView.java
+++ /dev/null
@@ -1,60 +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;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.view.View;
-
-/**
- * A view that mirrors the visual contents of another one. Should be used for animation purposes
- * only, as this view doesn't have any input handling.
- */
-public class MirrorView extends View {
-
-    private View mView;
-    private int mFixedWidth;
-    private int mFixedHeight;
-
-    public MirrorView(Context context) {
-        super(context);
-    }
-
-    public void setMirroredView(View v, int width, int height) {
-        mView = v;
-        mFixedWidth = width;
-        mFixedHeight = height;
-        requestLayout();
-        invalidate();
-    }
-
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        if (mView != null) {
-            setMeasuredDimension(mFixedWidth, mFixedHeight);
-        } else {
-            setMeasuredDimension(0, 0);
-        }
-    }
-
-    @Override
-    protected void onDraw(Canvas canvas) {
-        if (mView != null) {
-            mView.draw(canvas);
-        }
-    }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
index ad274b0..5db680a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java
@@ -35,15 +35,9 @@
     private Drawable mBackground;
     private int mClipTopAmount;
     private int mActualHeight;
-    private final int mTintedRippleColor;
-    private final int mNormalRippleColor;
 
     public NotificationBackgroundView(Context context, AttributeSet attrs) {
         super(context, attrs);
-        mTintedRippleColor = context.getResources().getColor(
-                R.color.notification_ripple_tinted_color);
-        mNormalRippleColor = context.getResources().getColor(
-                R.color.notification_ripple_untinted_color);
     }
 
     @Override
@@ -103,17 +97,10 @@
     }
 
     public void setTint(int tintColor) {
-        int rippleColor;
         if (tintColor != 0) {
             mBackground.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP);
-            rippleColor = mTintedRippleColor;
         } else {
             mBackground.clearColorFilter();
-            rippleColor = mNormalRippleColor;
-        }
-        if (mBackground instanceof RippleDrawable) {
-            RippleDrawable ripple = (RippleDrawable) mBackground;
-            ripple.setColor(ColorStateList.valueOf(rippleColor));
         }
         invalidate();
     }
@@ -138,4 +125,15 @@
         // Prevents this view from creating a layer when alpha is animating.
         return false;
     }
+
+    public void setState(int[] drawableState) {
+        mBackground.setState(drawableState);
+    }
+
+    public void setRippleColor(int color) {
+        if (mBackground instanceof RippleDrawable) {
+            RippleDrawable ripple = (RippleDrawable) mBackground;
+            ripple.setColor(ColorStateList.valueOf(color));
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 8b4c2c4..e31eb7c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -88,6 +88,14 @@
         mContractedVisible = true;
     }
 
+    public View getContractedChild() {
+        return mContractedChild;
+    }
+
+    public View getExpandedChild() {
+        return mExpandedChild;
+    }
+
     public void setContractedChild(View child) {
         if (mContractedChild != null) {
             mContractedChild.animate().cancel();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
index 7e37336..34c458a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -17,6 +17,7 @@
 package com.android.systemui.statusbar;
 
 import android.app.Notification;
+import android.service.notification.NotificationListenerService;
 import android.service.notification.NotificationListenerService.Ranking;
 import android.service.notification.NotificationListenerService.RankingMap;
 import android.service.notification.StatusBarNotification;
@@ -47,6 +48,7 @@
         private boolean interruption;
         public boolean autoRedacted; // whether the redacted notification was generated by us
         public boolean legacy; // whether the notification has a legacy, dark background
+        public int targetSdk;
 
         public Entry(StatusBarNotification n, StatusBarIconView ic) {
             this.key = n.getKey();
@@ -89,6 +91,7 @@
 
     private final ArrayMap<String, Entry> mEntries = new ArrayMap<>();
     private final ArrayList<Entry> mSortedAndFiltered = new ArrayList<>();
+    private ArraySet<String> mGroupsWithSummaries = new ArraySet<>();
 
     private RankingMap mRankingMap;
     private final Ranking mTmpRanking = new Ranking();
@@ -98,15 +101,26 @@
 
         @Override
         public int compare(Entry a, Entry b) {
-            String mediaNotification = mEnvironment.getCurrentMediaNotificationKey();
-
             // Upsort current media notification.
+            String mediaNotification = mEnvironment.getCurrentMediaNotificationKey();
             boolean aMedia = a.key.equals(mediaNotification);
             boolean bMedia = b.key.equals(mediaNotification);
             if (aMedia != bMedia) {
                 return aMedia ? -1 : 1;
             }
 
+            final StatusBarNotification na = a.notification;
+            final StatusBarNotification nb = b.notification;
+
+            // Upsort PRIORITY_MAX system notifications
+            boolean aSystemMax = na.getNotification().priority >= Notification.PRIORITY_MAX &&
+                    isSystemNotification(na);
+            boolean bSystemMax = nb.getNotification().priority >= Notification.PRIORITY_MAX &&
+                    isSystemNotification(nb);
+            if (aSystemMax != bSystemMax) {
+                return aSystemMax ? -1 : 1;
+            }
+
             // RankingMap as received from NoMan.
             if (mRankingMap != null) {
                 mRankingMap.getRanking(a.key, mRankingA);
@@ -114,8 +128,6 @@
                 return mRankingA.getRank() - mRankingB.getRank();
             }
 
-            final StatusBarNotification na = a.notification;
-            final StatusBarNotification nb = b.notification;
             int d = nb.getScore() - na.getScore();
             if (a.interruption != b.interruption) {
                 return a.interruption ? -1 : 1;
@@ -172,6 +184,14 @@
         return false;
     }
 
+    public int getVisibilityOverride(String key) {
+        if (mRankingMap != null) {
+            mRankingMap.getRanking(key, mTmpRanking);
+            return mTmpRanking.getVisibilityOverride();
+        }
+        return NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE;
+    }
+
     private void updateRankingAndSort(RankingMap ranking) {
         if (ranking != null) {
             mRankingMap = ranking;
@@ -183,8 +203,8 @@
     // anything changed, and this class should call back the UI so it updates itself.
     public void filterAndSort() {
         mSortedAndFiltered.clear();
+        mGroupsWithSummaries.clear();
 
-        ArraySet<String> groupsWithSummaries = null;
         final int N = mEntries.size();
         for (int i = 0; i < N; i++) {
             Entry entry = mEntries.valueAt(i);
@@ -195,22 +215,19 @@
             }
 
             if (sbn.getNotification().isGroupSummary()) {
-                if (groupsWithSummaries == null) {
-                    groupsWithSummaries = new ArraySet<>();
-                }
-                groupsWithSummaries.add(sbn.getGroupKey());
+                mGroupsWithSummaries.add(sbn.getGroupKey());
             }
             mSortedAndFiltered.add(entry);
         }
 
         // Second pass: Filter out group children with summary.
-        if (groupsWithSummaries != null) {
+        if (!mGroupsWithSummaries.isEmpty()) {
             final int M = mSortedAndFiltered.size();
             for (int i = M - 1; i >= 0; i--) {
                 Entry ent = mSortedAndFiltered.get(i);
                 StatusBarNotification sbn = ent.notification;
                 if (sbn.getNotification().isGroupChild() &&
-                        groupsWithSummaries.contains(sbn.getGroupKey())) {
+                        mGroupsWithSummaries.contains(sbn.getGroupKey())) {
                     mSortedAndFiltered.remove(i);
                 }
             }
@@ -219,7 +236,11 @@
         Collections.sort(mSortedAndFiltered, mRankingComparator);
     }
 
-    private boolean shouldFilterOut(StatusBarNotification sbn) {
+    public boolean isGroupWithSummary(String groupKey) {
+        return mGroupsWithSummaries.contains(groupKey);
+    }
+
+    boolean shouldFilterOut(StatusBarNotification sbn) {
         if (!(mEnvironment.isDeviceProvisioned() ||
                 showNotificationEvenIfUnprovisioned(sbn))) {
             return true;
@@ -294,11 +315,16 @@
         pw.println("      tickerText=\"" + n.getNotification().tickerText + "\"");
     }
 
+    private static boolean isSystemNotification(StatusBarNotification sbn) {
+        String sbnPackage = sbn.getPackageName();
+        return "android".equals(sbnPackage) || "com.android.systemui".equals(sbnPackage);
+    }
+
     /**
      * Provides access to keyguard state and user settings dependent data.
      */
     public interface Environment {
-        public boolean shouldHideSensitiveContents(int userId);
+        public boolean shouldHideSensitiveContents(int userid);
         public boolean isDeviceProvisioned();
         public boolean isNotificationForCurrentProfiles(StatusBarNotification sbn);
         public String getCurrentMediaNotificationKey();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationScrimView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
similarity index 65%
rename from packages/SystemUI/src/com/android/systemui/statusbar/NotificationScrimView.java
rename to packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index 440b2c1..46e0bf8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationScrimView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -18,25 +18,23 @@
 
 import android.content.Context;
 import android.graphics.Canvas;
-import android.graphics.PorterDuff;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
-import android.view.View;
-
-import com.android.keyguard.R;
+import android.widget.FrameLayout;
+import com.android.systemui.R;
 
 /**
- * A view that can be used for both the dimmed and normal background of an notification.
+ * The guts of a notification revealed when performing a long press.
  */
-public class NotificationScrimView extends View {
+public class NotificationGuts extends FrameLayout {
 
     private Drawable mBackground;
     private int mClipTopAmount;
     private int mActualHeight;
 
-    public NotificationScrimView(Context context, AttributeSet attrs) {
+    public NotificationGuts(Context context, AttributeSet attrs) {
         super(context, attrs);
-        mBackground = getResources().getDrawable(R.drawable.notification_scrim);
+        setWillNotDraw(false);
     }
 
     @Override
@@ -52,10 +50,37 @@
     }
 
     @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+        mBackground = mContext.getDrawable(R.drawable.notification_guts_bg);
+        if (mBackground != null) {
+            mBackground.setCallback(this);
+        }
+    }
+
+    @Override
     protected boolean verifyDrawable(Drawable who) {
         return super.verifyDrawable(who) || who == mBackground;
     }
 
+    @Override
+    protected void drawableStateChanged() {
+        drawableStateChanged(mBackground);
+    }
+
+    private void drawableStateChanged(Drawable d) {
+        if (d != null && d.isStateful()) {
+            d.setState(getDrawableState());
+        }
+    }
+
+    @Override
+    public void drawableHotspotChanged(float x, float y) {
+        if (mBackground != null) {
+            mBackground.setHotspot(x, y);
+        }
+    }
+
     public void setActualHeight(int actualHeight) {
         mActualHeight = actualHeight;
         invalidate();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java
index c75bd28..c4c9dac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationOverflowIconsView.java
@@ -36,7 +36,7 @@
     private TextView mMoreText;
     private int mTintColor;
     private int mIconSize;
-    private NotificationColorUtil mNotificationColorUtil = new NotificationColorUtil();
+    private NotificationColorUtil mNotificationColorUtil;
 
     public NotificationOverflowIconsView(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -45,6 +45,7 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
+        mNotificationColorUtil = NotificationColorUtil.getInstance(getContext());
         mTintColor = getResources().getColor(R.color.keyguard_overflow_content_color);
         mIconSize = getResources().getDimensionPixelSize(
                 com.android.internal.R.dimen.status_bar_icon_size);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 9da209a..18ef024 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -27,17 +27,21 @@
 
 import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.NetworkControllerImpl;
+import com.android.systemui.statusbar.policy.SecurityController;
 
 // Intimately tied to the design of res/layout/signal_cluster_view.xml
 public class SignalClusterView
         extends LinearLayout
-        implements NetworkControllerImpl.SignalCluster {
+        implements NetworkControllerImpl.SignalCluster,
+        SecurityController.SecurityControllerCallback {
 
     static final String TAG = "SignalClusterView";
     static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
     NetworkControllerImpl mNC;
+    SecurityController mSC;
 
+    private boolean mVpnVisible = false;
     private boolean mWifiVisible = false;
     private int mWifiStrengthId = 0;
     private boolean mMobileVisible = false;
@@ -46,10 +50,14 @@
     private int mAirplaneIconId = 0;
     private String mWifiDescription, mMobileDescription, mMobileTypeDescription;
     private boolean mRoaming;
+    private boolean mIsMobileTypeIconWide;
 
     ViewGroup mWifiGroup, mMobileGroup;
-    ImageView mWifi, mMobile, mMobileType, mAirplane;
-    View mSpacer;
+    ImageView mVpn, mWifi, mMobile, mMobileType, mAirplane;
+    View mWifiAirplaneSpacer;
+    View mWifiSignalSpacer;
+
+    private int mWideTypeIconStartPadding;
 
     public SignalClusterView(Context context) {
         this(context, null);
@@ -68,34 +76,62 @@
         mNC = nc;
     }
 
+    public void setSecurityController(SecurityController sc) {
+        if (DEBUG) Log.d(TAG, "SecurityController=" + sc);
+        mSC = sc;
+        mSC.addCallback(this);
+        mVpnVisible = mSC.isVpnEnabled();
+    }
+
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+        mWideTypeIconStartPadding = getContext().getResources().getDimensionPixelSize(
+                R.dimen.wide_type_icon_start_padding);
+    }
+
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
 
+        mVpn            = (ImageView) findViewById(R.id.vpn);
         mWifiGroup      = (ViewGroup) findViewById(R.id.wifi_combo);
         mWifi           = (ImageView) findViewById(R.id.wifi_signal);
         mMobileGroup    = (ViewGroup) findViewById(R.id.mobile_combo);
         mMobile         = (ImageView) findViewById(R.id.mobile_signal);
         mMobileType     = (ImageView) findViewById(R.id.mobile_type);
-        mSpacer         =             findViewById(R.id.spacer);
         mAirplane       = (ImageView) findViewById(R.id.airplane);
+        mWifiAirplaneSpacer =         findViewById(R.id.wifi_airplane_spacer);
+        mWifiSignalSpacer =           findViewById(R.id.wifi_signal_spacer);
 
         apply();
     }
 
     @Override
     protected void onDetachedFromWindow() {
+        mVpn            = null;
         mWifiGroup      = null;
         mWifi           = null;
         mMobileGroup    = null;
         mMobile         = null;
         mMobileType     = null;
-        mSpacer         = null;
         mAirplane       = null;
 
         super.onDetachedFromWindow();
     }
 
+    // From SecurityController.
+    @Override
+    public void onStateChanged() {
+        post(new Runnable() {
+            @Override
+            public void run() {
+                mVpnVisible = mSC.isVpnEnabled();
+                apply();
+            }
+        });
+    }
+
     @Override
     public void setWifiIndicators(boolean visible, int strengthIcon, String contentDescription) {
         mWifiVisible = visible;
@@ -107,13 +143,15 @@
 
     @Override
     public void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
-            String contentDescription, String typeContentDescription, boolean roaming) {
+            String contentDescription, String typeContentDescription, boolean roaming,
+            boolean isTypeIconWide) {
         mMobileVisible = visible;
         mMobileStrengthId = strengthIcon;
         mMobileTypeId = typeIcon;
         mMobileDescription = contentDescription;
         mMobileTypeDescription = typeContentDescription;
         mRoaming = roaming;
+        mIsMobileTypeIconWide = isTypeIconWide;
 
         apply();
     }
@@ -169,6 +207,8 @@
     private void apply() {
         if (mWifiGroup == null) return;
 
+        mVpn.setVisibility(mVpnVisible ? View.VISIBLE : View.GONE);
+        if (DEBUG) Log.d(TAG, String.format("vpn: %s", mVpnVisible ? "VISIBLE" : "GONE"));
         if (mWifiVisible) {
             mWifi.setImageResource(mWifiStrengthId);
             mWifiGroup.setContentDescription(mWifiDescription);
@@ -198,12 +238,20 @@
             mAirplane.setVisibility(View.GONE);
         }
 
-        if (mMobileVisible && mWifiVisible && mIsAirplaneMode) {
-            mSpacer.setVisibility(View.INVISIBLE);
+        if (mIsAirplaneMode && mWifiVisible) {
+            mWifiAirplaneSpacer.setVisibility(View.VISIBLE);
         } else {
-            mSpacer.setVisibility(View.GONE);
+            mWifiAirplaneSpacer.setVisibility(View.GONE);
         }
 
+        if (mRoaming && mMobileVisible && mWifiVisible) {
+            mWifiSignalSpacer.setVisibility(View.VISIBLE);
+        } else {
+            mWifiSignalSpacer.setVisibility(View.GONE);
+        }
+
+        mMobile.setPaddingRelative(mIsMobileTypeIconWide ? mWideTypeIconStartPadding : 0, 0, 0, 0);
+
         if (DEBUG) Log.d(TAG,
                 String.format("mobile: %s sig=%d typ=%d",
                     (mMobileVisible ? "VISIBLE" : "GONE"),
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
index 816612b..1fc8744 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
@@ -126,9 +126,4 @@
         // TODO: Use duration
         performVisibilityAnimation(true, delay);
     }
-
-    @Override
-    public void setScrimAmount(float scrimAmount) {
-        // We don't need to scrim the speedbumps
-    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StackScrollerDecorView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StackScrollerDecorView.java
index 62a492e..64d80cc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StackScrollerDecorView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StackScrollerDecorView.java
@@ -90,7 +90,6 @@
                     .alpha(endValue)
                     .setInterpolator(interpolator)
                     .setDuration(260)
-                    .withLayer()
                     .withEndAction(new Runnable() {
                         @Override
                         public void run() {
@@ -127,11 +126,6 @@
     }
 
     @Override
-    public void setScrimAmount(float scrimAmount) {
-        // We don't need to scrim the dismissView
-    }
-
-    @Override
     public boolean hasOverlappingRendering() {
         return false;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarter.java
index 9dfbb27..23810f9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarter.java
@@ -24,5 +24,5 @@
  * Keyguard.
  */
 public interface ActivityStarter {
-    public void startActivity(Intent intent, boolean dismissShade, boolean afterKeyguardGone);
+    public void startActivity(Intent intent, boolean dismissShade);
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
index 20ffba2..a9c701a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java
@@ -20,8 +20,6 @@
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ValueAnimator;
 import android.content.Context;
-import android.os.PowerManager;
-import android.os.SystemClock;
 import android.view.MotionEvent;
 import android.view.VelocityTracker;
 import android.view.View;
@@ -59,9 +57,9 @@
     private int mMinTranslationAmount;
     private int mMinFlingVelocity;
     private int mHintGrowAmount;
-    private final KeyguardAffordanceView mLeftIcon;
-    private final KeyguardAffordanceView mCenterIcon;
-    private final KeyguardAffordanceView mRightIcon;
+    private KeyguardAffordanceView mLeftIcon;
+    private KeyguardAffordanceView mCenterIcon;
+    private KeyguardAffordanceView mRightIcon;
     private Interpolator mAppearInterpolator;
     private Interpolator mDisappearInterpolator;
     private Animator mSwipeAnimator;
@@ -84,15 +82,10 @@
     KeyguardAffordanceHelper(Callback callback, Context context) {
         mContext = context;
         mCallback = callback;
-        mLeftIcon = mCallback.getLeftIcon();
-        mLeftIcon.setIsLeft(true);
-        mCenterIcon = mCallback.getCenterIcon();
-        mRightIcon = mCallback.getRightIcon();
-        mLeftIcon.setPreviewView(mCallback.getLeftPreview());
-        mRightIcon.setPreviewView(mCallback.getRightPreview());
-        updateIcon(mLeftIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false);
-        updateIcon(mCenterIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false);
-        updateIcon(mRightIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false);
+        initIcons();
+        updateIcon(mLeftIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false, false);
+        updateIcon(mCenterIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false, false);
+        updateIcon(mRightIcon, 0.0f, SWIPE_RESTING_ALPHA_AMOUNT, false, false);
         initDimens();
     }
 
@@ -113,6 +106,16 @@
                 android.R.interpolator.fast_out_linear_in);
     }
 
+    private void initIcons() {
+        mLeftIcon = mCallback.getLeftIcon();
+        mLeftIcon.setIsLeft(true);
+        mCenterIcon = mCallback.getCenterIcon();
+        mRightIcon = mCallback.getRightIcon();
+        mRightIcon.setIsLeft(false);
+        mLeftIcon.setPreviewView(mCallback.getLeftPreview());
+        mRightIcon.setPreviewView(mCallback.getRightPreview());
+    }
+
     public boolean onTouchEvent(MotionEvent event) {
         int pointerIndex = event.findPointerIndex(mTrackingPointer);
         if (pointerIndex < 0) {
@@ -290,8 +293,7 @@
         float vel = getCurrentVelocity();
 
         // We snap back if the current translation is not far enough
-        boolean snapBack = Math.abs(mTranslation) < Math.abs(mTranslationOnDown)
-                + mMinTranslationAmount;
+        boolean snapBack = isBelowFalsingThreshold();
 
         // or if the velocity is in the opposite direction.
         boolean velIsInWrongDirection = vel * mTranslation < 0;
@@ -300,6 +302,11 @@
         fling(vel, snapBack || forceSnapBack);
     }
 
+    private boolean isBelowFalsingThreshold() {
+        return Math.abs(mTranslation) < Math.abs(mTranslationOnDown)
+                + mMinTranslationAmount;
+    }
+
     private void fling(float vel, final boolean snapBack) {
         float target = mTranslation < 0 ? -mCallback.getPageWidth() : mCallback.getPageWidth();
         target = snapBack ? 0 : target;
@@ -350,13 +357,14 @@
 
             boolean animateIcons = isReset && animateReset;
             float radius = getRadiusFromTranslation(absTranslation);
+            boolean slowAnimation = isReset && isBelowFalsingThreshold();
             if (!isReset) {
-                updateIcon(targetView, radius, alpha, false);
+                updateIcon(targetView, radius, alpha, false, false);
             } else {
-                updateIcon(targetView, 0.0f, fadeOutAlpha, animateIcons);
+                updateIcon(targetView, 0.0f, fadeOutAlpha, animateIcons, slowAnimation);
             }
-            updateIcon(otherView, 0.0f, fadeOutAlpha, animateIcons);
-            updateIcon(mCenterIcon, 0.0f, fadeOutAlpha, animateIcons);
+            updateIcon(otherView, 0.0f, fadeOutAlpha, animateIcons, slowAnimation);
+            updateIcon(mCenterIcon, 0.0f, fadeOutAlpha, animateIcons, slowAnimation);
 
             mTranslation = translation;
         }
@@ -387,16 +395,16 @@
     }
 
     public void animateHideLeftRightIcon() {
-        updateIcon(mRightIcon, 0f, 0f, true);
-        updateIcon(mLeftIcon, 0f, 0f, true);
+        updateIcon(mRightIcon, 0f, 0f, true, false);
+        updateIcon(mLeftIcon, 0f, 0f, true, false);
     }
 
     private void updateIcon(KeyguardAffordanceView view, float circleRadius, float alpha,
-            boolean animate) {
+            boolean animate, boolean slowRadiusAnimation) {
         if (view.getVisibility() != View.VISIBLE) {
             return;
         }
-        view.setCircleRadius(circleRadius);
+        view.setCircleRadius(circleRadius, slowRadiusAnimation);
         updateIconAlpha(view, alpha, animate);
     }
 
@@ -436,6 +444,7 @@
 
     public void onConfigurationChanged() {
         initDimens();
+        initIcons();
     }
 
     public void reset(boolean animate) {
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 f9da30f..e84ca52 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -315,15 +315,15 @@
     public void launchCamera() {
         mFlashlightController.killFlashlight();
         Intent intent = getCameraIntent();
-        boolean wouldLaunchResolverActivity = mPreviewInflater.wouldLaunchResolverActivity(intent);
+        boolean wouldLaunchResolverActivity = PreviewInflater.wouldLaunchResolverActivity(
+                mContext, intent, mLockPatternUtils.getCurrentUser());
         if (intent == SECURE_CAMERA_INTENT && !wouldLaunchResolverActivity) {
             mContext.startActivityAsUser(intent, UserHandle.CURRENT);
         } else {
 
             // We need to delay starting the activity because ResolverActivity finishes itself if
             // launched behind lockscreen.
-            mActivityStarter.startActivity(intent, false /* dismissShade */,
-                    wouldLaunchResolverActivity /* afterKeyguardGone */);
+            mActivityStarter.startActivity(intent, false /* dismissShade */);
         }
     }
 
@@ -337,8 +337,7 @@
                 }
             });
         } else {
-            mActivityStarter.startActivity(PHONE_INTENT, false /* dismissShade */,
-                    mPreviewInflater.wouldLaunchResolverActivity(PHONE_INTENT));
+            mActivityStarter.startActivity(PHONE_INTENT, false /* dismissShade */);
         }
     }
 
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 fc737be..70b6952 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -17,14 +17,10 @@
 package com.android.systemui.statusbar.phone;
 
 import android.content.Context;
-import android.os.SystemClock;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.animation.AnimationUtils;
-import android.view.animation.Interpolator;
-import android.view.animation.LinearInterpolator;
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.keyguard.KeyguardViewBase;
@@ -33,7 +29,7 @@
 import com.android.systemui.keyguard.KeyguardViewMediator;
 
 import static com.android.keyguard.KeyguardHostView.OnDismissAction;
-import static com.android.keyguard.KeyguardSecurityModel.*;
+import static com.android.keyguard.KeyguardSecurityModel.SecurityMode;
 
 /**
  * A class which manages the bouncer on the lockscreen.
@@ -62,6 +58,10 @@
     public void show() {
         ensureView();
         if (mRoot.getVisibility() == View.VISIBLE) {
+
+            // show() updates the current security method. This is needed in case we are already
+            // showing and the current security method changed.
+            mKeyguardView.show();
             return;
         }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
index d7144da..685c184 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/MultiUserSwitch.java
@@ -30,6 +30,7 @@
 import com.android.systemui.R;
 import com.android.systemui.qs.QSPanel;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
+import com.android.systemui.statusbar.policy.UserSwitcherController;
 
 /**
  * Container for image of the multi user switcher (tappable).
@@ -73,8 +74,10 @@
                     mKeyguardUserSwitcher.show(true /* animate */);
                 }
             } else {
-                mQsPanel.showDetailAdapter(true,
-                        mQsPanel.getHost().getUserSwitcherController().userDetailAdapter);
+                if (mQsPanel != null) {
+                    mQsPanel.showDetailAdapter(true,
+                            mQsPanel.getHost().getUserSwitcherController().userDetailAdapter);
+                }
             }
         } else {
             Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent(
@@ -90,9 +93,24 @@
 
         if (isClickable()) {
             final UserManager um = UserManager.get(getContext());
-            String text = mContext.getString(um.isUserSwitcherEnabled()
-                    ? R.string.accessibility_multi_user_switch_switcher
-                    : R.string.accessibility_multi_user_switch_quick_contact);
+            String text;
+            if (um.isUserSwitcherEnabled()) {
+                String currentUser = null;
+                if (mQsPanel != null) {
+                    UserSwitcherController controller = mQsPanel.getHost()
+                            .getUserSwitcherController();
+                    currentUser = controller.getCurrentUserName(mContext);
+                }
+                if (TextUtils.isEmpty(currentUser)) {
+                    text = mContext.getString(R.string.accessibility_multi_user_switch_switcher);
+                } else {
+                    text = mContext.getString(
+                            R.string.accessibility_multi_user_switch_switcher_with_current,
+                            currentUser);
+                }
+            } else {
+                text = mContext.getString(R.string.accessibility_multi_user_switch_quick_contact);
+            }
             if (!TextUtils.isEmpty(text)) {
                 event.getText().add(text);
             }
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 3bb403d..0fb2192 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -87,7 +87,7 @@
     private final NavTransitionListener mTransitionListener = new NavTransitionListener();
 
     private OnVerticalChangedListener mOnVerticalChangedListener;
-    private boolean mIsLtr;
+    private boolean mIsLayoutRtl;
 
     private class NavTransitionListener implements TransitionListener {
         private boolean mBackTransitioning;
@@ -394,7 +394,7 @@
 
         getImeSwitchButton().setOnClickListener(mImeSwitcherClickListener);
 
-        updateLTROrder();
+        updateRTLOrder();
     }
 
     public boolean isVertical() {
@@ -460,17 +460,17 @@
     @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
-        updateLTROrder();
+        updateRTLOrder();
     }
 
     /**
      * In landscape, the LinearLayout is not auto mirrored since it is vertical. Therefore we
      * have to do it manually
      */
-    private void updateLTROrder() {
-        boolean isLtr = getResources().getConfiguration()
+    private void updateRTLOrder() {
+        boolean isLayoutRtl = getResources().getConfiguration()
                 .getLayoutDirection() == LAYOUT_DIRECTION_RTL;
-        if (mIsLtr != isLtr) {
+        if (mIsLayoutRtl != isLayoutRtl) {
 
             // We swap all children of the 90 and 270 degree layouts, since they are vertical
             View rotation90 = mRotatedViews[Surface.ROTATION_90];
@@ -480,7 +480,7 @@
             if (rotation90 != rotation270) {
                 swapChildrenOrderIfVertical(rotation270.findViewById(R.id.nav_buttons));
             }
-            mIsLtr = isLtr;
+            mIsLayoutRtl = isLayoutRtl;
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
index b633453..79bb1cd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java
@@ -31,7 +31,6 @@
     private final GestureDetector mTaskSwitcherDetector;
     private final int mScrollTouchSlop;
     private final int mMinFlingVelocity;
-    private boolean mInterceptTouches;
     private int mTouchDownX;
     private int mTouchDownY;
 
@@ -56,11 +55,11 @@
         // task switcher detector
         mTaskSwitcherDetector.onTouchEvent(event);
         int action = event.getAction();
+        boolean interceptTouches = false;
         switch (action & MotionEvent.ACTION_MASK) {
             case MotionEvent.ACTION_DOWN: {
                 mTouchDownX = (int) event.getX();
                 mTouchDownY = (int) event.getY();
-                mInterceptTouches = false;
                 break;
             }
             case MotionEvent.ACTION_MOVE: {
@@ -72,21 +71,19 @@
                         ? xDiff > mScrollTouchSlop && xDiff > yDiff
                         : yDiff > mScrollTouchSlop && yDiff > xDiff;
                 if (exceededTouchSlop) {
-                    mInterceptTouches = true;
+                    interceptTouches = true;
                     return true;
                 }
                 break;
             }
             case MotionEvent.ACTION_CANCEL:
             case MotionEvent.ACTION_UP:
-                mInterceptTouches = false;
                 break;
         }
-        return mInterceptTouches;
+        return interceptTouches;
     }
 
     public boolean onTouchEvent(MotionEvent event) {
-        if (!mInterceptTouches) return false;
         return mTaskSwitcherDetector.onTouchEvent(event);
     }
 
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 d3c3f56..902123d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -23,26 +23,27 @@
 import android.animation.ValueAnimator;
 import android.content.Context;
 import android.content.res.Configuration;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
 import android.util.AttributeSet;
 import android.util.MathUtils;
 import android.view.MotionEvent;
 import android.view.VelocityTracker;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.ViewTreeObserver;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 import android.widget.FrameLayout;
-import android.widget.LinearLayout;
 import android.widget.TextView;
+
+import com.android.keyguard.KeyguardStatusView;
 import com.android.systemui.R;
 import com.android.systemui.qs.QSPanel;
 import com.android.systemui.statusbar.ExpandableView;
 import com.android.systemui.statusbar.FlingAnimationUtils;
 import com.android.systemui.statusbar.GestureRecorder;
 import com.android.systemui.statusbar.KeyguardAffordanceView;
-import com.android.systemui.statusbar.MirrorView;
 import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
@@ -61,17 +62,20 @@
     private static final float HEADER_RUBBERBAND_FACTOR = 2.05f;
     private static final float LOCK_ICON_ACTIVE_SCALE = 1.2f;
 
+    private static final int DOZE_BACKGROUND_COLOR = 0xff000000;
+    private static final int TAG_KEY_ANIM = R.id.scrim;
+    private static final long DOZE_BACKGROUND_ANIM_DURATION = ScrimController.ANIMATION_DURATION;
+
     private KeyguardAffordanceHelper mAfforanceHelper;
     private StatusBarHeaderView mHeader;
     private KeyguardUserSwitcher mKeyguardUserSwitcher;
     private KeyguardStatusBarView mKeyguardStatusBar;
     private View mQsContainer;
     private QSPanel mQsPanel;
-    private View mKeyguardStatusView;
+    private KeyguardStatusView mKeyguardStatusView;
     private ObservableScrollView mScrollView;
     private TextView mClockView;
     private View mReserveNotificationSpace;
-    private MirrorView mSystemIconsCopy;
     private View mQsNavbarScrim;
     private View mNotificationContainerParent;
     private NotificationStackScrollLayout mNotificationStackScroller;
@@ -165,7 +169,6 @@
 
     public NotificationPanelView(Context context, AttributeSet attrs) {
         super(context, attrs);
-        mSystemIconsCopy = new MirrorView(context);
     }
 
     public void setStatusBar(PhoneStatusBar bar) {
@@ -178,7 +181,7 @@
         mHeader = (StatusBarHeaderView) findViewById(R.id.header);
         mHeader.setOnClickListener(this);
         mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header);
-        mKeyguardStatusView = findViewById(R.id.keyguard_status_view);
+        mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view);
         mQsContainer = findViewById(R.id.quick_settings_container);
         mQsPanel = (QSPanel) findViewById(R.id.quick_settings_panel);
         mClockView = (TextView) findViewById(R.id.clock_view);
@@ -551,7 +554,7 @@
     }
 
     private boolean flingExpandsQs(float vel) {
-        if (!mQsTouchAboveFalsingThreshold && mStatusBarState == StatusBarState.KEYGUARD) {
+        if (isBelowFalsingThreshold()) {
             return false;
         }
         if (Math.abs(vel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
@@ -561,6 +564,10 @@
         }
     }
 
+    private boolean isBelowFalsingThreshold() {
+        return !mQsTouchAboveFalsingThreshold && mStatusBarState == StatusBarState.KEYGUARD;
+    }
+
     private float getQsExpansionFraction() {
         return Math.min(1f, (mQsExpansionHeight - mQsMinExpansionHeight)
                 / (getTempQsMaxExpansion() - mQsMinExpansionHeight));
@@ -624,9 +631,10 @@
     }
 
     private boolean isInQsArea(float x, float y) {
-        return mStatusBarState != StatusBarState.SHADE
-                || y <= mNotificationStackScroller.getBottomMostNotificationBottom()
-                || y <= mQsContainer.getY() + mQsContainer.getHeight();
+        return mStatusBarState != StatusBarState.SHADE ||
+                (x >= mScrollView.getLeft() && x <= mScrollView.getRight()) &&
+                        (y <= mNotificationStackScroller.getBottomMostNotificationBottom()
+                                || y <= mQsContainer.getY() + mQsContainer.getHeight());
     }
 
     private void handleQsDown(MotionEvent event) {
@@ -1046,7 +1054,6 @@
         int startDistance = mQsMinExpansionHeight + mNotificationScrimWaitDistance;
         float progress = (height - startDistance) / (mQsMaxExpansionHeight - startDistance);
         progress = Math.max(0.0f, Math.min(progress, 1.0f));
-        mNotificationStackScroller.setScrimAlpha(progress);
     }
 
     private float getHeaderExpansionFraction() {
@@ -1125,9 +1132,16 @@
             }
             return;
         }
+        boolean belowFalsingThreshold = isBelowFalsingThreshold();
+        if (belowFalsingThreshold) {
+            vel = 0;
+        }
         mScrollView.setBlockFlinging(true);
         ValueAnimator animator = ValueAnimator.ofFloat(mQsExpansionHeight, target);
         mFlingAnimationUtils.apply(animator, mQsExpansionHeight, target, vel);
+        if (belowFalsingThreshold) {
+            animator.setDuration(350);
+        }
         animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
             @Override
             public void onAnimationUpdate(ValueAnimator animation) {
@@ -1168,43 +1182,6 @@
     }
 
     @Override
-    public void setVisibility(int visibility) {
-        int oldVisibility = getVisibility();
-        super.setVisibility(visibility);
-        if (visibility != oldVisibility) {
-            reparentStatusIcons(visibility == VISIBLE);
-        }
-    }
-
-    /**
-     * When the notification panel gets expanded, we need to move the status icons in the header
-     * card.
-     */
-    private void reparentStatusIcons(boolean toHeader) {
-        if (mStatusBar == null) {
-            return;
-        }
-        LinearLayout systemIcons = mStatusBar.getSystemIcons();
-        ViewGroup parent = ((ViewGroup) systemIcons.getParent());
-        if (toHeader) {
-            int index = parent.indexOfChild(systemIcons);
-            parent.removeView(systemIcons);
-            mSystemIconsCopy.setMirroredView(
-                    systemIcons, systemIcons.getWidth(), systemIcons.getHeight());
-            parent.addView(mSystemIconsCopy, index);
-            mHeader.attachSystemIcons(systemIcons);
-        } else {
-            ViewGroup newParent = mStatusBar.getSystemIconArea();
-            int index = newParent.indexOfChild(mSystemIconsCopy);
-            parent.removeView(systemIcons);
-            mHeader.onSystemIconsDetached();
-            mSystemIconsCopy.setMirroredView(null, 0, 0);
-            newParent.removeView(mSystemIconsCopy);
-            newParent.addView(systemIcons, index);
-        }
-    }
-
-    @Override
     protected boolean isScrolledToBottom() {
         if (mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
             return true;
@@ -1308,7 +1285,7 @@
     private void updateNotificationTranslucency() {
         float alpha = (getNotificationsTopY() + mNotificationStackScroller.getItemHeight())
                 / (mQsMinExpansionHeight + mNotificationStackScroller.getBottomStackPeekSize()
-                        + mNotificationStackScroller.getCollapseSecondCardPadding());
+                        - mNotificationStackScroller.getCollapseSecondCardPadding());
         alpha = Math.max(0, Math.min(alpha, 1));
         alpha = (float) Math.pow(alpha, 0.75);
         if (alpha != 1f && mNotificationStackScroller.getLayerType() != LAYER_TYPE_HARDWARE) {
@@ -1732,9 +1709,9 @@
     }
 
     public void setEmptyDragAmount(float amount) {
-        float factor = 1f;
+        float factor = 0.8f;
         if (mNotificationStackScroller.getNotGoneChildCount() > 0) {
-            factor = 0.6f;
+            factor = 0.4f;
         } else if (!mStatusBar.hasActiveNotifications()) {
             factor = 0.4f;
         }
@@ -1754,13 +1731,58 @@
         if (dozing == mDozing) return;
         mDozing = dozing;
         if (mDozing) {
-            setBackgroundColor(0xff000000);
+            setBackgroundColorAlpha(this, DOZE_BACKGROUND_COLOR, 0xff, false /*animate*/);
         } else {
-            setBackground(null);
+            setBackgroundColorAlpha(this, DOZE_BACKGROUND_COLOR, 0, true /*animate*/);
         }
         updateKeyguardStatusBarVisibility();
     }
 
+    private static void setBackgroundColorAlpha(final View target, int rgb, int targetAlpha,
+            boolean animate) {
+        int currentAlpha = getBackgroundAlpha(target);
+        if (currentAlpha == targetAlpha) {
+            return;
+        }
+        final int r = Color.red(rgb);
+        final int g = Color.green(rgb);
+        final int b = Color.blue(rgb);
+        Object runningAnim = target.getTag(TAG_KEY_ANIM);
+        if (runningAnim instanceof ValueAnimator) {
+            ((ValueAnimator) runningAnim).cancel();
+        }
+        if (!animate) {
+            target.setBackgroundColor(Color.argb(targetAlpha, r, g, b));
+            return;
+        }
+        ValueAnimator anim = ValueAnimator.ofInt(currentAlpha, targetAlpha);
+        anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+            @Override
+            public void onAnimationUpdate(ValueAnimator animation) {
+                int value = (int) animation.getAnimatedValue();
+                target.setBackgroundColor(Color.argb(value, r, g, b));
+            }
+        });
+        anim.setDuration(DOZE_BACKGROUND_ANIM_DURATION);
+        anim.addListener(new AnimatorListenerAdapter() {
+            @Override
+            public void onAnimationEnd(Animator animation) {
+                target.setTag(TAG_KEY_ANIM, null);
+            }
+        });
+        anim.start();
+        target.setTag(TAG_KEY_ANIM, anim);
+    }
+
+    private static int getBackgroundAlpha(View view) {
+        if (view.getBackground() instanceof ColorDrawable) {
+            ColorDrawable drawable = (ColorDrawable) view.getBackground();
+            return Color.alpha(drawable.getColor());
+        } else {
+            return 0;
+        }
+    }
+
     public void setShadeEmpty(boolean shadeEmpty) {
         mShadeEmpty = shadeEmpty;
         updateEmptyShadeView();
@@ -1790,4 +1812,8 @@
             mHeader.updateEverything();
         }
     };
+
+    public void onScreenTurnedOn() {
+        mKeyguardStatusView.refreshTime();
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
index 53361dc..b842a6b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
@@ -87,7 +87,9 @@
 
     @Override
     public boolean dispatchTouchEvent(MotionEvent ev) {
-        if (!mTouchEnabled) {
+        boolean isEndGuesture = (ev.getAction() == MotionEvent.ACTION_UP
+                || ev.getAction() == MotionEvent.ACTION_CANCEL);
+        if (!mTouchEnabled && !isEndGuesture) {
             return false;
         }
         return super.dispatchTouchEvent(ev);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index e818d23..006e480 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -479,7 +479,7 @@
      * @return whether a fling should expands the panel; contracts otherwise
      */
     protected boolean flingExpands(float vel, float vectorVel) {
-        if (!mTouchAboveFalsingThreshold && mStatusBar.isFalsingThresholdNeeded()) {
+        if (isBelowFalsingThreshold()) {
             return true;
         }
         if (Math.abs(vectorVel) < mFlingAnimationUtils.getMinVelocityPxPerSecond()) {
@@ -489,6 +489,10 @@
         }
     }
 
+    private boolean isBelowFalsingThreshold() {
+        return !mTouchAboveFalsingThreshold && mStatusBar.isFalsingThresholdNeeded();
+    }
+
     protected void fling(float vel, boolean expand) {
         cancelPeek();
         float target = expand ? getMaxPanelHeight() : 0.0f;
@@ -509,7 +513,14 @@
         mOverExpandedBeforeFling = getOverExpansionAmount() > 0f;
         ValueAnimator animator = createHeightAnimator(target);
         if (expand) {
+            boolean belowFalsingThreshold = isBelowFalsingThreshold();
+            if (belowFalsingThreshold) {
+                vel = 0;
+            }
             mFlingAnimationUtils.apply(animator, mExpandedHeight, target, vel, getHeight());
+            if (belowFalsingThreshold) {
+                animator.setDuration(350);
+            }
         } else {
             mFlingAnimationUtils.applyDismissing(animator, mExpandedHeight, target, vel,
                     getHeight());
@@ -673,25 +684,27 @@
                 removeCallbacks(mPeekRunnable);
                 mPeekRunnable.run();
             }
-        } else if (!isFullyCollapsed() && !mTracking) {
+        } else if (!isFullyCollapsed() && !mTracking && !mClosing) {
             if (mHeightAnimator != null) {
                 mHeightAnimator.cancel();
             }
             mClosing = true;
             notifyExpandingStarted();
             if (delayed) {
-                postDelayed(new Runnable() {
-                    @Override
-                    public void run() {
-                        fling(0, false /* expand */);
-                    }
-                }, 120);
+                postDelayed(mFlingCollapseRunnable, 120);
             } else {
                 fling(0, false /* expand */);
             }
         }
     }
 
+    private final Runnable mFlingCollapseRunnable = new Runnable() {
+        @Override
+        public void run() {
+            fling(0, false /* expand */);
+        }
+    };
+
     public void expand() {
         if (DEBUG) logf("expand: " + this);
         if (isFullyCollapsed()) {
@@ -717,9 +730,13 @@
 
     public void instantExpand() {
         mInstantExpanding = true;
+        mUpdateFlingOnLayout = false;
         abortAnimations();
+        cancelPeek();
         if (mTracking) {
             onTrackingStopped(true /* expands */); // The panel is expanded after this call.
+        }
+        if (mExpanding) {
             notifyExpandingFinished();
         }
         setVisibility(VISIBLE);
@@ -748,6 +765,8 @@
         if (mHeightAnimator != null) {
             mHeightAnimator.cancel();
         }
+        removeCallbacks(mPostCollapseRunnable);
+        removeCallbacks(mFlingCollapseRunnable);
     }
 
     protected void startUnlockHintAnimation() {
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 1a0d2d4..5d4c831 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -71,6 +71,7 @@
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.provider.Settings;
+import android.service.notification.NotificationListenerService;
 import android.service.notification.NotificationListenerService.RankingMap;
 import android.service.notification.StatusBarNotification;
 import android.util.ArraySet;
@@ -112,6 +113,7 @@
 import com.android.systemui.BatteryMeterView;
 import com.android.systemui.DemoMode;
 import com.android.systemui.EventLogTags;
+import com.android.systemui.FontSizeUtils;
 import com.android.systemui.R;
 import com.android.systemui.doze.DozeService;
 import com.android.systemui.keyguard.KeyguardViewMediator;
@@ -147,6 +149,7 @@
 import com.android.systemui.statusbar.policy.LocationControllerImpl;
 import com.android.systemui.statusbar.policy.NetworkControllerImpl;
 import com.android.systemui.statusbar.policy.NextAlarmController;
+import com.android.systemui.statusbar.policy.PreviewInflater;
 import com.android.systemui.statusbar.policy.RotationLockControllerImpl;
 import com.android.systemui.statusbar.policy.SecurityControllerImpl;
 import com.android.systemui.statusbar.policy.UserInfoController;
@@ -779,10 +782,17 @@
                 (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
         final SignalClusterView signalClusterKeyguard =
                 (SignalClusterView) mKeyguardStatusBar.findViewById(R.id.signal_cluster);
+        final SignalClusterView signalClusterQs =
+                (SignalClusterView) mHeader.findViewById(R.id.signal_cluster);
         mNetworkController.addSignalCluster(signalCluster);
         mNetworkController.addSignalCluster(signalClusterKeyguard);
+        mNetworkController.addSignalCluster(signalClusterQs);
+        signalCluster.setSecurityController(mSecurityController);
         signalCluster.setNetworkController(mNetworkController);
+        signalClusterKeyguard.setSecurityController(mSecurityController);
         signalClusterKeyguard.setNetworkController(mNetworkController);
+        signalClusterQs.setSecurityController(mSecurityController);
+        signalClusterQs.setNetworkController(mNetworkController);
         final boolean isAPhone = mNetworkController.hasVoiceCallingFeature();
         if (isAPhone) {
             mNetworkController.addEmergencyLabelView(mHeader);
@@ -1072,7 +1082,6 @@
     };
 
     private long mLastLockToAppLongPress;
-    private AccessibilityManager mAccessibilityManager;
     private View.OnLongClickListener mLongPressBackRecentsListener =
             new View.OnLongClickListener() {
         @Override
@@ -1224,11 +1233,12 @@
                 + " icon=" + icon);
         StatusBarIconView view = new StatusBarIconView(mContext, slot, null);
         view.set(icon);
-        mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize));
+        mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(
+                LayoutParams.WRAP_CONTENT, mIconSize));
         view = new StatusBarIconView(mContext, slot, null);
         view.set(icon);
-        mStatusIconsKeyguard.addView(view, viewIndex,
-                new LinearLayout.LayoutParams(mIconSize, mIconSize));
+        mStatusIconsKeyguard.addView(view, viewIndex, new LinearLayout.LayoutParams(
+                LayoutParams.WRAP_CONTENT, mIconSize));
     }
 
     public void updateIcon(String slot, int index, int viewIndex,
@@ -1408,11 +1418,12 @@
             // Display public version of the notification if we need to redact.
             final boolean hideSensitive =
                     !userAllowsPrivateNotificationsInPublic(ent.notification.getUserId());
-            boolean sensitive = vis == Notification.VISIBILITY_PRIVATE;
-            boolean showingPublic = sensitive && hideSensitive && isLockscreenPublicMode();
-            ent.row.setSensitive(sensitive && hideSensitive);
+            boolean sensitiveNote = vis == Notification.VISIBILITY_PRIVATE;
+            boolean sensitivePackage = packageHasVisibilityOverride(ent.notification.getKey());
+            boolean sensitive = (sensitiveNote && hideSensitive) || sensitivePackage;
+            boolean showingPublic = sensitive && isLockscreenPublicMode();
+            ent.row.setSensitive(sensitive);
             if (ent.autoRedacted && ent.legacy) {
-
                 // TODO: Also fade this? Or, maybe easier (and better), provide a dark redacted form
                 // for legacy auto redacted notifications.
                 if (showingPublic) {
@@ -1473,6 +1484,11 @@
         mShadeUpdates.check();
     }
 
+    private boolean packageHasVisibilityOverride(String key) {
+        return mNotificationData.getVisibilityOverride(key)
+                != NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE;
+    }
+
     private void updateClearAll() {
         boolean showDismissView =
                 mState != StatusBarState.KEYGUARD &&
@@ -1546,8 +1562,9 @@
             }
         }
 
-        for (View remove : toRemove) {
-            mNotificationIcons.removeView(remove);
+        final int toRemoveCount = toRemove.size();
+        for (int i = 0; i < toRemoveCount; i++) {
+            mNotificationIcons.removeView(toRemove.get(i));
         }
 
         for (int i=0; i<toShow.size(); i++) {
@@ -1556,6 +1573,18 @@
                 mNotificationIcons.addView(v, i, params);
             }
         }
+
+        // Resort notification icons
+        final int childCount = mNotificationIcons.getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            View actual = mNotificationIcons.getChildAt(i);
+            StatusBarIconView expected = toShow.get(i);
+            if (actual == expected) {
+                continue;
+            }
+            mNotificationIcons.removeView(expected);
+            mNotificationIcons.addView(expected, i);
+        }
     }
 
     @Override
@@ -1717,12 +1746,12 @@
                     // something old was playing
                     Log.v(TAG, "DEBUG_MEDIA: Disconnecting from old controller: "
                             + mMediaController);
-                    mMediaController.removeCallback(mMediaListener);
+                    mMediaController.unregisterCallback(mMediaListener);
                 }
                 mMediaController = controller;
 
                 if (mMediaController != null) {
-                    mMediaController.addCallback(mMediaListener);
+                    mMediaController.registerCallback(mMediaListener);
                     mMediaMetadata = mMediaController.getMetadata();
                     if (DEBUG_MEDIA) {
                         Log.v(TAG, "DEBUG_MEDIA: insert listener, receive metadata: "
@@ -2041,8 +2070,8 @@
     }
 
     @Override
-    public void startActivity(Intent intent, boolean dismissShade, boolean afterKeyguardGone) {
-        startActivityDismissingKeyguard(intent, false, dismissShade, afterKeyguardGone);
+    public void startActivity(Intent intent, boolean dismissShade) {
+        startActivityDismissingKeyguard(intent, false, dismissShade);
     }
 
     public ScrimController getScrimController() {
@@ -2931,9 +2960,11 @@
     }
 
     public void startActivityDismissingKeyguard(final Intent intent, boolean onlyProvisioned,
-            final boolean dismissShade, final boolean afterKeyguardGone) {
+            final boolean dismissShade) {
         if (onlyProvisioned && !isDeviceProvisioned()) return;
 
+        final boolean afterKeyguardGone = PreviewInflater.wouldLaunchResolverActivity(
+                mContext, intent, mCurrentUserId);
         final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
         dismissKeyguardThenExecute(new OnDismissAction() {
             @Override
@@ -3053,6 +3084,7 @@
         updateDisplaySize(); // populates mDisplayMetrics
 
         updateResources();
+        updateClockSize();
         repositionNavigationBar();
         updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
         updateShowSearchHoldoff();
@@ -3124,6 +3156,13 @@
         }
     }
 
+    private void updateClockSize() {
+        if (mStatusBarView == null) return;
+        TextView clock = (TextView) mStatusBarView.findViewById(R.id.clock);
+        if (clock != null) {
+            FontSizeUtils.updateFontSize(clock, R.dimen.status_bar_clock_size);
+        }
+    }
     protected void loadDimens() {
         final Resources res = mContext.getResources();
 
@@ -3274,8 +3313,7 @@
     }
 
     private void handleStartSettingsActivity(Intent intent, boolean onlyProvisioned) {
-        startActivityDismissingKeyguard(intent, onlyProvisioned, true /* dismissShade */,
-                false /* afterKeyguardGone */);
+        startActivityDismissingKeyguard(intent, onlyProvisioned, true /* dismissShade */);
     }
 
     private static class FastColorDrawable extends Drawable {
@@ -3753,7 +3791,9 @@
             row = (ExpandableNotificationRow) expandView;
             row.setUserExpanded(true);
         }
-        if (isLockscreenPublicMode() && !userAllowsPrivateNotificationsInPublic(mCurrentUserId)) {
+        boolean fullShadeNeedsBouncer = !userAllowsPrivateNotificationsInPublic(mCurrentUserId)
+                || !mShowLockscreenNotifications;
+        if (isLockscreenPublicMode() && fullShadeNeedsBouncer) {
             mLeaveOpenOnKeyguardHide = true;
             showBouncer();
             mDraggedDownRow = row;
@@ -3772,6 +3812,7 @@
      */
     public void goToKeyguard() {
         if (mState == StatusBarState.SHADE_LOCKED) {
+            mStackScroller.onGoToKeyguard();
             setBarState(StatusBarState.KEYGUARD);
             updateKeyguardState(false /* goingToFullShade */, true /* fromShadeLocked*/);
         }
@@ -3812,6 +3853,7 @@
 
     public void onScreenTurnedOn() {
         mStackScroller.setAnimationsEnabled(true);
+        mNotificationPanel.onScreenTurnedOn();
     }
 
     /**
@@ -3831,10 +3873,6 @@
         try {
             boolean sendBackLongPress = false;
             IActivityManager activityManager = ActivityManagerNative.getDefault();
-            if (mAccessibilityManager == null) {
-                mAccessibilityManager = (AccessibilityManager)
-                        mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
-            }
             boolean isAccessiblityEnabled = mAccessibilityManager.isEnabled();
             if (activityManager.isInLockTaskMode() && !isAccessiblityEnabled) {
                 long time = System.currentTimeMillis();
@@ -3910,6 +3948,13 @@
         return !mNotificationData.getActiveNotifications().isEmpty();
     }
 
+    public void wakeUpIfDozing(long time) {
+        if (mDozeServiceHost != null && mDozeServiceHost.isDozing()) {
+            PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
+            pm.wakeUp(time);
+        }
+    }
+
     private final class ShadeUpdates {
         private final ArraySet<String> mVisibleNotifications = new ArraySet<String>();
         private final ArraySet<String> mNewVisibleNotifications = new ArraySet<String>();
@@ -3954,6 +3999,10 @@
                     + mCurrentDozeService + "]";
         }
 
+        public boolean isDozing() {
+            return mCurrentDozeService != null;
+        }
+
         public void firePowerSaveChanged(boolean active) {
             for (Callback callback : mCallbacks) {
                 callback.onPowerSaveChanged(active);
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 455c336..be48df7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -38,11 +38,12 @@
     private static final String TAG = "ScrimController";
     private static final boolean DEBUG = false;
 
+    public static final long ANIMATION_DURATION = 220;
+
     private static final float SCRIM_BEHIND_ALPHA = 0.62f;
     private static final float SCRIM_BEHIND_ALPHA_KEYGUARD = 0.55f;
     private static final float SCRIM_BEHIND_ALPHA_UNLOCKING = 0.2f;
     private static final float SCRIM_IN_FRONT_ALPHA = 0.75f;
-    private static final long ANIMATION_DURATION = 220;
     private static final int TAG_KEY_ANIM = R.id.scrim;
 
     private static final long PULSE_IN_ANIMATION_DURATION = 1000;
@@ -131,6 +132,7 @@
         mDozing = dozing;
         if (!mDozing) {
             cancelPulsing();
+            mAnimateChange = true;
         }
         scheduleUpdate();
     }
@@ -163,7 +165,7 @@
         if (mAnimateKeyguardFadingOut) {
             setScrimInFrontColor(0f);
             setScrimBehindColor(0f);
-        }else if (!mKeyguardShowing && !mBouncerShowing) {
+        } else if (!mKeyguardShowing && !mBouncerShowing) {
             updateScrimNormal();
             setScrimInFrontColor(0);
         } else {
@@ -217,8 +219,8 @@
             mScrimInFront.setClickable(false);
         } else {
 
-            // Eat touch events.
-            mScrimInFront.setClickable(true);
+            // Eat touch events (unless dozing).
+            mScrimInFront.setClickable(!mDozing);
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java
index 562f550..3f5cf3f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SecureCameraLaunchManager.java
@@ -85,12 +85,12 @@
     private KeyguardBottomAreaView mKeyguardBottomArea;
 
     private CameraManager mCameraManager;
-    private CameraAvailabilityListener mCameraAvailabilityListener;
+    private CameraAvailabilityCallback mCameraAvailabilityCallback;
     private Map<String, Boolean> mCameraAvailabilityMap;
     private boolean mWaitingToLaunchSecureCamera;
     private Runnable mLaunchCameraRunnable;
 
-    private class CameraAvailabilityListener extends CameraManager.AvailabilityListener {
+    private class CameraAvailabilityCallback extends CameraManager.AvailabilityCallback {
         @Override
         public void onCameraUnavailable(String cameraId) {
             if (DEBUG) Log.d(TAG, "onCameraUnavailble(" + cameraId + ")");
@@ -123,10 +123,10 @@
         mKeyguardBottomArea = keyguardBottomArea;
 
         mCameraManager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE);
-        mCameraAvailabilityListener = new CameraAvailabilityListener();
+        mCameraAvailabilityCallback = new CameraAvailabilityCallback();
 
         // An onCameraAvailable() or onCameraUnavailable() callback will be received for each camera
-        // when the availability listener is registered, thus initializing the map.
+        // when the availability callback is registered, thus initializing the map.
         //
         // Keeping track of the state of all cameras using the onCameraAvailable() and
         // onCameraUnavailable() callbacks can get messy when dealing with hot-pluggable cameras.
@@ -150,14 +150,14 @@
      * Initializes the SecureCameraManager and starts listening for camera availability.
      */
     public void create() {
-        mCameraManager.addAvailabilityListener(mCameraAvailabilityListener, mHandler);
+        mCameraManager.registerAvailabilityCallback(mCameraAvailabilityCallback, mHandler);
     }
 
     /**
      * Stops listening for camera availability and cleans up the SecureCameraManager.
      */
     public void destroy() {
-        mCameraManager.removeAvailabilityListener(mCameraAvailabilityListener);
+        mCameraManager.unregisterAvailabilityCallback(mCameraAvailabilityCallback);
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index b6792f5..15a7229 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -39,6 +39,7 @@
 import android.widget.TextView;
 
 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;
@@ -67,7 +68,6 @@
     private TextView mDateCollapsed;
     private TextView mDateExpanded;
     private LinearLayout mSystemIcons;
-    private View mStatusIcons;
     private View mSignalCluster;
     private View mSettingsButton;
     private View mQsDetailHeader;
@@ -149,6 +149,8 @@
         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();
@@ -259,6 +261,7 @@
 
     public void setBatteryController(BatteryController batteryController) {
         mBatteryController = batteryController;
+        ((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController);
     }
 
     public void setNextAlarmController(NextAlarmController nextAlarmController) {
@@ -476,36 +479,6 @@
         invalidateOutline();
     }
 
-    public void attachSystemIcons(LinearLayout systemIcons) {
-        mSystemIconsContainer.addView(systemIcons);
-        mStatusIcons = systemIcons.findViewById(R.id.statusIcons);
-        mSignalCluster = systemIcons.findViewById(R.id.signal_cluster);
-        mSystemIcons = systemIcons;
-        updateVisibilities();
-        if (mStatusIcons != null) {
-            mStatusIcons.setVisibility(View.GONE);
-        }
-    }
-
-    public void onSystemIconsDetached() {
-        if (mSignalClusterDetached) {
-            reattachSignalCluster();
-            mSignalClusterDetached = false;
-        }
-        if (mStatusIcons != null) {
-            mStatusIcons.setVisibility(View.VISIBLE);
-        }
-        if (mSignalCluster != null) {
-            mSignalCluster.setVisibility(View.VISIBLE);
-            mSignalCluster.setAlpha(1f);
-            mSignalCluster.setTranslationX(0f);
-            mSignalCluster.setTranslationY(0f);
-        }
-        mStatusIcons = null;
-        mSignalCluster = null;
-        mSystemIcons = null;
-    }
-
     public void setUserInfoController(UserInfoController userInfoController) {
         userInfoController.addListener(new UserInfoController.OnUserInfoChangedListener() {
             @Override
@@ -524,20 +497,19 @@
         } else if (v == mAlarmStatus && mNextAlarm != null) {
             PendingIntent showIntent = mNextAlarm.getShowIntent();
             if (showIntent != null && showIntent.isActivity()) {
-                mActivityStarter.startActivity(showIntent.getIntent(), true /* dismissShade */,
-                        false /* afterKeyguardGone */);
+                mActivityStarter.startActivity(showIntent.getIntent(), true /* dismissShade */);
             }
         }
     }
 
     private void startSettingsActivity() {
         mActivityStarter.startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS),
-                true /* dismissShade */, false /* afterKeyguardGone */);
+                true /* dismissShade */);
     }
 
     private void startBatteryActivity() {
         mActivityStarter.startActivity(new Intent(Intent.ACTION_POWER_USAGE_SUMMARY),
-                true /* dismissShade */, false /* afterKeyguardGone */);
+                true /* dismissShade */);
     }
 
     public void setQSPanel(QSPanel qsp) {
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 e1fd779..a5217ab 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -42,6 +42,7 @@
     private DragDownHelper mDragDownHelper;
     private NotificationStackScrollLayout mStackScrollLayout;
     private NotificationPanelView mNotificationPanel;
+    private View mBrightnessMirror;
 
     PhoneStatusBar mService;
 
@@ -72,6 +73,7 @@
                 R.id.notification_stack_scroller);
         mNotificationPanel = (NotificationPanelView) findViewById(R.id.notification_panel);
         mDragDownHelper = new DragDownHelper(getContext(), this, mStackScrollLayout, mService);
+        mBrightnessMirror = findViewById(R.id.brightness_mirror);
 
         // We really need to be able to animate while window animations are going on
         // so that activities may be started asynchronously from panel animations
@@ -106,6 +108,19 @@
     }
 
     @Override
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+        if (mBrightnessMirror != null && mBrightnessMirror.getVisibility() == VISIBLE) {
+            // Disallow new pointers while the brightness mirror is visible. This is so that you
+            // can't touch anything other than the brightness slider while the mirror is showing
+            // and the rest of the panel is transparent.
+            if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {
+                return false;
+            }
+        }
+        return super.dispatchTouchEvent(ev);
+    }
+
+    @Override
     public boolean onInterceptTouchEvent(MotionEvent ev) {
         boolean intercept = false;
         if (mNotificationPanel.isFullyExpanded()
@@ -113,6 +128,10 @@
                 && mService.getBarState() == StatusBarState.KEYGUARD
                 && !mService.isBouncerShowing()) {
             intercept = mDragDownHelper.onInterceptTouchEvent(ev);
+            // wake up on a touch down event, if dozing
+            if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
+                mService.wakeUpIfDozing(ev.getEventTime());
+            }
         }
         if (!intercept) {
             super.onInterceptTouchEvent(ev);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
index 70eaa5c..6f021ac 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java
@@ -81,7 +81,7 @@
 
         if (mCameraId != null) {
             ensureHandler();
-            mCameraManager.addAvailabilityListener(mAvailabilityListener, mHandler);
+            mCameraManager.registerAvailabilityCallback(mAvailabilityCallback, mHandler);
         }
     }
 
@@ -339,8 +339,8 @@
         }
     };
 
-    private final CameraManager.AvailabilityListener mAvailabilityListener =
-            new CameraManager.AvailabilityListener() {
+    private final CameraManager.AvailabilityCallback mAvailabilityCallback =
+            new CameraManager.AvailabilityCallback() {
         @Override
         public void onCameraAvailable(String cameraId) {
             if (DEBUG) Log.d(TAG, "onCameraAvailable(" + cameraId + ")");
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
index b2009c3..7f155a1d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
@@ -28,6 +28,7 @@
 import android.view.ViewGroup;
 import android.view.ViewOutlineProvider;
 import android.view.ViewTreeObserver;
+import android.view.accessibility.AccessibilityEvent;
 import android.widget.FrameLayout;
 
 import com.android.systemui.ExpandHelper;
@@ -111,6 +112,7 @@
             mContentHolder.setVisibility(View.VISIBLE);
             mContentHolder.setAlpha(mMaxAlpha);
             mContentHolder.addView(mHeadsUp.row);
+            sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
 
             mSwipeHelper.snapChild(mContentHolder, 1f);
             mStartTouchTime = System.currentTimeMillis() + mTouchSensitivityDelay;
@@ -126,6 +128,14 @@
         return true;
     }
 
+    @Override
+    protected void onVisibilityChanged(View changedView, int visibility) {
+        super.onVisibilityChanged(changedView, visibility);
+        if (changedView.getVisibility() == VISIBLE) {
+            sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
+        }
+    }
+
     public boolean isShowing(String key) {
         return mHeadsUp != null && mHeadsUp.key.equals(key);
     }
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 10f457a..16c0e66 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -18,10 +18,12 @@
 
 import android.animation.Animator;
 import android.animation.ObjectAnimator;
+import android.app.ActivityManager;
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.graphics.drawable.Drawable;
 import android.hardware.input.InputManager;
+import android.media.AudioManager;
 import android.os.Bundle;
 import android.os.SystemClock;
 import android.util.AttributeSet;
@@ -46,7 +48,8 @@
     private static final String TAG = "StatusBar.KeyButtonView";
     private static final boolean DEBUG = false;
 
-    public static final float DEFAULT_QUIESCENT_ALPHA = 0.70f;
+    // TODO: Get rid of this
+    public static final float DEFAULT_QUIESCENT_ALPHA = 1f;
 
     private long mDownTime;
     private int mCode;
@@ -56,6 +59,7 @@
     private boolean mSupportsLongpress = true;
     private Animator mAnimateToQuiescent = new ObjectAnimator();
     private Drawable mBackground;
+    private AudioManager mAudioManager;
 
     private final Runnable mCheckLongPress = new Runnable() {
         public void run() {
@@ -98,6 +102,7 @@
 
         setClickable(true);
         mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+        mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
     }
 
     @Override
@@ -250,6 +255,10 @@
         return true;
     }
 
+    public void playSoundEffect(int soundConstant) {
+        mAudioManager.playSoundEffect(soundConstant, ActivityManager.getCurrentUser());
+    };
+
     public void sendEvent(int action, int flags) {
         sendEvent(action, flags, SystemClock.uptimeMillis());
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
index d5b2548..61ed095 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
@@ -42,8 +42,7 @@
     // The name of the placeholder corresponding to the location request status icon.
     // This string corresponds to config_statusBarIcons in core/res/res/values/config.xml.
     public static final String LOCATION_STATUS_ICON_PLACEHOLDER = "location";
-    public static final int LOCATION_STATUS_ICON_ID
-        = R.drawable.stat_sys_device_access_location_found;
+    public static final int LOCATION_STATUS_ICON_ID = R.drawable.stat_sys_location;
 
     private static final int[] mHighPowerRequestAppOpArray
         = new int[] {AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index b64dcbe..2ed9366 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -30,7 +30,8 @@
         void onMobileDataSignalChanged(boolean enabled, int mobileSignalIconId,
                 String mobileSignalContentDescriptionId, int dataTypeIconId,
                 boolean activityIn, boolean activityOut,
-                String dataTypeContentDescriptionId, String description, boolean noSim);
+                String dataTypeContentDescriptionId, String description, boolean noSim,
+                boolean isDataTypeIconWide);
         void onAirplaneModeChanged(boolean enabled);
         void onMobileDataEnabled(boolean enabled);
     }
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 9b59814..4d248c2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -63,9 +63,6 @@
     static final boolean DEBUG = false;
     static final boolean CHATTY = false; // additional diagnostics, but not logspew
 
-    private static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_signal_flightmode;
-    private static final int ROAMING_ICON = R.drawable.stat_sys_data_fully_connected_roam;
-
     // telephony
     boolean mHspaDataDistinguishable;
     final TelephonyManager mPhone;
@@ -165,7 +162,8 @@
     public interface SignalCluster {
         void setWifiIndicators(boolean visible, int strengthIcon, String contentDescription);
         void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon,
-                String contentDescription, String typeContentDescription, boolean roaming);
+                String contentDescription, String typeContentDescription, boolean roaming,
+                boolean isTypeIconWide);
         void setIsAirplaneMode(boolean is, int airplaneIcon);
     }
 
@@ -339,7 +337,9 @@
     @Override
     public DataUsageInfo getDataUsageInfo() {
         final DataUsageInfo info =  mMobileDataController.getDataUsageInfo();
-        info.carrier = mNetworkName;
+        if (info != null) {
+            info.carrier = mNetworkName;
+        }
         return info;
     }
 
@@ -358,6 +358,16 @@
         mMobileDataController.setMobileDataEnabled(enabled);
     }
 
+    private boolean isTypeIconWide(int iconId) {
+        return TelephonyIcons.ICON_LTE == iconId || TelephonyIcons.ICON_1X == iconId
+                || TelephonyIcons.ICON_3G == iconId || TelephonyIcons.ICON_4G == iconId;
+    }
+
+    private boolean isQsTypeIconWide(int iconId) {
+        return TelephonyIcons.QS_ICON_LTE == iconId || TelephonyIcons.QS_ICON_1X == iconId
+                || TelephonyIcons.QS_ICON_3G == iconId || TelephonyIcons.QS_ICON_4G == iconId;
+    }
+
     public void refreshSignalCluster(SignalCluster cluster) {
         if (mDemoMode) return;
         cluster.setWifiIndicators(
@@ -374,7 +384,8 @@
                     mDataTypeIconId,
                     mContentDescriptionWimax,
                     mContentDescriptionDataType,
-                    mDataTypeIconId == ROAMING_ICON);
+                    mDataTypeIconId == TelephonyIcons.ROAMING_ICON,
+                    false /* isTypeIconWide */ );
         } else {
             // normal mobile data
             cluster.setMobileDataIndicators(
@@ -383,7 +394,8 @@
                     mDataTypeIconId,
                     mContentDescriptionPhoneSignal,
                     mContentDescriptionDataType,
-                    mDataTypeIconId == ROAMING_ICON);
+                    mDataTypeIconId == TelephonyIcons.ROAMING_ICON,
+                    isTypeIconWide(mDataTypeIconId));
         }
         cluster.setIsAirplaneMode(mAirplaneMode, mAirplaneIconId);
     }
@@ -409,18 +421,20 @@
         if (isEmergencyOnly()) {
             cb.onMobileDataSignalChanged(false, mQSPhoneSignalIconId,
                     mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
-                    mContentDescriptionDataType, null, mNoSim);
+                    mContentDescriptionDataType, null, mNoSim, isQsTypeIconWide(mQSDataTypeIconId));
         } else {
             if (mIsWimaxEnabled && mWimaxConnected) {
                 // Wimax is special
                 cb.onMobileDataSignalChanged(true, mQSPhoneSignalIconId,
                         mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
-                        mContentDescriptionDataType, mNetworkName, mNoSim);
+                        mContentDescriptionDataType, mNetworkName, mNoSim,
+                        isQsTypeIconWide(mQSDataTypeIconId));
             } else {
                 // Normal mobile data
                 cb.onMobileDataSignalChanged(mHasMobileDataFeature, mQSPhoneSignalIconId,
                         mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
-                        mContentDescriptionDataType, mNetworkName, mNoSim);
+                        mContentDescriptionDataType, mNetworkName, mNoSim,
+                        isQsTypeIconWide(mQSDataTypeIconId));
             }
         }
         cb.onAirplaneModeChanged(mAirplaneMode);
@@ -754,7 +768,7 @@
                                 R.string.accessibility_data_connection_4g);
                     } else {
                         mDataIconList = TelephonyIcons.DATA_LTE[mInetCondition];
-                        mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_lte;
+                        mDataTypeIconId = TelephonyIcons.ICON_LTE;
                         mQSDataTypeIconId = TelephonyIcons.QS_DATA_LTE[mInetCondition];
                         mContentDescriptionDataType = mContext.getString(
                                 R.string.accessibility_data_connection_lte);
@@ -780,11 +794,11 @@
 
         if (isCdma()) {
             if (isCdmaEri()) {
-                mDataTypeIconId = ROAMING_ICON;
+                mDataTypeIconId = TelephonyIcons.ROAMING_ICON;
                 mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition];
             }
         } else if (mPhone.isNetworkRoaming()) {
-                mDataTypeIconId = ROAMING_ICON;
+                mDataTypeIconId = TelephonyIcons.ROAMING_ICON;
                 mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition];
         }
     }
@@ -833,7 +847,7 @@
                     visible = false;
                 }
             } else {
-                iconId = R.drawable.stat_sys_no_sim;
+                iconId = 0;
                 mNoSim = true;
                 visible = false; // no SIM? no data
             }
@@ -928,8 +942,8 @@
                     intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
             boolean wasConnected = mWifiConnected;
             mWifiConnected = networkInfo != null && networkInfo.isConnected();
-            // If we just connected, grab the inintial signal strength and ssid
-            if (mWifiConnected && !wasConnected) {
+            // If Connected grab the signal strength and ssid
+            if (mWifiConnected) {
                 // try getting it out of the intent first
                 WifiInfo info = (WifiInfo) intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO);
                 if (info == null) {
@@ -1164,7 +1178,7 @@
             // look again; your radios are now airplanes
             mContentDescriptionPhoneSignal = mContext.getString(
                     R.string.accessibility_airplane_mode);
-            mAirplaneIconId = FLIGHT_MODE_ICON;
+            mAirplaneIconId = TelephonyIcons.FLIGHT_MODE_ICON;
             mPhoneSignalIconId = mDataSignalIconId = mDataTypeIconId = mQSDataTypeIconId = 0;
             mQSPhoneSignalIconId = 0;
 
@@ -1198,11 +1212,11 @@
             mQSDataTypeIconId = 0;
             if (isCdma()) {
                 if (isCdmaEri()) {
-                    mDataTypeIconId = ROAMING_ICON;
+                    mDataTypeIconId = TelephonyIcons.ROAMING_ICON;
                     mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition];
                 }
             } else if (mPhone.isNetworkRoaming()) {
-                mDataTypeIconId = ROAMING_ICON;
+                mDataTypeIconId = TelephonyIcons.ROAMING_ICON;
                 mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition];
             }
         }
@@ -1509,7 +1523,7 @@
             if (airplane != null) {
                 boolean show = airplane.equals("show");
                 for (SignalCluster cluster : mSignalClusters) {
-                    cluster.setIsAirplaneMode(show, FLIGHT_MODE_ICON);
+                    cluster.setIsAirplaneMode(show, TelephonyIcons.FLIGHT_MODE_ICON);
                 }
             }
             String fully = args.getString("fully");
@@ -1540,23 +1554,23 @@
                 String datatype = args.getString("datatype");
                 if (datatype != null) {
                     mDemoDataTypeIconId =
-                            datatype.equals("1x") ? R.drawable.stat_sys_data_fully_connected_1x :
-                            datatype.equals("3g") ? R.drawable.stat_sys_data_fully_connected_3g :
-                            datatype.equals("4g") ? R.drawable.stat_sys_data_fully_connected_4g :
+                            datatype.equals("1x") ? TelephonyIcons.ICON_1X :
+                            datatype.equals("3g") ? TelephonyIcons.ICON_3G :
+                            datatype.equals("4g") ? TelephonyIcons.ICON_4G :
                             datatype.equals("e") ? R.drawable.stat_sys_data_fully_connected_e :
                             datatype.equals("g") ? R.drawable.stat_sys_data_fully_connected_g :
                             datatype.equals("h") ? R.drawable.stat_sys_data_fully_connected_h :
-                            datatype.equals("lte") ? R.drawable.stat_sys_data_fully_connected_lte :
-                            datatype.equals("roam") ? ROAMING_ICON :
+                            datatype.equals("lte") ? TelephonyIcons.ICON_LTE :
+                            datatype.equals("roam") ? TelephonyIcons.ROAMING_ICON :
                             0;
                     mDemoQSDataTypeIconId =
-                            datatype.equals("1x") ? R.drawable.ic_qs_signal_1x :
-                            datatype.equals("3g") ? R.drawable.ic_qs_signal_3g :
-                            datatype.equals("4g") ? R.drawable.ic_qs_signal_4g :
+                            datatype.equals("1x") ? TelephonyIcons.QS_ICON_1X :
+                            datatype.equals("3g") ? TelephonyIcons.QS_ICON_3G :
+                            datatype.equals("4g") ? TelephonyIcons.QS_ICON_4G :
                             datatype.equals("e") ? R.drawable.ic_qs_signal_e :
                             datatype.equals("g") ? R.drawable.ic_qs_signal_g :
                             datatype.equals("h") ? R.drawable.ic_qs_signal_h :
-                            datatype.equals("lte") ? R.drawable.ic_qs_signal_lte :
+                            datatype.equals("lte") ? TelephonyIcons.QS_ICON_LTE :
                             datatype.equals("roam") ? R.drawable.ic_qs_signal_r :
                             0;
                 }
@@ -1575,7 +1589,8 @@
                             mDemoDataTypeIconId,
                             "Demo",
                             "Demo",
-                            mDemoDataTypeIconId == ROAMING_ICON);
+                            mDemoDataTypeIconId == TelephonyIcons.ROAMING_ICON,
+                            isTypeIconWide(mDemoDataTypeIconId));
                 }
                 refreshViews();
             }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java
index cdbe494..030cd6d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PreviewInflater.java
@@ -20,14 +20,12 @@
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
-import android.content.pm.UserInfo;
 import android.os.UserHandle;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 
 import com.android.internal.widget.LockPatternUtils;
-import com.android.keyguard.KeyguardActivityLauncher;
 import com.android.systemui.statusbar.phone.KeyguardPreviewContainer;
 
 import java.util.List;
@@ -107,20 +105,21 @@
         return info;
     }
 
-    public boolean wouldLaunchResolverActivity(Intent intent) {
-        PackageManager packageManager = mContext.getPackageManager();
+    public static boolean wouldLaunchResolverActivity(Context ctx, Intent intent,
+            int currentUserId) {
+        PackageManager packageManager = ctx.getPackageManager();
         final List<ResolveInfo> appList = packageManager.queryIntentActivitiesAsUser(
-                intent, PackageManager.MATCH_DEFAULT_ONLY, mLockPatternUtils.getCurrentUser());
+                intent, PackageManager.MATCH_DEFAULT_ONLY, currentUserId);
         if (appList.size() == 0) {
             return false;
         }
         ResolveInfo resolved = packageManager.resolveActivityAsUser(intent,
-                PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_META_DATA,
-                mLockPatternUtils.getCurrentUser());
+                PackageManager.MATCH_DEFAULT_ONLY | PackageManager.GET_META_DATA, currentUserId);
         return wouldLaunchResolverActivity(resolved, appList);
     }
 
-    private boolean wouldLaunchResolverActivity(ResolveInfo resolved, List<ResolveInfo> appList) {
+    private static boolean wouldLaunchResolverActivity(
+            ResolveInfo resolved, List<ResolveInfo> appList) {
         // If the list contains the above resolved activity, then it can't be
         // ResolverActivity itself.
         for (int i = 0; i < appList.size(); i++) {
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 a15ddaf..2fbb812 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
@@ -139,14 +139,14 @@
     }
 
     @Override
-    public void addCallback(SecurityControllerCallback callback) {
+    public void removeCallback(SecurityControllerCallback callback) {
         if (callback == null) return;
         if (DEBUG) Log.d(TAG, "removeCallback " + callback);
         mCallbacks.remove(callback);
     }
 
     @Override
-    public void removeCallback(SecurityControllerCallback callback) {
+    public void addCallback(SecurityControllerCallback callback) {
         if (callback == null || mCallbacks.contains(callback)) return;
         if (DEBUG) Log.d(TAG, "addCallback " + callback);
         mCallbacks.add(callback);
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 84c53ce..1f2b918 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
@@ -188,5 +188,16 @@
         R.drawable.ic_qs_signal_lte
     };
 
+    static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode;
+    static final int ROAMING_ICON = R.drawable.stat_sys_data_fully_connected_roam;
+    static final int ICON_LTE = R.drawable.stat_sys_data_fully_connected_lte;
+    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_1X = R.drawable.stat_sys_data_fully_connected_1x;
+
+    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_1X = R.drawable.ic_qs_signal_1x;
 }
 
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 adb71e7..d02826f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -73,6 +73,7 @@
 
     private ArrayList<UserRecord> mUsers = new ArrayList<>();
     private Dialog mExitGuestDialog;
+    private Dialog mAddUserDialog;
     private int mLastNonGuestUser = UserHandle.USER_OWNER;
     private boolean mSimpleUserSwitcher;
     private boolean mAddUsersWhenLocked;
@@ -188,7 +189,7 @@
                     }
                 }
 
-                if (canCreateUser) {
+                if (!mSimpleUserSwitcher && canCreateUser) {
                     records.add(new UserRecord(null /* info */, null /* picture */,
                             false /* isGuest */, false /* isCurrent */, true /* isAddUser */,
                             createIsRestricted));
@@ -228,8 +229,8 @@
             // No guest user. Create one.
             id = mUserManager.createGuest(mContext, mContext.getString(R.string.guest_nickname)).id;
         } else if (record.isAddUser) {
-            id = mUserManager.createUser(
-                    mContext.getString(R.string.user_new_user_name), 0 /* flags */).id;
+            showAddUserDialog();
+            return;
         } else {
             id = record.info.id;
         }
@@ -260,6 +261,14 @@
         mExitGuestDialog.show();
     }
 
+    private void showAddUserDialog() {
+        if (mAddUserDialog != null && mAddUserDialog.isShowing()) {
+            mAddUserDialog.cancel();
+        }
+        mAddUserDialog = new AddUserDialog(mContext);
+        mAddUserDialog.show();
+    }
+
     private void exitGuest(int id) {
         int newId = UserHandle.USER_OWNER;
         if (mLastNonGuestUser != UserHandle.USER_OWNER) {
@@ -334,6 +343,14 @@
         }
     }
 
+    public String getCurrentUserName(Context context) {
+        if (mUsers.isEmpty()) return null;
+        UserRecord item = mUsers.get(0);
+        if (item == null || item.info == null) return null;
+        if (item.isGuest) return context.getString(R.string.guest_nickname);
+        return item.info.name;
+    }
+
     public static abstract class BaseUserAdapter extends BaseAdapter {
 
         final UserSwitcherController mController;
@@ -526,4 +543,30 @@
             }
         }
     }
+
+    private final class AddUserDialog extends SystemUIDialog implements
+            DialogInterface.OnClickListener {
+
+        public AddUserDialog(Context context) {
+            super(context);
+            setTitle(R.string.user_add_user_title);
+            setMessage(context.getString(R.string.user_add_user_message_short));
+            setButton(DialogInterface.BUTTON_NEGATIVE,
+                    context.getString(android.R.string.cancel), this);
+            setButton(DialogInterface.BUTTON_POSITIVE,
+                    context.getString(android.R.string.ok), this);
+        }
+
+        @Override
+        public void onClick(DialogInterface dialog, int which) {
+            if (which == BUTTON_NEGATIVE) {
+                cancel();
+            } else {
+                dismiss();
+                int id = mUserManager.createUser(
+                        mContext.getString(R.string.user_new_user_name), 0 /* flags */).id;
+                switchToUserId(id);
+            }
+        }
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index ddb5cb8..8e677f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -32,7 +32,6 @@
     private float mOverScrollTopAmount;
     private float mOverScrollBottomAmount;
     private int mSpeedBumpIndex = -1;
-    private float mScrimAmount;
     private boolean mDark;
     private boolean mHideSensitive;
 
@@ -105,14 +104,6 @@
         }
     }
 
-    public void setScrimAmount(float scrimAmount) {
-        mScrimAmount = scrimAmount;
-    }
-
-    public float getScrimAmount() {
-        return mScrimAmount;
-    }
-
     public float getOverScrollAmount(boolean top) {
         return top ? mOverScrollTopAmount : mOverScrollBottomAmount;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 0aa1114..67ba8d20 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -40,6 +40,7 @@
 import com.android.systemui.statusbar.ExpandableNotificationRow;
 import com.android.systemui.statusbar.ExpandableView;
 import com.android.systemui.statusbar.SpeedBumpView;
+import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.phone.PhoneStatusBar;
 import com.android.systemui.statusbar.policy.ScrollAdapter;
 import com.android.systemui.statusbar.stack.StackScrollState.ViewState;
@@ -166,6 +167,7 @@
     private boolean mDontReportNextOverScroll;
     private boolean mRequestViewResizeAnimationOnLayout;
     private boolean mNeedViewResizeAnimation;
+    private boolean mEverythingNeedsAnimation;
 
     /**
      * The maximum scrollPosition which we are allowed to reach when a notification was expanded.
@@ -579,7 +581,7 @@
             }
             float childTop = slidingChild.getTranslationY();
             float top = childTop + slidingChild.getClipTopAmount();
-            float bottom = top + slidingChild.getActualHeight();
+            float bottom = childTop + slidingChild.getActualHeight();
 
             // Allow the full width of this view to prevent gesture conflict on Keyguard (phone and
             // camera affordance).
@@ -644,7 +646,7 @@
 
     @Override
     public boolean isAntiFalsingNeeded() {
-        return mPhoneStatusBar.isFalsingThresholdNeeded();
+        return mPhoneStatusBar.getBarState() == StatusBarState.KEYGUARD;
     }
 
     private void setSwipingInProgress(boolean isSwiped) {
@@ -1466,6 +1468,7 @@
             // drawn when removed
             getOverlay().add(child);
         }
+        updateAnimationState(false, child);
 
         // Make sure the clipRect we might have set is removed
         child.setClipBounds(null);
@@ -1529,7 +1532,7 @@
                 return position;
             }
             if (child.getVisibility() != View.GONE) {
-                position += child.getHeight();
+                position += getIntrinsicHeight(child);
                 if (i < getChildCount()-1) {
                     position += mPaddingBetweenElements;
                 }
@@ -1544,10 +1547,33 @@
         mStackScrollAlgorithm.notifyChildrenChanged(this);
         ((ExpandableView) child).setOnHeightChangedListener(this);
         generateAddAnimation(child, false /* fromMoreCard */);
+        updateAnimationState(child);
     }
 
     public void setAnimationsEnabled(boolean animationsEnabled) {
         mAnimationsEnabled = animationsEnabled;
+        updateNotificationAnimationStates();
+    }
+
+    private void updateNotificationAnimationStates() {
+        boolean running = mIsExpanded && mAnimationsEnabled;
+        int childCount = getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            View child = getChildAt(i);
+            updateAnimationState(running, child);
+        }
+    }
+
+    private void updateAnimationState(View child) {
+        updateAnimationState(mAnimationsEnabled && mIsExpanded, child);
+    }
+
+
+    private void updateAnimationState(boolean running, View child) {
+        if (child instanceof ExpandableNotificationRow) {
+            ExpandableNotificationRow row = (ExpandableNotificationRow) child;
+            row.setIconAnimationRunning(running);
+        }
     }
 
     public boolean isAddOrRemoveAnimationPending() {
@@ -1619,6 +1645,7 @@
         generateDarkEvent();
         generateGoToFullShadeEvent();
         generateViewResizeEvent();
+        generateAnimateEverythingEvent();
         mNeedsAnimation = false;
     }
 
@@ -1701,6 +1728,14 @@
         mActivateNeedsAnimation = false;
     }
 
+    private void generateAnimateEverythingEvent() {
+        if (mEverythingNeedsAnimation) {
+            mAnimationEvents.add(
+                    new AnimationEvent(null, AnimationEvent.ANIMATION_TYPE_EVERYTHING));
+        }
+        mEverythingNeedsAnimation = false;
+    }
+
     private void generateDimmedEvent() {
         if (mDimmedNeedsAnimation) {
             mAnimationEvents.add(
@@ -1908,8 +1943,12 @@
     }
 
     private void setIsExpanded(boolean isExpanded) {
+        boolean changed = isExpanded != mIsExpanded;
         mIsExpanded = isExpanded;
         mStackScrollAlgorithm.setIsExpanded(isExpanded);
+        if (changed) {
+            updateNotificationAnimationStates();
+        }
     }
 
     @Override
@@ -1927,6 +1966,7 @@
             mRequestViewResizeAnimationOnLayout = true;
         }
         mStackScrollAlgorithm.onReset(view);
+        updateAnimationState(view);
     }
 
     private void updateScrollPositionOnExpandInBottom(ExpandableView view) {
@@ -2061,13 +2101,6 @@
         return true;
     }
 
-    public void setScrimAlpha(float progress) {
-        if (progress != mAmbientState.getScrimAmount()) {
-            mAmbientState.setScrimAmount(progress);
-            requestChildrenUpdate();
-        }
-    }
-
     /**
      * See {@link AmbientState#setDark}.
      */
@@ -2094,15 +2127,16 @@
         int oldVisibility = mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
         int newVisibility = visible ? VISIBLE : GONE;
         if (oldVisibility != newVisibility) {
-            if (oldVisibility == GONE) {
+            if (newVisibility != GONE) {
                 if (mEmptyShadeView.willBeGone()) {
                     mEmptyShadeView.cancelAnimation();
                 } else {
                     mEmptyShadeView.setInvisible();
-                    mEmptyShadeView.setVisibility(newVisibility);
                 }
+                mEmptyShadeView.setVisibility(newVisibility);
                 mEmptyShadeView.setWillBeGone(false);
                 updateContentHeight();
+                notifyHeightChangeListener(mDismissView);
             } else {
                 mEmptyShadeView.setWillBeGone(true);
                 mEmptyShadeView.performVisibilityAnimation(false, new Runnable() {
@@ -2111,6 +2145,7 @@
                         mEmptyShadeView.setVisibility(GONE);
                         mEmptyShadeView.setWillBeGone(false);
                         updateContentHeight();
+                        notifyHeightChangeListener(mDismissView);
                     }
                 });
             }
@@ -2121,15 +2156,16 @@
         int oldVisibility = mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
         int newVisibility = visible ? VISIBLE : GONE;
         if (oldVisibility != newVisibility) {
-            if (oldVisibility == GONE) {
+            if (newVisibility != GONE) {
                 if (mDismissView.willBeGone()) {
                     mDismissView.cancelAnimation();
                 } else {
                     mDismissView.setInvisible();
-                    mDismissView.setVisibility(newVisibility);
                 }
+                mDismissView.setVisibility(newVisibility);
                 mDismissView.setWillBeGone(false);
                 updateContentHeight();
+                notifyHeightChangeListener(mDismissView);
             } else {
                 mDismissView.setWillBeGone(true);
                 mDismissView.performVisibilityAnimation(false, new Runnable() {
@@ -2138,6 +2174,7 @@
                         mDismissView.setVisibility(GONE);
                         mDismissView.setWillBeGone(false);
                         updateContentHeight();
+                        notifyHeightChangeListener(mDismissView);
                     }
                 });
             }
@@ -2196,6 +2233,13 @@
         this.mPhoneStatusBar = phoneStatusBar;
     }
 
+    public void onGoToKeyguard() {
+        if (mIsExpanded && mAnimationsEnabled) {
+            mEverythingNeedsAnimation = true;
+            requestChildrenUpdate();
+        }
+    }
+
     /**
      * A listener that is notified when some child locations might have changed.
      */
@@ -2323,6 +2367,18 @@
                         .animateTopInset()
                         .animateY()
                         .animateZ(),
+
+                // ANIMATION_TYPE_EVERYTHING
+                new AnimationFilter()
+                        .animateAlpha()
+                        .animateDark()
+                        .animateScale()
+                        .animateDimmed()
+                        .animateHideSensitive()
+                        .animateHeight()
+                        .animateTopInset()
+                        .animateY()
+                        .animateZ(),
         };
 
         static int[] LENGTHS = new int[] {
@@ -2365,6 +2421,9 @@
 
                 // ANIMATION_TYPE_VIEW_RESIZE
                 StackStateAnimator.ANIMATION_DURATION_STANDARD,
+
+                // ANIMATION_TYPE_EVERYTHING
+                StackStateAnimator.ANIMATION_DURATION_STANDARD,
         };
 
         static final int ANIMATION_TYPE_ADD = 0;
@@ -2380,6 +2439,7 @@
         static final int ANIMATION_TYPE_GO_TO_FULL_SHADE = 10;
         static final int ANIMATION_TYPE_HIDE_SENSITIVE = 11;
         static final int ANIMATION_TYPE_VIEW_RESIZE = 12;
+        static final int ANIMATION_TYPE_EVERYTHING = 13;
 
         final long eventStartTime;
         final View changingView;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
index fe855d9..e4a1c27 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java
@@ -40,8 +40,6 @@
     private static final int MAX_ITEMS_IN_BOTTOM_STACK = 3;
     private static final int MAX_ITEMS_IN_TOP_STACK = 3;
 
-    /** When a child is activated, the other cards' alpha fade to this value. */
-    private static final float ACTIVATED_INVERSE_ALPHA = 0.9f;
     public static final float DIMMED_SCALE = 0.95f;
 
     private int mPaddingBetweenElements;
@@ -172,7 +170,6 @@
         handleDraggedViews(ambientState, resultState, algorithmState);
         updateDimmedActivatedHideSensitive(ambientState, resultState, algorithmState);
         updateClipping(resultState, algorithmState);
-        updateScrimAmount(resultState, algorithmState, ambientState.getScrimAmount());
         updateSpeedBumpState(resultState, algorithmState, ambientState.getSpeedBumpIndex());
     }
 
@@ -189,16 +186,6 @@
         }
     }
 
-    private void updateScrimAmount(StackScrollState resultState,
-            StackScrollAlgorithmState algorithmState, float scrimAmount) {
-        int childCount = algorithmState.visibleChildren.size();
-        for (int i = 0; i < childCount; i++) {
-            View child = algorithmState.visibleChildren.get(i);
-            StackScrollState.ViewState childViewState = resultState.getViewStateForView(child);
-            childViewState.scrimAmount = scrimAmount;
-        }
-    }
-
     private void updateClipping(StackScrollState resultState,
             StackScrollAlgorithmState algorithmState) {
         float previousNotificationEnd = 0;
@@ -281,12 +268,8 @@
             childViewState.scale = !mScaleDimmed || !dimmed || isActivatedChild
                     ? 1.0f
                     : DIMMED_SCALE;
-            if (dimmed && activatedChild != null) {
-                if (!isActivatedChild) {
-                    childViewState.alpha *= ACTIVATED_INVERSE_ALPHA;
-                } else {
-                    childViewState.zTranslation += 2.0f * mZDistanceBetweenElements;
-                }
+            if (dimmed && isActivatedChild) {
+                childViewState.zTranslation += 2.0f * mZDistanceBetweenElements;
             }
         }
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
index f7a2824..0967ecd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
@@ -165,9 +165,6 @@
                 // apply speed bump state
                 child.setBelowSpeedBump(state.belowSpeedBump);
 
-                // apply scrimming
-                child.setScrimAmount(state.scrimAmount);
-
                 // apply clipping
                 float oldClipTopAmount = child.getClipTopAmount();
                 if (oldClipTopAmount != state.clipTopAmount) {
@@ -252,12 +249,6 @@
         boolean belowSpeedBump;
 
         /**
-         * A value between 0 and 1 indicating how much the view should be scrimmed.
-         * 1 means that the notifications will be darkened as much as possible.
-         */
-        float scrimAmount;
-
-        /**
          * The amount which the view should be clipped from the top. This is calculated to
          * perceive consistent shadows.
          */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index cd3c1a0..ece82a1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -166,6 +166,7 @@
         boolean hasDelays = mAnimationFilter.hasDelays;
         boolean isDelayRelevant = yTranslationChanging || zTranslationChanging || scaleChanging ||
                 alphaChanging || heightChanging || topInsetChanging;
+        boolean noAnimation = wasAdded && !mAnimationFilter.hasGoToFullShadeEvent;
         long delay = 0;
         long duration = mCurrentLength;
         if (hasDelays && isDelayRelevant || wasAdded) {
@@ -183,49 +184,72 @@
 
         // start translationY animation
         if (yTranslationChanging) {
-            startYTranslationAnimation(child, viewState, duration, delay);
+            if (noAnimation) {
+                child.setTranslationY(viewState.yTranslation);
+            } else {
+                startYTranslationAnimation(child, viewState, duration, delay);
+            }
         }
 
         // start translationZ animation
         if (zTranslationChanging) {
-            startZTranslationAnimation(child, viewState, duration, delay);
+            if (noAnimation) {
+                child.setTranslationZ(viewState.zTranslation);
+            } else {
+                startZTranslationAnimation(child, viewState, duration, delay);
+            }
         }
 
         // start scale animation
         if (scaleChanging) {
-            startScaleAnimation(child, viewState, duration);
+            if (noAnimation) {
+                child.setScaleX(viewState.scale);
+                child.setScaleY(viewState.scale);
+            } else {
+                startScaleAnimation(child, viewState, duration);
+            }
         }
 
         // start alpha animation
         if (alphaChanging && child.getTranslationX() == 0) {
-            startAlphaAnimation(child, viewState, duration, delay);
+            if (noAnimation) {
+                child.setAlpha(viewState.alpha);
+            } else {
+                startAlphaAnimation(child, viewState, duration, delay);
+            }
         }
 
         // start height animation
-        if (heightChanging) {
-            startHeightAnimation(child, viewState, duration, delay);
+        if (heightChanging && child.getActualHeight() != 0) {
+            if (noAnimation) {
+                child.setActualHeight(viewState.height, false);
+            } else {
+                startHeightAnimation(child, viewState, duration, delay);
+            }
         }
 
         // start top inset animation
         if (topInsetChanging) {
-            startInsetAnimation(child, viewState, duration, delay);
+            if (noAnimation) {
+                child.setClipTopAmount(viewState.clipTopAmount);
+            } else {
+                startInsetAnimation(child, viewState, duration, delay);
+            }
         }
 
         // start dimmed animation
-        child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed && !wasAdded);
+        child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed && !wasAdded
+                && !noAnimation);
 
         // start dark animation
-        child.setDark(viewState.dark, mAnimationFilter.animateDark);
+        child.setDark(viewState.dark, mAnimationFilter.animateDark && !noAnimation);
 
         // apply speed bump state
         child.setBelowSpeedBump(viewState.belowSpeedBump);
 
         // start hiding sensitive animation
-        child.setHideSensitive(viewState.hideSensitive,
-                mAnimationFilter.animateHideSensitive && !wasAdded, delay, duration);
-
-        // apply scrimming
-        child.setScrimAmount(viewState.scrimAmount);
+        child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive &&
+                !wasAdded && !noAnimation, delay, duration);
 
         if (wasAdded) {
             child.performAddAnimation(delay, mCurrentLength);
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
index 12c887e..fa43f32 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
@@ -56,6 +56,7 @@
 import android.view.Window;
 import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
+import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
 import android.widget.ImageView;
 import android.widget.SeekBar;
@@ -96,7 +97,6 @@
     private static final int TIMEOUT_DELAY_SHORT = 1500;
     private static final int TIMEOUT_DELAY_COLLAPSED = 4500;
     private static final int TIMEOUT_DELAY_SAFETY_WARNING = 5000;
-    private static final int TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK = 25000;
     private static final int TIMEOUT_DELAY_EXPANDED = 10000;
 
     private static final int MSG_VOLUME_CHANGED = 0;
@@ -431,6 +431,9 @@
 
     public void onConfigurationChanged(Configuration newConfig) {
         updateWidth();
+        if (mZenPanel != null) {
+            mZenPanel.updateLocale();
+        }
     }
 
     private void updateWidth() {
@@ -794,8 +797,7 @@
     }
 
     private void updateTimeoutDelay() {
-        mTimeoutDelay = sSafetyWarning != null ? mAccessibilityManager.isEnabled() ?
-                TIMEOUT_DELAY_SAFETY_WARNING_TALKBACK : TIMEOUT_DELAY_SAFETY_WARNING
+        mTimeoutDelay = sSafetyWarning != null ? TIMEOUT_DELAY_SAFETY_WARNING
                 : mActiveStreamType == AudioManager.STREAM_MUSIC ? TIMEOUT_DELAY_SHORT
                 : mZenPanelExpanded ? TIMEOUT_DELAY_EXPANDED
                 : isZenPanelVisible() ? TIMEOUT_DELAY_COLLAPSED
@@ -1057,11 +1059,11 @@
         if (sc != null) {
             if (streamType == STREAM_REMOTE_MUSIC && controller != sc.controller) {
                 if (sc.controller != null) {
-                    sc.controller.removeCallback(mMediaControllerCb);
+                    sc.controller.unregisterCallback(mMediaControllerCb);
                 }
                 sc.controller = controller;
                 if (controller != null) {
-                    sc.controller.addCallback(mMediaControllerCb);
+                    sc.controller.registerCallback(mMediaControllerCb);
                 }
             }
             if (sc.seekbarView.getMax() != max) {
@@ -1080,6 +1082,7 @@
             if (mCallback != null) {
                 mCallback.onVisible(true);
             }
+            announceDialogShown();
         }
 
         // Do a little vibrate if applicable (only when going into vibrate mode)
@@ -1096,6 +1099,10 @@
         }
     }
 
+    private void announceDialogShown() {
+        mView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+    }
+
     private boolean isShowing() {
         return mDialog.isShowing();
     }
@@ -1177,7 +1184,7 @@
             StreamControl sc = mStreamControls.get(STREAM_REMOTE_MUSIC);
             if (sc != null) {
                 if (sc.controller != null) {
-                    sc.controller.removeCallback(mMediaControllerCb);
+                    sc.controller.unregisterCallback(mMediaControllerCb);
                     sc.controller = null;
                 }
             }
@@ -1218,8 +1225,12 @@
             }
             updateStates();
         }
-        updateTimeoutDelay();
-        resetTimeout();
+        if (mAccessibilityManager.isTouchExplorationEnabled()) {
+            removeMessages(MSG_TIMEOUT);
+        } else {
+            updateTimeoutDelay();
+            resetTimeout();
+        }
     }
 
     /**
@@ -1373,10 +1384,12 @@
     private void resetTimeout() {
         if (LOGD) Log.d(mTag, "resetTimeout at " + System.currentTimeMillis()
                 + " delay=" + mTimeoutDelay);
-        removeMessages(MSG_TIMEOUT);
-        sendEmptyMessageDelayed(MSG_TIMEOUT, mTimeoutDelay);
-        removeMessages(MSG_USER_ACTIVITY);
-        sendEmptyMessage(MSG_USER_ACTIVITY);
+        if (sSafetyWarning == null || !mAccessibilityManager.isTouchExplorationEnabled()) {
+            removeMessages(MSG_TIMEOUT);
+            sendEmptyMessageDelayed(MSG_TIMEOUT, mTimeoutDelay);
+            removeMessages(MSG_USER_ACTIVITY);
+            sendEmptyMessage(MSG_USER_ACTIVITY);
+        }
     }
 
     private void forceTimeout(long delay) {
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
index acb4827..0586a83 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeUI.java
@@ -140,8 +140,7 @@
         @Override
         public void run() {
             getComponent(PhoneStatusBar.class).startActivityDismissingKeyguard(
-                    ZenModePanel.ZEN_SETTINGS, true /* onlyProvisioned */, true /* dismissShade */,
-                    false /* afterKeyguardGone */);
+                    ZenModePanel.ZEN_SETTINGS, true /* onlyProvisioned */, true /* dismissShade */);
             mPanel.postDismiss(mDismissDelay);
         }
     };
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
index ac7fc25..f829994 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
@@ -60,7 +60,7 @@
 
     private static final int[] MINUTE_BUCKETS = DEBUG
             ? new int[] { 0, 1, 2, 5, 15, 30, 45, 60, 120, 180, 240, 480 }
-            : new int[] { 15, 30, 45, 60, 120, 180, 240, 480 };
+            : ZenModeConfig.MINUTE_BUCKETS;
     private static final int MIN_BUCKET_MINUTES = MINUTE_BUCKETS[0];
     private static final int MAX_BUCKET_MINUTES = MINUTE_BUCKETS[MINUTE_BUCKETS.length - 1];
     private static final int DEFAULT_BUCKET_INDEX = Arrays.binarySearch(MINUTE_BUCKETS, 60);
@@ -68,7 +68,6 @@
     private static final int TIME_CONDITION_INDEX = 1;
     private static final int FIRST_CONDITION_INDEX = 2;
     private static final float SILENT_HINT_PULSE_SCALE = 1.1f;
-    private static final int ZERO_VALUE_MS = 20 * SECONDS_MS;
 
     public static final Intent ZEN_SETTINGS = new Intent(Settings.ACTION_ZEN_MODE_SETTINGS);
 
@@ -121,10 +120,7 @@
         super.onFinishInflate();
 
         mZenButtons = (SegmentedButtons) findViewById(R.id.zen_buttons);
-        mZenButtons.addButton(R.string.interruption_level_none, Global.ZEN_MODE_NO_INTERRUPTIONS);
-        mZenButtons.addButton(R.string.interruption_level_priority,
-                Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
-        mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF);
+        addZenButtons();
         mZenButtons.setCallback(mZenButtonsCallback);
 
         mZenSubhead = findViewById(R.id.zen_subhead);
@@ -174,6 +170,13 @@
         setExpanded(false);
     }
 
+    private void addZenButtons() {
+        mZenButtons.addButton(R.string.interruption_level_none, Global.ZEN_MODE_NO_INTERRUPTIONS);
+        mZenButtons.addButton(R.string.interruption_level_priority,
+                Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+        mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF);
+    }
+
     public void setHidden(boolean hidden) {
         if (mHidden == hidden) return;
         mHidden = hidden;
@@ -213,7 +216,7 @@
                 mBucketIndex = -1;
             } else {
                 mBucketIndex = DEFAULT_BUCKET_INDEX;
-                mTimeCondition = newTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
+                mTimeCondition = ZenModeConfig.toTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
             }
             if (DEBUG) Log.d(mTag, "Initial bucket index: " + mBucketIndex);
             mConditions = null; // reset conditions
@@ -234,6 +237,11 @@
         mController.addCallback(mZenCallback);
     }
 
+    public void updateLocale() {
+        mZenButtons.removeAllViews();
+        addZenButtons();
+    }
+
     private void setExitCondition(Condition exitCondition) {
         if (sameConditionId(mExitCondition, exitCondition)) return;
         mExitCondition = exitCondition;
@@ -254,7 +262,7 @@
     }
 
     private void refreshExitConditionText() {
-        final String forever = mContext.getString(R.string.zen_mode_forever);
+        final String forever = mContext.getString(com.android.internal.R.string.zen_mode_forever);
         if (mExitCondition == null) {
             mExitConditionText = forever;
         } else if (ZenModeConfig.isValidCountdownConditionId(mExitCondition.id)) {
@@ -330,24 +338,7 @@
         if (time == 0) return null;
         final long span = time - System.currentTimeMillis();
         if (span <= 0 || span > MAX_BUCKET_MINUTES * MINUTES_MS) return null;
-        return timeCondition(time, Math.round(span / (float)MINUTES_MS));
-    }
-
-    private Condition newTimeCondition(int minutesFromNow) {
-        final long now = System.currentTimeMillis();
-        final long millis = minutesFromNow == 0 ? ZERO_VALUE_MS : minutesFromNow * MINUTES_MS;
-        return timeCondition(now + millis, minutesFromNow);
-    }
-
-    private Condition timeCondition(long time, int minutes) {
-        final int num = minutes < 60 ? minutes : Math.round(minutes / 60f);
-        final int resId = minutes < 60
-                ? R.plurals.zen_mode_duration_minutes
-                : R.plurals.zen_mode_duration_hours;
-        final String caption = mContext.getResources().getQuantityString(resId, num, num);
-        final Uri id = ZenModeConfig.toCountdownConditionId(time);
-        return new Condition(id, caption, "", "", 0, Condition.STATE_TRUE,
-                Condition.FLAG_RELEVANT_NOW);
+        return ZenModeConfig.toTimeCondition(time, Math.round(span / (float) MINUTES_MS));
     }
 
     private void handleUpdateConditions(Condition[] conditions) {
@@ -401,7 +392,7 @@
         if (favoriteIndex == -1) {
             getConditionTagAt(FOREVER_CONDITION_INDEX).rb.setChecked(true);
         } else {
-            mTimeCondition = newTimeCondition(MINUTE_BUCKETS[favoriteIndex]);
+            mTimeCondition = ZenModeConfig.toTimeCondition(MINUTE_BUCKETS[favoriteIndex]);
             mBucketIndex = favoriteIndex;
             bind(mTimeCondition, mZenConditions.getChildAt(TIME_CONDITION_INDEX));
             getConditionTagAt(TIME_CONDITION_INDEX).rb.setChecked(true);
@@ -457,7 +448,7 @@
         });
         final TextView title = (TextView) row.findViewById(android.R.id.title);
         if (condition == null) {
-            title.setText(R.string.zen_mode_forever);
+            title.setText(mContext.getString(com.android.internal.R.string.zen_mode_forever));
         } else {
             title.setText(condition.summary);
         }
@@ -494,7 +485,7 @@
             } else {
                 final long span = time - System.currentTimeMillis();
                 button1.setEnabled(span > MIN_BUCKET_MINUTES * MINUTES_MS);
-                final Condition maxCondition = newTimeCondition(MAX_BUCKET_MINUTES);
+                final Condition maxCondition = ZenModeConfig.toTimeCondition(MAX_BUCKET_MINUTES);
                 button2.setEnabled(!Objects.equals(condition.summary, maxCondition.summary));
             }
 
@@ -520,18 +511,18 @@
                 final long bucketTime = now + bucketMinutes * MINUTES_MS;
                 if (up && bucketTime > time || !up && bucketTime < time) {
                     mBucketIndex = j;
-                    newCondition = timeCondition(bucketTime, bucketMinutes);
+                    newCondition = ZenModeConfig.toTimeCondition(bucketTime, bucketMinutes);
                     break;
                 }
             }
             if (newCondition == null) {
                 mBucketIndex = DEFAULT_BUCKET_INDEX;
-                newCondition = newTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
+                newCondition = ZenModeConfig.toTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
             }
         } else {
             // on a known index, simply increment or decrement
             mBucketIndex = Math.max(0, Math.min(N - 1, mBucketIndex + (up ? 1 : -1)));
-            newCondition = newTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
+            newCondition = ZenModeConfig.toTimeCondition(MINUTE_BUCKETS[mBucketIndex]);
         }
         mTimeCondition = newCondition;
         bind(mTimeCondition, row);
diff --git a/packages/VpnDialogs/res/values-eu-rES/strings.xml b/packages/VpnDialogs/res/values-eu-rES/strings.xml
index 7467195..b716509 100644
--- a/packages/VpnDialogs/res/values-eu-rES/strings.xml
+++ b/packages/VpnDialogs/res/values-eu-rES/strings.xml
@@ -17,7 +17,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="prompt" msgid="3183836924226407828">"Konektatzeko eskaera"</string>
-    <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> VPN bidez konektatu nahi da sareko trafikoa kontrolatzeko. Iturburua fidagarria bada bakarrik baimendu. &lt;br /&gt; &lt;br /&gt; VPN konexioa aktibo dagoenean, &lt;img src=vpn_icon /&gt; agertuko da pantailaren goialdean."</string>
+    <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> aplikazioak VPN bidezko konexioa ezarri nahi du sareko trafikoa kontrolatzeko. Iturburua fidagarria bada bakarrik baimendu. &lt;br /&gt; &lt;br /&gt; VPN konexioa aktibo dagoenean, &lt;img src=vpn_icon /&gt; agertuko da pantailaren goialdean."</string>
     <string name="legacy_title" msgid="192936250066580964">"VPN sarera konektatuta dago"</string>
     <string name="configure" msgid="4905518375574791375">"Konfiguratu"</string>
     <string name="disconnect" msgid="971412338304200056">"Deskonektatu"</string>
diff --git a/packages/VpnDialogs/res/values-zh-rTW/strings.xml b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
index 6645b38..1a7ab35 100644
--- a/packages/VpnDialogs/res/values-zh-rTW/strings.xml
+++ b/packages/VpnDialogs/res/values-zh-rTW/strings.xml
@@ -17,7 +17,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="prompt" msgid="3183836924226407828">"連線要求"</string>
-    <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> 要求設定 VPN 連線以監控網路流量。除非您信任要求來源,否則請勿任意接受要求。&lt;br /&gt; &lt;br /&gt;VPN 啟用時,畫面頂端會顯示 &lt;img src=vpn_icon /&gt;。"</string>
+    <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> 要求設定 VPN 連線,允許此要求即開放該來源監控網路流量。除非您信任該來源,否則請勿任意接受要求。&lt;br /&gt; &lt;br /&gt;VPN 啟用時,畫面頂端會顯示 &lt;img src=vpn_icon /&gt;。"</string>
     <string name="legacy_title" msgid="192936250066580964">"VPN 已連線"</string>
     <string name="configure" msgid="4905518375574791375">"設定"</string>
     <string name="disconnect" msgid="971412338304200056">"中斷連線"</string>
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java
index 41695c1..7b41391 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalActions.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java
@@ -413,7 +413,7 @@
             @Override
             public void onPress() {
                 Intent intent = new Intent(Settings.ACTION_SETTINGS);
-                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
                 mContext.startActivity(intent);
             }
 
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 93591a9..cce30c7 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -264,7 +264,7 @@
     private Transition mSharedElementReturnTransition = USE_DEFAULT_TRANSITION;
     private Transition mSharedElementExitTransition = null;
     private Transition mSharedElementReenterTransition = USE_DEFAULT_TRANSITION;
-    private Boolean mAllowExitTransitionOverlap;
+    private Boolean mAllowReturnTransitionOverlap;
     private Boolean mAllowEnterTransitionOverlap;
     private long mBackgroundFadeDurationMillis = -1;
     private Boolean mSharedElementsUseOverlay;
@@ -2755,12 +2755,14 @@
                         SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
                         mStatusBarColor, mLastTopInset, Gravity.TOP,
                         STATUS_BAR_BACKGROUND_TRANSITION_NAME,
-                        com.android.internal.R.id.statusBarBackground);
+                        com.android.internal.R.id.statusBarBackground,
+                        (getAttributes().flags & FLAG_FULLSCREEN) != 0);
                 mNavigationColorView = updateColorViewInt(mNavigationColorView,
                         SYSTEM_UI_FLAG_HIDE_NAVIGATION, FLAG_TRANSLUCENT_NAVIGATION,
                         mNavigationBarColor, mLastBottomInset, Gravity.BOTTOM,
                         NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME,
-                        com.android.internal.R.id.navigationBarBackground);
+                        com.android.internal.R.id.navigationBarBackground,
+                        false /* hiddenByWindowFlag */);
             }
             if (insets != null) {
                 insets = insets.consumeStableInsets();
@@ -2769,8 +2771,10 @@
         }
 
         private View updateColorViewInt(View view, int systemUiHideFlag, int translucentFlag,
-                int color, int height, int verticalGravity, String transitionName, int id) {
+                int color, int height, int verticalGravity, String transitionName, int id,
+                boolean hiddenByWindowFlag) {
             boolean show = height > 0 && (mLastSystemUiVisibility & systemUiHideFlag) == 0
+                    && !hiddenByWindowFlag
                     && (getAttributes().flags & translucentFlag) == 0
                     && (color & Color.BLACK) != 0
                     && (getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;
@@ -2890,7 +2894,6 @@
             invalidate();
 
             int opacity = PixelFormat.OPAQUE;
-
             // Note: if there is no background, we will assume opaque. The
             // common case seems to be that an application sets there to be
             // no background so it can draw everything itself. For that,
@@ -3549,9 +3552,9 @@
                     mAllowEnterTransitionOverlap = getWindowStyle().getBoolean(
                             R.styleable.Window_windowAllowEnterTransitionOverlap, true);
                 }
-                if (mAllowExitTransitionOverlap == null) {
-                    mAllowExitTransitionOverlap = getWindowStyle().getBoolean(
-                            R.styleable.Window_windowAllowExitTransitionOverlap, true);
+                if (mAllowReturnTransitionOverlap == null) {
+                    mAllowReturnTransitionOverlap = getWindowStyle().getBoolean(
+                            R.styleable.Window_windowAllowReturnTransitionOverlap, true);
                 }
                 if (mBackgroundFadeDurationMillis < 0) {
                     mBackgroundFadeDurationMillis = getWindowStyle().getInteger(
@@ -4017,13 +4020,13 @@
     }
 
     @Override
-    public void setAllowExitTransitionOverlap(boolean allowExitTransitionOverlap) {
-        mAllowExitTransitionOverlap = allowExitTransitionOverlap;
+    public void setAllowReturnTransitionOverlap(boolean allowExitTransitionOverlap) {
+        mAllowReturnTransitionOverlap = allowExitTransitionOverlap;
     }
 
     @Override
-    public boolean getAllowExitTransitionOverlap() {
-        return (mAllowExitTransitionOverlap == null) ? true : mAllowExitTransitionOverlap;
+    public boolean getAllowReturnTransitionOverlap() {
+        return (mAllowReturnTransitionOverlap == null) ? true : mAllowReturnTransitionOverlap;
     }
 
     @Override
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index e382a9f..16bb00b 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -66,6 +66,7 @@
 import android.os.UEventObserver;
 import android.os.UserHandle;
 import android.os.Vibrator;
+import android.provider.MediaStore;
 import android.provider.Settings;
 import android.service.dreams.DreamManagerInternal;
 import android.service.dreams.DreamService;
@@ -127,6 +128,9 @@
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_ABSENT;
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_OPEN;
 import static android.view.WindowManagerPolicy.WindowManagerFuncs.LID_CLOSED;
+import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVER_ABSENT;
+import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_UNCOVERED;
+import static android.view.WindowManagerPolicy.WindowManagerFuncs.CAMERA_LENS_COVERED;
 
 /**
  * WindowManagerPolicy implementation for the Android phone UI.  This
@@ -315,6 +319,7 @@
     boolean mLanguageSwitchKeyPressed;
 
     int mLidState = LID_ABSENT;
+    int mCameraLensCoverState = CAMERA_LENS_COVER_ABSENT;
     boolean mHaveBuiltInKeyboard;
 
     boolean mSystemReady;
@@ -1525,6 +1530,10 @@
         mLidState = mWindowManagerFuncs.getLidState();
     }
 
+    private void readCameraLensCoverState() {
+        mCameraLensCoverState = mWindowManagerFuncs.getCameraLensCoverState();
+    }
+
     private boolean isHidden(int accessibilityMode) {
         switch (accessibilityMode) {
             case 1:
@@ -2400,7 +2409,7 @@
             if (down) {
                 mPendingMetaAction = true;
             } else if (mPendingMetaAction) {
-                launchAssistAction();
+                launchAssistAction(Intent.EXTRA_ASSIST_INPUT_HINT_KEYBOARD);
             }
             return -1;
         }
@@ -2620,10 +2629,17 @@
     }
 
     private void launchAssistAction() {
+        launchAssistAction(null);
+    }
+
+    private void launchAssistAction(String hint) {
         sendCloseSystemWindows(SYSTEM_DIALOG_REASON_ASSIST);
         Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
                 .getAssistIntent(mContext, true, UserHandle.USER_CURRENT);
         if (intent != null) {
+            if (hint != null) {
+                intent.putExtra(hint, true);
+            }
             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                     | Intent.FLAG_ACTIVITY_SINGLE_TOP
                     | Intent.FLAG_ACTIVITY_CLEAR_TOP);
@@ -3517,13 +3533,16 @@
                     pf.bottom = df.bottom = of.bottom = cf.bottom = mOverscanScreenTop
                             + mOverscanScreenHeight;
                 } else if (attrs.type == TYPE_WALLPAPER) {
-                    // The wallpaper also has Real Ultimate Power.
-                    pf.left = df.left = of.left = cf.left = mUnrestrictedScreenLeft;
-                    pf.top = df.top = of.top = cf.top = mUnrestrictedScreenTop;
-                    pf.right = df.right = of.right = cf.right
-                            = mUnrestrictedScreenLeft + mUnrestrictedScreenWidth;
-                    pf.bottom = df.bottom = of.bottom = cf.bottom
-                            = mUnrestrictedScreenTop + mUnrestrictedScreenHeight;
+                    // 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) {
@@ -3637,9 +3656,12 @@
 
         // TYPE_SYSTEM_ERROR is above the NavigationBar so it can't be allowed to extend over it.
         if ((fl & FLAG_LAYOUT_NO_LIMITS) != 0 && attrs.type != TYPE_SYSTEM_ERROR) {
-            df.left = df.top = of.left = of.top = cf.left = cf.top = vf.left = vf.top = -10000;
-            df.right = df.bottom = of.right = of.bottom = cf.right = cf.bottom
-                    = vf.right = vf.bottom = 10000;
+            df.left = df.top = -10000;
+            df.right = df.bottom = 10000;
+            if (attrs.type != TYPE_WALLPAPER) {
+                of.left = of.top = cf.left = cf.top = vf.left = vf.top = -10000;
+                of.right = of.bottom = cf.right = cf.bottom = vf.right = vf.bottom = 10000;
+            }
         }
 
         if (DEBUG_LAYOUT) Slog.v(TAG, "Compute frame " + attrs.getTitle()
@@ -4055,6 +4077,27 @@
         }
     }
 
+    @Override
+    public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered) {
+        int lensCoverState = lensCovered ? CAMERA_LENS_COVERED : CAMERA_LENS_UNCOVERED;
+        if (mCameraLensCoverState == lensCoverState) {
+            return;
+        }
+        if (mCameraLensCoverState == CAMERA_LENS_COVERED &&
+                lensCoverState == CAMERA_LENS_UNCOVERED) {
+            Intent intent;
+            final boolean keyguardActive = mKeyguardDelegate == null ? false :
+                    mKeyguardDelegate.isShowing();
+            if (keyguardActive) {
+                intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
+            } else {
+                intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
+            }
+            mContext.startActivityAsUser(intent, UserHandle.CURRENT_OR_SELF);
+        }
+        mCameraLensCoverState = lensCoverState;
+    }
+
     void setHdmiPlugged(boolean plugged) {
         if (mHdmiPlugged != plugged) {
             mHdmiPlugged = plugged;
@@ -4204,9 +4247,16 @@
         boolean isWakeKey = (policyFlags & WindowManagerPolicy.FLAG_WAKE) != 0
                 || event.isWakeKey();
         if (interactive || (isInjected && !isWakeKey)) {
-            // When the screen is on or if the key is injected pass the key to the application.
+            // When the device is interactive or the key is injected pass the key to the
+            // application.
             result = ACTION_PASS_TO_USER;
             isWakeKey = false;
+        } else if (!interactive && shouldDispatchInputWhenNonInteractive()) {
+            // If we're currently dozing with the screen on and the keyguard showing, pass the key
+            // to the application but preserve its wake key status to make sure we still move
+            // from dozing to fully interactive if we would normally go from off to fully
+            // interactive.
+            result = ACTION_PASS_TO_USER;
         } else {
             // When the screen is off and the key is not injected, determine whether
             // to wake the device but don't pass the key to the application.
@@ -4511,14 +4561,22 @@
 
     /** {@inheritDoc} */
     @Override
-    public int interceptWakeMotionBeforeQueueing(long whenNanos, int policyFlags) {
-        // We already know this is a wake motion so just wake up.
-        // Note that we would observe policyFlags containing
-        // FLAG_WAKE and FLAG_INTERACTIVE here.
-        mPowerManager.wakeUp(whenNanos / 1000000);
+    public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags) {
+        if ((policyFlags & FLAG_WAKE) != 0) {
+            mPowerManager.wakeUp(whenNanos / 1000000);
+            return 0;
+        }
+        if (shouldDispatchInputWhenNonInteractive()) {
+            return ACTION_PASS_TO_USER;
+        }
         return 0;
     }
 
+    private boolean shouldDispatchInputWhenNonInteractive() {
+        return keyguardIsShowingTq() && mDisplay != null &&
+                mDisplay.getState() != Display.STATE_OFF;
+    }
+
     void dispatchMediaKeyWithWakeLock(KeyEvent event) {
         if (DEBUG_INPUT) {
             Slog.d(TAG, "dispatchMediaKeyWithWakeLock: " + event);
@@ -5132,6 +5190,7 @@
         mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null);
         mKeyguardDelegate.onSystemReady();
 
+        readCameraLensCoverState();
         updateUiMode();
         synchronized (mLock) {
             updateOrientationListenerLp();
@@ -5783,6 +5842,7 @@
                 pw.print(" mSystemBooted="); pw.println(mSystemBooted);
         pw.print(prefix); pw.print("mLidState="); pw.print(mLidState);
                 pw.print(" mLidOpenRotation="); pw.print(mLidOpenRotation);
+                pw.print(" mCameraLensCoverState="); pw.print(mCameraLensCoverState);
                 pw.print(" mHdmiPlugged="); pw.println(mHdmiPlugged);
         if (mLastSystemUiFlags != 0 || mResettingSystemUiFlags != 0
                 || mForceClearedSystemUiFlags != 0) {
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 4e2f52c..ebe21ff 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -42,6 +42,7 @@
 import android.database.ContentObserver;
 import android.graphics.Point;
 import android.graphics.Rect;
+import android.graphics.Region;
 import android.hardware.display.DisplayManager;
 import android.hardware.input.InputManager;
 import android.net.Uri;
@@ -162,6 +163,8 @@
     private final List<AccessibilityServiceInfo> mEnabledServicesForFeedbackTempList =
             new ArrayList<>();
 
+    private final Region mTempRegion = new Region();
+
     private final Rect mTempRect = new Rect();
 
     private final Point mTempPoint = new Point();
@@ -743,14 +746,16 @@
     }
 
     /**
-     * Gets the bounds of the accessibility focus in the active window.
+     * Gets a point within the accessibility focused node where we can send down
+     * and up events to perform a click.
      *
-     * @param outBounds The output to which to write the focus bounds.
-     * @return Whether accessibility focus was found and the bounds are populated.
+     * @param outPoint The click point to populate.
+     * @return Whether accessibility a click point was found and set.
      */
     // TODO: (multi-display) Make sure this works for multiple displays.
-    boolean getAccessibilityFocusBounds(Rect outBounds) {
-        return getInteractionBridgeLocked().getAccessibilityFocusBoundsNotLocked(outBounds);
+    boolean getAccessibilityFocusClickPointInScreen(Point outPoint) {
+        return getInteractionBridgeLocked()
+                .getAccessibilityFocusClickPointInScreenNotLocked(outPoint);
     }
 
     /**
@@ -2161,6 +2166,7 @@
                 throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2182,14 +2188,18 @@
                         return false;
                     }
                 }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
             }
             final int interrogatingPid = Binder.getCallingPid();
             final long identityToken = Binder.clearCallingIdentity();
             MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
             try {
-                connection.findAccessibilityNodeInfosByViewId(accessibilityNodeId,
-                        viewIdResName, interactionId, callback, mFetchFlags, interrogatingPid,
-                        interrogatingTid, spec);
+                connection.findAccessibilityNodeInfosByViewId(accessibilityNodeId, viewIdResName,
+                        partialInteractiveRegion, interactionId, callback, mFetchFlags,
+                        interrogatingPid, interrogatingTid, spec);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -2208,6 +2218,7 @@
                 throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2229,14 +2240,18 @@
                         return false;
                     }
                 }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
             }
             final int interrogatingPid = Binder.getCallingPid();
             final long identityToken = Binder.clearCallingIdentity();
             MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
             try {
                 connection.findAccessibilityNodeInfosByText(accessibilityNodeId, text,
-                        interactionId, callback, mFetchFlags, interrogatingPid, interrogatingTid,
-                        spec);
+                        partialInteractiveRegion, interactionId, callback, mFetchFlags,
+                        interrogatingPid, interrogatingTid, spec);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -2255,6 +2270,7 @@
                 long interrogatingTid) throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2276,14 +2292,18 @@
                         return false;
                     }
                 }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
             }
             final int interrogatingPid = Binder.getCallingPid();
             final long identityToken = Binder.clearCallingIdentity();
             MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
             try {
                 connection.findAccessibilityNodeInfoByAccessibilityId(accessibilityNodeId,
-                        interactionId, callback, mFetchFlags | flags, interrogatingPid,
-                        interrogatingTid, spec);
+                        partialInteractiveRegion, interactionId, callback, mFetchFlags | flags,
+                        interrogatingPid, interrogatingTid, spec);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -2302,6 +2322,7 @@
                 throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2324,13 +2345,18 @@
                         return false;
                     }
                 }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
             }
             final int interrogatingPid = Binder.getCallingPid();
             final long identityToken = Binder.clearCallingIdentity();
             MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
             try {
-                connection.findFocus(accessibilityNodeId, focusType, interactionId, callback,
-                        mFetchFlags, interrogatingPid, interrogatingTid, spec);
+                connection.findFocus(accessibilityNodeId, focusType, partialInteractiveRegion,
+                        interactionId, callback, mFetchFlags, interrogatingPid, interrogatingTid,
+                        spec);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -2349,6 +2375,7 @@
                 throws RemoteException {
             final int resolvedWindowId;
             IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
                 // share the accessibility state of the parent. The call below
@@ -2370,13 +2397,18 @@
                         return false;
                     }
                 }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
             }
             final int interrogatingPid = Binder.getCallingPid();
             final long identityToken = Binder.clearCallingIdentity();
             MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
             try {
-                connection.focusSearch(accessibilityNodeId, direction, interactionId, callback,
-                        mFetchFlags, interrogatingPid, interrogatingTid, spec);
+                connection.focusSearch(accessibilityNodeId, direction, partialInteractiveRegion,
+                        interactionId, callback, mFetchFlags, interrogatingPid, interrogatingTid,
+                        spec);
                 return true;
             } catch (RemoteException re) {
                 if (DEBUG) {
@@ -2432,6 +2464,7 @@
             return true;
         }
 
+        @Override
         public boolean performGlobalAction(int action) {
             synchronized (mLock) {
                 // We treat calls from a profile as if made by its parent as profiles
@@ -2473,6 +2506,57 @@
         }
 
         @Override
+        public  boolean computeClickPointInScreen(int accessibilityWindowId,
+                long accessibilityNodeId, int interactionId,
+                IAccessibilityInteractionConnectionCallback callback, long interrogatingTid)
+                throws RemoteException {
+            final int resolvedWindowId;
+            IAccessibilityInteractionConnection connection = null;
+            Region partialInteractiveRegion = mTempRegion;
+            synchronized (mLock) {
+                // We treat calls from a profile as if made by its parent as profiles
+                // share the accessibility state of the parent. The call below
+                // performs the current profile parent resolution.
+                final int resolvedUserId = mSecurityPolicy
+                        .resolveCallingUserIdEnforcingPermissionsLocked(
+                                UserHandle.getCallingUserId());
+                if (resolvedUserId != mCurrentUserId) {
+                    return false;
+                }
+                resolvedWindowId = resolveAccessibilityWindowIdLocked(accessibilityWindowId);
+                final boolean permissionGranted =
+                        mSecurityPolicy.canRetrieveWindowContentLocked(this);
+                if (!permissionGranted) {
+                    return false;
+                } else {
+                    connection = getConnectionLocked(resolvedWindowId);
+                    if (connection == null) {
+                        return false;
+                    }
+                }
+                if (!mSecurityPolicy.computePartialInteractiveRegionForWindowLocked(
+                        resolvedWindowId, partialInteractiveRegion)) {
+                    partialInteractiveRegion = null;
+                }
+            }
+            final int interrogatingPid = Binder.getCallingPid();
+            final long identityToken = Binder.clearCallingIdentity();
+            MagnificationSpec spec = getCompatibleMagnificationSpecLocked(resolvedWindowId);
+            try {
+                connection.computeClickPointInScreen(accessibilityNodeId, partialInteractiveRegion,
+                        interactionId, callback, interrogatingPid, interrogatingTid, spec);
+                return true;
+            } catch (RemoteException re) {
+                if (DEBUG) {
+                    Slog.e(LOG_TAG, "Error computeClickPointInScreen().");
+                }
+            } finally {
+                Binder.restoreCallingIdentity(identityToken);
+            }
+            return false;
+        }
+
+        @Override
         public void dump(FileDescriptor fd, final PrintWriter pw, String[] args) {
             mSecurityPolicy.enforceCallingPermission(Manifest.permission.DUMP, FUNCTION_DUMP);
             synchronized (mLock) {
@@ -3091,30 +3175,43 @@
             }
         }
 
-        public boolean getAccessibilityFocusBoundsNotLocked(Rect outBounds) {
+        public boolean getAccessibilityFocusClickPointInScreenNotLocked(Point outPoint) {
             AccessibilityNodeInfo focus = getAccessibilityFocusNotLocked();
             if (focus == null) {
                 return false;
             }
 
             synchronized (mLock) {
-                focus.getBoundsInScreen(outBounds);
+                Point point = mClient.computeClickPointInScreen(mConnectionId,
+                        focus.getWindowId(), focus.getSourceNodeId());
+
+                if (point == null) {
+                    return false;
+                }
 
                 MagnificationSpec spec = getCompatibleMagnificationSpecLocked(focus.getWindowId());
                 if (spec != null && !spec.isNop()) {
-                    outBounds.offset((int) -spec.offsetX, (int) -spec.offsetY);
-                    outBounds.scale(1 / spec.scale);
+                    point.offset((int) -spec.offsetX, (int) -spec.offsetY);
+                    point.x = (int) (point.x * (1 / spec.scale));
+                    point.y = (int) (point.y * (1 / spec.scale));
                 }
 
-                // Clip to the window rectangle.
+                // Make sure the point is within the window.
                 Rect windowBounds = mTempRect;
                 getActiveWindowBounds(windowBounds);
-                outBounds.intersect(windowBounds);
+                if (!windowBounds.contains(point.x, point.y)) {
+                    return false;
+                }
 
-                // Clip to the screen rectangle.
-                mDefaultDisplay.getRealSize(mTempPoint);
-                outBounds.intersect(0, 0, mTempPoint.x, mTempPoint.y);
+                // Make sure the point is within the screen.
+                Point screenSize = mTempPoint;
+                mDefaultDisplay.getRealSize(screenSize);
+                if (point.x < 0 || point.x > screenSize.x
+                        || point.y < 0 || point.y > screenSize.y) {
+                    return false;
+                }
 
+                outPoint.set(point.x, point.y);
                 return true;
             }
         }
@@ -3288,6 +3385,42 @@
             }
         }
 
+        public boolean computePartialInteractiveRegionForWindowLocked(int windowId,
+                Region outRegion) {
+            if (mWindows == null) {
+                return false;
+            }
+
+            // Windows are ordered in z order so start from the botton and find
+            // the window of interest. After that all windows that cover it should
+            // be subtracted from the resulting region. Note that for accessibility
+            // we are returning only interactive windows.
+            Region windowInteractiveRegion = null;
+            boolean windowInteractiveRegionChanged = false;
+
+            final int windowCount = mWindows.size();
+            for (int i = windowCount - 1; i >= 0; i--) {
+                AccessibilityWindowInfo currentWindow = mWindows.get(i);
+                if (windowInteractiveRegion == null) {
+                    if (currentWindow.getId() == windowId) {
+                        Rect currentWindowBounds = mTempRect;
+                        currentWindow.getBoundsInScreen(currentWindowBounds);
+                        outRegion.set(currentWindowBounds);
+                        windowInteractiveRegion = outRegion;
+                        continue;
+                    }
+                } else {
+                    Rect currentWindowBounds = mTempRect;
+                    currentWindow.getBoundsInScreen(currentWindowBounds);
+                    if (windowInteractiveRegion.op(currentWindowBounds, Region.Op.DIFFERENCE)) {
+                        windowInteractiveRegionChanged = true;
+                    }
+                }
+            }
+
+            return windowInteractiveRegionChanged;
+        }
+
         public void updateEventSourceLocked(AccessibilityEvent event) {
             if ((event.getEventType() & RETRIEVAL_ALLOWING_EVENT_TYPES) == 0) {
                 event.setSource(null);
@@ -3420,11 +3553,16 @@
         }
 
         private void notifyWindowsChanged() {
-            // Let the client know the windows changed.
-            AccessibilityEvent event = AccessibilityEvent.obtain(
-                    AccessibilityEvent.TYPE_WINDOWS_CHANGED);
-            event.setEventTime(SystemClock.uptimeMillis());
-            sendAccessibilityEvent(event, mCurrentUserId);
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                // Let the client know the windows changed.
+                AccessibilityEvent event = AccessibilityEvent.obtain(
+                        AccessibilityEvent.TYPE_WINDOWS_CHANGED);
+                event.setEventTime(SystemClock.uptimeMillis());
+                sendAccessibilityEvent(event, mCurrentUserId);
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
         }
 
         public boolean canGetAccessibilityNodeInfoLocked(Service service, int windowId) {
diff --git a/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java b/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
index af5c13d..9e63433 100644
--- a/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
+++ b/services/accessibility/java/com/android/server/accessibility/TouchExplorer.java
@@ -24,6 +24,7 @@
 import android.gesture.GestureStore;
 import android.gesture.GestureStroke;
 import android.gesture.Prediction;
+import android.graphics.Point;
 import android.graphics.Rect;
 import android.os.Handler;
 import android.os.SystemClock;
@@ -171,6 +172,9 @@
     // Temporary rectangle to avoid instantiation.
     private final Rect mTempRect = new Rect();
 
+    // Temporary point to avoid instantiation.
+    private final Point mTempPoint = new Point();
+
     // Context in which this explorer operates.
     private final Context mContext;
 
@@ -708,7 +712,6 @@
                      // Send an event to the end of the drag gesture.
                      sendMotionEvent(event, MotionEvent.ACTION_UP, pointerIdBits, policyFlags);
                  }
-                 mCurrentState = STATE_TOUCH_EXPLORING;
             } break;
             case MotionEvent.ACTION_UP: {
                 mAms.onTouchInteractionEnd();
@@ -1158,18 +1161,18 @@
                 mInjectedPointerTracker.getLastInjectedHoverEventForClick();
             if (lastExploreEvent == null) {
                 // No last touch explored event but there is accessibility focus in
-                // the active window. We click in the middle of the focus bounds.
-                Rect focusBounds = mTempRect;
-                if (mAms.getAccessibilityFocusBounds(focusBounds)) {
-                    clickLocationX = focusBounds.centerX();
-                    clickLocationY = focusBounds.centerY();
+                // the active window. We click in the focus bounds.
+                Point point = mTempPoint;
+                if (mAms.getAccessibilityFocusClickPointInScreen(point)) {
+                    clickLocationX = point.x;
+                    clickLocationY = point.y;
                 } else {
                     // Out of luck - do nothing.
                     return;
                 }
             } else {
                 // If the click is within the active window but not within the
-                // accessibility focus bounds we click in the focus center.
+                // accessibility focus bounds we click in the focus bounds.
                 final int lastExplorePointerIndex = lastExploreEvent.getActionIndex();
                 clickLocationX = (int) lastExploreEvent.getX(lastExplorePointerIndex);
                 clickLocationY = (int) lastExploreEvent.getY(lastExplorePointerIndex);
@@ -1177,12 +1180,10 @@
                 if (mLastTouchedWindowId == mAms.getActiveWindowId()) {
                     mAms.getActiveWindowBounds(activeWindowBounds);
                     if (activeWindowBounds.contains(clickLocationX, clickLocationY)) {
-                        Rect focusBounds = mTempRect;
-                        if (mAms.getAccessibilityFocusBounds(focusBounds)) {
-                            if (!focusBounds.contains(clickLocationX, clickLocationY)) {
-                                clickLocationX = focusBounds.centerX();
-                                clickLocationY = focusBounds.centerY();
-                            }
+                        Point point = mTempPoint;
+                        if (mAms.getAccessibilityFocusClickPointInScreen(point)) {
+                            clickLocationX = point.x;
+                            clickLocationY = point.y;
                         }
                     }
                 }
@@ -1331,18 +1332,18 @@
                 mInjectedPointerTracker.getLastInjectedHoverEventForClick();
             if (lastExploreEvent == null) {
                 // No last touch explored event but there is accessibility focus in
-                // the active window. We click in the middle of the focus bounds.
-                Rect focusBounds = mTempRect;
-                if (mAms.getAccessibilityFocusBounds(focusBounds)) {
-                    clickLocationX = focusBounds.centerX();
-                    clickLocationY = focusBounds.centerY();
+                // the active window. We click in the focus bounds.
+                Point point = mTempPoint;
+                if (mAms.getAccessibilityFocusClickPointInScreen(point)) {
+                    clickLocationX = point.x;
+                    clickLocationY = point.y;
                 } else {
                     // Out of luck - do nothing.
                     return;
                 }
             } else {
                 // If the click is within the active window but not within the
-                // accessibility focus bounds we click in the focus center.
+                // accessibility focus bounds we click in the focus bounds.
                 final int lastExplorePointerIndex = lastExploreEvent.getActionIndex();
                 clickLocationX = (int) lastExploreEvent.getX(lastExplorePointerIndex);
                 clickLocationY = (int) lastExploreEvent.getY(lastExplorePointerIndex);
@@ -1350,12 +1351,10 @@
                 if (mLastTouchedWindowId == mAms.getActiveWindowId()) {
                     mAms.getActiveWindowBounds(activeWindowBounds);
                     if (activeWindowBounds.contains(clickLocationX, clickLocationY)) {
-                        Rect focusBounds = mTempRect;
-                        if (mAms.getAccessibilityFocusBounds(focusBounds)) {
-                            if (!focusBounds.contains(clickLocationX, clickLocationY)) {
-                                clickLocationX = focusBounds.centerX();
-                                clickLocationY = focusBounds.centerY();
-                            }
+                        Point point = mTempPoint;
+                        if (mAms.getAccessibilityFocusClickPointInScreen(point)) {
+                            clickLocationX = point.x;
+                            clickLocationY = point.y;
                         }
                     }
                 }
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 7f7e5c3..d05de69 100644
--- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -440,12 +440,10 @@
 
     @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
-                != PackageManager.PERMISSION_GRANTED) {
-            throw new SecurityException("Permission Denial: can't dump from from pid="
-                    + Binder.getCallingPid()
-                    + ", uid=" + Binder.getCallingUid());
-        }
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP,
+                                                "Permission Denial: can't dump from from pid="
+                                                + Binder.getCallingPid()
+                                                + ", uid=" + Binder.getCallingUid());
 
         synchronized (mLock) {
             int N = mProviders.size();
@@ -1863,7 +1861,7 @@
 
     private void deleteProviderLocked(Provider provider) {
         int N = provider.widgets.size();
-        for (int i = 0; i < N; i++) {
+        for (int i = N - 1; i >= 0; i--) {
             Widget widget = provider.widgets.remove(i);
             // Call back with empty RemoteViews
             updateAppWidgetInstanceLocked(widget, null, false);
@@ -4038,4 +4036,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 3e7a7e4..083aa9b 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -8395,10 +8395,15 @@
 
         Slog.i(TAG, "Auto restore => " + doAutoRestore);
 
-        synchronized (this) {
-            Settings.Secure.putInt(mContext.getContentResolver(),
-                    Settings.Secure.BACKUP_AUTO_RESTORE, doAutoRestore ? 1 : 0);
-            mAutoRestore = doAutoRestore;
+        final long oldId = Binder.clearCallingIdentity();
+        try {
+            synchronized (this) {
+                Settings.Secure.putInt(mContext.getContentResolver(),
+                        Settings.Secure.BACKUP_AUTO_RESTORE, doAutoRestore ? 1 : 0);
+                mAutoRestore = doAutoRestore;
+            }
+        } finally {
+            Binder.restoreCallingIdentity(oldId);
         }
     }
 
@@ -8467,10 +8472,15 @@
         synchronized (mTransports) {
             String prevTransport = null;
             if (mTransports.get(transport) != null) {
-                prevTransport = mCurrentTransport;
-                mCurrentTransport = transport;
-                Settings.Secure.putString(mContext.getContentResolver(),
-                        Settings.Secure.BACKUP_TRANSPORT, transport);
+                final long oldId = Binder.clearCallingIdentity();
+                try {
+                    prevTransport = mCurrentTransport;
+                    mCurrentTransport = transport;
+                    Settings.Secure.putString(mContext.getContentResolver(),
+                            Settings.Secure.BACKUP_TRANSPORT, transport);
+                } finally {
+                    Binder.restoreCallingIdentity(oldId);
+                }
                 Slog.v(TAG, "selectBackupTransport() set " + mCurrentTransport
                         + " returning " + prevTransport);
             } else {
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 0919f77..75090db 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -425,8 +425,8 @@
 
     TelephonyManager mTelephonyManager;
 
-    // sequence number for Networks
-    private final static int MIN_NET_ID = 10; // some reserved marks
+    // sequence number for Networks; keep in sync with system/netd/NetworkController.cpp
+    private final static int MIN_NET_ID = 100; // some reserved marks
     private final static int MAX_NET_ID = 65535;
     private int mNextNetId = MIN_NET_ID;
 
@@ -793,14 +793,28 @@
     }
 
     /**
-     * Check if UID should be blocked from using the network represented by the
-     * given {@link NetworkStateTracker}.
+     * Check if UID should be blocked from using the network represented by the given networkType.
+     * @deprecated Uses mLegacyTypeTracker; cannot deal with multiple Networks of the same type.
      */
     private boolean isNetworkBlocked(int networkType, int uid) {
+        return isNetworkWithLinkPropertiesBlocked(getLinkPropertiesForType(networkType), uid);
+    }
+
+    /**
+     * Check if UID should be blocked from using the network represented by the given
+     * NetworkAgentInfo.
+     */
+    private boolean isNetworkBlocked(NetworkAgentInfo nai, int uid) {
+        return isNetworkWithLinkPropertiesBlocked(nai.linkProperties, uid);
+    }
+
+    /**
+     * Check if UID should be blocked from using the network with the given LinkProperties.
+     */
+    private boolean isNetworkWithLinkPropertiesBlocked(LinkProperties lp, int uid) {
         final boolean networkCostly;
         final int uidRules;
 
-        LinkProperties lp = getLinkPropertiesForType(networkType);
         final String iface = (lp == null ? "" : lp.getInterfaceName());
         synchronized (mRulesLock) {
             networkCostly = mMeteredIfaces.contains(iface);
@@ -819,17 +833,36 @@
      * Return a filtered {@link NetworkInfo}, potentially marked
      * {@link DetailedState#BLOCKED} based on
      * {@link #isNetworkBlocked}.
+     * @deprecated Uses mLegacyTypeTracker; cannot deal with multiple Networks of the same type.
      */
     private NetworkInfo getFilteredNetworkInfo(int networkType, int uid) {
         NetworkInfo info = getNetworkInfoForType(networkType);
         return getFilteredNetworkInfo(info, networkType, uid);
     }
 
+    /*
+     * @deprecated Uses mLegacyTypeTracker; cannot deal with multiple Networks of the same type.
+     */
     private NetworkInfo getFilteredNetworkInfo(NetworkInfo info, int networkType, int uid) {
         if (isNetworkBlocked(networkType, uid)) {
             // network is blocked; clone and override state
             info = new NetworkInfo(info);
             info.setDetailedState(DetailedState.BLOCKED, null, null);
+            if (VDBG) log("returning Blocked NetworkInfo");
+        }
+        if (mLockdownTracker != null) {
+            info = mLockdownTracker.augmentNetworkInfo(info);
+            if (VDBG) log("returning Locked NetworkInfo");
+        }
+        return info;
+    }
+
+    private NetworkInfo getFilteredNetworkInfo(NetworkAgentInfo nai, int uid) {
+        NetworkInfo info = nai.networkInfo;
+        if (isNetworkBlocked(nai, uid)) {
+            // network is blocked; clone and override state
+            info = new NetworkInfo(info);
+            info.setDetailedState(DetailedState.BLOCKED, null, null);
             if (DBG) log("returning Blocked NetworkInfo");
         }
         if (mLockdownTracker != null) {
@@ -946,7 +979,7 @@
         synchronized (nai) {
             if (nai.networkInfo == null) return null;
 
-            return getFilteredNetworkInfo(nai.networkInfo, nai.networkInfo.getType(), uid);
+            return getFilteredNetworkInfo(nai, uid);
         }
     }
 
@@ -967,6 +1000,17 @@
     }
 
     @Override
+    public Network getNetworkForType(int networkType) {
+        enforceAccessPermission();
+        final int uid = Binder.getCallingUid();
+        if (isNetworkBlocked(networkType, uid)) {
+            return null;
+        }
+        NetworkAgentInfo nai = mLegacyTypeTracker.getNetworkForType(networkType);
+        return (nai == null) ? null : nai.network;
+    }
+
+    @Override
     public Network[] getAllNetworks() {
         enforceAccessPermission();
         final ArrayList<Network> result = new ArrayList();
@@ -1304,6 +1348,12 @@
 //        }
     }
 
+    private void enforceInternetPermission() {
+        mContext.enforceCallingOrSelfPermission(
+                android.Manifest.permission.INTERNET,
+                "ConnectivityService");
+    }
+
     private void enforceAccessPermission() {
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.ACCESS_NETWORK_STATE,
@@ -1724,7 +1774,7 @@
         pw.println();
 
         synchronized (this) {
-            pw.println("NetworkTranstionWakeLock is currently " +
+            pw.println("NetworkTransitionWakeLock is currently " +
                     (mNetTransitionWakeLock.isHeld() ? "" : "not ") + "held.");
             pw.println("It was last requested for "+mNetTransitionWakeLockCausedBy);
         }
@@ -2457,7 +2507,22 @@
     }
 
     public void reportBadNetwork(Network network) {
-        //TODO
+        enforceAccessPermission();
+        enforceInternetPermission();
+
+        if (network == null) return;
+
+        final int uid = Binder.getCallingUid();
+        NetworkAgentInfo nai = null;
+        synchronized (mNetworkForNetId) {
+            nai = mNetworkForNetId.get(network.netId);
+        }
+        if (nai == null) return;
+        synchronized (nai) {
+            if (isNetworkBlocked(nai, uid)) return;
+
+            nai.networkMonitor.sendMessage(NetworkMonitor.CMD_FORCE_REEVALUATION, uid);
+        }
     }
 
     public ProxyInfo getProxy() {
@@ -4425,10 +4490,14 @@
             loge("Unknown NetworkAgentInfo in handleLingerComplete");
             return;
         }
-        if (DBG) log("handleLingerComplete for " + oldNetwork.name());
         if (DBG) {
-            if (oldNetwork.networkRequests.size() != 0) {
-                loge("Dead network still had " + oldNetwork.networkRequests.size() + " requests");
+            log("handleLingerComplete for " + oldNetwork.name());
+            for (int i = 0; i < oldNetwork.networkRequests.size(); i++) {
+                NetworkRequest nr = oldNetwork.networkRequests.valueAt(i);
+                // Ignore listening requests.
+                if (mNetworkRequests.get(nr).isRequest == false) continue;
+                loge("Dead network still had at least " + nr);
+                break;
             }
         }
         oldNetwork.asyncChannel.disconnect();
@@ -4452,6 +4521,8 @@
             loge("Unknown NetworkAgentInfo in handleConnectionValidated");
             return;
         }
+        if (newNetwork.validated) return;
+        newNetwork.validated = true;
         boolean keep = newNetwork.isVPN();
         boolean isNewDefault = false;
         if (DBG) log("handleConnectionValidated for "+newNetwork.name());
@@ -4675,6 +4746,11 @@
 
     private void updateNetworkScore(NetworkAgentInfo nai, int score) {
         if (DBG) log("updateNetworkScore for " + nai.name() + " to " + score);
+        if (score < 0) {
+            loge("updateNetworkScore for " + nai.name() + " got a negative score (" + score +
+                    ").  Bumping score to min of 0");
+            score = 0;
+        }
 
         nai.currentScore = score;
 
@@ -4695,6 +4771,8 @@
         // code will fire.
         for (int i = 0; i < nai.networkRequests.size(); i++) {
             NetworkRequest nr = nai.networkRequests.valueAt(i);
+            // Don't send listening requests to factories. b/17393458
+            if (mNetworkRequests.get(nr).isRequest == false) continue;
             sendUpdatedScoreToFactories(nr, score);
         }
     }
@@ -4805,7 +4883,8 @@
             result.setType(networkType);
             return result;
         } else {
-            NetworkInfo result = new NetworkInfo(networkType);
+            NetworkInfo result = new NetworkInfo(
+                    networkType, 0, ConnectivityManager.getNetworkTypeName(networkType), "");
             result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
             return result;
         }
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index c8718e3..060c8e3 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -106,6 +106,7 @@
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.view.inputmethod.InputMethodSubtype;
+import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
 import android.widget.ArrayAdapter;
 import android.widget.CompoundButton;
 import android.widget.CompoundButton.OnCheckedChangeListener;
@@ -3455,9 +3456,14 @@
                                 parser.getAttributeValue(null, ATTR_IME_SUBTYPE_EXTRA_VALUE);
                         final boolean isAuxiliary = "1".equals(String.valueOf(
                                 parser.getAttributeValue(null, ATTR_IS_AUXILIARY)));
-                        final InputMethodSubtype subtype =
-                                new InputMethodSubtype(label, icon, imeSubtypeLocale,
-                                        imeSubtypeMode, imeSubtypeExtraValue, isAuxiliary);
+                        final InputMethodSubtype subtype = new InputMethodSubtypeBuilder()
+                                .setSubtypeNameResId(label)
+                                .setSubtypeIconResId(icon)
+                                .setSubtypeLocale(imeSubtypeLocale)
+                                .setSubtypeMode(imeSubtypeMode)
+                                .setSubtypeExtraValue(imeSubtypeExtraValue)
+                                .setIsAuxiliary(isAuxiliary)
+                                .build();
                         tempSubtypesArray.add(subtype);
                     }
                 }
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 92f5170..adfbb16 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -116,7 +116,7 @@
         @Override
         public void onReceive(Context context, Intent intent) {
             // Update keystore settings for profiles which use the same password as their parent
-            if (Intent.ACTION_USER_STARTED.equals(intent.getAction())) {
+            if (Intent.ACTION_USER_ADDED.equals(intent.getAction())) {
                 final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0);
                 final UserManager um = (UserManager) mContext.getSystemService(USER_SERVICE);
                 final UserInfo parentInfo = um.getProfileParent(userHandle);
@@ -319,17 +319,18 @@
         String dataSystemDirectory =
                 android.os.Environment.getDataDirectory().getAbsolutePath() +
                 SYSTEM_DIRECTORY;
+        userId = getUserParentOrSelfId(userId);
         if (userId == 0) {
             // Leave it in the same place for user 0
             return dataSystemDirectory + LOCK_PATTERN_FILE;
         } else {
-            userId = getUserParentOrSelfId(userId);
             return  new File(Environment.getUserSystemDirectory(userId), LOCK_PATTERN_FILE)
                     .getAbsolutePath();
         }
     }
 
     private String getLockPasswordFilename(int userId) {
+        userId = getUserParentOrSelfId(userId);
         String dataSystemDirectory =
                 android.os.Environment.getDataDirectory().getAbsolutePath() +
                 SYSTEM_DIRECTORY;
@@ -337,7 +338,6 @@
             // Leave it in the same place for user 0
             return dataSystemDirectory + LOCK_PASSWORD_FILE;
         } else {
-            userId = getUserParentOrSelfId(userId);
             return new File(Environment.getUserSystemDirectory(userId), LOCK_PASSWORD_FILE)
                     .getAbsolutePath();
         }
@@ -510,13 +510,18 @@
 
         SQLiteDatabase db = mOpenHelper.getWritableDatabase();
         try {
-            File file = new File(getLockPasswordFilename(userId));
-            if (file.exists()) {
-                file.delete();
-            }
-            file = new File(getLockPatternFilename(userId));
-            if (file.exists()) {
-                file.delete();
+            final UserManager um = (UserManager) mContext.getSystemService(USER_SERVICE);
+            final UserInfo parentInfo = um.getProfileParent(userId);
+            if (parentInfo == null) {
+                // This user owns its lock settings files - safe to delete them
+                File file = new File(getLockPasswordFilename(userId));
+                if (file.exists()) {
+                    file.delete();
+                }
+                file = new File(getLockPatternFilename(userId));
+                if (file.exists()) {
+                    file.delete();
+                }
             }
 
             db.beginTransaction();
diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java
index df54c7f..b452a38 100644
--- a/services/core/java/com/android/server/MmsServiceBroker.java
+++ b/services/core/java/com/android/server/MmsServiceBroker.java
@@ -29,10 +29,12 @@
 import android.content.pm.PackageManager;
 import android.net.Uri;
 import android.os.Binder;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Message;
 import android.os.RemoteException;
+import android.os.ServiceManager;
 import android.telephony.TelephonyManager;
 import android.util.Slog;
 
@@ -190,29 +192,30 @@
     // Service API calls implementation, proxied to the real MmsService in "com.android.mms.service"
     private final class BinderService extends IMms.Stub {
         @Override
-        public void sendMessage(long subId, String callingPkg, byte[] pdu, String locationUrl,
-                ContentValues configOverrides, PendingIntent sentIntent) throws RemoteException {
+        public void sendMessage(long subId, String callingPkg, Uri contentUri,
+                String locationUrl, Bundle configOverrides, PendingIntent sentIntent)
+                        throws RemoteException {
             mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, "Send MMS message");
             if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(),
                     callingPkg) != AppOpsManager.MODE_ALLOWED) {
                 return;
             }
-            getServiceGuarded().sendMessage(subId, callingPkg, pdu, locationUrl, configOverrides,
-                    sentIntent);
+            getServiceGuarded().sendMessage(subId, callingPkg, contentUri, locationUrl,
+                    configOverrides, sentIntent);
         }
 
         @Override
         public void downloadMessage(long subId, String callingPkg, String locationUrl,
-                ContentValues configOverrides, PendingIntent downloadedIntent)
-                throws RemoteException {
+                Uri contentUri, Bundle configOverrides,
+                PendingIntent downloadedIntent) throws RemoteException {
             mContext.enforceCallingPermission(Manifest.permission.RECEIVE_MMS,
                     "Download MMS message");
             if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(),
                     callingPkg) != AppOpsManager.MODE_ALLOWED) {
                 return;
             }
-            getServiceGuarded().downloadMessage(subId, callingPkg, locationUrl, configOverrides,
-                    downloadedIntent);
+            getServiceGuarded().downloadMessage(subId, callingPkg, locationUrl, contentUri,
+                    configOverrides, downloadedIntent);
         }
 
         @Override
@@ -228,21 +231,8 @@
         }
 
         @Override
-        public boolean getCarrierConfigBoolean(long subId, String name, boolean defaultValue)
-                throws RemoteException {
-            return getServiceGuarded().getCarrierConfigBoolean(subId, name, defaultValue);
-        }
-
-        @Override
-        public int getCarrierConfigInt(long subId, String name, int defaultValue)
-                throws RemoteException {
-            return getServiceGuarded().getCarrierConfigInt(subId, name, defaultValue);
-        }
-
-        @Override
-        public String getCarrierConfigString(long subId, String name, String defaultValue)
-                throws RemoteException {
-            return getServiceGuarded().getCarrierConfigString(subId, name, defaultValue);
+        public Bundle getCarrierConfigValues(long subId) throws RemoteException {
+            return getServiceGuarded().getCarrierConfigValues(subId);
         }
 
         @Override
@@ -260,8 +250,9 @@
         }
 
         @Override
-        public Uri importMultimediaMessage(String callingPkg, byte[] pdu, String messageId,
-                long timestampSecs, boolean seen, boolean read) throws RemoteException {
+        public Uri importMultimediaMessage(String callingPkg, Uri contentUri,
+                String messageId, long timestampSecs, boolean seen, boolean read)
+                        throws RemoteException {
             mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Import MMS message");
             if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(),
                     callingPkg) != AppOpsManager.MODE_ALLOWED) {
@@ -270,7 +261,7 @@
                 return FAKE_MMS_SENT_URI;
             }
             return getServiceGuarded().importMultimediaMessage(
-                    callingPkg, pdu, messageId, timestampSecs, seen, read);
+                    callingPkg, contentUri, messageId, timestampSecs, seen, read);
         }
 
         @Override
@@ -328,7 +319,8 @@
         }
 
         @Override
-        public Uri addMultimediaMessageDraft(String callingPkg, byte[] pdu) throws RemoteException {
+        public Uri addMultimediaMessageDraft(String callingPkg, Uri contentUri)
+                throws RemoteException {
             mContext.enforceCallingPermission(Manifest.permission.WRITE_SMS, "Add MMS draft");
             if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(),
                     callingPkg) != AppOpsManager.MODE_ALLOWED) {
@@ -336,12 +328,12 @@
                 // while writing the TelephonyProvider
                 return FAKE_MMS_DRAFT_URI;
             }
-            return getServiceGuarded().addMultimediaMessageDraft(callingPkg, pdu);
+            return getServiceGuarded().addMultimediaMessageDraft(callingPkg, contentUri);
         }
 
         @Override
         public void sendStoredMessage(long subId, String callingPkg, Uri messageUri,
-                ContentValues configOverrides, PendingIntent sentIntent) throws RemoteException {
+                Bundle configOverrides, PendingIntent sentIntent) throws RemoteException {
             mContext.enforceCallingPermission(Manifest.permission.SEND_SMS,
                     "Send stored MMS message");
             if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(),
diff --git a/services/core/java/com/android/server/NativeDaemonEvent.java b/services/core/java/com/android/server/NativeDaemonEvent.java
index 2095152..59d50bd 100644
--- a/services/core/java/com/android/server/NativeDaemonEvent.java
+++ b/services/core/java/com/android/server/NativeDaemonEvent.java
@@ -201,20 +201,16 @@
         }
         while (current < length) {
             // find the end of the word
-            if (quoted) {
-                wordEnd = current;
-                while ((wordEnd = rawEvent.indexOf('\"', wordEnd)) != -1) {
-                    if (rawEvent.charAt(wordEnd - 1) != '\\') {
-                        break;
-                    } else {
-                        wordEnd++; // skip this escaped quote and keep looking
-                    }
+            char terminator = quoted ? '\"' : ' ';
+            wordEnd = current;
+            while (wordEnd < length && rawEvent.charAt(wordEnd) != terminator) {
+                if (rawEvent.charAt(wordEnd) == '\\') {
+                    // skip the escaped char
+                    ++wordEnd;
                 }
-            } else {
-                wordEnd = rawEvent.indexOf(' ', current);
+                ++wordEnd;
             }
-            // if we didn't find the end-o-word token, take the rest of the string
-            if (wordEnd == -1) wordEnd = length;
+            if (wordEnd > length) wordEnd = length;
             String word = rawEvent.substring(current, wordEnd);
             current += word.length();
             if (!quoted) {
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index f9b65b8..1318f66 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -44,6 +44,7 @@
 import android.net.InterfaceConfiguration;
 import android.net.IpPrefix;
 import android.net.LinkAddress;
+import android.net.Network;
 import android.net.NetworkStats;
 import android.net.NetworkUtils;
 import android.net.RouteInfo;
@@ -1200,10 +1201,12 @@
     }
 
     @Override
-    public void setDnsForwarders(String[] dns) {
+    public void setDnsForwarders(Network network, String[] dns) {
         mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
 
-        final Command cmd = new Command("tether", "dns", "set");
+        int netId = (network != null) ? network.netId : ConnectivityManager.NETID_UNSET;
+        final Command cmd = new Command("tether", "dns", "set", netId);
+
         for (String s : dns) {
             cmd.appendArg(NetworkUtils.numericToInetAddress(s).getHostAddress());
         }
diff --git a/services/core/java/com/android/server/NsdService.java b/services/core/java/com/android/server/NsdService.java
index cf7e65c..cb1748d 100644
--- a/services/core/java/com/android/server/NsdService.java
+++ b/services/core/java/com/android/server/NsdService.java
@@ -397,8 +397,7 @@
                         break;
                     case NsdManager.NATIVE_DAEMON_EVENT:
                         NativeEvent event = (NativeEvent) msg.obj;
-                        if (!handleNativeEvent(event.code, event.raw,
-                                NativeDaemonEvent.unescapeArgs(event.raw))) {
+                        if (!handleNativeEvent(event.code, event.raw, event.cooked)) {
                             result = NOT_HANDLED;
                         }
                         break;
@@ -474,8 +473,14 @@
                     case NativeResponseCode.SERVICE_RESOLVED:
                         /* NNN resolveId fullName hostName port txtlen txtdata */
                         if (DBG) Slog.d(TAG, "SERVICE_RESOLVED Raw: " + raw);
-                        int index = cooked[2].indexOf(".");
-                        if (index == -1) {
+                        int index = 0;
+                        while (index < cooked[2].length() && cooked[2].charAt(index) != '.') {
+                            if (cooked[2].charAt(index) == '\\') {
+                                ++index;
+                            }
+                            ++index;
+                        }
+                        if (index >= cooked[2].length()) {
                             Slog.e(TAG, "Invalid service found " + raw);
                             break;
                         }
@@ -483,6 +488,8 @@
                         String rest = cooked[2].substring(index);
                         String type = rest.replace(".local.", "");
 
+                        name = unescape(name);
+
                         clientInfo.mResolvedService.setServiceName(name);
                         clientInfo.mResolvedService.setServiceType(type);
                         clientInfo.mResolvedService.setPort(Integer.parseInt(cooked[4]));
@@ -541,6 +548,30 @@
        }
     }
 
+    private String unescape(String s) {
+        StringBuilder sb = new StringBuilder(s.length());
+        for (int i = 0; i < s.length(); ++i) {
+            char c = s.charAt(i);
+            if (c == '\\') {
+                if (++i >= s.length()) {
+                    Slog.e(TAG, "Unexpected end of escape sequence in: " + s);
+                    break;
+                }
+                c = s.charAt(i);
+                if (c != '.' && c != '\\') {
+                    if (i + 2 >= s.length()) {
+                        Slog.e(TAG, "Unexpected end of escape sequence in: " + s);
+                        break;
+                    }
+                    c = (char) ((c-'0') * 100 + (s.charAt(i+1)-'0') * 10 + (s.charAt(i+2)-'0'));
+                    i += 2;
+                }
+            }
+            sb.append(c);
+        }
+        return sb.toString();
+    }
+
     private NativeDaemonConnector mNativeConnector;
     private final CountDownLatch mNativeDaemonConnected = new CountDownLatch(1);
 
@@ -625,10 +656,12 @@
     private class NativeEvent {
         final int code;
         final String raw;
+        final String[] cooked;
 
-        NativeEvent(int code, String raw) {
+        NativeEvent(int code, String raw, String[] cooked) {
             this.code = code;
             this.raw = raw;
+            this.cooked = cooked;
         }
     }
 
@@ -644,7 +677,7 @@
         public boolean onEvent(int code, String raw, String[] cooked) {
             // TODO: NDC translates a message to a callback, we could enhance NDC to
             // directly interact with a state machine through messages
-            NativeEvent event = new NativeEvent(code, raw);
+            NativeEvent event = new NativeEvent(code, raw, cooked);
             mNsdStateMachine.sendMessage(NsdManager.NATIVE_DAEMON_EVENT, event);
             return true;
         }
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 7624314..37c23bb 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -196,7 +196,7 @@
                     if (VDBG) log("MSG_USER_SWITCHED userId=" + msg.arg1);
                     int numPhones = TelephonyManager.getDefault().getPhoneCount();
                     for (int sub = 0; sub < numPhones; sub++) {
-                        TelephonyRegistry.this.notifyCellLocationUsingSubId(sub,
+                        TelephonyRegistry.this.notifyCellLocationForSubscriber(sub,
                                 mCellLocation[sub]);
                     }
                     break;
@@ -326,7 +326,7 @@
     }
 
     @Override
-    public void listenUsingSubId(long subId, String pkgForDebug, IPhoneStateListener callback,
+    public void listenForSubscriber(long subId, String pkgForDebug, IPhoneStateListener callback,
             int events, boolean notifyNow) {
         listen(pkgForDebug, callback, events, notifyNow, subId, false);
     }
@@ -542,12 +542,12 @@
         broadcastCallStateChanged(state, incomingNumber, mDefaultSubId);
     }
 
-    public void notifyCallStateUsingSubId(long subId, int state, String incomingNumber) {
+    public void notifyCallStateForSubscriber(long subId, int state, String incomingNumber) {
         if (!checkNotifyPermission("notifyCallState()")) {
             return;
         }
         if (VDBG) {
-            log("notifyCallStateUsingSubId: subId=" + subId
+            log("notifyCallStateForSubscriber: subId=" + subId
                 + " state=" + state + " incomingNumber=" + incomingNumber);
         }
         synchronized (mRecords) {
@@ -573,38 +573,38 @@
     }
 
      public void notifyServiceState(ServiceState state) {
-         notifyServiceStateUsingSubId(mDefaultSubId, state);
+         notifyServiceStateForSubscriber(mDefaultSubId, state);
      }
 
-    public void notifyServiceStateUsingSubId(long subId, ServiceState state) {
+    public void notifyServiceStateForSubscriber(long subId, ServiceState state) {
         if (!checkNotifyPermission("notifyServiceState()")){
             return;
         }
         if (subId == SubscriptionManager.DEFAULT_SUB_ID) {
             subId = mDefaultSubId;
-            if (VDBG) log("notifyServiceStateUsingSubId: using mDefaultSubId=" + mDefaultSubId);
+            if (VDBG) log("notifyServiceStateForSubscriber: using mDefaultSubId=" + mDefaultSubId);
         }
         synchronized (mRecords) {
             int phoneId = SubscriptionManager.getPhoneId(subId);
             if (VDBG) {
-                log("notifyServiceStateUsingSubId: subId=" + subId + " phoneId=" + phoneId
+                log("notifyServiceStateForSubscriber: subId=" + subId + " phoneId=" + phoneId
                     + " state=" + state);
             }
             if (validatePhoneId(phoneId)) {
                 mServiceState[phoneId] = state;
-                logServiceStateChanged("notifyServiceStateUsingSubId", subId, phoneId, state);
-                if (VDBG) toStringLogSSC("notifyServiceStateUsingSubId");
+                logServiceStateChanged("notifyServiceStateForSubscriber", subId, phoneId, state);
+                if (VDBG) toStringLogSSC("notifyServiceStateForSubscriber");
 
                 for (Record r : mRecords) {
                     if (VDBG) {
-                        log("notifyServiceStateUsingSubId: r=" + r + " subId=" + subId
+                        log("notifyServiceStateForSubscriber: r=" + r + " subId=" + subId
                                 + " phoneId=" + phoneId + " state=" + state);
                     }
                     if (((r.events & PhoneStateListener.LISTEN_SERVICE_STATE) != 0) &&
                         (r.phoneId == phoneId)) {
                         try {
                             if (DBG) {
-                                log("notifyServiceStateUsingSubId: callback.onSSC r=" + r
+                                log("notifyServiceStateForSubscriber: callback.onSSC r=" + r
                                         + " subId=" + subId + " phoneId=" + phoneId
                                         + " state=" + state);
                             }
@@ -615,7 +615,7 @@
                     }
                 }
             } else {
-                log("notifyServiceStateUsingSubId: INVALID phoneId=" + phoneId);
+                log("notifyServiceStateForSubscriber: INVALID phoneId=" + phoneId);
             }
             handleRemoveListLocked();
         }
@@ -623,33 +623,33 @@
     }
 
     public void notifySignalStrength(SignalStrength signalStrength) {
-        notifySignalStrengthUsingSubId(mDefaultSubId, signalStrength);
+        notifySignalStrengthForSubscriber(mDefaultSubId, signalStrength);
     }
 
-    public void notifySignalStrengthUsingSubId(long subId, SignalStrength signalStrength) {
+    public void notifySignalStrengthForSubscriber(long subId, SignalStrength signalStrength) {
         if (!checkNotifyPermission("notifySignalStrength()")) {
             return;
         }
         if (VDBG) {
-            log("notifySignalStrengthUsingSubId: subId=" + subId
+            log("notifySignalStrengthForSubscriber: subId=" + subId
                 + " signalStrength=" + signalStrength);
-            toStringLogSSC("notifySignalStrengthUsingSubId");
+            toStringLogSSC("notifySignalStrengthForSubscriber");
         }
         synchronized (mRecords) {
             int phoneId = SubscriptionManager.getPhoneId(subId);
             if (validatePhoneId(phoneId)) {
-                if (VDBG) log("notifySignalStrengthUsingSubId: valid phoneId=" + phoneId);
+                if (VDBG) log("notifySignalStrengthForSubscriber: valid phoneId=" + phoneId);
                 mSignalStrength[phoneId] = signalStrength;
                 for (Record r : mRecords) {
                     if (VDBG) {
-                        log("notifySignalStrengthUsingSubId: r=" + r + " subId=" + subId
+                        log("notifySignalStrengthForSubscriber: r=" + r + " subId=" + subId
                                 + " phoneId=" + phoneId + " ss=" + signalStrength);
                     }
                     if (((r.events & PhoneStateListener.LISTEN_SIGNAL_STRENGTHS) != 0) &&
                         (r.phoneId == phoneId)) {
                         try {
                             if (DBG) {
-                                log("notifySignalStrengthUsingSubId: callback.onSsS r=" + r
+                                log("notifySignalStrengthForSubscriber: callback.onSsS r=" + r
                                         + " subId=" + subId + " phoneId=" + phoneId
                                         + " ss=" + signalStrength);
                             }
@@ -664,7 +664,7 @@
                             int gsmSignalStrength = signalStrength.getGsmSignalStrength();
                             int ss = (gsmSignalStrength == 99 ? -1 : gsmSignalStrength);
                             if (DBG) {
-                                log("notifySignalStrengthUsingSubId: callback.onSS r=" + r
+                                log("notifySignalStrengthForSubscriber: callback.onSS r=" + r
                                         + " subId=" + subId + " phoneId=" + phoneId
                                         + " gsmSS=" + gsmSignalStrength + " ss=" + ss);
                             }
@@ -675,7 +675,7 @@
                     }
                 }
             } else {
-                log("notifySignalStrengthUsingSubId: invalid phoneId=" + phoneId);
+                log("notifySignalStrengthForSubscriber: invalid phoneId=" + phoneId);
             }
             handleRemoveListLocked();
         }
@@ -683,15 +683,15 @@
     }
 
     public void notifyCellInfo(List<CellInfo> cellInfo) {
-         notifyCellInfoUsingSubId(mDefaultSubId, cellInfo);
+         notifyCellInfoForSubscriber(mDefaultSubId, cellInfo);
     }
 
-    public void notifyCellInfoUsingSubId(long subId, List<CellInfo> cellInfo) {
+    public void notifyCellInfoForSubscriber(long subId, List<CellInfo> cellInfo) {
         if (!checkNotifyPermission("notifyCellInfo()")) {
             return;
         }
         if (VDBG) {
-            log("notifyCellInfoUsingSubId: subId=" + subId
+            log("notifyCellInfoForSubscriber: subId=" + subId
                 + " cellInfo=" + cellInfo);
         }
 
@@ -743,15 +743,15 @@
     }
 
     public void notifyMessageWaitingChanged(boolean mwi) {
-        notifyMessageWaitingChangedUsingSubId(mDefaultSubId, mwi);
+        notifyMessageWaitingChangedForSubscriber(mDefaultSubId, mwi);
     }
 
-    public void notifyMessageWaitingChangedUsingSubId(long subId, boolean mwi) {
+    public void notifyMessageWaitingChangedForSubscriber(long subId, boolean mwi) {
         if (!checkNotifyPermission("notifyMessageWaitingChanged()")) {
             return;
         }
         if (VDBG) {
-            log("notifyMessageWaitingChangedUsingSubId: subId=" + subId
+            log("notifyMessageWaitingChangedForSubscriber: subId=" + subId
                 + " mwi=" + mwi);
         }
         synchronized (mRecords) {
@@ -774,15 +774,15 @@
     }
 
     public void notifyCallForwardingChanged(boolean cfi) {
-        notifyCallForwardingChangedUsingSubId(mDefaultSubId, cfi);
+        notifyCallForwardingChangedForSubscriber(mDefaultSubId, cfi);
     }
 
-    public void notifyCallForwardingChangedUsingSubId(long subId, boolean cfi) {
+    public void notifyCallForwardingChangedForSubscriber(long subId, boolean cfi) {
         if (!checkNotifyPermission("notifyCallForwardingChanged()")) {
             return;
         }
         if (VDBG) {
-            log("notifyCallForwardingChangedUsingSubId: subId=" + subId
+            log("notifyCallForwardingChangedForSubscriber: subId=" + subId
                 + " cfi=" + cfi);
         }
         synchronized (mRecords) {
@@ -805,10 +805,10 @@
     }
 
     public void notifyDataActivity(int state) {
-        notifyDataActivityUsingSubId(mDefaultSubId, state);
+        notifyDataActivityForSubscriber(mDefaultSubId, state);
     }
 
-    public void notifyDataActivityUsingSubId(long subId, int state) {
+    public void notifyDataActivityForSubscriber(long subId, int state) {
         if (!checkNotifyPermission("notifyDataActivity()" )) {
             return;
         }
@@ -831,12 +831,12 @@
     public void notifyDataConnection(int state, boolean isDataConnectivityPossible,
             String reason, String apn, String apnType, LinkProperties linkProperties,
             NetworkCapabilities networkCapabilities, int networkType, boolean roaming) {
-        notifyDataConnectionUsingSubId(mDefaultSubId, state, isDataConnectivityPossible,
+        notifyDataConnectionForSubscriber(mDefaultSubId, state, isDataConnectivityPossible,
             reason, apn, apnType, linkProperties,
             networkCapabilities, networkType, roaming);
     }
 
-    public void notifyDataConnectionUsingSubId(long subId, int state,
+    public void notifyDataConnectionForSubscriber(long subId, int state,
             boolean isDataConnectivityPossible, String reason, String apn, String apnType,
             LinkProperties linkProperties, NetworkCapabilities networkCapabilities,
             int networkType, boolean roaming) {
@@ -844,7 +844,7 @@
             return;
         }
         if (VDBG) {
-            log("notifyDataConnectionUsingSubId: subId=" + subId
+            log("notifyDataConnectionForSubscriber: subId=" + subId
                 + " state=" + state + " isDataConnectivityPossible=" + isDataConnectivityPossible
                 + " reason='" + reason
                 + "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType
@@ -921,16 +921,16 @@
     }
 
     public void notifyDataConnectionFailed(String reason, String apnType) {
-         notifyDataConnectionFailedUsingSubId(mDefaultSubId, reason, apnType);
+         notifyDataConnectionFailedForSubscriber(mDefaultSubId, reason, apnType);
     }
 
-    public void notifyDataConnectionFailedUsingSubId(long subId,
+    public void notifyDataConnectionFailedForSubscriber(long subId,
             String reason, String apnType) {
         if (!checkNotifyPermission("notifyDataConnectionFailed()")) {
             return;
         }
         if (VDBG) {
-            log("notifyDataConnectionFailedUsingSubId: subId=" + subId
+            log("notifyDataConnectionFailedForSubscriber: subId=" + subId
                 + " reason=" + reason + " apnType=" + apnType);
         }
         synchronized (mRecords) {
@@ -954,17 +954,17 @@
     }
 
     public void notifyCellLocation(Bundle cellLocation) {
-         notifyCellLocationUsingSubId(mDefaultSubId, cellLocation);
+         notifyCellLocationForSubscriber(mDefaultSubId, cellLocation);
     }
 
-    public void notifyCellLocationUsingSubId(long subId, Bundle cellLocation) {
-        log("notifyCellLocationUsingSubId: subId=" + subId
+    public void notifyCellLocationForSubscriber(long subId, Bundle cellLocation) {
+        log("notifyCellLocationForSubscriber: subId=" + subId
                 + " cellLocation=" + cellLocation);
         if (!checkNotifyPermission("notifyCellLocation()")) {
             return;
         }
         if (VDBG) {
-            log("notifyCellLocationUsingSubId: subId=" + subId
+            log("notifyCellLocationForSubscriber: subId=" + subId
                 + " cellLocation=" + cellLocation);
         }
         synchronized (mRecords) {
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index 94d979e..888fa1a 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -265,7 +265,11 @@
         mContext.registerReceiver(new BroadcastReceiver() {
             @Override
             public void onReceive(Context context1, Intent intent) {
-                purgeOldGrantsAll();
+                // Don't delete accounts when updating a authenticator's
+                // package.
+                if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
+                    purgeOldGrantsAll();
+                }
             }
         }, intentFilter);
 
@@ -1700,9 +1704,10 @@
             subtitle = titleAndSubtitle.substring(index + 1);
         }
         UserHandle user = new UserHandle(userId);
-        n.color = mContext.getResources().getColor(
+        Context contextForUser = getContextForUser(user);
+        n.color = contextForUser.getResources().getColor(
                 com.android.internal.R.color.system_notification_accent_color);
-        n.setLatestEventInfo(mContext, title, subtitle,
+        n.setLatestEventInfo(contextForUser, title, subtitle,
                 PendingIntent.getActivityAsUser(mContext, 0, intent,
                         PendingIntent.FLAG_CANCEL_CURRENT, null, user));
         installNotification(getCredentialPermissionNotificationId(
@@ -2968,11 +2973,12 @@
                 Notification n = new Notification(android.R.drawable.stat_sys_warning, null,
                         0 /* when */);
                 UserHandle user = new UserHandle(userId);
+                Context contextForUser = getContextForUser(user);
                 final String notificationTitleFormat =
-                        mContext.getText(R.string.notification_title).toString();
-                n.color = mContext.getResources().getColor(
+                        contextForUser.getText(R.string.notification_title).toString();
+                n.color = contextForUser.getResources().getColor(
                         com.android.internal.R.color.system_notification_accent_color);
-                n.setLatestEventInfo(mContext,
+                n.setLatestEventInfo(contextForUser,
                         String.format(notificationTitleFormat, account.name),
                         message, PendingIntent.getActivityAsUser(
                         mContext, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT,
@@ -3478,4 +3484,13 @@
         }
         return authTokensForAccount;
     }
+
+    private Context getContextForUser(UserHandle user) {
+        try {
+            return mContext.createPackageContextAsUser(mContext.getPackageName(), 0, user);
+        } catch (NameNotFoundException e) {
+            // Default to mContext, not finding the package system is running as is unlikely.
+            return mContext;
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 0bdb964..599c3b9 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -308,7 +308,14 @@
             return new ComponentName("!", res.permission != null
                     ? res.permission : "private to package");
         }
+
         ServiceRecord r = res.record;
+
+        if (!mAm.getUserManagerLocked().exists(r.userId)) {
+            Slog.d(TAG, "Trying to start service with non-existent user! " + r.userId);
+            return null;
+        }
+
         NeededUriGrants neededGrants = mAm.checkGrantUriPermissionFromIntentLocked(
                 callingUid, r.packageName, service, service.getFlags(), null, r.userId);
         if (unscheduleServiceRestartLocked(r, callingUid, false)) {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index c2c86ff..7bec165 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -196,6 +196,7 @@
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.WindowManager;
+import dalvik.system.VMRuntime;
 
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
@@ -887,6 +888,8 @@
     boolean mProcessesReady = false;
     boolean mSystemReady = false;
     boolean mBooting = false;
+    boolean mCallFinishBooting = false;
+    boolean mBootAnimationComplete = false;
     boolean mWaitingUpdate = false;
     boolean mDidUpdate = false;
     boolean mOnBattery = false;
@@ -1074,13 +1077,16 @@
 
     /**
      * Runtime CPU use collection thread.  This object's lock is used to
-     * protect all related state.
+     * perform synchronization with the thread (notifying it to run).
      */
     final Thread mProcessCpuThread;
 
     /**
-     * Used to collect process stats when showing not responding dialog.
-     * Protected by mProcessCpuThread.
+     * Used to collect per-process CPU use for ANRs, battery stats, etc.
+     * Must acquire this object's lock when accessing it.
+     * NOTE: this lock will be held while doing long operations (trawling
+     * through all processes in /proc), so it should never be acquired by
+     * any critical paths such as when holding the main activity manager lock.
      */
     final ProcessCpuTracker mProcessCpuTracker = new ProcessCpuTracker(
             MONITOR_THREAD_CPU_USAGE);
@@ -1107,7 +1113,12 @@
 
     final ActivityThread mSystemThread;
 
+    // Holds the current foreground user's id
     int mCurrentUserId = 0;
+    // Holds the target user's id during a user switch
+    int mTargetUserId = UserHandle.USER_NULL;
+    // If there are multiple profiles for the current user, their ids are here
+    // Currently only the primary user can have managed profiles
     int[] mCurrentProfileIds = new int[] {UserHandle.USER_OWNER}; // Accessed by ActivityStack
 
     /**
@@ -1589,7 +1600,7 @@
                             infoMap.put(mi.pid, mi);
                         }
                         updateCpuStatsNow();
-                        synchronized (mProcessCpuThread) {
+                        synchronized (mProcessCpuTracker) {
                             final int N = mProcessCpuTracker.countStats();
                             for (int i=0; i<N; i++) {
                                 ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -1888,7 +1899,7 @@
                 if (memInfo != null) {
                     updateCpuStatsNow();
                     long nativeTotalPss = 0;
-                    synchronized (mProcessCpuThread) {
+                    synchronized (mProcessCpuTracker) {
                         final int N = mProcessCpuTracker.countStats();
                         for (int j=0; j<N; j++) {
                             ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(j);
@@ -1906,7 +1917,7 @@
                         }
                     }
                     memInfo.readMemInfo();
-                    synchronized (this) {
+                    synchronized (ActivityManagerService.this) {
                         if (DEBUG_PSS) Slog.d(TAG, "Collected native and kernel memory in "
                                 + (SystemClock.uptimeMillis()-start) + "ms");
                         mProcessStats.addSysMemUsageLocked(memInfo.getCachedSizeKb(),
@@ -2177,7 +2188,7 @@
                 return;
             }
 
-            synchronized (mActivityManagerService.mProcessCpuThread) {
+            synchronized (mActivityManagerService.mProcessCpuTracker) {
                 pw.print(mActivityManagerService.mProcessCpuTracker.printCurrentLoad());
                 pw.print(mActivityManagerService.mProcessCpuTracker.printCurrentState(
                         SystemClock.uptimeMillis()));
@@ -2373,7 +2384,7 @@
     }
 
     void updateCpuStatsNow() {
-        synchronized (mProcessCpuThread) {
+        synchronized (mProcessCpuTracker) {
             mProcessCpuMutexFree.set(false);
             final long now = SystemClock.uptimeMillis();
             boolean haveNewCpuStats = false;
@@ -2898,9 +2909,11 @@
             boolean knownToBeDead, int intentFlags, String hostingType, ComponentName hostingName,
             boolean allowWhileBooting, boolean isolated, int isolatedUid, boolean keepIfLarge,
             String abiOverride, String entryPoint, String[] entryPointArgs, Runnable crashHandler) {
+        long startTime = SystemClock.elapsedRealtime();
         ProcessRecord app;
         if (!isolated) {
             app = getProcessRecordLocked(processName, info.uid, keepIfLarge);
+            checkTime(startTime, "startProcess: after getProcessRecord");
         } else {
             // If this is an isolated process, it can't re-use an existing process.
             app = null;
@@ -2922,14 +2935,17 @@
                 if (DEBUG_PROCESSES) Slog.v(TAG, "App already running: " + app);
                 // If this is a new package in the process, add the package to the list
                 app.addPackage(info.packageName, info.versionCode, mProcessStats);
+                checkTime(startTime, "startProcess: done, added package to proc");
                 return app;
             }
 
             // An application record is attached to a previous process,
             // clean it up now.
             if (DEBUG_PROCESSES || DEBUG_CLEANUP) Slog.v(TAG, "App died: " + app);
+            checkTime(startTime, "startProcess: bad proc running, killing");
             Process.killProcessGroup(app.info.uid, app.pid);
             handleAppDiedLocked(app, true, true);
+            checkTime(startTime, "startProcess: done killing old proc");
         }
 
         String hostingNameStr = hostingName != null
@@ -2965,6 +2981,7 @@
         }
 
         if (app == null) {
+            checkTime(startTime, "startProcess: creating new process record");
             app = newProcessRecordLocked(info, processName, isolated, isolatedUid);
             app.crashHandler = crashHandler;
             if (app == null) {
@@ -2976,9 +2993,11 @@
             if (isolated) {
                 mIsolatedProcesses.put(app.uid, app);
             }
+            checkTime(startTime, "startProcess: done creating new process record");
         } else {
             // If this is a new package in the process, add the package to the list
             app.addPackage(info.packageName, info.versionCode, mProcessStats);
+            checkTime(startTime, "startProcess: added package to existing proc");
         }
 
         // If the system is not ready yet, then hold off on starting this
@@ -2990,11 +3009,14 @@
                 mProcessesOnHold.add(app);
             }
             if (DEBUG_PROCESSES) Slog.v(TAG, "System not ready, putting on hold: " + app);
+            checkTime(startTime, "startProcess: returning with proc on hold");
             return app;
         }
 
+        checkTime(startTime, "startProcess: stepping in to startProcess");
         startProcessLocked(
                 app, hostingType, hostingNameStr, abiOverride, entryPoint, entryPointArgs);
+        checkTime(startTime, "startProcess: done starting proc!");
         return (app.pid != 0) ? app : null;
     }
 
@@ -3010,11 +3032,14 @@
 
     private final void startProcessLocked(ProcessRecord app, String hostingType,
             String hostingNameStr, String abiOverride, String entryPoint, String[] entryPointArgs) {
+        long startTime = SystemClock.elapsedRealtime();
         if (app.pid > 0 && app.pid != MY_PID) {
+            checkTime(startTime, "startProcess: removing from pids map");
             synchronized (mPidsSelfLocked) {
                 mPidsSelfLocked.remove(app.pid);
                 mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
             }
+            checkTime(startTime, "startProcess: done removing from pids map");
             app.setPid(0);
         }
 
@@ -3022,7 +3047,9 @@
                 "startProcessLocked removing on hold: " + app);
         mProcessesOnHold.remove(app);
 
+        checkTime(startTime, "startProcess: starting to update cpu stats");
         updateCpuStats();
+        checkTime(startTime, "startProcess: done updating cpu stats");
 
         try {
             int uid = app.uid;
@@ -3032,10 +3059,12 @@
             if (!app.isolated) {
                 int[] permGids = null;
                 try {
+                    checkTime(startTime, "startProcess: getting gids from package manager");
                     final PackageManager pm = mContext.getPackageManager();
                     permGids = pm.getPackageGids(app.info.packageName);
 
                     if (Environment.isExternalStorageEmulated()) {
+                        checkTime(startTime, "startProcess: checking external storage perm");
                         if (pm.checkPermission(
                                 android.Manifest.permission.ACCESS_ALL_EXTERNAL_STORAGE,
                                 app.info.packageName) == PERMISSION_GRANTED) {
@@ -3061,6 +3090,7 @@
                 gids[0] = UserHandle.getSharedAppGid(UserHandle.getAppId(uid));
                 gids[1] = UserHandle.getUserGid(UserHandle.getUserId(uid));
             }
+            checkTime(startTime, "startProcess: building args");
             if (mFactoryTest != FactoryTest.FACTORY_TEST_OFF) {
                 if (mFactoryTest == FactoryTest.FACTORY_TEST_LOW_LEVEL
                         && mTopComponent != null
@@ -3100,18 +3130,27 @@
                 requiredAbi = Build.SUPPORTED_ABIS[0];
             }
 
+            String instructionSet = null;
+            if (app.info.primaryCpuAbi != null) {
+                instructionSet = VMRuntime.getInstructionSet(app.info.primaryCpuAbi);
+            }
+
             // Start the process.  It will either succeed and return a result containing
             // the PID of the new process, or else throw a RuntimeException.
             boolean isActivityProcess = (entryPoint == null);
             if (entryPoint == null) entryPoint = "android.app.ActivityThread";
+            checkTime(startTime, "startProcess: asking zygote to start proc");
             Process.ProcessStartResult startResult = Process.start(entryPoint,
                     app.processName, uid, uid, gids, debugFlags, mountExternal,
-                    app.info.targetSdkVersion, app.info.seinfo, requiredAbi, entryPointArgs);
+                    app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet,
+                    entryPointArgs);
+            checkTime(startTime, "startProcess: returned from zygote!");
 
             if (app.isolated) {
                 mBatteryStatsService.addIsolatedUid(app.uid, app.info.uid);
             }
             mBatteryStatsService.noteProcessStart(app.processName, app.info.uid);
+            checkTime(startTime, "startProcess: done updating battery stats");
 
             EventLog.writeEvent(EventLogTags.AM_PROC_START,
                     UserHandle.getUserId(uid), startResult.pid, uid,
@@ -3122,6 +3161,7 @@
                 Watchdog.getInstance().processStarted(app.processName, startResult.pid);
             }
 
+            checkTime(startTime, "startProcess: building log message");
             StringBuilder buf = mStringBuilder;
             buf.setLength(0);
             buf.append("Start proc ");
@@ -3159,6 +3199,7 @@
             app.usingWrapper = startResult.usingWrapper;
             app.removed = false;
             app.killedByAm = false;
+            checkTime(startTime, "startProcess: starting to update pids map");
             synchronized (mPidsSelfLocked) {
                 this.mPidsSelfLocked.put(startResult.pid, app);
                 if (isActivityProcess) {
@@ -3168,6 +3209,7 @@
                             ? PROC_START_TIMEOUT_WITH_WRAPPER : PROC_START_TIMEOUT);
                 }
             }
+            checkTime(startTime, "startProcess: done updating pids map");
         } catch (RuntimeException e) {
             // XXX do better error recovery.
             app.setPid(0);
@@ -3185,7 +3227,6 @@
         if (resumed) {
             if (mUsageStatsService != null) {
                 mUsageStatsService.reportEvent(component.realActivity, component.userId,
-                        System.currentTimeMillis(),
                         UsageEvents.Event.MOVE_TO_FOREGROUND);
             }
             synchronized (stats) {
@@ -3194,7 +3235,6 @@
         } else {
             if (mUsageStatsService != null) {
                 mUsageStatsService.reportEvent(component.realActivity, component.userId,
-                        System.currentTimeMillis(),
                         UsageEvents.Event.MOVE_TO_BACKGROUND);
             }
             synchronized (stats) {
@@ -5039,7 +5079,7 @@
         String cpuInfo = null;
         if (MONITOR_CPU_USAGE) {
             updateCpuStatsNow();
-            synchronized (mProcessCpuThread) {
+            synchronized (mProcessCpuTracker) {
                 cpuInfo = mProcessCpuTracker.printCurrentState(anrTime);
             }
             info.append(processCpuTracker.printCurrentLoad());
@@ -6160,6 +6200,14 @@
     }
 
     final void finishBooting() {
+        synchronized (this) {
+            if (!mBootAnimationComplete) {
+                mCallFinishBooting = true;
+                return;
+            }
+            mCallFinishBooting = false;
+        }
+
         // Register receivers to handle package update events
         mPackageMonitor.register(mContext, Looper.getMainLooper(), false);
 
@@ -6218,6 +6266,18 @@
         }
     }
 
+    @Override
+    public void bootAnimationComplete() {
+        final boolean callFinishBooting;
+        synchronized (this) {
+            callFinishBooting = mCallFinishBooting;
+            mBootAnimationComplete = true;
+        }
+        if (callFinishBooting) {
+            finishBooting();
+        }
+    }
+
     final void ensureBootCompleted() {
         boolean booting;
         boolean enableScreen;
@@ -6250,12 +6310,12 @@
     }
 
     @Override
-    public final void activityPaused(IBinder token, PersistableBundle persistentState) {
+    public final void activityPaused(IBinder token) {
         final long origId = Binder.clearCallingIdentity();
         synchronized(this) {
             ActivityStack stack = ActivityRecord.getStackLocked(token);
             if (stack != null) {
-                stack.activityPausedLocked(token, false, persistentState);
+                stack.activityPausedLocked(token, false);
             }
         }
         Binder.restoreCallingIdentity(origId);
@@ -7411,12 +7471,33 @@
 
         // Does the caller have this permission on the URI?
         if (!checkHoldingPermissionsLocked(pm, pi, grantUri, callingUid, modeFlags)) {
-            // Right now, if you are not the original owner of the permission,
-            // you are not allowed to revoke it.
-            //if (!checkUriPermissionLocked(uri, callingUid, modeFlags)) {
-                throw new SecurityException("Uid " + callingUid
-                        + " does not have permission to uri " + grantUri);
-            //}
+            // Have they don't have direct access to the URI, then revoke any URI
+            // permissions that have been granted to them.
+            final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(callingUid);
+            if (perms != null) {
+                boolean persistChanged = false;
+                for (Iterator<UriPermission> it = perms.values().iterator(); it.hasNext();) {
+                    final UriPermission perm = it.next();
+                    if (perm.uri.sourceUserId == grantUri.sourceUserId
+                            && perm.uri.uri.isPathPrefixMatch(grantUri.uri)) {
+                        if (DEBUG_URI_PERMISSION)
+                            Slog.v(TAG,
+                                    "Revoking " + perm.targetUid + " permission to " + perm.uri);
+                        persistChanged |= perm.revokeModes(
+                                modeFlags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
+                        if (perm.modeFlags == 0) {
+                            it.remove();
+                        }
+                    }
+                }
+                if (perms.isEmpty()) {
+                    mGrantedUriPermissions.remove(callingUid);
+                }
+                if (persistChanged) {
+                    schedulePersistUriGrants();
+                }
+            }
+            return;
         }
 
         boolean persistChanged = false;
@@ -8378,6 +8459,10 @@
         synchronized(this) {
             TaskRecord tr = recentTaskForIdLocked(taskId);
             if (tr != null) {
+                if (tr == mStackSupervisor.mLockTaskModeTask) {
+                    mStackSupervisor.showLockTaskToast();
+                    return;
+                }
                 if (DEBUG_STACK) Slog.d(TAG, "moveTaskToBack: moving task=" + tr);
                 ActivityStack stack = tr.stack;
                 if (stack.mResumedActivity != null && stack.mResumedActivity.task == tr) {
@@ -8410,11 +8495,19 @@
         enforceNotIsolatedCaller("moveActivityTaskToBack");
         synchronized(this) {
             final long origId = Binder.clearCallingIdentity();
-            int taskId = ActivityRecord.getTaskForActivityLocked(token, !nonRoot);
-            if (taskId >= 0) {
-                return ActivityRecord.getStackLocked(token).moveTaskToBackLocked(taskId, null);
+            try {
+                int taskId = ActivityRecord.getTaskForActivityLocked(token, !nonRoot);
+                if (taskId >= 0) {
+                    if ((mStackSupervisor.mLockTaskModeTask != null)
+                            && (mStackSupervisor.mLockTaskModeTask.taskId == taskId)) {
+                        mStackSupervisor.showLockTaskToast();
+                        return false;
+                    }
+                    return ActivityRecord.getStackLocked(token).moveTaskToBackLocked(taskId, null);
+                }
+            } finally {
+                Binder.restoreCallingIdentity(origId);
             }
-            Binder.restoreCallingIdentity(origId);
         }
         return false;
     }
@@ -8655,7 +8748,8 @@
 
     @Override
     public void startLockTaskModeOnCurrent() throws RemoteException {
-        checkCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS);
+        enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
+                "startLockTaskModeOnCurrent");
         ActivityRecord r = null;
         synchronized (this) {
             r = mStackSupervisor.topRunningActivityLocked();
@@ -8697,7 +8791,8 @@
 
     @Override
     public void stopLockTaskModeOnCurrent() throws RemoteException {
-        checkCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS);
+        enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
+                "stopLockTaskModeOnCurrent");
         long ident = Binder.clearCallingIdentity();
         try {
             stopLockTaskMode();
@@ -9903,7 +9998,7 @@
     }
 
     private void updateEventDispatchingLocked() {
-        mWindowManager.setEventDispatching(mBooted && !mWentToSleep && !mShuttingDown);
+        mWindowManager.setEventDispatching(mBooted && !mShuttingDown);
     }
 
     public void setLockScreenShown(boolean shown) {
@@ -10272,13 +10367,13 @@
                 if (r == null) {
                     return false;
                 }
-                if (r.changeWindowTranslucency(true)) {
-                    mWindowManager.setAppFullscreen(token, true);
+                final boolean translucentChanged = r.changeWindowTranslucency(true);
+                if (translucentChanged) {
                     r.task.stack.releaseBackgroundResources();
                     mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
-                    return true;
                 }
-                return false;
+                mWindowManager.setAppFullscreen(token, true);
+                return translucentChanged;
             }
         } finally {
             Binder.restoreCallingIdentity(origId);
@@ -10299,15 +10394,13 @@
                     ActivityRecord under = r.task.mActivities.get(index - 1);
                     under.returningOptions = options;
                 }
-                if (r.changeWindowTranslucency(false)) {
+                final boolean translucentChanged = r.changeWindowTranslucency(false);
+                if (translucentChanged) {
                     r.task.stack.convertToTranslucent(r);
-                    mWindowManager.setAppFullscreen(token, false);
-                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
-                    return true;
-                } else {
-                    mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
-                    return false;
                 }
+                mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
+                mWindowManager.setAppFullscreen(token, false);
+                return translucentChanged;
             }
         } finally {
             Binder.restoreCallingIdentity(origId);
@@ -13653,7 +13746,7 @@
                     findPid = Integer.parseInt(args[opti]);
                 } catch (NumberFormatException e) {
                 }
-                synchronized (mProcessCpuThread) {
+                synchronized (mProcessCpuTracker) {
                     final int N = mProcessCpuTracker.countStats();
                     for (int i=0; i<N; i++) {
                         ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -13815,7 +13908,7 @@
             // If we are showing aggregations, also look for native processes to
             // include so that our aggregations are more accurate.
             updateCpuStatsNow();
-            synchronized (mProcessCpuThread) {
+            synchronized (mProcessCpuTracker) {
                 final int N = mProcessCpuTracker.countStats();
                 for (int i=0; i<N; i++) {
                     ProcessCpuTracker.Stats st = mProcessCpuTracker.getStats(i);
@@ -15894,6 +15987,7 @@
                 newConfig.seq = mConfigurationSeq;
                 mConfiguration = newConfig;
                 Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + newConfig);
+                mUsageStatsService.reportConfigurationChange(newConfig, mCurrentUserId);
                 //mUsageStatsService.noteStartConfig(newConfig);
 
                 final Configuration configCopy = new Configuration(mConfiguration);
@@ -17937,6 +18031,7 @@
                 return false;
             }
             userName = userInfo.name;
+            mTargetUserId = userId;
         }
         mHandler.removeMessages(START_USER_SWITCH_MSG);
         mHandler.sendMessage(mHandler.obtainMessage(START_USER_SWITCH_MSG, userId, 0, userName));
@@ -18004,6 +18099,7 @@
 
                 if (foreground) {
                     mCurrentUserId = userId;
+                    mTargetUserId = UserHandle.USER_NULL; // reset, mCurrentUserId has caught up
                     updateCurrentProfileIdsLocked();
                     mWindowManager.setCurrentUser(userId, mCurrentProfileIds);
                     // Once the internal notion of the active user has switched, we lock the device
@@ -18371,7 +18467,7 @@
 
     private int stopUserLocked(final int userId, final IStopUserCallback callback) {
         if (DEBUG_MU) Slog.i(TAG_MU, "stopUserLocked userId=" + userId);
-        if (mCurrentUserId == userId) {
+        if (mCurrentUserId == userId && mTargetUserId == UserHandle.USER_NULL) {
             return ActivityManager.USER_OP_IS_CURRENT;
         }
 
@@ -18511,12 +18607,13 @@
             throw new SecurityException(msg);
         }
         synchronized (this) {
-            return getUserManagerLocked().getUserInfo(mCurrentUserId);
+            int userId = mTargetUserId != UserHandle.USER_NULL ? mTargetUserId : mCurrentUserId;
+            return getUserManagerLocked().getUserInfo(userId);
         }
     }
 
     int getCurrentUserIdLocked() {
-        return mCurrentUserId;
+        return mTargetUserId != UserHandle.USER_NULL ? mTargetUserId : mCurrentUserId;
     }
 
     @Override
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 77b4cc9..e043f03 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -698,12 +698,12 @@
                 case ActivityOptions.ANIM_SCALE_UP:
                     service.mWindowManager.overridePendingAppTransitionScaleUp(
                             pendingOptions.getStartX(), pendingOptions.getStartY(),
-                            pendingOptions.getStartWidth(), pendingOptions.getStartHeight());
+                            pendingOptions.getWidth(), pendingOptions.getHeight());
                     if (intent.getSourceBounds() == null) {
                         intent.setSourceBounds(new Rect(pendingOptions.getStartX(),
                                 pendingOptions.getStartY(),
-                                pendingOptions.getStartX()+pendingOptions.getStartWidth(),
-                                pendingOptions.getStartY()+pendingOptions.getStartHeight()));
+                                pendingOptions.getStartX()+pendingOptions.getWidth(),
+                                pendingOptions.getStartY()+pendingOptions.getHeight()));
                     }
                     break;
                 case ActivityOptions.ANIM_THUMBNAIL_SCALE_UP:
@@ -728,15 +728,14 @@
                     service.mWindowManager.overridePendingAppTransitionAspectScaledThumb(
                             pendingOptions.getThumbnail(),
                             pendingOptions.getStartX(), pendingOptions.getStartY(),
+                            pendingOptions.getWidth(), pendingOptions.getHeight(),
                             pendingOptions.getOnAnimationStartListener(),
                             (animationType == ActivityOptions.ANIM_THUMBNAIL_ASPECT_SCALE_UP));
                     if (intent.getSourceBounds() == null) {
                         intent.setSourceBounds(new Rect(pendingOptions.getStartX(),
                                 pendingOptions.getStartY(),
-                                pendingOptions.getStartX()
-                                        + pendingOptions.getThumbnail().getWidth(),
-                                pendingOptions.getStartY()
-                                        + pendingOptions.getThumbnail().getHeight()));
+                                pendingOptions.getStartX() + pendingOptions.getWidth(),
+                                pendingOptions.getStartY() + pendingOptions.getHeight()));
                     }
                     break;
                 default:
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index 3efd049..d71f94e 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -241,6 +241,9 @@
     /** Run all ActivityStacks through this */
     final ActivityStackSupervisor mStackSupervisor;
 
+    /** Used to keep resumeTopActivityLocked() from being entered recursively */
+    private boolean inResumeTopActivity;
+
     static final int PAUSE_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 1;
     static final int DESTROY_TIMEOUT_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 2;
     static final int LAUNCH_TICK_MSG = ActivityManagerService.FIRST_ACTIVITY_STACK_MSG + 3;
@@ -281,7 +284,7 @@
                         if (r.app != null) {
                             mService.logAppTooSlow(r.app, r.pauseTime, "pausing " + r);
                         }
-                        activityPausedLocked(r.appToken, true, r.persistentState);
+                        activityPausedLocked(r.appToken, true);
                     }
                 } break;
                 case LAUNCH_TICK_MSG: {
@@ -422,13 +425,13 @@
     }
 
     final ActivityRecord topActivity() {
-        // Iterate to find the first non-empty task stack. Note that this code can
-        // be simplified once we stop storing tasks with empty mActivities lists.
         for (int taskNdx = mTaskHistory.size() - 1; taskNdx >= 0; --taskNdx) {
             ArrayList<ActivityRecord> activities = mTaskHistory.get(taskNdx).mActivities;
-            final int topActivityNdx = activities.size() - 1;
-            if (topActivityNdx >= 0) {
-                return activities.get(topActivityNdx);
+            for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
+                final ActivityRecord r = activities.get(activityNdx);
+                if (!r.finishing) {
+                    return r;
+                }
             }
         }
         return null;
@@ -456,7 +459,7 @@
         final ActivityRecord r = ActivityRecord.forToken(token);
         if (r != null) {
             final TaskRecord task = r.task;
-            if (task.mActivities.contains(r) && mTaskHistory.contains(task)) {
+            if (task != null && task.mActivities.contains(r) && mTaskHistory.contains(task)) {
                 if (task.stack != this) Slog.w(TAG,
                     "Illegal state! task does not point to stack it is in.");
                 return r;
@@ -709,7 +712,7 @@
             // Still have something resumed; can't sleep until it is paused.
             if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause " + mResumedActivity);
             if (DEBUG_USER_LEAVING) Slog.v(TAG, "Sleep => pause with userLeaving=false");
-            startPausingLocked(false, true);
+            startPausingLocked(false, true, false, false);
             return true;
         }
         if (mPausingActivity != null) {
@@ -787,22 +790,38 @@
         return null;
     }
 
-    final void startPausingLocked(boolean userLeaving, boolean uiSleeping) {
+    /**
+     * Start pausing the currently resumed activity.  It is an error to call this if there
+     * is already an activity being paused or there is no resumed activity.
+     *
+     * @param userLeaving True if this should result in an onUserLeaving to the current activity.
+     * @param uiSleeping True if this is happening with the user interface going to sleep (the
+     * screen turning off).
+     * @param resuming True if this is being called as part of resuming the top activity, so
+     * we shouldn't try to instigate a resume here.
+     * @param dontWait True if the caller does not want to wait for the pause to complete.  If
+     * set to true, we will immediately complete the pause here before returning.
+     * @return Returns true if an activity now is in the PAUSING state, and we are waiting for
+     * it to tell us when it is done.
+     */
+    final boolean startPausingLocked(boolean userLeaving, boolean uiSleeping, boolean resuming,
+            boolean dontWait) {
         if (mPausingActivity != null) {
-            Slog.e(TAG, "Trying to pause when pause is already pending for "
-                  + mPausingActivity, new RuntimeException("here").fillInStackTrace());
+            Slog.wtf(TAG, "Going to pause when pause is already pending for " + mPausingActivity);
+            completePauseLocked(false);
         }
         ActivityRecord prev = mResumedActivity;
         if (prev == null) {
-            Slog.e(TAG, "Trying to pause when nothing is resumed",
-                    new RuntimeException("here").fillInStackTrace());
-            mStackSupervisor.resumeTopActivitiesLocked();
-            return;
+            if (!resuming) {
+                Slog.wtf(TAG, "Trying to pause when nothing is resumed");
+                mStackSupervisor.resumeTopActivitiesLocked();
+            }
+            return false;
         }
 
         if (mActivityContainer.mParentActivity == null) {
             // Top level stack, not a child. Look for child stacks.
-            mStackSupervisor.pauseChildStacks(prev, userLeaving, uiSleeping);
+            mStackSupervisor.pauseChildStacks(prev, userLeaving, uiSleeping, resuming, dontWait);
         }
 
         if (DEBUG_STATES) Slog.v(TAG, "Moving to PAUSING: " + prev);
@@ -831,7 +850,7 @@
                         prev.shortComponentName);
                 mService.updateUsageStats(prev, false);
                 prev.app.thread.schedulePauseActivity(prev.appToken, prev.finishing,
-                        userLeaving, prev.configChangeFlags);
+                        userLeaving, prev.configChangeFlags, dontWait);
             } catch (Exception e) {
                 // Ignore exception, if process died other code will cleanup.
                 Slog.w(TAG, "Exception thrown during pause", e);
@@ -862,39 +881,46 @@
                 if (DEBUG_PAUSE) Slog.v(TAG, "Key dispatch not paused for screen off");
             }
 
-            // Schedule a pause timeout in case the app doesn't respond.
-            // We don't give it much time because this directly impacts the
-            // responsiveness seen by the user.
-            Message msg = mHandler.obtainMessage(PAUSE_TIMEOUT_MSG);
-            msg.obj = prev;
-            prev.pauseTime = SystemClock.uptimeMillis();
-            mHandler.sendMessageDelayed(msg, PAUSE_TIMEOUT);
-            if (DEBUG_PAUSE) Slog.v(TAG, "Waiting for pause to complete...");
+            if (dontWait) {
+                // If the caller said they don't want to wait for the pause, then complete
+                // the pause now.
+                completePauseLocked(false);
+                return false;
+
+            } else {
+                // Schedule a pause timeout in case the app doesn't respond.
+                // We don't give it much time because this directly impacts the
+                // responsiveness seen by the user.
+                Message msg = mHandler.obtainMessage(PAUSE_TIMEOUT_MSG);
+                msg.obj = prev;
+                prev.pauseTime = SystemClock.uptimeMillis();
+                mHandler.sendMessageDelayed(msg, PAUSE_TIMEOUT);
+                if (DEBUG_PAUSE) Slog.v(TAG, "Waiting for pause to complete...");
+                return true;
+            }
+
         } else {
             // This activity failed to schedule the
             // pause, so just treat it as being paused now.
             if (DEBUG_PAUSE) Slog.v(TAG, "Activity not running, resuming next.");
-            mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
+            if (!resuming) {
+                mStackSupervisor.getFocusedStack().resumeTopActivityLocked(null);
+            }
+            return false;
         }
     }
 
-    final void activityPausedLocked(IBinder token, boolean timeout,
-            PersistableBundle persistentState) {
+    final void activityPausedLocked(IBinder token, boolean timeout) {
         if (DEBUG_PAUSE) Slog.v(
             TAG, "Activity paused: token=" + token + ", timeout=" + timeout);
 
         final ActivityRecord r = isInStackLocked(token);
         if (r != null) {
             mHandler.removeMessages(PAUSE_TIMEOUT_MSG, r);
-            if (persistentState != null) {
-                r.persistentState = persistentState;
-                mService.notifyTaskPersisterLocked(r.task, false);
-            }
             if (mPausingActivity == r) {
                 if (DEBUG_STATES) Slog.v(TAG, "Moving to PAUSED: " + r
                         + (timeout ? " (due to timeout)" : " (pause complete)"));
-                r.state = ActivityState.PAUSED;
-                completePauseLocked();
+                completePauseLocked(true);
             } else {
                 EventLog.writeEvent(EventLogTags.AM_FAILED_TO_PAUSE,
                         r.userId, System.identityHashCode(r), r.shortComponentName,
@@ -945,11 +971,12 @@
         }
     }
 
-    private void completePauseLocked() {
+    private void completePauseLocked(boolean resumeNext) {
         ActivityRecord prev = mPausingActivity;
         if (DEBUG_PAUSE) Slog.v(TAG, "Complete pause: " + prev);
 
         if (prev != null) {
+            prev.state = ActivityState.PAUSED;
             if (prev.finishing) {
                 if (DEBUG_PAUSE) Slog.v(TAG, "Executing finish of activity: " + prev);
                 prev = finishCurrentActivityLocked(prev, FINISH_AFTER_VISIBLE, false);
@@ -992,19 +1019,21 @@
             mPausingActivity = null;
         }
 
-        final ActivityStack topStack = mStackSupervisor.getFocusedStack();
-        if (!mService.isSleepingOrShuttingDown()) {
-            mStackSupervisor.resumeTopActivitiesLocked(topStack, prev, null);
-        } else {
-            mStackSupervisor.checkReadyForSleepLocked();
-            ActivityRecord top = topStack.topRunningActivityLocked(null);
-            if (top == null || (prev != null && top != prev)) {
-                // If there are no more activities available to run,
-                // do resume anyway to start something.  Also if the top
-                // activity on the stack is not the just paused activity,
-                // we need to go ahead and resume it to ensure we complete
-                // an in-flight app switch.
-                mStackSupervisor.resumeTopActivitiesLocked(topStack, null, null);
+        if (resumeNext) {
+            final ActivityStack topStack = mStackSupervisor.getFocusedStack();
+            if (!mService.isSleepingOrShuttingDown()) {
+                mStackSupervisor.resumeTopActivitiesLocked(topStack, prev, null);
+            } else {
+                mStackSupervisor.checkReadyForSleepLocked();
+                ActivityRecord top = topStack.topRunningActivityLocked(null);
+                if (top == null || (prev != null && top != prev)) {
+                    // If there are no more activities available to run,
+                    // do resume anyway to start something.  Also if the top
+                    // activity on the stack is not the just paused activity,
+                    // we need to go ahead and resume it to ensure we complete
+                    // an in-flight app switch.
+                    mStackSupervisor.resumeTopActivitiesLocked(topStack, null, null);
+                }
             }
         }
 
@@ -1013,11 +1042,8 @@
 
             if (prev.app != null && prev.cpuTimeAtResume > 0
                     && mService.mBatteryStatsService.isOnBattery()) {
-                long diff;
-                synchronized (mService.mProcessCpuThread) {
-                    diff = mService.mProcessCpuTracker.getCpuTimeForPid(prev.app.pid)
-                            - prev.cpuTimeAtResume;
-                }
+                long diff = mService.mProcessCpuTracker.getCpuTimeForPid(prev.app.pid)
+                        - prev.cpuTimeAtResume;
                 if (diff > 0) {
                     BatteryStatsImpl bsi = mService.mBatteryStatsService.getActiveStatistics();
                     synchronized (bsi) {
@@ -1068,9 +1094,7 @@
         // TODO: To be more accurate, the mark should be before the onCreate,
         //       not after the onResume. But for subsequent starts, onResume is fine.
         if (next.app != null) {
-            synchronized (mService.mProcessCpuThread) {
-                next.cpuTimeAtResume = mService.mProcessCpuTracker.getCpuTimeForPid(next.app.pid);
-            }
+            next.cpuTimeAtResume = mService.mProcessCpuTracker.getCpuTimeForPid(next.app.pid);
         } else {
             next.cpuTimeAtResume = 0; // Couldn't get the cpu time of process
         }
@@ -1439,6 +1463,23 @@
     }
 
     final boolean resumeTopActivityLocked(ActivityRecord prev, Bundle options) {
+        if (inResumeTopActivity) {
+            // Don't even start recursing.
+            return false;
+        }
+
+        boolean result = false;
+        try {
+            // Protect against recursion.
+            inResumeTopActivity = true;
+            result = resumeTopActivityInnerLocked(prev, options);
+        } finally {
+            inResumeTopActivity = false;
+        }
+        return result;
+    }
+
+    final boolean resumeTopActivityInnerLocked(ActivityRecord prev, Bundle options) {
         if (ActivityManagerService.DEBUG_LOCKSCREEN) mService.logLockScreen("");
 
         ActivityRecord parent = mActivityContainer.mParentActivity;
@@ -1587,10 +1628,10 @@
 
         // We need to start pausing the current activity so the top one
         // can be resumed...
-        boolean pausing = mStackSupervisor.pauseBackStacks(userLeaving);
+        boolean dontWaitForPause = (next.info.flags&ActivityInfo.FLAG_RESUME_WHILE_PAUSING) != 0;
+        boolean pausing = mStackSupervisor.pauseBackStacks(userLeaving, true, dontWaitForPause);
         if (mResumedActivity != null) {
-            pausing = true;
-            startPausingLocked(userLeaving, false);
+            pausing |= startPausingLocked(userLeaving, false, true, dontWaitForPause);
             if (DEBUG_STATES) Slog.d(TAG, "resumeTopActivityLocked: Pausing " + mResumedActivity);
         }
         if (pausing) {
@@ -2700,7 +2741,7 @@
             if (mPausingActivity == null) {
                 if (DEBUG_PAUSE) Slog.v(TAG, "Finish needs to pause: " + r);
                 if (DEBUG_USER_LEAVING) Slog.v(TAG, "finish() => pause with userLeaving=false");
-                startPausingLocked(false, false);
+                startPausingLocked(false, false, false, false);
             }
 
             if (endTask) {
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 6545134..b8261a4 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -592,7 +592,7 @@
      * @param userLeaving Passed to pauseActivity() to indicate whether to call onUserLeaving().
      * @return true if any activity was paused as a result of this call.
      */
-    boolean pauseBackStacks(boolean userLeaving) {
+    boolean pauseBackStacks(boolean userLeaving, boolean resuming, boolean dontWait) {
         boolean someActivityPaused = false;
         for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
             ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
@@ -601,8 +601,8 @@
                 if (!isFrontStack(stack) && stack.mResumedActivity != null) {
                     if (DEBUG_STATES) Slog.d(TAG, "pauseBackStacks: stack=" + stack +
                             " mResumedActivity=" + stack.mResumedActivity);
-                    stack.startPausingLocked(userLeaving, false);
-                    someActivityPaused = true;
+                    someActivityPaused |= stack.startPausingLocked(userLeaving, false, resuming,
+                            dontWait);
                 }
             }
         }
@@ -631,7 +631,8 @@
         return pausing;
     }
 
-    void pauseChildStacks(ActivityRecord parent, boolean userLeaving, boolean uiSleeping) {
+    void pauseChildStacks(ActivityRecord parent, boolean userLeaving, boolean uiSleeping,
+            boolean resuming, boolean dontWait) {
         // TODO: Put all stacks in supervisor and iterate through them instead.
         for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
             ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
@@ -639,7 +640,7 @@
                 final ActivityStack stack = stacks.get(stackNdx);
                 if (stack.mResumedActivity != null &&
                         stack.mActivityContainer.mParentActivity == parent) {
-                    stack.startPausingLocked(userLeaving, uiSleeping);
+                    stack.startPausingLocked(userLeaving, uiSleeping, resuming, dontWait);
                 }
             }
         }
@@ -1262,7 +1263,7 @@
         if (err == ActivityManager.START_SUCCESS) {
             final int userId = aInfo != null ? UserHandle.getUserId(aInfo.applicationInfo.uid) : 0;
             Slog.i(TAG, "START u" + userId + " {" + intent.toShortString(true, true, true, false)
-                    + "} from pid " + (callerApp != null ? callerApp.pid : callingPid)
+                    + "} from uid " + callingUid
                     + " on display " + (container == null ? (mFocusedStack == null ?
                             Display.DEFAULT_DISPLAY : mFocusedStack.mDisplayId) :
                             (container.mActivityDisplay == null ? Display.DEFAULT_DISPLAY :
@@ -1640,57 +1641,8 @@
             }
         }
 
-        if (sourceRecord == null) {
-            // This activity is not being started from another...  in this
-            // case we -always- start a new task.
-            if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0 && inTask == null) {
-                Slog.w(TAG, "startActivity called from non-Activity context; forcing " +
-                        "Intent.FLAG_ACTIVITY_NEW_TASK for: " + intent);
-                launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-            }
-        } else if (sourceRecord.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
-            // The original activity who is starting us is running as a single
-            // instance...  this new activity it is starting must go on its
-            // own task.
-            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-        } else if (launchSingleInstance || launchSingleTask) {
-            // The activity being started is a single instance...  it always
-            // gets launched into its own task.
-            launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-        }
-
-        ActivityInfo newTaskInfo = null;
-        Intent newTaskIntent = null;
-        ActivityStack sourceStack;
-        if (sourceRecord != null) {
-            if (sourceRecord.finishing) {
-                // If the source is finishing, we can't further count it as our source.  This
-                // is because the task it is associated with may now be empty and on its way out,
-                // so we don't want to blindly throw it in to that task.  Instead we will take
-                // the NEW_TASK flow and try to find a task for it. But save the task information
-                // so it can be used when creating the new task.
-                if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
-                    Slog.w(TAG, "startActivity called from finishing " + sourceRecord
-                            + "; forcing " + "Intent.FLAG_ACTIVITY_NEW_TASK for: " + intent);
-                    launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
-                    newTaskInfo = sourceRecord.info;
-                    newTaskIntent = sourceRecord.task.intent;
-                }
-                sourceRecord = null;
-                sourceStack = null;
-            } else {
-                sourceStack = sourceRecord.task.stack;
-            }
-        } else {
-            sourceStack = null;
-        }
-
         boolean addingToTask = false;
-        boolean movedHome = false;
         TaskRecord reuseTask = null;
-        ActivityStack targetStack;
-
-        intent.setFlags(launchFlags);
 
         // If the caller is not coming from another activity, but has given us an
         // explicit task into which they would like us to launch the new activity,
@@ -1729,20 +1681,75 @@
                         | (baseIntent.getFlags()&flagsOfInterest);
                 intent.setFlags(launchFlags);
                 inTask.setIntent(r);
+                addingToTask = true;
 
-            // If the task is not empty, then we are going to add the new activity on top
-            // of the task, so it can not be launching as a new task.
+            // If the task is not empty and the caller is asking to start it as the root
+            // of a new task, then we don't actually want to start this on the task.  We
+            // will bring the task to the front, and possibly give it a new intent.
             } else if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
-                ActivityOptions.abort(options);
-                throw new IllegalStateException("Caller has inTask " + inTask
-                        + " but target is a new task");
+                addingToTask = false;
+
+            } else {
+                addingToTask = true;
             }
+
             reuseTask = inTask;
-            addingToTask = true;
         } else {
             inTask = null;
         }
 
+        if (inTask == null) {
+            if (sourceRecord == null) {
+                // This activity is not being started from another...  in this
+                // case we -always- start a new task.
+                if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0 && inTask == null) {
+                    Slog.w(TAG, "startActivity called from non-Activity context; forcing " +
+                            "Intent.FLAG_ACTIVITY_NEW_TASK for: " + intent);
+                    launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+                }
+            } else if (sourceRecord.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
+                // The original activity who is starting us is running as a single
+                // instance...  this new activity it is starting must go on its
+                // own task.
+                launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+            } else if (launchSingleInstance || launchSingleTask) {
+                // The activity being started is a single instance...  it always
+                // gets launched into its own task.
+                launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+            }
+        }
+
+        ActivityInfo newTaskInfo = null;
+        Intent newTaskIntent = null;
+        ActivityStack sourceStack;
+        if (sourceRecord != null) {
+            if (sourceRecord.finishing) {
+                // If the source is finishing, we can't further count it as our source.  This
+                // is because the task it is associated with may now be empty and on its way out,
+                // so we don't want to blindly throw it in to that task.  Instead we will take
+                // the NEW_TASK flow and try to find a task for it. But save the task information
+                // so it can be used when creating the new task.
+                if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
+                    Slog.w(TAG, "startActivity called from finishing " + sourceRecord
+                            + "; forcing " + "Intent.FLAG_ACTIVITY_NEW_TASK for: " + intent);
+                    launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
+                    newTaskInfo = sourceRecord.info;
+                    newTaskIntent = sourceRecord.task.intent;
+                }
+                sourceRecord = null;
+                sourceStack = null;
+            } else {
+                sourceStack = sourceRecord.task.stack;
+            }
+        } else {
+            sourceStack = null;
+        }
+
+        boolean movedHome = false;
+        ActivityStack targetStack;
+
+        intent.setFlags(launchFlags);
+
         // We may want to try to place the new activity in to an existing task.  We always
         // do this if the target activity is singleTask or singleInstance; we will also do
         // this if NEW_TASK has been requested, and there is not an additional qualifier telling
@@ -1765,7 +1772,7 @@
                 if (intentActivity != null) {
                     if (isLockTaskModeViolation(intentActivity.task)) {
                         showLockTaskToast();
-                        Slog.e(TAG, "moveTaskToFront: Attempt to violate Lock Task Mode");
+                        Slog.e(TAG, "startActivityUnchecked: Attempt to violate Lock Task Mode");
                         return ActivityManager.START_RETURN_LOCK_TASK_MODE_VIOLATION;
                     }
                     if (r.task == null) {
@@ -1979,7 +1986,7 @@
                 sourceRecord.task : null;
 
         // Should this be considered a new task?
-        if (r.resultTo == null && !addingToTask
+        if (r.resultTo == null && inTask == null && !addingToTask
                 && (launchFlags & Intent.FLAG_ACTIVITY_NEW_TASK) != 0) {
             if (isLockTaskModeViolation(reuseTask)) {
                 Slog.e(TAG, "Attempted Lock Task Mode violation r=" + r);
@@ -2072,6 +2079,7 @@
             }
             targetStack = inTask.stack;
             targetStack.moveTaskToFrontLocked(inTask, r, options);
+            targetStack.moveToFront();
             mWindowManager.moveTaskToTop(inTask.taskId);
 
             // Check whether we should actually launch the new activity in to the task,
@@ -2092,6 +2100,13 @@
                 }
             }
 
+            if (!addingToTask) {
+                // We don't actually want to have this activity added to the task, so just
+                // stop here but still tell the caller that we consumed the intent.
+                ActivityOptions.abort(options);
+                return ActivityManager.START_TASK_TO_FRONT;
+            }
+
             r.setTask(inTask, null);
             if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
                     + " in explicit task " + r.task);
@@ -2768,9 +2783,8 @@
         }
 
         // A non-top activity is reporting a visibility change.
-        if ((visible && (top.fullscreen || top.state != ActivityState.RESUMED)) ||
-                top.app == null || top.app.thread == null) {
-            // Can't carry out this request.
+        if (visible && top.fullscreen) {
+            // Let the caller know that it can't be seen.
             if (DEBUG_VISIBLE_BEHIND) Slog.d(TAG, "requestVisibleBehind: returning top.fullscreen="
                     + top.fullscreen + " top.state=" + top.state + " top.app=" + top.app +
                     " top.app.thread=" + top.app.thread);
@@ -2792,9 +2806,12 @@
                 mService.convertFromTranslucent(next.appToken);
             }
         }
-        try {
-            top.app.thread.scheduleBackgroundVisibleBehindChanged(top.appToken, visible);
-        } catch (RemoteException e) {
+        if (top.app != null && top.app.thread != null) {
+            // Notify the top app of the change.
+            try {
+                top.app.thread.scheduleBackgroundVisibleBehindChanged(top.appToken, visible);
+            } catch (RemoteException e) {
+            }
         }
         return true;
     }
@@ -3829,7 +3846,7 @@
                 mContainerState = CONTAINER_STATE_NO_SURFACE;
                 ((VirtualActivityDisplay) mActivityDisplay).setSurface(null);
                 if (mStack.mPausingActivity == null && mStack.mResumedActivity != null) {
-                    mStack.startPausingLocked(false, true);
+                    mStack.startPausingLocked(false, true, false, false);
                 }
             }
 
diff --git a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
index 5a97aee..bba786d 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -47,6 +47,7 @@
     public final NetworkMonitor networkMonitor;
     public final NetworkMisc networkMisc;
     public boolean created;
+    public boolean validated;
 
     // The list of NetworkRequests being satisfied by this Network.
     public final SparseArray<NetworkRequest> networkRequests = new SparseArray<NetworkRequest>();
@@ -68,6 +69,7 @@
         networkMonitor = new NetworkMonitor(context, handler, this);
         networkMisc = misc;
         created = false;
+        validated = false;
     }
 
     public void addRequest(NetworkRequest networkRequest) {
diff --git a/services/core/java/com/android/server/connectivity/NetworkMonitor.java b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
index cedf573..96872a7 100644
--- a/services/core/java/com/android/server/connectivity/NetworkMonitor.java
+++ b/services/core/java/com/android/server/connectivity/NetworkMonitor.java
@@ -16,6 +16,7 @@
 
 package com.android.server.connectivity;
 
+import android.app.AlarmManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -26,6 +27,7 @@
 import android.net.Network;
 import android.net.NetworkCapabilities;
 import android.net.NetworkInfo;
+import android.net.TrafficStats;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Handler;
@@ -139,34 +141,28 @@
     private static final int CMD_REEVALUATE = BASE + 6;
 
     /**
-     * Message to self indicating network evaluation is complete.
-     * arg1 = Token to ignore old messages.
-     * arg2 = HTTP response code of network evaluation.
-     */
-    private static final int EVENT_REEVALUATION_COMPLETE = BASE + 7;
-
-    /**
      * Inform NetworkMonitor that the network has disconnected.
      */
-    public static final int CMD_NETWORK_DISCONNECTED = BASE + 8;
+    public static final int CMD_NETWORK_DISCONNECTED = BASE + 7;
 
     /**
      * Force evaluation even if it has succeeded in the past.
+     * arg1 = UID responsible for requesting this reeval.  Will be billed for data.
      */
-    public static final int CMD_FORCE_REEVALUATION = BASE + 9;
+    public static final int CMD_FORCE_REEVALUATION = BASE + 8;
 
     /**
      * Message to self indicating captive portal login is complete.
      * arg1 = Token to ignore old messages.
      * arg2 = 1 if we should use this network, 0 otherwise.
      */
-    private static final int CMD_CAPTIVE_PORTAL_LOGGED_IN = BASE + 10;
+    private static final int CMD_CAPTIVE_PORTAL_LOGGED_IN = BASE + 9;
 
     /**
      * Message to self indicating user desires to log into captive portal.
      * arg1 = Token to ignore old messages.
      */
-    private static final int CMD_USER_WANTS_SIGN_IN = BASE + 11;
+    private static final int CMD_USER_WANTS_SIGN_IN = BASE + 10;
 
     /**
      * Request ConnectivityService display provisioning notification.
@@ -174,22 +170,22 @@
      * arg2    = NetID.
      * obj     = Intent to be launched when notification selected by user, null if !arg1.
      */
-    public static final int EVENT_PROVISIONING_NOTIFICATION = BASE + 12;
+    public static final int EVENT_PROVISIONING_NOTIFICATION = BASE + 11;
 
     /**
      * Message to self indicating sign-in app bypassed captive portal.
      */
-    private static final int EVENT_APP_BYPASSED_CAPTIVE_PORTAL = BASE + 13;
+    private static final int EVENT_APP_BYPASSED_CAPTIVE_PORTAL = BASE + 12;
 
     /**
      * Message to self indicating no sign-in app responded.
      */
-    private static final int EVENT_NO_APP_RESPONSE = BASE + 14;
+    private static final int EVENT_NO_APP_RESPONSE = BASE + 13;
 
     /**
      * Message to self indicating sign-in app indicates sign-in is not possible.
      */
-    private static final int EVENT_APP_INDICATES_SIGN_IN_IMPOSSIBLE = BASE + 15;
+    private static final int EVENT_APP_INDICATES_SIGN_IN_IMPOSSIBLE = BASE + 14;
 
     private static final String LINGER_DELAY_PROPERTY = "persist.netmon.linger";
     // Default to 30s linger time-out.
@@ -204,6 +200,8 @@
     private static final int MAX_RETRIES = 10;
     private final int mReevaluateDelayMs;
     private int mReevaluateToken = 0;
+    private static final int INVALID_UID = -1;
+    private int mUidResponsibleForReeval = INVALID_UID;
 
     private int mCaptivePortalLoggedInToken = 0;
     private int mUserPromptedToken = 0;
@@ -213,6 +211,7 @@
     private final NetworkAgentInfo mNetworkAgentInfo;
     private final TelephonyManager mTelephonyManager;
     private final WifiManager mWifiManager;
+    private final AlarmManager mAlarmManager;
 
     private String mServer;
     private boolean mIsCaptivePortalCheckEnabled = false;
@@ -236,6 +235,7 @@
         mNetworkAgentInfo = networkAgentInfo;
         mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
         mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+        mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
 
         addState(mDefaultState);
         addState(mOfflineState, mDefaultState);
@@ -279,6 +279,7 @@
                     return HANDLED;
                 case CMD_FORCE_REEVALUATION:
                     if (DBG) log("Forcing reevaluation");
+                    mUidResponsibleForReeval = message.arg1;
                     transitionTo(mEvaluatingState);
                     return HANDLED;
                 default:
@@ -319,20 +320,14 @@
     private class EvaluatingState extends State {
         private int mRetries;
 
-        private class EvaluateInternetConnectivity extends Thread {
-            private int mToken;
-            EvaluateInternetConnectivity(int token) {
-                mToken = token;
-            }
-            public void run() {
-                sendMessage(EVENT_REEVALUATION_COMPLETE, mToken, isCaptivePortal());
-            }
-        }
-
         @Override
         public void enter() {
             mRetries = 0;
             sendMessage(CMD_REEVALUATE, ++mReevaluateToken, 0);
+            if (mUidResponsibleForReeval != INVALID_UID) {
+                TrafficStats.setThreadStatsUid(mUidResponsibleForReeval);
+                mUidResponsibleForReeval = INVALID_UID;
+            }
         }
 
         @Override
@@ -353,14 +348,7 @@
                         transitionTo(mValidatedState);
                         return HANDLED;
                     }
-                    // Kick off a thread to perform internet connectivity evaluation.
-                    Thread thread = new EvaluateInternetConnectivity(mReevaluateToken);
-                    thread.run();
-                    return HANDLED;
-                case EVENT_REEVALUATION_COMPLETE:
-                    if (message.arg1 != mReevaluateToken)
-                        return HANDLED;
-                    int httpResponseCode = message.arg2;
+                    int httpResponseCode = isCaptivePortal();
                     if (httpResponseCode == 204) {
                         transitionTo(mValidatedState);
                     } else if (httpResponseCode >= 200 && httpResponseCode <= 399) {
@@ -372,10 +360,18 @@
                         sendMessageDelayed(msg, mReevaluateDelayMs);
                     }
                     return HANDLED;
+                case CMD_FORCE_REEVALUATION:
+                    // Ignore duplicate requests.
+                    return HANDLED;
                 default:
                     return NOT_HANDLED;
             }
         }
+
+        @Override
+        public void exit() {
+            TrafficStats.clearThreadStatsUid();
+        }
     }
 
     private class UserPromptedState extends State {
@@ -500,10 +496,38 @@
     }
 
     private class LingeringState extends State {
+        private static final String ACTION_LINGER_EXPIRED = "android.net.netmon.lingerExpired";
+        private static final String EXTRA_NETID = "lingerExpiredNetId";
+        private static final String EXTRA_TOKEN = "lingerExpiredToken";
+
+        private class LingerExpiredBroadcastReceiver extends BroadcastReceiver {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                if (intent.getAction().equals(ACTION_LINGER_EXPIRED) &&
+                        Integer.parseInt(intent.getStringExtra(EXTRA_NETID)) ==
+                        mNetworkAgentInfo.network.netId) {
+                    sendMessage(CMD_LINGER_EXPIRED,
+                            Integer.parseInt(intent.getStringExtra(EXTRA_TOKEN)));
+                }
+            }
+        }
+
+        private BroadcastReceiver mBroadcastReceiver;
+        private PendingIntent mIntent;
+
         @Override
         public void enter() {
-            Message message = obtainMessage(CMD_LINGER_EXPIRED, ++mLingerToken, 0);
-            sendMessageDelayed(message, mLingerDelayMs);
+            mBroadcastReceiver = new LingerExpiredBroadcastReceiver();
+            mContext.registerReceiver(mBroadcastReceiver, new IntentFilter(ACTION_LINGER_EXPIRED));
+
+            Intent intent = new Intent(ACTION_LINGER_EXPIRED, null);
+            intent.putExtra(EXTRA_NETID, String.valueOf(mNetworkAgentInfo.network.netId));
+            intent.putExtra(EXTRA_TOKEN, String.valueOf(++mLingerToken));
+            mIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+            long wakeupTime = SystemClock.elapsedRealtime() + mLingerDelayMs;
+            mAlarmManager.setWindow(AlarmManager.ELAPSED_REALTIME_WAKEUP, wakeupTime,
+                    // Give a specific window so we aren't subject to unknown inexactitude.
+                    mLingerDelayMs / 6, mIntent);
         }
 
         @Override
@@ -524,6 +548,12 @@
                     return NOT_HANDLED;
             }
         }
+
+        @Override
+        public void exit() {
+            mAlarmManager.cancel(mIntent);
+            mContext.unregisterReceiver(mBroadcastReceiver);
+        }
     }
 
     /**
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 1fd114c..7c303ff 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -31,6 +31,7 @@
 import android.net.InterfaceConfiguration;
 import android.net.LinkAddress;
 import android.net.LinkProperties;
+import android.net.Network;
 import android.net.NetworkInfo;
 import android.net.NetworkUtils;
 import android.net.RouteInfo;
@@ -56,6 +57,7 @@
 import java.net.InetAddress;
 import java.net.Inet4Address;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -742,7 +744,7 @@
         static final int CMD_IP_FORWARDING_ENABLE_ERROR  =  7;
         // notification from the master SM that it had trouble disabling IP Forwarding
         static final int CMD_IP_FORWARDING_DISABLE_ERROR =  8;
-        // notification from the master SM that it had trouble staring tethering
+        // notification from the master SM that it had trouble starting tethering
         static final int CMD_START_TETHERING_ERROR       =  9;
         // notification from the master SM that it had trouble stopping tethering
         static final int CMD_STOP_TETHERING_ERROR        = 10;
@@ -1235,12 +1237,6 @@
                         return false;
                     }
                 }
-                try {
-                    mNMService.setDnsForwarders(mDefaultDnsServers);
-                } catch (Exception e) {
-                    transitionTo(mSetDnsForwardersErrorState);
-                    return false;
-                }
                 return true;
             }
             protected boolean turnOffMasterTetherSettings() {
@@ -1348,8 +1344,17 @@
                             }
                         }
                         try {
-                            mNMService.setDnsForwarders(dnsServers);
+                            Network network = getConnectivityManager().getNetworkForType(upType);
+                            if (network == null) {
+                                Log.e(TAG, "No Network for upstream type " + upType + "!");
+                            }
+                            if (VDBG) {
+                                Log.d(TAG, "Setting DNS forwarders: Network=" + network +
+                                       ", dnsServers=" + Arrays.toString(dnsServers));
+                            }
+                            mNMService.setDnsForwarders(network, dnsServers);
                         } catch (Exception e) {
+                            Log.e(TAG, "Setting DNS forwarders failed!");
                             transitionTo(mSetDnsForwardersErrorState);
                         }
                     }
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 9e169d9..9292d45 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -16,6 +16,7 @@
 
 package com.android.server.content;
 
+import android.Manifest;
 import android.accounts.Account;
 import android.accounts.AccountAndUser;
 import android.accounts.AccountManager;
@@ -46,6 +47,7 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ProviderInfo;
 import android.content.pm.RegisteredServicesCache;
 import android.content.pm.RegisteredServicesCacheListener;
@@ -477,7 +479,7 @@
             mContext.registerReceiverAsUser(mAccountsUpdatedReceiver,
                     UserHandle.ALL,
                     new IntentFilter(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION),
-                    null, null);
+                    Manifest.permission.ACCOUNT_MANAGER, null);
         }
 
         // Pick a random second in a day to seed all periodic syncs
@@ -3098,26 +3100,28 @@
                 return;
             }
 
+            UserHandle user = new UserHandle(userId);
             final PendingIntent pendingIntent = PendingIntent
                     .getActivityAsUser(mContext, 0, clickIntent,
-                            PendingIntent.FLAG_CANCEL_CURRENT, null, new UserHandle(userId));
+                            PendingIntent.FLAG_CANCEL_CURRENT, null, user);
 
             CharSequence tooManyDeletesDescFormat = mContext.getResources().getText(
                     R.string.contentServiceTooManyDeletesNotificationDesc);
 
+            Context contextForUser = getContextForUser(user);
             Notification notification =
                 new Notification(R.drawable.stat_notify_sync_error,
                         mContext.getString(R.string.contentServiceSync),
                         System.currentTimeMillis());
-            notification.color = mContext.getResources().getColor(
+            notification.color = contextForUser.getResources().getColor(
                     com.android.internal.R.color.system_notification_accent_color);
-            notification.setLatestEventInfo(mContext,
-                    mContext.getString(R.string.contentServiceSyncNotificationTitle),
+            notification.setLatestEventInfo(contextForUser,
+                    contextForUser.getString(R.string.contentServiceSyncNotificationTitle),
                     String.format(tooManyDeletesDescFormat.toString(), authorityName),
                     pendingIntent);
             notification.flags |= Notification.FLAG_ONGOING_EVENT;
             mNotificationMgr.notifyAsUser(null, account.hashCode() ^ authority.hashCode(),
-                    notification, new UserHandle(userId));
+                    notification, user);
         }
 
         /**
@@ -3305,4 +3309,13 @@
             return mTable.size();
         }
     }
+
+    private Context getContextForUser(UserHandle user) {
+        try {
+            return mContext.createPackageContextAsUser(mContext.getPackageName(), 0, user);
+        } catch (NameNotFoundException e) {
+            // Default to mContext, not finding the package system is running as is unlikely.
+            return mContext;
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index e31f177..e609701 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -29,7 +29,7 @@
 import android.hardware.display.DisplayManagerInternal.DisplayTransactionListener;
 import android.hardware.display.IDisplayManager;
 import android.hardware.display.IDisplayManagerCallback;
-import android.hardware.display.IVirtualDisplayCallbacks;
+import android.hardware.display.IVirtualDisplayCallback;
 import android.hardware.display.WifiDisplayStatus;
 import android.hardware.input.InputManagerInternal;
 import android.media.projection.IMediaProjection;
@@ -491,7 +491,7 @@
         }
     }
 
-    private int createVirtualDisplayInternal(IVirtualDisplayCallbacks callbacks,
+    private int createVirtualDisplayInternal(IVirtualDisplayCallback callback,
             IMediaProjection projection, int callingUid, String packageName,
             String name, int width, int height, int densityDpi, Surface surface, int flags) {
         synchronized (mSyncRoot) {
@@ -502,7 +502,7 @@
             }
 
             DisplayDevice device = mVirtualDisplayAdapter.createVirtualDisplayLocked(
-                    callbacks, projection, callingUid, packageName,
+                    callback, projection, callingUid, packageName,
                     name, width, height, densityDpi, surface, flags);
             if (device == null) {
                 return -1;
@@ -517,7 +517,7 @@
             // Something weird happened and the logical display was not created.
             Slog.w(TAG, "Rejecting request to create virtual display "
                     + "because the logical display was not created.");
-            mVirtualDisplayAdapter.releaseVirtualDisplayLocked(callbacks.asBinder());
+            mVirtualDisplayAdapter.releaseVirtualDisplayLocked(callback.asBinder());
             handleDisplayDeviceRemovedLocked(device);
         }
         return -1;
@@ -1251,14 +1251,14 @@
         }
 
         @Override // Binder call
-        public int createVirtualDisplay(IVirtualDisplayCallbacks callbacks,
+        public int createVirtualDisplay(IVirtualDisplayCallback callback,
                 IMediaProjection projection, String packageName, String name,
                 int width, int height, int densityDpi, Surface surface, int flags) {
             final int callingUid = Binder.getCallingUid();
             if (!validatePackageName(callingUid, packageName)) {
                 throw new SecurityException("packageName must match the calling uid");
             }
-            if (callbacks == null) {
+            if (callback == null) {
                 throw new IllegalArgumentException("appToken must not be null");
             }
             if (TextUtils.isEmpty(name)) {
@@ -1306,7 +1306,7 @@
 
             final long token = Binder.clearCallingIdentity();
             try {
-                return createVirtualDisplayInternal(callbacks, projection, callingUid,
+                return createVirtualDisplayInternal(callback, projection, callingUid,
                         packageName, name, width, height, densityDpi, surface, flags);
             } finally {
                 Binder.restoreCallingIdentity(token);
@@ -1314,31 +1314,31 @@
         }
 
         @Override // Binder call
-        public void resizeVirtualDisplay(IVirtualDisplayCallbacks callbacks,
+        public void resizeVirtualDisplay(IVirtualDisplayCallback callback,
                 int width, int height, int densityDpi) {
             final long token = Binder.clearCallingIdentity();
             try {
-                resizeVirtualDisplayInternal(callbacks.asBinder(), width, height, densityDpi);
+                resizeVirtualDisplayInternal(callback.asBinder(), width, height, densityDpi);
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
         }
 
         @Override // Binder call
-        public void setVirtualDisplaySurface(IVirtualDisplayCallbacks callbacks, Surface surface) {
+        public void setVirtualDisplaySurface(IVirtualDisplayCallback callback, Surface surface) {
             final long token = Binder.clearCallingIdentity();
             try {
-                setVirtualDisplaySurfaceInternal(callbacks.asBinder(), surface);
+                setVirtualDisplaySurfaceInternal(callback.asBinder(), surface);
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
         }
 
         @Override // Binder call
-        public void releaseVirtualDisplay(IVirtualDisplayCallbacks callbacks) {
+        public void releaseVirtualDisplay(IVirtualDisplayCallback callback) {
             final long token = Binder.clearCallingIdentity();
             try {
-                releaseVirtualDisplayInternal(callbacks.asBinder());
+                releaseVirtualDisplayInternal(callback.asBinder());
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
diff --git a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
index e39f0b1..f6399a3 100644
--- a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java
@@ -18,7 +18,7 @@
 
 import android.content.Context;
 import android.hardware.display.DisplayManager;
-import android.hardware.display.IVirtualDisplayCallbacks;
+import android.hardware.display.IVirtualDisplayCallback;
 import android.media.projection.IMediaProjection;
 import android.media.projection.IMediaProjectionCallback;
 import android.os.Handler;
@@ -55,15 +55,15 @@
         mHandler = handler;
     }
 
-    public DisplayDevice createVirtualDisplayLocked(IVirtualDisplayCallbacks callbacks,
+    public DisplayDevice createVirtualDisplayLocked(IVirtualDisplayCallback callback,
             IMediaProjection projection, int ownerUid, String ownerPackageName,
             String name, int width, int height, int densityDpi, Surface surface, int flags) {
         boolean secure = (flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE) != 0;
-        IBinder appToken = callbacks.asBinder();
+        IBinder appToken = callback.asBinder();
         IBinder displayToken = SurfaceControl.createDisplay(name, secure);
         VirtualDisplayDevice device = new VirtualDisplayDevice(displayToken, appToken,
                 ownerUid, ownerPackageName, name, width, height, densityDpi, surface, flags,
-                new Callbacks(callbacks, mHandler));
+                new Callback(callback, mHandler));
 
         mVirtualDisplayDevices.put(appToken, device);
 
@@ -139,7 +139,7 @@
         final String mOwnerPackageName;
         final String mName;
         private final int mFlags;
-        private final Callbacks mCallbacks;
+        private final Callback mCallback;
 
         private int mWidth;
         private int mHeight;
@@ -153,7 +153,7 @@
         public VirtualDisplayDevice(IBinder displayToken, IBinder appToken,
                 int ownerUid, String ownerPackageName,
                 String name, int width, int height, int densityDpi, Surface surface, int flags,
-                Callbacks callbacks) {
+                Callback callback) {
             super(VirtualDisplayAdapter.this, displayToken);
             mAppToken = appToken;
             mOwnerUid = ownerUid;
@@ -164,7 +164,7 @@
             mDensityDpi = densityDpi;
             mSurface = surface;
             mFlags = flags;
-            mCallbacks = callbacks;
+            mCallback = callback;
             mDisplayState = Display.STATE_UNKNOWN;
             mPendingChanges |= PENDING_SURFACE_CHANGE;
         }
@@ -184,7 +184,7 @@
                 mSurface = null;
             }
             SurfaceControl.destroyDisplay(getDisplayTokenLocked());
-            mCallbacks.dispatchDisplayStopped();
+            mCallback.dispatchDisplayStopped();
         }
 
         @Override
@@ -192,9 +192,9 @@
             if (state != mDisplayState) {
                 mDisplayState = state;
                 if (state == Display.STATE_OFF) {
-                    mCallbacks.dispatchDisplayPaused();
+                    mCallback.dispatchDisplayPaused();
                 } else {
-                    mCallbacks.dispatchDisplayResumed();
+                    mCallback.dispatchDisplayResumed();
                 }
             }
         }
@@ -287,16 +287,16 @@
         }
     }
 
-    private static class Callbacks extends Handler {
+    private static class Callback extends Handler {
         private static final int MSG_ON_DISPLAY_PAUSED = 0;
         private static final int MSG_ON_DISPLAY_RESUMED = 1;
         private static final int MSG_ON_DISPLAY_STOPPED = 2;
 
-        private final IVirtualDisplayCallbacks mCallbacks;
+        private final IVirtualDisplayCallback mCallback;
 
-        public Callbacks(IVirtualDisplayCallbacks callbacks, Handler handler) {
+        public Callback(IVirtualDisplayCallback callback, Handler handler) {
             super(handler.getLooper());
-            mCallbacks = callbacks;
+            mCallback = callback;
         }
 
         @Override
@@ -304,13 +304,13 @@
             try {
                 switch (msg.what) {
                     case MSG_ON_DISPLAY_PAUSED:
-                        mCallbacks.onDisplayPaused();
+                        mCallback.onPaused();
                         break;
                     case MSG_ON_DISPLAY_RESUMED:
-                        mCallbacks.onDisplayResumed();
+                        mCallback.onResumed();
                         break;
                     case MSG_ON_DISPLAY_STOPPED:
-                        mCallbacks.onDisplayStopped();
+                        mCallback.onStopped();
                         break;
                 }
             } catch (RemoteException e) {
diff --git a/services/core/java/com/android/server/hdmi/Constants.java b/services/core/java/com/android/server/hdmi/Constants.java
index aa1310d..6ce235b 100644
--- a/services/core/java/com/android/server/hdmi/Constants.java
+++ b/services/core/java/com/android/server/hdmi/Constants.java
@@ -159,6 +159,8 @@
     static final int TRUE = 1;
     static final int FALSE = 0;
 
+    // Internal abort error code. It's the same as success.
+    static final int ABORT_NO_ERROR = -1;
     // Constants related to operands of HDMI CEC commands.
     // Refer to CEC Table 29 in HDMI Spec v1.4b.
     // [Abort Reason]
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index bb22b4d..c5a6dbd 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -31,8 +31,6 @@
 
 import libcore.util.EmptyArray;
 
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -102,11 +100,6 @@
     // Stores the local CEC devices in the system. Device type is used for key.
     private final SparseArray<HdmiCecLocalDevice> mLocalDevices = new SparseArray<>();
 
-    @IoThreadOnly
-    private final HdmiLogger mIoThreadLogger = new HdmiLogger(TAG);
-    @ServiceThreadOnly
-    private final HdmiLogger mServiceThreadLogger = new HdmiLogger(TAG);
-
     // Private constructor.  Use HdmiCecController.create().
     private HdmiCecController(HdmiControlService service) {
         mService = service;
@@ -210,9 +203,8 @@
         }
 
         final int assignedAddress = logicalAddress;
-        mIoThreadLogger.debug(
-                String.format("New logical address for device [%d]: [preferred:%d, assigned:%d]",
-                        deviceType, preferredAddress, assignedAddress));
+        HdmiLogger.debug("New logical address for device [%d]: [preferred:%d, assigned:%d]",
+                        deviceType, preferredAddress, assignedAddress);
         if (callback != null) {
             runOnServiceThread(new Runnable() {
                 @Override
@@ -449,7 +441,7 @@
                         allocated.add(address);
                     }
                 }
-                mIoThreadLogger.debug("[P]:Allocated Address=" + allocated);
+                HdmiLogger.debug("[P]:Allocated Address=" + allocated);
                 if (callback != null) {
                     runOnServiceThread(new Runnable() {
                         @Override
@@ -551,7 +543,7 @@
         runOnIoThread(new Runnable() {
             @Override
             public void run() {
-                mIoThreadLogger.debug("[S]:" + cecMessage);
+                HdmiLogger.debug("[S]:" + cecMessage);
                 byte[] body = buildBody(cecMessage.getOpcode(), cecMessage.getParams());
                 int i = 0;
                 int errorCode = Constants.SEND_RESULT_SUCCESS;
@@ -586,7 +578,7 @@
     private void handleIncomingCecCommand(int srcAddress, int dstAddress, byte[] body) {
         assertRunOnServiceThread();
         HdmiCecMessage command = HdmiCecMessageBuilder.of(srcAddress, dstAddress, body);
-        mServiceThreadLogger.debug("[R]:" + command);
+        HdmiLogger.debug("[R]:" + command);
         onReceiveCommand(command);
     }
 
@@ -596,8 +588,7 @@
     @ServiceThreadOnly
     private void handleHotplug(int port, boolean connected) {
         assertRunOnServiceThread();
-        mServiceThreadLogger.debug(
-                "Hotplug event:[port:" + port + " , connected:" + connected + "]");
+        HdmiLogger.debug("Hotplug event:[port:%d, connected:%b]", port, connected);
         mService.onHotplug(port, connected);
     }
 
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecFeatureAction.java b/services/core/java/com/android/server/hdmi/HdmiCecFeatureAction.java
index 85f5be2..b2300a6 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecFeatureAction.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecFeatureAction.java
@@ -43,9 +43,6 @@
  */
 abstract class HdmiCecFeatureAction {
     private static final String TAG = "HdmiCecFeatureAction";
-    // As all actions run in the same thread (service thread), it's fine to have single logger.
-    // TODO: create global logger for each threads and use them.
-    protected static final HdmiLogger DLOGGER = new HdmiLogger(TAG);
 
     // Timer handler message used for timeout event
     protected static final int MSG_TIMEOUT = 100;
@@ -264,10 +261,7 @@
     }
 
     protected final void sendUserControlPressedAndReleased(int targetAddress, int uiCommand) {
-        sendCommand(HdmiCecMessageBuilder.buildUserControlPressed(
-                getSourceAddress(), targetAddress, uiCommand));
-        sendCommand(HdmiCecMessageBuilder.buildUserControlReleased(
-                getSourceAddress(), targetAddress));
+        mSource.sendUserControlPressedAndReleased(targetAddress, uiCommand);
     }
 
     protected final void addOnFinishedCallback(HdmiCecFeatureAction action, Runnable runnable) {
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
index 38addba..c00c5d0 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -274,6 +274,12 @@
                 return handleRecordTvScreen(message);
             case Constants.MESSAGE_TIMER_CLEARED_STATUS:
                 return handleTimerClearedStatus(message);
+            case Constants.MESSAGE_REPORT_POWER_STATUS:
+                return handleReportPowerStatus(message);
+            case Constants.MESSAGE_TIMER_STATUS:
+                return handleTimerStatus(message);
+            case Constants.MESSAGE_RECORD_STATUS:
+                return handleRecordStatus(message);
             default:
                 return false;
         }
@@ -541,6 +547,18 @@
         return false;
     }
 
+    protected boolean handleReportPowerStatus(HdmiCecMessage message) {
+        return false;
+    }
+
+    protected boolean handleTimerStatus(HdmiCecMessage message) {
+        return false;
+    }
+
+    protected boolean handleRecordStatus(HdmiCecMessage message) {
+        return false;
+    }
+
     @ServiceThreadOnly
     final void handleAddressAllocated(int logicalAddress, int reason) {
         assertRunOnServiceThread();
@@ -549,6 +567,10 @@
         setPreferredAddress(logicalAddress);
     }
 
+    int getType() {
+        return mDeviceType;
+    }
+
     @ServiceThreadOnly
     HdmiDeviceInfo getDeviceInfo() {
         assertRunOnServiceThread();
@@ -806,6 +828,13 @@
         Slog.w(TAG, "sendKeyEvent not implemented");
     }
 
+    void sendUserControlPressedAndReleased(int targetAddress, int cecKeycode) {
+        mService.sendCecCommand(HdmiCecMessageBuilder.buildUserControlPressed(
+                mAddress, targetAddress, cecKeycode));
+        mService.sendCecCommand(HdmiCecMessageBuilder.buildUserControlReleased(
+                mAddress, targetAddress));
+    }
+
     /**
      * Dump internal status of HdmiCecLocalDevice object.
      */
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 1ab8069..58ccbdb 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -120,8 +120,6 @@
     // other CEC devices since they might not have logical address.
     private final ArraySet<Integer> mCecSwitches = new ArraySet<Integer>();
 
-    private final HdmiLogger mSafeLogger = new HdmiLogger(TAG);
-
     HdmiCecLocalDeviceTv(HdmiControlService service) {
         super(service, HdmiDeviceInfo.DEVICE_TV);
         mPrevPortId = Constants.INVALID_PORT_ID;
@@ -281,7 +279,6 @@
             return;
         }
         setPrevPortId(getActivePortId());
-        int portId = mService.pathToPortId(path);
         setActivePath(path);
         // TODO: Handle PAP/PIP case.
         // Show OSD port change banner
@@ -289,7 +286,7 @@
             ActiveSource activeSource = getActiveSource();
             HdmiDeviceInfo info = getCecDeviceInfo(activeSource.logicalAddress);
             if (info == null) {
-                info = new HdmiDeviceInfo(Constants.ADDR_INVALID, path, portId,
+                info = new HdmiDeviceInfo(Constants.ADDR_INVALID, path, getActivePortId(),
                         HdmiDeviceInfo.DEVICE_RESERVED, 0, null);
             }
             mService.invokeInputChangeListener(info);
@@ -470,13 +467,32 @@
             return true;
         }
 
-        if (!isInDeviceList(path, address)) {
+        if (!isInDeviceList(address, path)) {
             handleNewDeviceAtTheTailOfActivePath(path);
         }
         startNewDeviceAction(ActiveSource.of(address, path));
         return true;
     }
 
+    @Override
+    protected boolean handleReportPowerStatus(HdmiCecMessage command) {
+        int newStatus = command.getParams()[0] & 0xFF;
+        updateDevicePowerStatus(command.getSource(), newStatus);
+        return true;
+    }
+
+    @Override
+    protected boolean handleTimerStatus(HdmiCecMessage message) {
+        // Do nothing.
+        return true;
+    }
+
+    @Override
+    protected boolean handleRecordStatus(HdmiCecMessage message) {
+        // Do nothing.
+        return true;
+    }
+
     boolean updateCecSwitchInfo(int address, int type, int path) {
         if (address == Constants.ADDR_UNREGISTERED
                 && type == HdmiDeviceInfo.DEVICE_PURE_CEC_SWITCH) {
@@ -701,8 +717,7 @@
 
     // # Seq 25
     void setSystemAudioMode(boolean on, boolean updateSetting) {
-        mSafeLogger.debug(String.format("System Audio Mode change[old:%b new:%b]",
-                mSystemAudioActivated, on));
+        HdmiLogger.debug("System Audio Mode change[old:%b new:%b]", mSystemAudioActivated, on);
 
         if (updateSetting) {
             mService.writeBooleanSetting(Global.HDMI_SYSTEM_AUDIO_ENABLED, on);
@@ -833,6 +848,8 @@
                     AudioManager.STREAM_MUSIC);
             mService.setAudioStatus(mute,
                     VolumeControlAction.scaleToCustomVolume(volume, maxVolume));
+            displayOsd(HdmiControlManager.OSD_MESSAGE_AVR_VOLUME_CHANGED,
+                    mute ? HdmiControlManager.AVR_VOLUME_MUTED : volume);
         }
     }
 
@@ -856,12 +873,13 @@
             }
         }
 
-        // Remove existing volume action.
-        removeAction(VolumeControlAction.class);
-
-        HdmiDeviceInfo avr = getAvrDeviceInfo();
-        addAndStartAction(VolumeControlAction.ofVolumeChange(this, avr.getLogicalAddress(),
-                cecVolume, delta > 0));
+        List<VolumeControlAction> actions = getActions(VolumeControlAction.class);
+        if (actions.isEmpty()) {
+            addAndStartAction(new VolumeControlAction(this,
+                    getAvrDeviceInfo().getLogicalAddress(), delta > 0));
+        } else {
+            actions.get(0).handleVolumeChange(delta > 0);
+        }
     }
 
     @ServiceThreadOnly
@@ -873,8 +891,9 @@
 
         // Remove existing volume action.
         removeAction(VolumeControlAction.class);
-        HdmiDeviceInfo avr = getAvrDeviceInfo();
-        addAndStartAction(VolumeControlAction.ofMute(this, avr.getLogicalAddress(), mute));
+        sendUserControlPressedAndReleased(getAvrDeviceInfo().getLogicalAddress(),
+                mute ? HdmiCecKeycode.CEC_KEYCODE_MUTE_FUNCTION :
+                        HdmiCecKeycode.CEC_KEYCODE_RESTORE_VOLUME_FUNCTION);
     }
 
     @Override
@@ -936,8 +955,9 @@
     protected boolean handleSetSystemAudioMode(HdmiCecMessage message) {
         assertRunOnServiceThread();
         if (!isMessageForSystemAudio(message)) {
-            mSafeLogger.warning("Invalid <Set System Audio Mode> message:" + message);
-            return false;
+            HdmiLogger.warning("Invalid <Set System Audio Mode> message:" + message);
+            mService.maySendFeatureAbortCommand(message, Constants.ABORT_REFUSED);
+            return true;
         }
         SystemAudioActionFromAvr action = new SystemAudioActionFromAvr(this,
                 message.getSource(), HdmiUtils.parseCommandParamSystemAudioStatus(message), null);
@@ -950,8 +970,9 @@
     protected boolean handleSystemAudioModeStatus(HdmiCecMessage message) {
         assertRunOnServiceThread();
         if (!isMessageForSystemAudio(message)) {
-            mSafeLogger.warning("Invalid <System Audio Mode Status> message:" + message);
-            return false;
+            HdmiLogger.warning("Invalid <System Audio Mode Status> message:" + message);
+            // Ignore this message.
+            return true;
         }
         setSystemAudioMode(HdmiUtils.parseCommandParamSystemAudioStatus(message), true);
         return true;
@@ -974,7 +995,10 @@
 
         int recorderAddress = message.getSource();
         byte[] recordSource = mService.invokeRecordRequestListener(recorderAddress);
-        startOneTouchRecord(recorderAddress, recordSource);
+        int reason = startOneTouchRecord(recorderAddress, recordSource);
+        if (reason != Constants.ABORT_NO_ERROR) {
+            mService.maySendFeatureAbortCommand(message, reason);
+        }
         return true;
     }
 
@@ -999,7 +1023,8 @@
     }
 
     private boolean isMessageForSystemAudio(HdmiCecMessage message) {
-        return message.getSource() == Constants.ADDR_AUDIO_SYSTEM
+        return mService.isControlEnabled()
+                && message.getSource() == Constants.ADDR_AUDIO_SYSTEM
                 && (message.getDestination() == Constants.ADDR_TV
                         || message.getDestination() == Constants.ADDR_BROADCAST)
                 && getAvrDeviceInfo() != null;
@@ -1055,9 +1080,9 @@
      * does not include local device.
      */
     @ServiceThreadOnly
-    List<HdmiDeviceInfo> getDeviceInfoList(boolean includelLocalDevice) {
+    List<HdmiDeviceInfo> getDeviceInfoList(boolean includeLocalDevice) {
         assertRunOnServiceThread();
-        if (includelLocalDevice) {
+        if (includeLocalDevice) {
             return HdmiUtils.sparseArrayToList(mDeviceInfos);
         } else {
             ArrayList<HdmiDeviceInfo> infoList = new ArrayList<>();
@@ -1243,7 +1268,8 @@
             int newPath = mService.portIdToPath(getActivePortId());
             mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(
                     mAddress, getActivePath(), newPath));
-            addAndStartAction(new RoutingControlAction(this, getActivePortId(), true, null));
+            mActiveSource.invalidate();
+            addAndStartAction(new RoutingControlAction(this, getActivePath(), true, null));
         }
     }
 
@@ -1306,7 +1332,7 @@
      * @return true if exist; otherwise false
      */
     @ServiceThreadOnly
-    boolean isInDeviceList(int logicalAddress, int physicalAddress) {
+    private boolean isInDeviceList(int logicalAddress, int physicalAddress) {
         assertRunOnServiceThread();
         HdmiDeviceInfo device = getCecDeviceInfo(logicalAddress);
         if (device == null) {
@@ -1445,31 +1471,38 @@
         mService.displayOsd(messageId);
     }
 
+    @ServiceThreadOnly
+    void displayOsd(int messageId, int extra) {
+        assertRunOnServiceThread();
+        mService.displayOsd(messageId, extra);
+    }
+
     // Seq #54 and #55
     @ServiceThreadOnly
-    void startOneTouchRecord(int recorderAddress, byte[] recordSource) {
+    int startOneTouchRecord(int recorderAddress, byte[] recordSource) {
         assertRunOnServiceThread();
         if (!mService.isControlEnabled()) {
             Slog.w(TAG, "Can not start one touch record. CEC control is disabled.");
             announceOneTouchRecordResult(ONE_TOUCH_RECORD_CEC_DISABLED);
-            return;
+            return Constants.ABORT_NOT_IN_CORRECT_MODE;
         }
 
         if (!checkRecorder(recorderAddress)) {
             Slog.w(TAG, "Invalid recorder address:" + recorderAddress);
             announceOneTouchRecordResult(ONE_TOUCH_RECORD_CHECK_RECORDER_CONNECTION);
-            return;
+            return Constants.ABORT_NOT_IN_CORRECT_MODE;
         }
 
         if (!checkRecordSource(recordSource)) {
             Slog.w(TAG, "Invalid record source." + Arrays.toString(recordSource));
             announceOneTouchRecordResult(ONE_TOUCH_RECORD_FAIL_TO_RECORD_DISPLAYED_SCREEN);
-            return;
+            return Constants.ABORT_UNABLE_TO_DETERMINE;
         }
 
         addAndStartAction(new OneTouchRecordAction(this, recorderAddress, recordSource));
         Slog.i(TAG, "Start new [One Touch Record]-Target:" + recorderAddress + ", recordSource:"
                 + Arrays.toString(recordSource));
+        return Constants.ABORT_NO_ERROR;
     }
 
     @ServiceThreadOnly
@@ -1622,5 +1655,11 @@
         pw.println("mAutoDeviceOff: " + mAutoDeviceOff);
         pw.println("mAutoWakeup: " + mAutoWakeup);
         pw.println("mSkipRoutingControl: " + mSkipRoutingControl);
+        pw.println("CEC devices:");
+        pw.increaseIndent();
+        for (HdmiDeviceInfo info : mSafeAllDeviceInfos) {
+            pw.println(info);
+        }
+        pw.decreaseIndent();
     }
 }
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
index 8b345cf..0b3d9fb 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
@@ -51,7 +51,6 @@
     }
 
     final SparseArray<ValidationInfo> mValidationInfo = new SparseArray<>();
-    private final HdmiLogger mSpamSafeLogger = new HdmiLogger(TAG);
 
     public HdmiCecMessageValidator(HdmiControlService service) {
         mService = service;
@@ -183,32 +182,32 @@
         int opcode = message.getOpcode();
         ValidationInfo info = mValidationInfo.get(opcode);
         if (info == null) {
-            mSpamSafeLogger.warning("No validation information for the message: " + message);
+            HdmiLogger.warning("No validation information for the message: " + message);
             return true;
         }
 
         // Check the source field.
         if (message.getSource() == Constants.ADDR_UNREGISTERED &&
                 (info.addressType & SRC_UNREGISTERED) == 0) {
-            mSpamSafeLogger.warning("Unexpected source: " + message);
+            HdmiLogger.warning("Unexpected source: " + message);
             return false;
         }
         // Check the destination field.
         if (message.getDestination() == Constants.ADDR_BROADCAST) {
             if ((info.addressType & DEST_BROADCAST) == 0) {
-                mSpamSafeLogger.warning("Unexpected broadcast message: " + message);
+                HdmiLogger.warning("Unexpected broadcast message: " + message);
                 return false;
             }
         } else {  // Direct addressing.
             if ((info.addressType & DEST_DIRECT) == 0) {
-                mSpamSafeLogger.warning("Unexpected direct message: " + message);
+                HdmiLogger.warning("Unexpected direct message: " + message);
                 return false;
             }
         }
 
         // Check the parameter type.
         if (!info.parameterValidator.isValid(message.getParams())) {
-            mSpamSafeLogger.warning("Unexpected parameters: " + message);
+            HdmiLogger.warning("Unexpected parameters: " + message);
             return false;
         }
         return true;
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index d13e1de..5cd7c01 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -98,6 +98,7 @@
     static final int INITIATED_BY_BOOT_UP = 1;
     static final int INITIATED_BY_SCREEN_ON = 2;
     static final int INITIATED_BY_WAKE_UP_MESSAGE = 3;
+    static final int INITIATED_BY_HOTPLUG = 4;
 
     /**
      * Interface to report send result.
@@ -165,8 +166,6 @@
     // Type of logical devices hosted in the system. Stored in the unmodifiable list.
     private final List<Integer> mLocalDevices;
 
-    private final HdmiLogger mSpamSafeLogger = new HdmiLogger(TAG);
-
     // List of records for hotplug event listener to handle the the caller killed in action.
     @GuardedBy("mLock")
     private final ArrayList<HotplugEventListenerRecord> mHotplugEventListenerRecords =
@@ -257,7 +256,7 @@
     private List<HdmiDeviceInfo> mMhlDevices;
 
     @Nullable
-    private HdmiMhlController mMhlController;
+    private HdmiMhlControllerStub mMhlController;
 
     // Last input port before switching to the MHL port. Should switch back to this port
     // when the mobile device sends the request one touch play with off.
@@ -306,7 +305,7 @@
             Slog.i(TAG, "Device does not support HDMI-CEC.");
         }
 
-        mMhlController = HdmiMhlController.create(this);
+        mMhlController = HdmiMhlControllerStub.create(this);
         if (!mMhlController.isReady()) {
             Slog.i(TAG, "Device does not support MHL-control.");
         }
@@ -408,20 +407,31 @@
 
     private void initializeCec(int initiatedBy) {
         mCecController.setOption(OPTION_CEC_SERVICE_CONTROL, ENABLED);
-        initializeLocalDevices(mLocalDevices, initiatedBy);
+        initializeLocalDevices(initiatedBy);
     }
 
     @ServiceThreadOnly
-    private void initializeLocalDevices(final List<Integer> deviceTypes, final int initiatedBy) {
+    private void initializeLocalDevices(final int initiatedBy) {
         assertRunOnServiceThread();
-        // A container for [Logical Address, Local device info].
-        final SparseArray<HdmiCecLocalDevice> devices = new SparseArray<>();
-        final int[] finished = new int[1];
+        // A container for [Device type, Local device info].
+        ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
         clearLocalDevices();
-        for (int type : deviceTypes) {
+        for (int type : mLocalDevices) {
             final HdmiCecLocalDevice localDevice = HdmiCecLocalDevice.create(this, type);
             localDevice.init();
-            mCecController.allocateLogicalAddress(type,
+            localDevices.add(localDevice);
+        }
+        allocateLogicalAddress(localDevices, initiatedBy);
+    }
+
+    @ServiceThreadOnly
+    private void allocateLogicalAddress(final ArrayList<HdmiCecLocalDevice> allocatingDevices,
+            final int initiatedBy) {
+        assertRunOnServiceThread();
+        final ArrayList<HdmiCecLocalDevice> allocatedDevices = new ArrayList<>();
+        final int[] finished = new int[1];
+        for (final HdmiCecLocalDevice localDevice : allocatingDevices) {
+            mCecController.allocateLogicalAddress(localDevice.getType(),
                     localDevice.getPreferredAddress(), new AllocateAddressCallback() {
                 @Override
                 public void onAllocated(int deviceType, int logicalAddress) {
@@ -435,13 +445,17 @@
                         localDevice.setDeviceInfo(deviceInfo);
                         mCecController.addLocalDevice(deviceType, localDevice);
                         mCecController.addLogicalAddress(logicalAddress);
-                        devices.append(logicalAddress, localDevice);
+                        allocatedDevices.add(localDevice);
                     }
 
                     // Address allocation completed for all devices. Notify each device.
-                    if (deviceTypes.size() == ++finished[0]) {
-                        onInitializeCecComplete();
-                        notifyAddressAllocated(devices, initiatedBy);
+                    if (allocatingDevices.size() == ++finished[0]) {
+                        if (initiatedBy != INITIATED_BY_HOTPLUG) {
+                            // In case of the hotplug we don't call onInitializeCecComplete()
+                            // since we reallocate the logical address only.
+                            onInitializeCecComplete();
+                        }
+                        notifyAddressAllocated(allocatedDevices, initiatedBy);
                     }
                 }
             });
@@ -449,11 +463,10 @@
     }
 
     @ServiceThreadOnly
-    private void notifyAddressAllocated(SparseArray<HdmiCecLocalDevice> devices, int initiatedBy) {
+    private void notifyAddressAllocated(ArrayList<HdmiCecLocalDevice> devices, int initiatedBy) {
         assertRunOnServiceThread();
-        for (int i = 0; i < devices.size(); ++i) {
-            int address = devices.keyAt(i);
-            HdmiCecLocalDevice device = devices.valueAt(i);
+        for (HdmiCecLocalDevice device : devices) {
+            int address = device.getDeviceInfo().getLogicalAddress();
             device.handleAddressAllocated(address, initiatedBy);
         }
     }
@@ -641,7 +654,7 @@
         if (mMessageValidator.isValid(command)) {
             mCecController.sendCommand(command, callback);
         } else {
-            mSpamSafeLogger.error("Invalid message type:" + command);
+            HdmiLogger.error("Invalid message type:" + command);
             if (callback != null) {
                 callback.onSendCompleted(Constants.SEND_RESULT_FAILURE);
             }
@@ -690,7 +703,7 @@
         }
 
         if (message.getDestination() != Constants.ADDR_BROADCAST) {
-            mSpamSafeLogger.warning("Unhandled cec command:" + message);
+            HdmiLogger.warning("Unhandled cec command:" + message);
         }
         return false;
     }
@@ -704,6 +717,22 @@
     @ServiceThreadOnly
     void onHotplug(int portId, boolean connected) {
         assertRunOnServiceThread();
+
+        ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
+        for (int type : mLocalDevices) {
+            if (type == HdmiDeviceInfo.DEVICE_TV) {
+                // Skip the reallocation of the logical address on TV.
+                continue;
+            }
+            HdmiCecLocalDevice localDevice = mCecController.getLocalDevice(type);
+            if (localDevice == null) {
+                localDevice = HdmiCecLocalDevice.create(this, type);
+                localDevice.init();
+            }
+            localDevices.add(localDevice);
+        }
+        allocateLogicalAddress(localDevices, INITIATED_BY_HOTPLUG);
+
         for (HdmiCecLocalDevice device : mCecController.getLocalDeviceList()) {
             device.onHotplug(portId, connected);
         }
@@ -763,7 +792,6 @@
             // FLAG_HDMI_SYSTEM_AUDIO_VOLUME prevents audio manager from announcing
             // volume change notification back to hdmi control service.
             audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume,
-                    AudioManager.FLAG_SHOW_UI |
                     AudioManager.FLAG_HDMI_SYSTEM_AUDIO_VOLUME);
         }
     }
@@ -825,8 +853,11 @@
                 device.onDeviceRemoved();
                 // There is no explicit event for device removal unlike capability register event
                 // used for device addition . Hence we remove the device on hotplug event.
-                invokeDeviceEventListeners(device.getInfo(), DEVICE_EVENT_REMOVE_DEVICE);
-                updateSafeMhlInput();
+                HdmiDeviceInfo deviceInfo = device.getInfo();
+                if (deviceInfo != null) {
+                    invokeDeviceEventListeners(deviceInfo, DEVICE_EVENT_REMOVE_DEVICE);
+                    updateSafeMhlInput();
+                }
             } else {
                 Slog.w(TAG, "No device to remove:[portId=" + portId);
             }
@@ -1051,7 +1082,7 @@
                         // the connected mobile device, start routing control to switch ports.
                         // callback is handled by MHL action.
                         device.turnOn(callback);
-                        tv.doManualPortSwitching(device.getInfo().getPortId(), null);
+                        tv.doManualPortSwitching(device.getPortId(), null);
                         return;
                     }
                     tv.deviceSelect(deviceId, callback);
@@ -1999,4 +2030,14 @@
         getContext().sendBroadcastAsUser(intent, UserHandle.ALL,
                 HdmiControlService.PERMISSION);
     }
+
+    @ServiceThreadOnly
+    void displayOsd(int messageId, int extra) {
+        assertRunOnServiceThread();
+        Intent intent = new Intent(HdmiControlManager.ACTION_OSD_MESSAGE);
+        intent.putExtra(HdmiControlManager.EXTRA_MESSAGE_ID, messageId);
+        intent.putExtra(HdmiControlManager.EXTRA_MESSAGE_EXTRAM_PARAM1, extra);
+        getContext().sendBroadcastAsUser(intent, UserHandle.ALL,
+                HdmiControlService.PERMISSION);
+    }
 }
diff --git a/services/core/java/com/android/server/hdmi/HdmiLogger.java b/services/core/java/com/android/server/hdmi/HdmiLogger.java
index c7add75..2562ffc 100644
--- a/services/core/java/com/android/server/hdmi/HdmiLogger.java
+++ b/services/core/java/com/android/server/hdmi/HdmiLogger.java
@@ -26,44 +26,83 @@
 /**
  * A logger that prevents spammy log. For the same log message, it logs once every 20seconds.
  * This class is not thread-safe.
+ * <p>
+ * For convenience, use single character prefix for all messages.
+ * Here are common acronyms
+ * <ul>
+ *   <li>[T]: Timout
+ *   <li>[R]: Received message
+ *   <li>[S]: Sent message
+ *   <li>[P]: Device polling result
+ * </ul>
  */
 final class HdmiLogger {
+    private static final String TAG = "HDMI";
     // Logging duration for same error message.
     private static final long ERROR_LOG_DURATTION_MILLIS = 20 * 1000;  // 20s
 
     private static final boolean DEBUG = false;
 
+    private static final ThreadLocal<HdmiLogger> sLogger = new ThreadLocal<>();
+
     // Key (String): log message.
     // Value (Pair(Long, Integer)): a pair of last log time millis and the number of logMessage.
     // Cache for warning.
     private final HashMap<String, Pair<Long, Integer>> mWarningTimingCache = new HashMap<>();
     // Cache for error.
     private final HashMap<String, Pair<Long, Integer>> mErrorTimingCache = new HashMap<>();
-    private final String mTag;
 
-    HdmiLogger(String tag) {
-        mTag = "HDMI:" + tag;
+    private HdmiLogger() {
     }
 
-    void warning(String logMessage) {
+    static final void warning(String logMessage, Object... objs) {
+        getLogger().warningInternal(toLogString(logMessage, objs));
+    }
+
+    private void warningInternal(String logMessage) {
         String log = updateLog(mWarningTimingCache, logMessage);
         if (!log.isEmpty()) {
-            Slog.w(mTag, log);
+            Slog.w(TAG, log);
         }
     }
 
-    void error(String logMessage) {
+    static final void error(String logMessage, Object... objs) {
+        getLogger().errorInternal(toLogString(logMessage, objs));
+    }
+
+    private void errorInternal(String logMessage) {
         String log = updateLog(mErrorTimingCache, logMessage);
         if (!log.isEmpty()) {
-            Slog.e(mTag, log);
+            Slog.e(TAG, log);
         }
     }
 
-    void debug(String logMessage) {
+    static final void debug(String logMessage, Object... objs) {
+        getLogger().debugInternal(toLogString(logMessage, objs));
+    }
+
+    private void debugInternal(String logMessage) {
         if (!DEBUG) {
             return;
         }
-        Slog.d(mTag, logMessage);
+        Slog.d(TAG, logMessage);
+    }
+
+    private static final String toLogString(String logMessage, Object[] objs) {
+        if (objs.length > 0) {
+            return String.format(logMessage, objs);
+        } else {
+            return logMessage;
+        }
+    }
+
+    private static HdmiLogger getLogger() {
+        HdmiLogger logger = sLogger.get();
+        if (logger == null) {
+            logger = new HdmiLogger();
+            sLogger.set(logger);
+        }
+        return logger;
     }
 
     private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) {
diff --git a/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java b/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java
new file mode 100644
index 0000000..c27cf18
--- /dev/null
+++ b/services/core/java/com/android/server/hdmi/HdmiMhlControllerStub.java
@@ -0,0 +1,149 @@
+/*
+ * 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.server.hdmi;
+
+import android.hardware.hdmi.HdmiPortInfo;
+import android.util.SparseArray;
+
+import com.android.server.hdmi.HdmiControlService.SendMessageCallback;
+
+/**
+ * A handler class for MHL control command. It converts user's command into MHL command and pass it
+ * to MHL HAL layer.
+ * <p>
+ * It can be created only by {@link HdmiMhlControllerStub#create}.
+ */
+final class HdmiMhlControllerStub {
+
+    private static final SparseArray<HdmiMhlLocalDevice> mLocalDevices = new SparseArray<>();
+    private static final HdmiPortInfo[] EMPTY_PORT_INFO = new HdmiPortInfo[0];
+    private static final int INVALID_MHL_VERSION = 0;
+    private static final int NO_SUPPORTED_FEATURES = 0;
+    private static final int INVALID_DEVICE_ROLES = 0;
+
+    // Private constructor. Use HdmiMhlControllerStub.create().
+    private HdmiMhlControllerStub(HdmiControlService service) {
+    }
+
+    // Returns true if MHL controller is initialized and ready to use.
+    boolean isReady() {
+        return false;
+    }
+
+    static HdmiMhlControllerStub create(HdmiControlService service) {
+        return new HdmiMhlControllerStub(service);
+    }
+
+    HdmiPortInfo[] getPortInfos() {
+        return EMPTY_PORT_INFO;
+    }
+
+    /**
+     * Return {@link HdmiMhlLocalDevice} matched with the given port id.
+     *
+     * @return null if has no matched port id
+     */
+    HdmiMhlLocalDevice getLocalDevice(int portId) {
+        return null;
+    }
+
+    /**
+     * Return {@link HdmiMhlLocalDevice} matched with the given device id.
+     *
+     * @return null if has no matched id
+     */
+    HdmiMhlLocalDevice getLocalDeviceById(int deviceId) {
+        return null;
+    }
+
+    SparseArray<HdmiMhlLocalDevice> getAllLocalDevices() {
+        return mLocalDevices;
+    }
+
+    /**
+     * Remove a {@link HdmiMhlLocalDevice} matched with the given port id.
+     *
+     * @return removed {@link HdmiMhlLocalDevice}. Return null if no matched port id.
+     */
+    HdmiMhlLocalDevice removeLocalDevice(int portId) {
+        return null;
+    }
+
+    /**
+     * Add a new {@link HdmiMhlLocalDevice}.
+     *
+     * @return old {@link HdmiMhlLocalDevice} having same port id
+     */
+    HdmiMhlLocalDevice addLocalDevice(HdmiMhlLocalDevice device) {
+        return null;
+    }
+
+    void clearAllLocalDevices() {
+    }
+
+    /**
+     * Send MHL MSC-Subcommand to the device connected to the given port.
+     */
+    void sendSubcommand(int portId, HdmiMhlSubcommand command) {
+    }
+
+    void sendSubcommand(final int portId, final HdmiMhlSubcommand command,
+            SendMessageCallback callback) {
+    }
+
+
+    void sendScratchpadCommand(int portId, int offset, int length, byte[] data) {
+    }
+
+    void setOption(int flag, int value) {
+    }
+
+    /**
+     * Get the MHL version supported by underlying hardware port of the given {@code portId}.
+     * MHL specification version 2.0 returns 0x20, 3.0 will return 0x30 respectively.
+     * The return value is stored in 'version'. Return INVALID_VERSION if MHL hardware layer
+     * is not ready.
+     */
+    int getMhlVersion(int portId) {
+        return INVALID_MHL_VERSION;
+    }
+
+    /**
+     * Get MHL version of a device which is connected to a port of the given {@code portId}.
+     * MHL specification version 2.0 returns 0x20, 3.0 will return 0x30 respectively.
+     * The return value is stored in 'version'.
+     */
+    int getPeerMhlVersion(int portId) {
+        return INVALID_MHL_VERSION;
+    }
+
+    /**
+     * Get the bit flags describing the features supported by the system. Refer to feature support
+     * flag register info in MHL specification.
+     */
+    int getSupportedFeatures(int portId) {
+        return NO_SUPPORTED_FEATURES;
+    }
+
+    /**
+     * Get the bit flags describing the roles which ECBUS device can play. Refer to the
+     * ECBUS_DEV_ROLES Register info MHL3.0 specification
+     */
+    int getEcbusDeviceRoles(int portId) {
+        return INVALID_DEVICE_ROLES;
+    }
+}
diff --git a/services/core/java/com/android/server/hdmi/PowerStatusMonitorAction.java b/services/core/java/com/android/server/hdmi/PowerStatusMonitorAction.java
index 03fbb95..1e29fd6 100644
--- a/services/core/java/com/android/server/hdmi/PowerStatusMonitorAction.java
+++ b/services/core/java/com/android/server/hdmi/PowerStatusMonitorAction.java
@@ -77,7 +77,7 @@
             // if no device exists for incoming message, hands it over to other actions.
             return false;
         }
-        int newStatus = cmd.getParams()[0];
+        int newStatus = cmd.getParams()[0] & 0xFF;
         updatePowerStatus(sourceAddress, newStatus, true);
         return true;
     }
diff --git a/services/core/java/com/android/server/hdmi/RequestArcAction.java b/services/core/java/com/android/server/hdmi/RequestArcAction.java
index 17c2d6c..3fb450f 100644
--- a/services/core/java/com/android/server/hdmi/RequestArcAction.java
+++ b/services/core/java/com/android/server/hdmi/RequestArcAction.java
@@ -85,6 +85,7 @@
         if (mState != state || state != STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE) {
             return;
         }
+        HdmiLogger.debug("[T]RequestArcAction.");
         disableArcTransmission();
         finish();
     }
diff --git a/services/core/java/com/android/server/hdmi/RequestArcInitiationAction.java b/services/core/java/com/android/server/hdmi/RequestArcInitiationAction.java
index f25363d..d9e1f24 100644
--- a/services/core/java/com/android/server/hdmi/RequestArcInitiationAction.java
+++ b/services/core/java/com/android/server/hdmi/RequestArcInitiationAction.java
@@ -35,15 +35,15 @@
 
     @Override
     boolean start() {
+        mState = STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE;
+        addTimer(mState, HdmiConfig.TIMEOUT_MS);
+
         HdmiCecMessage command = HdmiCecMessageBuilder.buildRequestArcInitiation(
                 getSourceAddress(), mAvrAddress);
         sendCommand(command, new HdmiControlService.SendMessageCallback() {
             @Override
             public void onSendCompleted(int error) {
-                if (error == Constants.SEND_RESULT_SUCCESS) {
-                    mState = STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE;
-                    addTimer(mState, HdmiConfig.TIMEOUT_MS);
-                } else {
+                if (error != Constants.SEND_RESULT_SUCCESS) {
                     // If failed to send <Request ARC Initiation>, start "Disabled"
                     // ARC transmission action.
                     disableArcTransmission();
diff --git a/services/core/java/com/android/server/hdmi/RequestArcTerminationAction.java b/services/core/java/com/android/server/hdmi/RequestArcTerminationAction.java
index 1491c72..f5a0115 100644
--- a/services/core/java/com/android/server/hdmi/RequestArcTerminationAction.java
+++ b/services/core/java/com/android/server/hdmi/RequestArcTerminationAction.java
@@ -35,15 +35,15 @@
 
     @Override
     boolean start() {
+        mState = STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE;
+        addTimer(mState, HdmiConfig.TIMEOUT_MS);
+
         HdmiCecMessage command =
                 HdmiCecMessageBuilder.buildRequestArcTermination(getSourceAddress(), mAvrAddress);
         sendCommand(command, new HdmiControlService.SendMessageCallback() {
             @Override
             public void onSendCompleted(int error) {
-                if (error == Constants.SEND_RESULT_SUCCESS) {
-                    mState = STATE_WATING_FOR_REQUEST_ARC_REQUEST_RESPONSE;
-                    addTimer(mState, HdmiConfig.TIMEOUT_MS);
-                } else {
+                if (error != Constants.SEND_RESULT_SUCCESS) {
                     // If failed to send <Request ARC Termination>, start "Disabled" ARC
                     // transmission action.
                     disableArcTransmission();
diff --git a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
index 30519f3..bffa854 100644
--- a/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
+++ b/services/core/java/com/android/server/hdmi/SetArcTransmissionStateAction.java
@@ -53,6 +53,18 @@
     @Override
     boolean start() {
         if (mEnabled) {
+            // Enable ARC status immediately after sending <Report Arc Initiated>.
+            // If AVR responds with <Feature Abort>, disable ARC status again.
+            // This is different from spec that says that turns ARC status to
+            // "Enabled" if <Report ARC Initiated> is acknowledged and no
+            // <Feature Abort> is received.
+            // But implemented this way to save the time having to wait for
+            // <Feature Abort>.
+            setArcStatus(true);
+            // If succeeds to send <Report ARC Initiated>, wait general timeout
+            // to check whether there is no <Feature Abort> for <Report ARC Initiated>.
+            mState = STATE_WAITING_TIMEOUT;
+            addTimer(mState, HdmiConfig.TIMEOUT_MS);
             sendReportArcInitiated();
         } else {
             setArcStatus(false);
@@ -67,23 +79,11 @@
         sendCommand(command, new HdmiControlService.SendMessageCallback() {
             @Override
             public void onSendCompleted(int error) {
-                if (error == Constants.SEND_RESULT_SUCCESS) {
-                    // Enable ARC status immediately after sending <Report Arc Initiated>.
-                    // If AVR responds with <Feature Abort>, disable ARC status again.
-                    // This is different from spec that says that turns ARC status to
-                    // "Enabled" if <Report ARC Initiated> is acknowledged and no
-                    // <Feature Abort> is received.
-                    // But implemented this way to save the time having to wait for
-                    // <Feature Abort>.
-                    setArcStatus(true);
-                    // If succeeds to send <Report ARC Initiated>, wait general timeout
-                    // to check whether there is no <Feature Abort> for <Report ARC Initiated>.
-                    mState = STATE_WAITING_TIMEOUT;
-                    addTimer(mState, HdmiConfig.TIMEOUT_MS);
-                } else {
+                if (error != Constants.SEND_RESULT_SUCCESS) {
                     // If fails to send <Report ARC Initiated>, disable ARC and
                     // send <Report ARC Terminated> directly.
                     setArcStatus(false);
+                    HdmiLogger.debug("Failed to send <Report Arc Initiated>.");
                     finish();
                 }
             }
@@ -112,6 +112,7 @@
         if (opcode == Constants.MESSAGE_FEATURE_ABORT) {
             int originalOpcode = cmd.getParams()[0] & 0xFF;
             if (originalOpcode == Constants.MESSAGE_REPORT_ARC_INITIATED) {
+                HdmiLogger.debug("Feature aborted for <Report Arc Initiated>");
                 setArcStatus(false);
                 finish();
                 return true;
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioAction.java b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
index d15ffb0..0871194 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioAction.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
@@ -98,7 +98,7 @@
             @Override
             public void onSendCompleted(int error) {
                 if (error != Constants.SEND_RESULT_SUCCESS) {
-                    DLOGGER.debug("Failed to send <System Audio Mode Request>:" + error);
+                    HdmiLogger.debug("Failed to send <System Audio Mode Request>:" + error);
                     setSystemAudioMode(false);
                     finishWithCallback(HdmiControlManager.RESULT_COMMUNICATION_FAILED);
                 }
@@ -111,7 +111,7 @@
     private void handleSendSystemAudioModeRequestTimeout() {
         if (!mTargetAudioStatus  // Don't retry for Off case.
                 || mSendRetryCount++ >= MAX_SEND_RETRY_COUNT) {
-            DLOGGER.debug("[T]:wait for <Set System Audio Mode>.");
+            HdmiLogger.debug("[T]:wait for <Set System Audio Mode>.");
             setSystemAudioMode(false);
             finishWithCallback(HdmiControlManager.RESULT_TIMEOUT);
             return;
@@ -130,7 +130,7 @@
                 if (cmd.getOpcode() == Constants.MESSAGE_FEATURE_ABORT
                         && (cmd.getParams()[0] & 0xFF)
                                 == Constants.MESSAGE_SYSTEM_AUDIO_MODE_REQUEST) {
-                    DLOGGER.debug("Failed to start system audio mode request.");
+                    HdmiLogger.debug("Failed to start system audio mode request.");
                     setSystemAudioMode(false);
                     finishWithCallback(HdmiControlManager.RESULT_EXCEPTION);
                     return true;
@@ -145,7 +145,7 @@
                     startAudioStatusAction();
                     return true;
                 } else {
-                    DLOGGER.debug("Unexpected system audio mode request:" + receivedStatus);
+                    HdmiLogger.debug("Unexpected system audio mode request:" + receivedStatus);
                     // Unexpected response, consider the request is newly initiated by AVR.
                     // To return 'false' will initiate new SystemAudioActionFromAvr by the control
                     // service.
diff --git a/services/core/java/com/android/server/hdmi/VolumeControlAction.java b/services/core/java/com/android/server/hdmi/VolumeControlAction.java
index ddc267a..4338fc7 100644
--- a/services/core/java/com/android/server/hdmi/VolumeControlAction.java
+++ b/services/core/java/com/android/server/hdmi/VolumeControlAction.java
@@ -17,66 +17,35 @@
 package com.android.server.hdmi;
 
 import static com.android.server.hdmi.Constants.IRT_MS;
+import static com.android.server.hdmi.Constants.MESSAGE_FEATURE_ABORT;
+import static com.android.server.hdmi.Constants.MESSAGE_REPORT_AUDIO_STATUS;
+import static com.android.server.hdmi.Constants.MESSAGE_USER_CONTROL_PRESSED;
 
-import com.android.internal.util.Preconditions;
+import android.media.AudioManager;
 
 /**
  * Feature action that transmits volume change to Audio Receiver.
  * <p>
- * This action is created when a user pressed volume up/down. However, Since Android only provides a
- * listener for delta of some volume change, we will set a target volume, and check reported volume
- * from Audio Receiver(AVR). If TV receives no &lt;Report Audio Status&gt; from AVR, this action
- * will be finished in {@link #IRT_MS} * {@link #VOLUME_CHANGE_TIMEOUT_MAX_COUNT} (ms).
+ * This action is created when a user pressed volume up/down. However, Android only provides a
+ * listener for delta of some volume change instead of individual key event. Also it's hard to know
+ * Audio Receiver's number of volume steps for a single volume control key. Because of this, it
+ * sends key-down event until IRT timeout happens, and it will send key-up event if no additional
+ * volume change happens; otherwise, it will send again key-down as press and hold feature does.
  */
 final class VolumeControlAction extends HdmiCecFeatureAction {
     private static final String TAG = "VolumeControlAction";
 
-    private static final int VOLUME_MUTE = 101;
-    private static final int VOLUME_RESTORE = 102;
+    // State that wait for next volume press.
+    private static final int STATE_WAIT_FOR_NEXT_VOLUME_PRESS = 1;
     private static final int MAX_VOLUME = 100;
-    private static final int MIN_VOLUME = 0;
 
-    // State where to wait for <Report Audio Status>
-    private static final int STATE_WAIT_FOR_REPORT_VOLUME_STATUS = 1;
-
-    // Maximum count of time out used to finish volume action.
-    private static final int VOLUME_CHANGE_TIMEOUT_MAX_COUNT = 2;
+    private static final int UNKNOWN_AVR_VOLUME = -1;
 
     private final int mAvrAddress;
-    private final int mTargetVolume;
-    private final boolean mIsVolumeUp;
-    private int mTimeoutCount;
-
-    /**
-     * Create a {@link VolumeControlAction} for mute/restore change
-     *
-     * @param source source device sending volume change
-     * @param avrAddress address of audio receiver
-     * @param mute whether to mute sound or not. {@code true} for mute on; {@code false} for mute
-     *            off, i.e restore volume
-     * @return newly created {@link VolumeControlAction}
-     */
-    public static VolumeControlAction ofMute(HdmiCecLocalDevice source, int avrAddress,
-            boolean mute) {
-        return new VolumeControlAction(source, avrAddress, mute ? VOLUME_MUTE : VOLUME_RESTORE,
-                false);
-    }
-
-    /**
-     * Create a {@link VolumeControlAction} for volume up/down change
-     *
-     * @param source source device sending volume change
-     * @param avrAddress address of audio receiver
-     * @param targetVolume target volume to be set to AVR. It should be in range of [0-100]
-     * @param isVolumeUp whether to volume up or not. {@code true} for volume up; {@code false} for
-     *            volume down
-     * @return newly created {@link VolumeControlAction}
-     */
-    public static VolumeControlAction ofVolumeChange(HdmiCecLocalDevice source, int avrAddress,
-            int targetVolume, boolean isVolumeUp) {
-        Preconditions.checkArgumentInRange(targetVolume, MIN_VOLUME, MAX_VOLUME, "volume");
-        return new VolumeControlAction(source, avrAddress, targetVolume, isVolumeUp);
-    }
+    private boolean mIsVolumeUp;
+    private long mLastKeyUpdateTime;
+    private int mLastAvrVolume;
+    private boolean mSentKeyPressed;
 
     /**
      * Scale a custom volume value to cec volume scale.
@@ -94,123 +63,141 @@
      *
      * @param cecVolume volume value in cec volume scale. It should be in a range of [0-100]
      * @param scale scale of custom volume (max volume)
-     * @return a volume value scaled to custom volume range
+     * @return a volume scaled to custom volume range
      */
     public static int scaleToCustomVolume(int cecVolume, int scale) {
         return (cecVolume * scale) / MAX_VOLUME;
     }
 
-    private VolumeControlAction(HdmiCecLocalDevice source, int avrAddress, int targetVolume,
-            boolean isVolumeUp) {
+    VolumeControlAction(HdmiCecLocalDevice source, int avrAddress, boolean isVolumeUp) {
         super(source);
-
         mAvrAddress = avrAddress;
-        mTargetVolume = targetVolume;
         mIsVolumeUp = isVolumeUp;
+        mLastAvrVolume = UNKNOWN_AVR_VOLUME;
+        mSentKeyPressed = false;
+
+        updateLastKeyUpdateTime();
+    }
+
+    private void updateLastKeyUpdateTime() {
+        mLastKeyUpdateTime = System.currentTimeMillis();
     }
 
     @Override
     boolean start() {
-        if (isForMute()) {
-            sendMuteChange(mTargetVolume == VOLUME_MUTE);
-            finish();
-            return true;
-        }
-
-        startVolumeChange();
+        mState = STATE_WAIT_FOR_NEXT_VOLUME_PRESS;
+        sendVolumeKeyPressed();
+        resetTimer();
         return true;
     }
 
-
-    private boolean isForMute() {
-        return mTargetVolume == VOLUME_MUTE || mTargetVolume == VOLUME_RESTORE;
-    }
-
-    private void startVolumeChange() {
-        mTimeoutCount = 0;
-        sendVolumeChange(mIsVolumeUp);
-        mState = STATE_WAIT_FOR_REPORT_VOLUME_STATUS;
-        addTimer(mState, IRT_MS);
-    }
-
-    private void sendVolumeChange(boolean up) {
+    private void sendVolumeKeyPressed() {
         sendCommand(HdmiCecMessageBuilder.buildUserControlPressed(getSourceAddress(), mAvrAddress,
-                up ? HdmiCecKeycode.CEC_KEYCODE_VOLUME_UP
+                mIsVolumeUp ? HdmiCecKeycode.CEC_KEYCODE_VOLUME_UP
                         : HdmiCecKeycode.CEC_KEYCODE_VOLUME_DOWN));
+        mSentKeyPressed = true;
     }
 
-    private void sendMuteChange(boolean mute) {
-        sendUserControlPressedAndReleased(mAvrAddress,
-                mute ? HdmiCecKeycode.CEC_KEYCODE_MUTE_FUNCTION :
-                        HdmiCecKeycode.CEC_KEYCODE_RESTORE_VOLUME_FUNCTION);
+    private void resetTimer() {
+        mActionTimer.clearTimerMessage();
+        addTimer(STATE_WAIT_FOR_NEXT_VOLUME_PRESS, IRT_MS);
+    }
+
+    void handleVolumeChange(boolean isVolumeUp) {
+        if (mIsVolumeUp != isVolumeUp) {
+            HdmiLogger.debug("Volume Key Status Changed[old:%b new:%b]", mIsVolumeUp, isVolumeUp);
+            sendVolumeKeyReleased();
+            mIsVolumeUp = isVolumeUp;
+        }
+        updateLastKeyUpdateTime();
+    }
+
+    private void sendVolumeKeyReleased() {
+        sendCommand(HdmiCecMessageBuilder.buildUserControlReleased(
+                getSourceAddress(), mAvrAddress));
+        mSentKeyPressed = false;
     }
 
     @Override
     boolean processCommand(HdmiCecMessage cmd) {
-        if (mState != STATE_WAIT_FOR_REPORT_VOLUME_STATUS) {
+        if (mState != STATE_WAIT_FOR_NEXT_VOLUME_PRESS || cmd.getSource() != mAvrAddress) {
             return false;
         }
 
         switch (cmd.getOpcode()) {
-            case Constants.MESSAGE_REPORT_AUDIO_STATUS:
-                handleReportAudioStatus(cmd);
-                return true;
-            case Constants.MESSAGE_FEATURE_ABORT:
-                int originalOpcode = cmd.getParams()[0] & 0xFF;
-                if (originalOpcode == Constants.MESSAGE_USER_CONTROL_PRESSED
-                        || originalOpcode == Constants.MESSAGE_USER_CONTROL_RELEASED) {
-                    // TODO: handle feature abort.
-                    finish();
-                    return true;
-                }
-            default:  // fall through
+            case MESSAGE_REPORT_AUDIO_STATUS:
+                return handleReportAudioStatus(cmd);
+            case MESSAGE_FEATURE_ABORT:
+                return handleFeatureAbort(cmd);
+            default:
                 return false;
         }
     }
 
-    private void handleReportAudioStatus(HdmiCecMessage cmd) {
-        byte[] params = cmd.getParams();
+    private boolean handleReportAudioStatus(HdmiCecMessage cmd) {
+        byte params[] = cmd.getParams();
+        boolean mute = (params[0] & 0x80) == 0x80;
         int volume = params[0] & 0x7F;
-        // Update volume with new value.
-        // Note that it will affect system volume change.
-        tv().setAudioStatus(false, volume);
-        if (mIsVolumeUp) {
-            if (mTargetVolume <= volume) {
-                finishWithVolumeChangeRelease();
-                return;
-            }
-        } else {
-            if (mTargetVolume >= volume) {
-                finishWithVolumeChangeRelease();
-                return;
-            }
+        mLastAvrVolume = volume;
+        if (shouldUpdateAudioVolume(mute)) {
+            HdmiLogger.debug("Force volume change[mute:%b, volume=%d]", mute, volume);
+            tv().setAudioStatus(mute, volume);
         }
-
-        // Clear action status and send another volume change command.
-        clear();
-        startVolumeChange();
+        return true;
     }
 
-    private void finishWithVolumeChangeRelease() {
-        sendCommand(HdmiCecMessageBuilder.buildUserControlReleased(
-                getSourceAddress(), mAvrAddress));
-        finish();
+    private boolean shouldUpdateAudioVolume(boolean mute) {
+        // Do nothing if in mute.
+        if (mute) {
+            return true;
+        }
+
+        // Update audio status if current volume position is edge of volume bar,
+        // i.e max or min volume.
+        AudioManager audioManager = tv().getService().getAudioManager();
+        int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
+        if (mIsVolumeUp) {
+            int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
+            return currentVolume == maxVolume;
+        } else {
+            return currentVolume == 0;
+        }
+    }
+
+    private boolean handleFeatureAbort(HdmiCecMessage cmd) {
+        int originalOpcode = cmd.getParams()[0] & 0xFF;
+        // Since it sends <User Control Released> only when it finishes this action,
+        // it takes care of <User Control Pressed> only here.
+        if (originalOpcode == MESSAGE_USER_CONTROL_PRESSED) {
+            finish();
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected void clear() {
+        super.clear();
+        if (mSentKeyPressed) {
+            sendVolumeKeyReleased();
+        }
+        if (mLastAvrVolume != UNKNOWN_AVR_VOLUME) {
+            tv().setAudioStatus(false, mLastAvrVolume);
+            mLastAvrVolume = UNKNOWN_AVR_VOLUME;
+        }
     }
 
     @Override
     void handleTimerEvent(int state) {
-        if (mState != STATE_WAIT_FOR_REPORT_VOLUME_STATUS) {
+        if (state != STATE_WAIT_FOR_NEXT_VOLUME_PRESS) {
             return;
         }
 
-        // If no report volume action after IRT * VOLUME_CHANGE_TIMEOUT_MAX_COUNT just stop volume
-        // action.
-        if (++mTimeoutCount == VOLUME_CHANGE_TIMEOUT_MAX_COUNT) {
-            finishWithVolumeChangeRelease();
-            return;
+        if (System.currentTimeMillis() - mLastKeyUpdateTime >= IRT_MS) {
+            finish();
+        } else {
+            sendVolumeKeyPressed();
+            resetTimer();
         }
-
-        sendVolumeChange(mIsVolumeUp);
-        addTimer(mState, IRT_MS);
     }
 }
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 93dceff..9c567ac 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -241,6 +241,9 @@
     /** Switch code: Headphone/Microphone Jack.  When set, something is inserted. */
     public static final int SW_JACK_PHYSICAL_INSERT = 0x07;
 
+    /** Switch code: Camera lens cover. When set the lens is covered. */
+    public static final int SW_CAMERA_LENS_COVER = 0x09;
+
     public static final int SW_LID_BIT = 1 << SW_LID;
     public static final int SW_KEYPAD_SLIDE_BIT = 1 << SW_KEYPAD_SLIDE;
     public static final int SW_HEADPHONE_INSERT_BIT = 1 << SW_HEADPHONE_INSERT;
@@ -249,6 +252,7 @@
     public static final int SW_JACK_PHYSICAL_INSERT_BIT = 1 << SW_JACK_PHYSICAL_INSERT;
     public static final int SW_JACK_BITS =
             SW_HEADPHONE_INSERT_BIT | SW_MICROPHONE_INSERT_BIT | SW_JACK_PHYSICAL_INSERT_BIT | SW_LINEOUT_INSERT_BIT;
+    public static final int SW_CAMERA_LENS_COVER_BIT = 1 << SW_CAMERA_LENS_COVER;
 
     /** Whether to use the dev/input/event or uevent subsystem for the audio jack. */
     final boolean mUseDevInputEventForAudioJack;
@@ -693,7 +697,9 @@
             synchronized (mDataStore) {
                 for (int i = 0; i < numFullKeyboards; i++) {
                     final InputDevice inputDevice = mTempFullKeyboards.get(i);
-                    if (mDataStore.getCurrentKeyboardLayout(inputDevice.getDescriptor()) == null) {
+                    final String layout =
+                            getCurrentKeyboardLayoutForInputDevice(inputDevice.getIdentifier());
+                    if (layout == null) {
                         missingLayoutForExternalKeyboard = true;
                         if (i < numFullKeyboardsAdded) {
                             missingLayoutForExternalKeyboardAdded = true;
@@ -1380,6 +1386,11 @@
             mWindowManagerCallbacks.notifyLidSwitchChanged(whenNanos, lidOpen);
         }
 
+        if ((switchMask & SW_CAMERA_LENS_COVER_BIT) != 0) {
+            final boolean lensCovered = ((switchValues & SW_CAMERA_LENS_COVER_BIT) == 0);
+            mWindowManagerCallbacks.notifyCameraLensCoverSwitchChanged(whenNanos, lensCovered);
+        }
+
         if (mUseDevInputEventForAudioJack && (switchMask & SW_JACK_BITS) != 0) {
             mWiredAccessoryCallbacks.notifyWiredAccessoryChanged(whenNanos, switchValues,
                     switchMask);
@@ -1420,8 +1431,8 @@
     }
 
     // Native callback.
-    private int interceptWakeMotionBeforeQueueing(long whenNanos, int policyFlags) {
-        return mWindowManagerCallbacks.interceptWakeMotionBeforeQueueing(
+    private int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags) {
+        return mWindowManagerCallbacks.interceptMotionBeforeQueueingNonInteractive(
                 whenNanos, policyFlags);
     }
 
@@ -1575,6 +1586,8 @@
 
         public void notifyLidSwitchChanged(long whenNanos, boolean lidOpen);
 
+        public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered);
+
         public void notifyInputChannelBroken(InputWindowHandle inputWindowHandle);
 
         public long notifyANR(InputApplicationHandle inputApplicationHandle,
@@ -1582,7 +1595,7 @@
 
         public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags);
 
-        public int interceptWakeMotionBeforeQueueing(long whenNanos, int policyFlags);
+        public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags);
 
         public long interceptKeyBeforeDispatching(InputWindowHandle focus,
                 KeyEvent event, int policyFlags);
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index c3bc306..30154d7 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -199,9 +199,6 @@
             List<JobStatus> jobsForUser = mJobs.getJobsByUser(userHandle);
             for (int i=0; i<jobsForUser.size(); i++) {
                 JobStatus toRemove = jobsForUser.get(i);
-                if (DEBUG) {
-                    Slog.d(TAG, "Cancelling: " + toRemove);
-                }
                 cancelJobLocked(toRemove);
             }
         }
@@ -219,9 +216,6 @@
             List<JobStatus> jobsForUid = mJobs.getJobsByUid(uid);
             for (int i=0; i<jobsForUid.size(); i++) {
                 JobStatus toRemove = jobsForUid.get(i);
-                if (DEBUG) {
-                    Slog.d(TAG, "Cancelling: " + toRemove);
-                }
                 cancelJobLocked(toRemove);
             }
         }
@@ -547,14 +541,28 @@
         private void queueReadyJobsForExecutionH() {
             synchronized (mJobs) {
                 ArraySet<JobStatus> jobs = mJobs.getJobs();
+                if (DEBUG) {
+                    Slog.d(TAG, "queuing all ready jobs for execution:");
+                }
                 for (int i=0; i<jobs.size(); i++) {
                     JobStatus job = jobs.valueAt(i);
                     if (isReadyToBeExecutedLocked(job)) {
+                        if (DEBUG) {
+                            Slog.d(TAG, "    queued " + job.toShortString());
+                        }
                         mPendingJobs.add(job);
                     } else if (isReadyToBeCancelledLocked(job)) {
                         stopJobOnServiceContextLocked(job);
                     }
                 }
+                if (DEBUG) {
+                    final int queuedJobs = mPendingJobs.size();
+                    if (queuedJobs == 0) {
+                        Slog.d(TAG, "No jobs pending.");
+                    } else {
+                        Slog.d(TAG, queuedJobs + " jobs queued.");
+                    }
+                }
             }
         }
 
@@ -657,6 +665,9 @@
         private void maybeRunPendingJobsH() {
             synchronized (mJobs) {
                 Iterator<JobStatus> it = mPendingJobs.iterator();
+                if (DEBUG) {
+                    Slog.d(TAG, "pending queue: " + mPendingJobs.size() + " jobs.");
+                }
                 while (it.hasNext()) {
                     JobStatus nextPending = it.next();
                     JobServiceContext availableContext = null;
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index 5297911..344c57b 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -157,6 +157,7 @@
             mExecutionStartTimeElapsed = SystemClock.elapsedRealtime();
 
             mVerb = VERB_BINDING;
+            scheduleOpTimeOut();
             final Intent intent = new Intent().setComponent(job.getServiceComponent());
             boolean binding = mContext.bindServiceAsUser(intent, this,
                     Context.BIND_AUTO_CREATE | Context.BIND_NOT_FOREGROUND,
@@ -253,8 +254,6 @@
             return;
         }
         this.service = IJobService.Stub.asInterface(service);
-        // Remove all timeouts.
-        mCallbackHandler.removeMessages(MSG_TIMEOUT);
         final PowerManager pm =
                 (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
         mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, mRunningJob.getTag());
@@ -299,6 +298,7 @@
         public void handleMessage(Message message) {
             switch (message.what) {
                 case MSG_SERVICE_BOUND:
+                    removeMessages(MSG_TIMEOUT);
                     handleServiceBoundH();
                     break;
                 case MSG_CALLBACK:
@@ -337,6 +337,9 @@
 
         /** Start the job on the service. */
         private void handleServiceBoundH() {
+            if (DEBUG) {
+                Slog.d(TAG, "MSG_SERVICE_BOUND for " + mRunningJob.toShortString());
+            }
             if (mVerb != VERB_BINDING) {
                 Slog.e(TAG, "Sending onStartJob for a job that isn't pending. "
                         + VERB_STRINGS[mVerb]);
@@ -456,42 +459,36 @@
 
         /** Process MSG_TIMEOUT here. */
         private void handleOpTimeoutH() {
-            if (JobSchedulerService.DEBUG) {
-                Slog.d(TAG, "MSG_TIMEOUT of " +
-                        mRunningJob.getServiceComponent().getShortClassName() + " : "
-                        + mParams.getJobId());
-            }
-
-            final int jobId = mParams.getJobId();
             switch (mVerb) {
+                case VERB_BINDING:
+                    Slog.e(TAG, "Time-out while trying to bind " + mRunningJob.toShortString() +
+                            ", dropping.");
+                    closeAndCleanupJobH(false /* needsReschedule */);
+                    break;
                 case VERB_STARTING:
                     // Client unresponsive - wedged or failed to respond in time. We don't really
                     // know what happened so let's log it and notify the JobScheduler
                     // FINISHED/NO-RETRY.
                     Slog.e(TAG, "No response from client for onStartJob '" +
-                            mRunningJob.getServiceComponent().getShortClassName() + "' jId: "
-                            + jobId);
+                            mRunningJob.toShortString());
                     closeAndCleanupJobH(false /* needsReschedule */);
                     break;
                 case VERB_STOPPING:
                     // At least we got somewhere, so fail but ask the JobScheduler to reschedule.
                     Slog.e(TAG, "No response from client for onStopJob, '" +
-                            mRunningJob.getServiceComponent().getShortClassName() + "' jId: "
-                            + jobId);
+                            mRunningJob.toShortString());
                     closeAndCleanupJobH(true /* needsReschedule */);
                     break;
                 case VERB_EXECUTING:
                     // Not an error - client ran out of time.
                     Slog.i(TAG, "Client timed out while executing (no jobFinished received)." +
-                            " sending onStop. "  +
-                            mRunningJob.getServiceComponent().getShortClassName() + "' jId: "
-                            + jobId);
+                            " sending onStop. "  + mRunningJob.toShortString());
                     sendStopMessageH();
                     break;
                 default:
-                    Slog.e(TAG, "Handling timeout for an unknown active job state: "
-                            + mRunningJob);
-                    return;
+                    Slog.e(TAG, "Handling timeout for an invalid job state: " +
+                            mRunningJob.toShortString() + ", dropping.");
+                    closeAndCleanupJobH(false /* needsReschedule */);
             }
         }
 
@@ -530,7 +527,9 @@
                 } catch (RemoteException e) {
                     // Whatever.
                 }
-                mWakeLock.release();
+                if (mWakeLock != null) {
+                    mWakeLock.release();
+                }
                 mContext.unbindService(JobServiceContext.this);
                 mWakeLock = null;
                 mRunningJob = null;
@@ -547,25 +546,25 @@
             removeMessages(MSG_SHUTDOWN_EXECUTION);
             mCompletedListener.onJobCompleted(completedJob, reschedule);
         }
+    }
 
-        /**
-         * Called when sending a message to the client, over whose execution we have no control. If
-         * we haven't received a response in a certain amount of time, we want to give up and carry
-         * on with life.
-         */
-        private void scheduleOpTimeOut() {
-            mCallbackHandler.removeMessages(MSG_TIMEOUT);
+    /**
+     * Called when sending a message to the client, over whose execution we have no control. If
+     * we haven't received a response in a certain amount of time, we want to give up and carry
+     * on with life.
+     */
+    private void scheduleOpTimeOut() {
+        mCallbackHandler.removeMessages(MSG_TIMEOUT);
 
-            final long timeoutMillis = (mVerb == VERB_EXECUTING) ?
-                    EXECUTING_TIMESLICE_MILLIS : OP_TIMEOUT_MILLIS;
-            if (DEBUG) {
-                Slog.d(TAG, "Scheduling time out for '" +
-                        mRunningJob.getServiceComponent().getShortClassName() + "' jId: " +
-                        mParams.getJobId() + ", in " + (timeoutMillis / 1000) + " s");
-            }
-            Message m = mCallbackHandler.obtainMessage(MSG_TIMEOUT);
-            mCallbackHandler.sendMessageDelayed(m, timeoutMillis);
-            mTimeoutElapsed = SystemClock.elapsedRealtime() + timeoutMillis;
+        final long timeoutMillis = (mVerb == VERB_EXECUTING) ?
+                EXECUTING_TIMESLICE_MILLIS : OP_TIMEOUT_MILLIS;
+        if (DEBUG) {
+            Slog.d(TAG, "Scheduling time out for '" +
+                    mRunningJob.getServiceComponent().getShortClassName() + "' jId: " +
+                    mParams.getJobId() + ", in " + (timeoutMillis / 1000) + " s");
         }
+        Message m = mCallbackHandler.obtainMessage(MSG_TIMEOUT);
+        mCallbackHandler.sendMessageDelayed(m, timeoutMillis);
+        mTimeoutElapsed = SystemClock.elapsedRealtime() + timeoutMillis;
     }
 }
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index 753ae39..11818d8 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -22,6 +22,7 @@
 import com.android.internal.location.GpsNetInitiatedHandler.GpsNiNotification;
 import com.android.internal.location.ProviderProperties;
 import com.android.internal.location.ProviderRequest;
+import com.android.internal.R;
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
 
@@ -76,6 +77,7 @@
 import android.util.Log;
 import android.util.NtpTrustedTime;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileDescriptor;
 import java.io.FileInputStream;
@@ -138,7 +140,7 @@
     private static final int LOCATION_HAS_BEARING = 8;
     private static final int LOCATION_HAS_ACCURACY = 16;
 
-// IMPORTANT - the GPS_DELETE_* symbols here must match constants in gps.h
+    // IMPORTANT - the GPS_DELETE_* symbols here must match constants in gps.h
     private static final int GPS_DELETE_EPHEMERIS = 0x0001;
     private static final int GPS_DELETE_ALMANAC = 0x0002;
     private static final int GPS_DELETE_POSITION = 0x0004;
@@ -329,6 +331,7 @@
     private int mSuplServerPort;
     private String mC2KServerHost;
     private int mC2KServerPort;
+    private boolean mSuplEsEnabled = false;
 
     private final Context mContext;
     private final NtpTrustedTime mNtpTime;
@@ -367,6 +370,10 @@
     // Alarms
     private final static String ALARM_WAKEUP = "com.android.internal.location.ALARM_WAKEUP";
     private final static String ALARM_TIMEOUT = "com.android.internal.location.ALARM_TIMEOUT";
+
+    // SIM/Carrier info.
+    private final static String SIM_STATE_CHANGED = "android.intent.action.SIM_STATE_CHANGED";
+
     private final PowerManager mPowerManager;
     private final AlarmManager mAlarmManager;
     private final PendingIntent mWakeupIntent;
@@ -443,15 +450,14 @@
         return mGpsNavigationMessageProvider;
     }
 
-    private final BroadcastReceiver mBroadcastReciever = new BroadcastReceiver() {
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
         @Override public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
 
+            if (DEBUG) Log.d(TAG, "receive broadcast intent, action: " + action);
             if (action.equals(ALARM_WAKEUP)) {
-                if (DEBUG) Log.d(TAG, "ALARM_WAKEUP");
                 startNavigating(false);
             } else if (action.equals(ALARM_TIMEOUT)) {
-                if (DEBUG) Log.d(TAG, "ALARM_TIMEOUT");
                 hibernate();
             } else if (action.equals(Intents.DATA_SMS_RECEIVED_ACTION)) {
                 checkSmsSuplInit(intent);
@@ -477,6 +483,20 @@
                     || Intent.ACTION_SCREEN_OFF.equals(action)
                     || Intent.ACTION_SCREEN_ON.equals(action)) {
                 updateLowPowerMode();
+            } else if (action.equals(SIM_STATE_CHANGED)) {
+                TelephonyManager phone = (TelephonyManager)
+                        mContext.getSystemService(Context.TELEPHONY_SERVICE);
+                int simState = phone.getSimState();
+                Log.d(TAG, "SIM STATE CHANGED to " + simState);
+                String mccMnc = phone.getSimOperator();
+                if (simState == TelephonyManager.SIM_STATE_READY &&
+                    !TextUtils.isEmpty(mccMnc)) {
+                    Log.d(TAG, "SIM STATE is ready, SIM MCC/MNC is " + mccMnc);
+                    synchronized (mLock) {
+                        reloadGpsProperties(context, mProperties);
+                        mNIHandler.setSuplEsEnablement(mSuplEsEnabled);
+                    }
+                }
             }
         }
     };
@@ -514,37 +534,83 @@
         return native_is_supported();
     }
 
-    private boolean loadPropertiesFile(String filename) {
-        mProperties = new Properties();
+    private void reloadGpsProperties(Context context, Properties properties) {
+        Log.d(TAG, "Reset GPS properties, previous size = " + properties.size());
+        loadPropertiesFromResource(context, properties);
+        boolean isPropertiesLoadedFromFile = false;
+        final String gpsHardware = SystemProperties.get("ro.hardware.gps");
+        if (!TextUtils.isEmpty(gpsHardware)) {
+            final String propFilename =
+                    PROPERTIES_FILE_PREFIX + "." + gpsHardware + PROPERTIES_FILE_SUFFIX;
+            isPropertiesLoadedFromFile =
+                    loadPropertiesFromFile(propFilename, properties);
+        }
+        if (!isPropertiesLoadedFromFile) {
+            loadPropertiesFromFile(DEFAULT_PROPERTIES_FILE, properties);
+        }
+        Log.d(TAG, "GPS properties reloaded, size = " + properties.size());
+
+        // TODO: we should get rid of C2K specific setting.
+        setSuplHostPort(properties.getProperty("SUPL_HOST"),
+                        properties.getProperty("SUPL_PORT"));
+        mC2KServerHost = properties.getProperty("C2K_HOST");
+        String portString = properties.getProperty("C2K_PORT");
+        if (mC2KServerHost != null && portString != null) {
+            try {
+                mC2KServerPort = Integer.parseInt(portString);
+            } catch (NumberFormatException e) {
+                Log.e(TAG, "unable to parse C2K_PORT: " + portString);
+            }
+        }
+
+        try {
+            // Convert properties to string contents and send it to HAL.
+            ByteArrayOutputStream baos = new ByteArrayOutputStream(4096);
+            properties.store(baos, null);
+            native_configuration_update(baos.toString());
+            Log.d(TAG, "final config = " + baos.toString());
+        } catch (IOException ex) {
+            Log.w(TAG, "failed to dump properties contents");
+        }
+
+        // SUPL_ES configuration.
+        String suplESProperty = mProperties.getProperty("SUPL_ES");
+        if (suplESProperty != null) {
+            try {
+                mSuplEsEnabled = (Integer.parseInt(suplESProperty) == 1);
+            } catch (NumberFormatException e) {
+                Log.e(TAG, "unable to parse SUPL_ES: " + suplESProperty);
+            }
+        }
+    }
+
+    private void loadPropertiesFromResource(Context context,
+                                            Properties properties) {
+        String[] configValues = context.getResources().getStringArray(
+                com.android.internal.R.array.config_gpsParameters);
+        for (String item : configValues) {
+            Log.d(TAG, "GpsParamsResource: " + item);
+            String[] split = item.split("=");
+            if (split.length == 2) {
+                properties.setProperty(split[0].trim().toUpperCase(), split[1]);
+            } else {
+                Log.w(TAG, "malformed contents: " + item);
+            }
+        }
+    }
+
+    private boolean loadPropertiesFromFile(String filename,
+                                           Properties properties) {
         try {
             File file = new File(filename);
             FileInputStream stream = null;
             try {
                 stream = new FileInputStream(file);
-                mProperties.load(stream);
+                properties.load(stream);
             } finally {
                 IoUtils.closeQuietly(stream);
             }
 
-            mSuplServerHost = mProperties.getProperty("SUPL_HOST");
-            String portString = mProperties.getProperty("SUPL_PORT");
-            if (mSuplServerHost != null && portString != null) {
-                try {
-                    mSuplServerPort = Integer.parseInt(portString);
-                } catch (NumberFormatException e) {
-                    Log.e(TAG, "unable to parse SUPL_PORT: " + portString);
-                }
-            }
-
-            mC2KServerHost = mProperties.getProperty("C2K_HOST");
-            portString = mProperties.getProperty("C2K_PORT");
-            if (mC2KServerHost != null && portString != null) {
-                try {
-                    mC2KServerPort = Integer.parseInt(portString);
-                } catch (NumberFormatException e) {
-                    Log.e(TAG, "unable to parse C2K_PORT: " + portString);
-                }
-            }
         } catch (IOException e) {
             Log.w(TAG, "Could not open GPS configuration file " + filename);
             return false;
@@ -557,7 +623,6 @@
         mContext = context;
         mNtpTime = NtpTrustedTime.getInstance(context);
         mILocationManager = ilocationManager;
-        mNIHandler = new GpsNetInitiatedHandler(context);
 
         mLocation.setExtras(mLocationExtras);
 
@@ -580,16 +645,14 @@
         mBatteryStats = IBatteryStats.Stub.asInterface(ServiceManager.getService(
                 BatteryStats.SERVICE_NAME));
 
-        boolean propertiesLoaded = false;
-        final String gpsHardware = SystemProperties.get("ro.hardware.gps");
-        if (!TextUtils.isEmpty(gpsHardware)) {
-            final String propFilename = PROPERTIES_FILE_PREFIX + "." + gpsHardware + PROPERTIES_FILE_SUFFIX;
-            propertiesLoaded = loadPropertiesFile(propFilename);
-        }
+        // Load GPS configuration.
+        mProperties = new Properties();
+        reloadGpsProperties(mContext, mProperties);
 
-        if (!propertiesLoaded) {
-            loadPropertiesFile(DEFAULT_PROPERTIES_FILE);
-        }
+        // Create a GPS net-initiated handler.
+        mNIHandler = new GpsNetInitiatedHandler(context,
+                                                mNetInitiatedListener,
+                                                mSuplEsEnabled);
 
         // construct handler, listen for events
         mHandler = new ProviderHandler(looper);
@@ -625,7 +688,7 @@
         intentFilter.addAction(Intents.DATA_SMS_RECEIVED_ACTION);
         intentFilter.addDataScheme("sms");
         intentFilter.addDataAuthority("localhost","7275");
-        mContext.registerReceiver(mBroadcastReciever, intentFilter, null, mHandler);
+        mContext.registerReceiver(mBroadcastReceiver, intentFilter, null, mHandler);
 
         intentFilter = new IntentFilter();
         intentFilter.addAction(Intents.WAP_PUSH_RECEIVED_ACTION);
@@ -634,7 +697,7 @@
         } catch (IntentFilter.MalformedMimeTypeException e) {
             Log.w(TAG, "Malformed SUPL init mime type");
         }
-        mContext.registerReceiver(mBroadcastReciever, intentFilter, null, mHandler);
+        mContext.registerReceiver(mBroadcastReceiver, intentFilter, null, mHandler);
 
         intentFilter = new IntentFilter();
         intentFilter.addAction(ALARM_WAKEUP);
@@ -643,7 +706,8 @@
         intentFilter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
         intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
         intentFilter.addAction(Intent.ACTION_SCREEN_ON);
-        mContext.registerReceiver(mBroadcastReciever, intentFilter, null, mHandler);
+        intentFilter.addAction(SIM_STATE_CHANGED);
+        mContext.registerReceiver(mBroadcastReceiver, intentFilter, null, mHandler);
     }
 
     /**
@@ -844,6 +908,19 @@
         sendMessage(ENABLE, 1, null);
     }
 
+    private void setSuplHostPort(String hostString, String portString) {
+        if (hostString != null) {
+            mSuplServerHost = hostString;
+        }
+        if (portString != null) {
+            try {
+                mSuplServerPort = Integer.parseInt(portString);
+            } catch (NumberFormatException e) {
+                Log.e(TAG, "unable to parse SUPL_PORT: " + portString);
+            }
+        }
+    }
+
     private void handleEnable() {
         if (DEBUG) Log.d(TAG, "handleEnable");
 
@@ -2055,5 +2132,8 @@
     private static native boolean native_is_navigation_message_supported();
     private native boolean native_start_navigation_message_collection();
     private native boolean native_stop_navigation_message_collection();
+
+    // GNSS Configuration
+    private static native void native_configuration_update(String configData);
 }
 
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index 0da2cfa..5097927 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -229,9 +229,15 @@
      * {@link AudioManager#ADJUST_SAME}.
      *
      * @param direction The direction to adjust volume in.
+     * @param flags Any of the flags from {@link AudioManager}.
+     * @param packageName The package that made the original volume request.
+     * @param uid The uid that made the original volume request.
+     * @param useSuggested True to use adjustSuggestedStreamVolume instead of
+     *            adjustStreamVolume.
      */
-    public void adjustVolume(int direction, int flags, String packageName, int uid) {
-        if (isPlaybackActive(false)) {
+    public void adjustVolume(int direction, int flags, String packageName, int uid,
+            boolean useSuggested) {
+        if (isPlaybackActive(false) || hasFlag(MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY)) {
             flags &= ~AudioManager.FLAG_PLAY_SOUND;
         }
         if (direction > 1) {
@@ -241,8 +247,13 @@
         }
         if (mVolumeType == PlaybackInfo.PLAYBACK_TYPE_LOCAL) {
             int stream = AudioAttributes.toLegacyStreamType(mAudioAttrs);
-            mAudioManagerInternal.adjustStreamVolumeForUid(stream, direction, flags, packageName,
-                    uid);
+            if (useSuggested) {
+                mAudioManagerInternal.adjustSuggestedStreamVolumeForUid(stream, direction, flags,
+                        packageName, uid);
+            } else {
+                mAudioManagerInternal.adjustStreamVolumeForUid(stream, direction, flags,
+                        packageName, uid);
+            }
         } else {
             if (mVolumeControlType == VolumeProvider.VOLUME_CONTROL_FIXED) {
                 // Nothing to do, the volume cannot be changed
@@ -1020,7 +1031,7 @@
             int uid = Binder.getCallingUid();
             final long token = Binder.clearCallingIdentity();
             try {
-                MediaSessionRecord.this.adjustVolume(direction, flags, packageName, uid);
+                MediaSessionRecord.this.adjustVolume(direction, flags, packageName, uid, false);
             } finally {
                 Binder.restoreCallingIdentity(token);
             }
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 0c6d46c..a12dd1c 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -814,7 +814,7 @@
                 }
             } else {
                 session.adjustVolume(direction, flags, getContext().getPackageName(),
-                        UserHandle.myUserId());
+                        UserHandle.myUserId(), true);
                 if (session.getPlaybackType() == PlaybackInfo.PLAYBACK_TYPE_REMOTE
                         && mRvc != null) {
                     try {
diff --git a/services/core/java/com/android/server/notification/ConditionProviders.java b/services/core/java/com/android/server/notification/ConditionProviders.java
index 189131c..05ad1fe 100644
--- a/services/core/java/com/android/server/notification/ConditionProviders.java
+++ b/services/core/java/com/android/server/notification/ConditionProviders.java
@@ -545,8 +545,9 @@
                 setZenModeCondition(condition, "downtime");
             }
             // exit downtime
-            if (!inDowntime && mode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
-                    && mDowntime.isDowntimeCondition(mExitCondition)) {
+            if (!inDowntime && mDowntime.isDowntimeCondition(mExitCondition)
+                    && (mode == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
+                                || mode == Global.ZEN_MODE_NO_INTERRUPTIONS)) {
                 mZenModeHelper.setZenMode(Global.ZEN_MODE_OFF, "downtimeExit");
             }
         }
diff --git a/services/core/java/com/android/server/notification/DowntimeConditionProvider.java b/services/core/java/com/android/server/notification/DowntimeConditionProvider.java
index 317ebef..b71bad8 100644
--- a/services/core/java/com/android/server/notification/DowntimeConditionProvider.java
+++ b/services/core/java/com/android/server/notification/DowntimeConditionProvider.java
@@ -43,6 +43,7 @@
 import java.util.Date;
 import java.util.Locale;
 import java.util.Objects;
+import java.util.TimeZone;
 
 /** Built-in zen condition provider for managing downtime */
 public class DowntimeConditionProvider extends ConditionProviderService {
@@ -275,6 +276,9 @@
                 final long schTime = intent.getLongExtra(EXTRA_TIME, 0);
                 if (DEBUG) Slog.d(TAG, String.format("%s scheduled for %s, fired at %s, delta=%s",
                         action, ts(schTime), ts(now), now - schTime));
+            } else if (Intent.ACTION_TIMEZONE_CHANGED.equals(action)) {
+                if (DEBUG) Slog.d(TAG, "timezone changed to " + TimeZone.getDefault());
+                mCalendar.setTimeZone(TimeZone.getDefault());
             } else {
                 if (DEBUG) Slog.d(TAG, action + " fired at " + now);
             }
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index d0f4054..c09eff8 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -49,6 +49,7 @@
 import android.database.ContentObserver;
 import android.media.AudioAttributes;
 import android.media.AudioManager;
+import android.media.AudioSystem;
 import android.media.IRingtonePlayer;
 import android.net.Uri;
 import android.os.Binder;
@@ -69,6 +70,7 @@
 import android.service.notification.IConditionListener;
 import android.service.notification.IConditionProvider;
 import android.service.notification.INotificationListener;
+import android.service.notification.IStatusBarNotificationHolder;
 import android.service.notification.NotificationListenerService;
 import android.service.notification.NotificationRankingUpdate;
 import android.service.notification.StatusBarNotification;
@@ -1126,6 +1128,19 @@
             return mRankingHelper.getPackagePriority(pkg, uid);
         }
 
+        @Override
+        public void setPackageVisibilityOverride(String pkg, int uid, int visibility) {
+            checkCallerIsSystem();
+            mRankingHelper.setPackageVisibilityOverride(pkg, uid, visibility);
+            savePolicyFile();
+        }
+
+        @Override
+        public int getPackageVisibilityOverride(String pkg, int uid) {
+            checkCallerIsSystem();
+            return mRankingHelper.getPackageVisibilityOverride(pkg, uid);
+        }
+
         /**
          * System-only API for getting a list of current (i.e. not cleared) notifications.
          *
@@ -1457,7 +1472,14 @@
         @Override
         public boolean matchesCallFilter(Bundle extras) {
             enforceSystemOrSystemUI("INotificationManager.matchesCallFilter");
-            return mZenModeHelper.matchesCallFilter(extras,
+            return matchesCallFilterAsUser(extras, Binder.getCallingUid());
+        }
+
+        @Override
+        public boolean matchesCallFilterAsUser(Bundle extras, int userId) {
+            enforceSystemOrSystemUI("INotificationManager.matchesCallFilter");
+            UserHandle userHandle = new UserHandle(userId);
+            return mZenModeHelper.matchesCallFilter(userHandle, extras,
                     mRankingHelper.findExtractor(ValidateNotificationPeople.class));
         }
     };
@@ -1924,14 +1946,19 @@
     }
 
     private static AudioAttributes audioAttributesForNotification(Notification n) {
-        if (n.audioAttributes != null
-                && !Notification.AUDIO_ATTRIBUTES_DEFAULT.equals(n.audioAttributes)) {
+        if (n.audioAttributes != null) {
             return n.audioAttributes;
+        } else if (n.audioStreamType >= 0 && n.audioStreamType < AudioSystem.getNumStreamTypes()) {
+            // the stream type is valid, use it
+            return new AudioAttributes.Builder()
+                    .setInternalLegacyStreamType(n.audioStreamType)
+                    .build();
+        } else if (n.audioStreamType == AudioSystem.STREAM_DEFAULT) {
+            return Notification.AUDIO_ATTRIBUTES_DEFAULT;
+        } else {
+            Log.w(TAG, String.format("Invalid stream type: %d", n.audioStreamType));
+            return Notification.AUDIO_ATTRIBUTES_DEFAULT;
         }
-        return new AudioAttributes.Builder()
-                .setLegacyStreamType(n.audioStreamType)
-                .setUsage(AudioAttributes.usageForLegacyStreamType(n.audioStreamType))
-                .build();
     }
 
     void showNextToastLocked() {
@@ -2045,12 +2072,15 @@
             }
             int indexBefore = findNotificationRecordIndexLocked(record);
             boolean interceptBefore = record.isIntercepted();
+            int visibilityBefore = record.getPackageVisibilityOverride();
             recon.applyChangesLocked(record);
             applyZenModeLocked(record);
             mRankingHelper.sort(mNotificationList);
             int indexAfter = findNotificationRecordIndexLocked(record);
             boolean interceptAfter = record.isIntercepted();
-            changed = indexBefore != indexAfter || interceptBefore != interceptAfter;
+            int visibilityAfter = record.getPackageVisibilityOverride();
+            changed = indexBefore != indexAfter || interceptBefore != interceptAfter
+                    || visibilityBefore != visibilityAfter;
             if (interceptBefore && !interceptAfter) {
                 buzzBeepBlinkLocked(record);
             }
@@ -2064,14 +2094,18 @@
         synchronized (mNotificationList) {
             final int N = mNotificationList.size();
             ArrayList<String> orderBefore = new ArrayList<String>(N);
+            int[] visibilities = new int[N];
             for (int i = 0; i < N; i++) {
                 final NotificationRecord r = mNotificationList.get(i);
                 orderBefore.add(r.getKey());
+                visibilities[i] = r.getPackageVisibilityOverride();
                 mRankingHelper.extractSignals(r);
             }
-            mRankingHelper.sort(mNotificationList);
             for (int i = 0; i < N; i++) {
-                if (!orderBefore.get(i).equals(mNotificationList.get(i).getKey())) {
+                mRankingHelper.sort(mNotificationList);
+                final NotificationRecord r = mNotificationList.get(i);
+                if (!orderBefore.get(i).equals(r.getKey())
+                        || visibilities[i] != r.getPackageVisibilityOverride()) {
                     scheduleSendRankingUpdate();
                     return;
                 }
@@ -2601,6 +2635,7 @@
         final int N = mNotificationList.size();
         ArrayList<String> keys = new ArrayList<String>(N);
         ArrayList<String> interceptedKeys = new ArrayList<String>(N);
+        Bundle visibilityOverrides = new Bundle();
         for (int i = 0; i < N; i++) {
             NotificationRecord record = mNotificationList.get(i);
             if (!isVisibleToListener(record.sbn, info)) {
@@ -2610,14 +2645,28 @@
             if (record.isIntercepted()) {
                 interceptedKeys.add(record.sbn.getKey());
             }
+            if (record.getPackageVisibilityOverride()
+                    != NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE) {
+                visibilityOverrides.putInt(record.sbn.getKey(),
+                        record.getPackageVisibilityOverride());
+            }
+            // Find first min-prio notification for speedbump placement.
             if (speedBumpIndex == -1 &&
+                    // Intrusiveness trumps priority, hence ignore intrusives.
+                    !record.isRecentlyIntrusive() &&
+                    // Currently, package priority is either PRIORITY_DEFAULT or PRIORITY_MAX, so
+                    // scanning for PRIORITY_MIN within the package bucket PRIORITY_DEFAULT
+                    // (or lower as a safeguard) is sufficient to find the speedbump index.
+                    // We'll have to revisit this when more package priority buckets are introduced.
+                    record.getPackagePriority() <= Notification.PRIORITY_DEFAULT &&
                     record.sbn.getNotification().priority == Notification.PRIORITY_MIN) {
                 speedBumpIndex = keys.size() - 1;
             }
         }
         String[] keysAr = keys.toArray(new String[keys.size()]);
         String[] interceptedKeysAr = interceptedKeys.toArray(new String[interceptedKeys.size()]);
-        return new NotificationRankingUpdate(keysAr, interceptedKeysAr, speedBumpIndex);
+        return new NotificationRankingUpdate(keysAr, interceptedKeysAr, visibilityOverrides,
+                speedBumpIndex);
     }
 
     private boolean isVisibleToListener(StatusBarNotification sbn, ManagedServiceInfo listener) {
@@ -2811,8 +2860,9 @@
         private void notifyPosted(final ManagedServiceInfo info,
                 final StatusBarNotification sbn, NotificationRankingUpdate rankingUpdate) {
             final INotificationListener listener = (INotificationListener)info.service;
+            StatusBarNotificationHolder sbnHolder = new StatusBarNotificationHolder(sbn);
             try {
-                listener.onNotificationPosted(sbn, rankingUpdate);
+                listener.onNotificationPosted(sbnHolder, rankingUpdate);
             } catch (RemoteException ex) {
                 Log.e(TAG, "unable to notify listener (posted): " + listener, ex);
             }
@@ -2824,8 +2874,9 @@
                 return;
             }
             final INotificationListener listener = (INotificationListener) info.service;
+            StatusBarNotificationHolder sbnHolder = new StatusBarNotificationHolder(sbn);
             try {
-                listener.onNotificationRemoved(sbn, rankingUpdate);
+                listener.onNotificationRemoved(sbnHolder, rankingUpdate);
             } catch (RemoteException ex) {
                 Log.e(TAG, "unable to notify listener (removed): " + listener, ex);
             }
@@ -2913,4 +2964,25 @@
             return zen ? "zen" : ('\'' + pkgFilter + '\'');
         }
     }
+
+    /**
+     * Wrapper for a StatusBarNotification object that allows transfer across a oneway
+     * binder without sending large amounts of data over a oneway transaction.
+     */
+    private static final class StatusBarNotificationHolder
+            extends IStatusBarNotificationHolder.Stub {
+        private StatusBarNotification mValue;
+
+        public StatusBarNotificationHolder(StatusBarNotification value) {
+            mValue = value;
+        }
+
+        /** Get the held value and clear it. This function should only be called once per holder */
+        @Override
+        public StatusBarNotification get() {
+            StatusBarNotification value = mValue;
+            mValue = null;
+            return value;
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index f2bd676..fd34aa5 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -21,6 +21,7 @@
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.media.AudioAttributes;
+import android.os.UserHandle;
 import android.service.notification.StatusBarNotification;
 
 import com.android.internal.annotations.VisibleForTesting;
@@ -65,6 +66,7 @@
 
     private int mAuthoritativeRank;
     private String mGlobalSortKey;
+    private int mPackageVisibility;
 
     @VisibleForTesting
     public NotificationRecord(StatusBarNotification sbn, int score)
@@ -79,6 +81,7 @@
         mContactAffinity = previous.mContactAffinity;
         mRecentlyIntrusive = previous.mRecentlyIntrusive;
         mPackagePriority = previous.mPackagePriority;
+        mPackageVisibility = previous.mPackageVisibility;
         mIntercept = previous.mIntercept;
         mRankingTimeMs = calculateRankingTimeMs(previous.getRankingTimeMs());
         // Don't copy mGlobalSortKey, recompute it.
@@ -86,8 +89,10 @@
 
     public Notification getNotification() { return sbn.getNotification(); }
     public int getFlags() { return sbn.getNotification().flags; }
-    public int getUserId() { return sbn.getUserId(); }
+    public UserHandle getUser() { return sbn.getUser(); }
     public String getKey() { return sbn.getKey(); }
+    /** @deprecated Use {@link #getUser()} instead. */
+    public int getUserId() { return sbn.getUserId(); }
 
     void dump(PrintWriter pw, String prefix, Context baseContext) {
         final Notification notification = sbn.getNotification();
@@ -155,6 +160,7 @@
         pw.println(prefix + "  mContactAffinity=" + mContactAffinity);
         pw.println(prefix + "  mRecentlyIntrusive=" + mRecentlyIntrusive);
         pw.println(prefix + "  mPackagePriority=" + mPackagePriority);
+        pw.println(prefix + "  mPackageVisibility=" + mPackageVisibility);
         pw.println(prefix + "  mIntercept=" + mIntercept);
         pw.println(prefix + "  mGlobalSortKey=" + mGlobalSortKey);
         pw.println(prefix + "  mRankingTimeMs=" + mRankingTimeMs);
@@ -216,6 +222,14 @@
         return mPackagePriority;
     }
 
+    public void setPackageVisibilityOverride(int packageVisibility) {
+        mPackageVisibility = packageVisibility;
+    }
+
+    public int getPackageVisibilityOverride() {
+        return mPackageVisibility;
+    }
+
     public boolean setIntercepted(boolean intercept) {
         mIntercept = intercept;
         return mIntercept;
diff --git a/services/core/java/com/android/server/notification/NotificationUsageStats.java b/services/core/java/com/android/server/notification/NotificationUsageStats.java
index 3d13d21..8278c4f 100644
--- a/services/core/java/com/android/server/notification/NotificationUsageStats.java
+++ b/services/core/java/com/android/server/notification/NotificationUsageStats.java
@@ -49,7 +49,7 @@
     // WARNING: Aggregated stats can grow unboundedly with pkg+id+tag.
     // Don't enable on production builds.
     private static final boolean ENABLE_AGGREGATED_IN_MEMORY_STATS = false;
-    private static final boolean ENABLE_SQLITE_LOG = true;
+    private static final boolean ENABLE_SQLITE_LOG = false;
 
     private static final AggregatedStats[] EMPTY_AGGREGATED_STATS = new AggregatedStats[0];
 
diff --git a/services/core/java/com/android/server/notification/PackageVisibilityExtractor.java b/services/core/java/com/android/server/notification/PackageVisibilityExtractor.java
new file mode 100644
index 0000000..f720f9f
--- /dev/null
+++ b/services/core/java/com/android/server/notification/PackageVisibilityExtractor.java
@@ -0,0 +1,53 @@
+/*
+* 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.server.notification;
+
+import android.content.Context;
+import android.util.Slog;
+
+public class PackageVisibilityExtractor implements NotificationSignalExtractor {
+    private static final String TAG = "PackageVisibilityExtractor";
+    private static final boolean DBG = false;
+
+    private RankingConfig mConfig;
+
+    public void initialize(Context ctx) {
+        if (DBG) Slog.d(TAG, "Initializing  " + getClass().getSimpleName() + ".");
+    }
+
+    public RankingReconsideration process(NotificationRecord record) {
+        if (record == null || record.getNotification() == null) {
+            if (DBG) Slog.d(TAG, "skipping empty notification");
+            return null;
+        }
+
+        if (mConfig == null) {
+            if (DBG) Slog.d(TAG, "missing config");
+            return null;
+        }
+
+        final int packageVisibility = mConfig.getPackageVisibilityOverride(
+                record.sbn.getPackageName(), record.sbn.getUid());
+        record.setPackageVisibilityOverride(packageVisibility);
+
+        return null;
+    }
+
+    @Override
+    public void setConfig(RankingConfig config) {
+        mConfig = config;
+    }
+}
diff --git a/services/core/java/com/android/server/notification/RankingConfig.java b/services/core/java/com/android/server/notification/RankingConfig.java
index 7d0bd59..aea137b 100644
--- a/services/core/java/com/android/server/notification/RankingConfig.java
+++ b/services/core/java/com/android/server/notification/RankingConfig.java
@@ -19,4 +19,8 @@
     int getPackagePriority(String packageName, int uid);
 
     void setPackagePriority(String packageName, int uid, int priority);
+
+    int getPackageVisibilityOverride(String packageName, int uid);
+
+    void setPackageVisibilityOverride(String packageName, int uid, int visibility);
 }
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index 435177b..aeddecb 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -20,8 +20,10 @@
 import android.os.Handler;
 import android.os.Message;
 import android.os.UserHandle;
+import android.service.notification.NotificationListenerService;
 import android.text.TextUtils;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 import android.util.Log;
 import android.util.Slog;
 import android.util.SparseIntArray;
@@ -33,7 +35,7 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Comparator;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 public class RankingHelper implements RankingConfig {
@@ -49,6 +51,7 @@
     private static final String ATT_NAME = "name";
     private static final String ATT_UID = "uid";
     private static final String ATT_PRIORITY = "priority";
+    private static final String ATT_VISIBILITY = "visibility";
 
     private final NotificationSignalExtractor[] mSignalExtractors;
     private final NotificationComparator mPreliminaryComparator = new NotificationComparator();
@@ -56,6 +59,7 @@
 
     // Package name to uid, to priority. Would be better as Table<String, Int, Int>
     private final ArrayMap<String, SparseIntArray> mPackagePriorities;
+    private final ArrayMap<String, SparseIntArray> mPackageVisibilities;
     private final ArrayMap<String, NotificationRecord> mProxyByGroupTmp;
 
     private final Context mContext;
@@ -65,6 +69,7 @@
         mContext = context;
         mRankingHandler = rankingHandler;
         mPackagePriorities = new ArrayMap<String, SparseIntArray>();
+        mPackageVisibilities = new ArrayMap<String, SparseIntArray>();
 
         final int N = extractorNames.length;
         mSignalExtractors = new NotificationSignalExtractor[N];
@@ -132,15 +137,27 @@
                 if (TAG_PACKAGE.equals(tag)) {
                     int uid = safeInt(parser, ATT_UID, UserHandle.USER_ALL);
                     int priority = safeInt(parser, ATT_PRIORITY, Notification.PRIORITY_DEFAULT);
+                    int vis = safeInt(parser, ATT_VISIBILITY,
+                            NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE);
                     String name = parser.getAttributeValue(null, ATT_NAME);
 
-                    if (!TextUtils.isEmpty(name) && priority != Notification.PRIORITY_DEFAULT) {
-                        SparseIntArray priorityByUid = mPackagePriorities.get(name);
-                        if (priorityByUid == null) {
-                            priorityByUid = new SparseIntArray();
-                            mPackagePriorities.put(name, priorityByUid);
+                    if (!TextUtils.isEmpty(name)) {
+                        if (priority != Notification.PRIORITY_DEFAULT) {
+                            SparseIntArray priorityByUid = mPackagePriorities.get(name);
+                            if (priorityByUid == null) {
+                                priorityByUid = new SparseIntArray();
+                                mPackagePriorities.put(name, priorityByUid);
+                            }
+                            priorityByUid.put(uid, priority);
                         }
-                        priorityByUid.put(uid, priority);
+                        if (vis != NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE) {
+                            SparseIntArray visibilityByUid = mPackageVisibilities.get(name);
+                            if (visibilityByUid == null) {
+                                visibilityByUid = new SparseIntArray();
+                                mPackageVisibilities.put(name, visibilityByUid);
+                            }
+                            visibilityByUid.put(uid, vis);
+                        }
                     }
                 }
             }
@@ -152,18 +169,43 @@
         out.startTag(null, TAG_RANKING);
         out.attribute(null, ATT_VERSION, Integer.toString(XML_VERSION));
 
-        final int N = mPackagePriorities.size();
-        for (int i = 0; i < N; i ++) {
-            String name = mPackagePriorities.keyAt(i);
-            SparseIntArray priorityByUid = mPackagePriorities.get(name);
-            final int M = priorityByUid.size();
-            for (int j = 0; j < M; j++) {
-                int uid = priorityByUid.keyAt(j);
-                int priority = priorityByUid.get(uid);
+        final Set<String> packageNames = new ArraySet<>(mPackagePriorities.size()
+                + mPackageVisibilities.size());
+        packageNames.addAll(mPackagePriorities.keySet());
+        packageNames.addAll(mPackageVisibilities.keySet());
+        final Set<Integer> packageUids = new ArraySet<>();
+        for (String packageName : packageNames) {
+            packageUids.clear();
+            SparseIntArray priorityByUid = mPackagePriorities.get(packageName);
+            SparseIntArray visibilityByUid = mPackageVisibilities.get(packageName);
+            if (priorityByUid != null) {
+                final int M = priorityByUid.size();
+                for (int j = 0; j < M; j++) {
+                    packageUids.add(priorityByUid.keyAt(j));
+                }
+            }
+            if (visibilityByUid != null) {
+                final int M = visibilityByUid.size();
+                for (int j = 0; j < M; j++) {
+                    packageUids.add(visibilityByUid.keyAt(j));
+                }
+            }
+            for (Integer uid : packageUids) {
                 out.startTag(null, TAG_PACKAGE);
-                out.attribute(null, ATT_NAME, name);
+                out.attribute(null, ATT_NAME, packageName);
+                if (priorityByUid != null) {
+                    final int priority = priorityByUid.get(uid);
+                    if (priority != Notification.PRIORITY_DEFAULT) {
+                        out.attribute(null, ATT_PRIORITY, Integer.toString(priority));
+                    }
+                }
+                if (visibilityByUid != null) {
+                    final int visibility = visibilityByUid.get(uid);
+                    if (visibility != NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE) {
+                        out.attribute(null, ATT_VISIBILITY, Integer.toString(visibility));
+                    }
+                }
                 out.attribute(null, ATT_UID, Integer.toString(uid));
-                out.attribute(null, ATT_PRIORITY, Integer.toString(priority));
                 out.endTag(null, TAG_PACKAGE);
             }
         }
@@ -293,6 +335,31 @@
         updateConfig();
     }
 
+    @Override
+    public int getPackageVisibilityOverride(String packageName, int uid) {
+        int visibility = NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE;
+        SparseIntArray visibilityByUid = mPackageVisibilities.get(packageName);
+        if (visibilityByUid != null) {
+            visibility = visibilityByUid.get(uid,
+                    NotificationListenerService.Ranking.VISIBILITY_NO_OVERRIDE);
+        }
+        return visibility;
+    }
+
+    @Override
+    public void setPackageVisibilityOverride(String packageName, int uid, int visibility) {
+        if (visibility == getPackageVisibilityOverride(packageName, uid)) {
+            return;
+        }
+        SparseIntArray visibilityByUid = mPackageVisibilities.get(packageName);
+        if (visibilityByUid == null) {
+            visibilityByUid = new SparseIntArray();
+            mPackageVisibilities.put(packageName, visibilityByUid);
+        }
+        visibilityByUid.put(uid, visibility);
+        updateConfig();
+    }
+
     public void dump(PrintWriter pw, String prefix, NotificationManagerService.DumpFilter filter) {
         if (filter == null) {
             final int N = mSignalExtractors.length;
diff --git a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
index aa47858..f266916 100644
--- a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
+++ b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java
@@ -18,18 +18,23 @@
 
 import android.app.Notification;
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.UserHandle;
 import android.provider.ContactsContract;
 import android.provider.ContactsContract.Contacts;
 import android.provider.Settings;
 import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.Log;
 import android.util.LruCache;
 import android.util.Slog;
 
 import java.util.ArrayList;
 import java.util.LinkedList;
+import java.util.Map;
 
 /**
  * This {@link NotificationSignalExtractor} attempts to validate
@@ -65,21 +70,88 @@
     static final float STARRED_CONTACT = 1f;
 
     protected boolean mEnabled;
-    private Context mContext;
+    private Context mBaseContext;
 
     // maps raw person handle to resolved person object
     private LruCache<String, LookupResult> mPeopleCache;
+    private Map<Integer, Context> mUserToContextMap;
 
-    private RankingReconsideration validatePeople(final NotificationRecord record) {
+    public void initialize(Context context) {
+        if (DEBUG) Slog.d(TAG, "Initializing  " + getClass().getSimpleName() + ".");
+        mUserToContextMap = new ArrayMap<>();
+        mBaseContext = context;
+        mPeopleCache = new LruCache<String, LookupResult>(PEOPLE_CACHE_SIZE);
+        mEnabled = ENABLE_PEOPLE_VALIDATOR && 1 == Settings.Global.getInt(
+                mBaseContext.getContentResolver(), SETTING_ENABLE_PEOPLE_VALIDATOR, 1);
+    }
+
+    public RankingReconsideration process(NotificationRecord record) {
+        if (!mEnabled) {
+            if (INFO) Slog.i(TAG, "disabled");
+            return null;
+        }
+        if (record == null || record.getNotification() == null) {
+            if (INFO) Slog.i(TAG, "skipping empty notification");
+            return null;
+        }
+        if (record.getUserId() == UserHandle.USER_ALL) {
+            if (INFO) Slog.i(TAG, "skipping global notification");
+            return null;
+        }
+        Context context = getContextAsUser(record.getUser());
+        if (context == null) {
+            if (INFO) Slog.i(TAG, "skipping notification that lacks a context");
+            return null;
+        }
+        return validatePeople(context, record);
+    }
+
+    @Override
+    public void setConfig(RankingConfig config) {
+        // ignore: config has no relevant information yet.
+    }
+
+    public float getContactAffinity(UserHandle userHandle, Bundle extras) {
+        if (extras == null) return NONE;
+        final String key = Long.toString(System.nanoTime());
+        final float[] affinityOut = new float[1];
+        Context context = getContextAsUser(userHandle);
+        if (context == null) {
+            return NONE;
+        }
+        final PeopleRankingReconsideration prr = validatePeople(context, key, extras, affinityOut);
+        float affinity = affinityOut[0];
+        if (prr != null) {
+            prr.work();
+            affinity = Math.max(prr.getContactAffinity(), affinity);
+        }
+        return affinity;
+    }
+
+    private Context getContextAsUser(UserHandle userHandle) {
+        Context context = mUserToContextMap.get(userHandle.getIdentifier());
+        if (context == null) {
+            try {
+                context = mBaseContext.createPackageContextAsUser("android", 0, userHandle);
+                mUserToContextMap.put(userHandle.getIdentifier(), context);
+            } catch (PackageManager.NameNotFoundException e) {
+                Log.e(TAG, "failed to create package context for lookups", e);
+            }
+        }
+        return context;
+    }
+
+    private RankingReconsideration validatePeople(Context context,
+            final NotificationRecord record) {
         final String key = record.getKey();
         final Bundle extras = record.getNotification().extras;
         final float[] affinityOut = new float[1];
-        final RankingReconsideration rr = validatePeople(key, extras, affinityOut);
+        final RankingReconsideration rr = validatePeople(context, key, extras, affinityOut);
         record.setContactAffinity(affinityOut[0]);
         return rr;
     }
 
-    private PeopleRankingReconsideration validatePeople(String key, Bundle extras,
+    private PeopleRankingReconsideration validatePeople(Context context, String key, Bundle extras,
             float[] affinityOut) {
         float affinity = NONE;
         if (extras == null) {
@@ -98,7 +170,8 @@
             if (TextUtils.isEmpty(handle)) continue;
 
             synchronized (mPeopleCache) {
-                LookupResult lookupResult = mPeopleCache.get(handle);
+                final String cacheKey = getCacheKey(context.getUserId(), handle);
+                LookupResult lookupResult = mPeopleCache.get(cacheKey);
                 if (lookupResult == null || lookupResult.isExpired()) {
                     pendingLookups.add(handle);
                 } else {
@@ -119,7 +192,11 @@
         }
 
         if (DEBUG) Slog.d(TAG, "Pending: future work scheduled for: " + key);
-        return new PeopleRankingReconsideration(key, pendingLookups);
+        return new PeopleRankingReconsideration(context, key, pendingLookups);
+    }
+
+    private String getCacheKey(int userId, String handle) {
+        return Integer.toString(userId) + ":" + handle;
     }
 
     // VisibleForTesting
@@ -185,24 +262,24 @@
         return null;
     }
 
-    private LookupResult resolvePhoneContact(final String number) {
+    private LookupResult resolvePhoneContact(Context context, final String number) {
         Uri phoneUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI,
                 Uri.encode(number));
-        return searchContacts(phoneUri);
+        return searchContacts(context, phoneUri);
     }
 
-    private LookupResult resolveEmailContact(final String email) {
+    private LookupResult resolveEmailContact(Context context, final String email) {
         Uri numberUri = Uri.withAppendedPath(
                 ContactsContract.CommonDataKinds.Email.CONTENT_LOOKUP_URI,
                 Uri.encode(email));
-        return searchContacts(numberUri);
+        return searchContacts(context, numberUri);
     }
 
-    private LookupResult searchContacts(Uri lookupUri) {
+    private LookupResult searchContacts(Context context, Uri lookupUri) {
         LookupResult lookupResult = new LookupResult();
         Cursor c = null;
         try {
-            c = mContext.getContentResolver().query(lookupUri, LOOKUP_PROJECTION, null, null, null);
+            c = context.getContentResolver().query(lookupUri, LOOKUP_PROJECTION, null, null, null);
             if (c != null && c.getCount() > 0) {
                 c.moveToFirst();
                 lookupResult.readContact(c);
@@ -217,44 +294,6 @@
         return lookupResult;
     }
 
-    public void initialize(Context context) {
-        if (DEBUG) Slog.d(TAG, "Initializing  " + getClass().getSimpleName() + ".");
-        mContext = context;
-        mPeopleCache = new LruCache<String, LookupResult>(PEOPLE_CACHE_SIZE);
-        mEnabled = ENABLE_PEOPLE_VALIDATOR && 1 == Settings.Global.getInt(
-                mContext.getContentResolver(), SETTING_ENABLE_PEOPLE_VALIDATOR, 1);
-    }
-
-    public RankingReconsideration process(NotificationRecord record) {
-        if (!mEnabled) {
-            if (INFO) Slog.i(TAG, "disabled");
-            return null;
-        }
-        if (record == null || record.getNotification() == null) {
-            if (INFO) Slog.i(TAG, "skipping empty notification");
-            return null;
-        }
-        return validatePeople(record);
-    }
-
-    @Override
-    public void setConfig(RankingConfig config) {
-        // ignore: config has no relevant information yet.
-    }
-
-    public float getContactAffinity(Bundle extras) {
-        if (extras == null) return NONE;
-        final String key = Long.toString(System.nanoTime());
-        final float[] affinityOut = new float[1];
-        final PeopleRankingReconsideration prr = validatePeople(key, extras, affinityOut);
-        float affinity = affinityOut[0];
-        if (prr != null) {
-            prr.work();
-            affinity = Math.max(prr.getContactAffinity(), affinity);
-        }
-        return affinity;
-    }
-
     private static class LookupResult {
         private static final long CONTACT_REFRESH_MILLIS = 60 * 60 * 1000;  // 1hr
         public static final int INVALID_ID = -1;
@@ -317,11 +356,13 @@
 
     private class PeopleRankingReconsideration extends RankingReconsideration {
         private final LinkedList<String> mPendingLookups;
+        private final Context mContext;
 
         private float mContactAffinity = NONE;
 
-        private PeopleRankingReconsideration(String key, LinkedList<String> pendingLookups) {
+        private PeopleRankingReconsideration(Context context, String key, LinkedList<String> pendingLookups) {
             super(key);
+            mContext = context;
             mPendingLookups = pendingLookups;
         }
 
@@ -333,20 +374,21 @@
                 final Uri uri = Uri.parse(handle);
                 if ("tel".equals(uri.getScheme())) {
                     if (DEBUG) Slog.d(TAG, "checking telephone URI: " + handle);
-                    lookupResult = resolvePhoneContact(uri.getSchemeSpecificPart());
+                    lookupResult = resolvePhoneContact(mContext, uri.getSchemeSpecificPart());
                 } else if ("mailto".equals(uri.getScheme())) {
                     if (DEBUG) Slog.d(TAG, "checking mailto URI: " + handle);
-                    lookupResult = resolveEmailContact(uri.getSchemeSpecificPart());
+                    lookupResult = resolveEmailContact(mContext, uri.getSchemeSpecificPart());
                 } else if (handle.startsWith(Contacts.CONTENT_LOOKUP_URI.toString())) {
                     if (DEBUG) Slog.d(TAG, "checking lookup URI: " + handle);
-                    lookupResult = searchContacts(uri);
+                    lookupResult = searchContacts(mContext, uri);
                 } else {
                     lookupResult = new LookupResult();  // invalid person for the cache
                     Slog.w(TAG, "unsupported URI " + handle);
                 }
                 if (lookupResult != null) {
                     synchronized (mPeopleCache) {
-                        mPeopleCache.put(handle, lookupResult);
+                        final String cacheKey = getCacheKey(mContext.getUserId(), handle);
+                        mPeopleCache.put(cacheKey, lookupResult);
                     }
                     mContactAffinity = Math.max(mContactAffinity, lookupResult.getAffinity());
                 }
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index fd35ede..41d7fa8f 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -18,7 +18,6 @@
 
 import static android.media.AudioAttributes.USAGE_ALARM;
 import static android.media.AudioAttributes.USAGE_NOTIFICATION_RINGTONE;
-import static android.media.AudioAttributes.USAGE_UNKNOWN;
 
 import android.app.AppOpsManager;
 import android.app.Notification;
@@ -225,11 +224,6 @@
                 muteCalls ? AppOpsManager.MODE_IGNORED : AppOpsManager.MODE_ALLOWED,
                 exceptionPackages);
 
-        // restrict vibrations with no hints
-        mAppOps.setRestriction(AppOpsManager.OP_VIBRATE, USAGE_UNKNOWN,
-                zen ? AppOpsManager.MODE_IGNORED : AppOpsManager.MODE_ALLOWED,
-                exceptionPackages);
-
         // alarm restrictions
         final boolean muteAlarms = mZenMode == Global.ZEN_MODE_NO_INTERRUPTIONS;
         mAppOps.setRestriction(AppOpsManager.OP_VIBRATE, USAGE_ALARM,
@@ -307,8 +301,8 @@
             final int ringerMode = mAudioManager.getRingerMode();
             int newZen = -1;
             if (ringerMode == AudioManager.RINGER_MODE_SILENT) {
-                if (mZenMode != Global.ZEN_MODE_NO_INTERRUPTIONS) {
-                    newZen = Global.ZEN_MODE_NO_INTERRUPTIONS;
+                if (mZenMode == Global.ZEN_MODE_OFF) {
+                    newZen = Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
                 }
             } else if ((ringerMode == AudioManager.RINGER_MODE_NORMAL
                     || ringerMode == AudioManager.RINGER_MODE_VIBRATE)
@@ -373,13 +367,14 @@
         return record.isCategory(Notification.CATEGORY_MESSAGE) || isDefaultMessagingApp(record);
     }
 
-    public boolean matchesCallFilter(Bundle extras, ValidateNotificationPeople validator) {
+    public boolean matchesCallFilter(UserHandle userHandle, Bundle extras,
+            ValidateNotificationPeople validator) {
         final int zen = mZenMode;
         if (zen == Global.ZEN_MODE_NO_INTERRUPTIONS) return false; // nothing gets through
         if (zen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS) {
             if (!mConfig.allowCalls) return false; // no calls get through
             if (validator != null) {
-                final float contactAffinity = validator.getContactAffinity(extras);
+                final float contactAffinity = validator.getContactAffinity(userHandle, extras);
                 return audienceMatches(contactAffinity);
             }
         }
diff --git a/services/core/java/com/android/server/pm/BackgroundDexOptService.java b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
index 355f34f..a7eebf8 100644
--- a/services/core/java/com/android/server/pm/BackgroundDexOptService.java
+++ b/services/core/java/com/android/server/pm/BackgroundDexOptService.java
@@ -75,7 +75,7 @@
                         schedule(BackgroundDexOptService.this);
                         return;
                     }
-                    pm.performDexOpt(pkg, null /* instruction set */, false);
+                    pm.performDexOpt(pkg, null /* instruction set */, true);
                 }
                 // ran to completion, so we abandon our timeslice and do not reschedule
                 jobFinished(jobParams, false);
diff --git a/services/core/java/com/android/server/pm/KeySetManagerService.java b/services/core/java/com/android/server/pm/KeySetManagerService.java
index 37bedf3..4a8e318 100644
--- a/services/core/java/com/android/server/pm/KeySetManagerService.java
+++ b/services/core/java/com/android/server/pm/KeySetManagerService.java
@@ -538,14 +538,17 @@
                     pw.println("");
                 }
                 printedLabel = false;
-                for (long keySetId : pkg.keySetData.getSigningKeySets()) {
-                    if (!printedLabel) {
-                        pw.print("      Signing KeySets: ");
-                        printedLabel = true;
-                    } else {
-                        pw.print(", ");
+                final long[] signingKeySets = pkg.keySetData.getSigningKeySets();
+                if (signingKeySets != null) {
+                    for (long keySetId : signingKeySets) {
+                        if (!printedLabel) {
+                            pw.print("      Signing KeySets: ");
+                            printedLabel = true;
+                        } else {
+                            pw.print(", ");
+                        }
+                        pw.print(Long.toString(keySetId));
                     }
-                    pw.print(Long.toString(keySetId));
                 }
                 if (printedLabel) {
                     pw.println("");
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index b7b1c23..dcc4f8d 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -199,8 +199,7 @@
             mainIntent.setPackage(packageName);
             long ident = Binder.clearCallingIdentity();
             try {
-                List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent,
-                        PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user
+                List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(mainIntent, 0 /* flags */,
                         user.getIdentifier());
                 return apps;
             } finally {
@@ -288,8 +287,7 @@
                 // as calling startActivityAsUser ignores the category and just
                 // resolves based on the component if present.
                 List<ResolveInfo> apps = mPm.queryIntentActivitiesAsUser(launchIntent,
-                        PackageManager.NO_CROSS_PROFILE, // We only want the apps for this user
-                        user.getIdentifier());
+                        0 /* flags */, user.getIdentifier());
                 final int size = apps.size();
                 for (int i = 0; i < size; ++i) {
                     ActivityInfo activityInfo = apps.get(i).activityInfo;
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index 3f7a607..496c136 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -42,23 +42,18 @@
 import android.content.Intent;
 import android.content.IntentSender;
 import android.content.IntentSender.SendIntentException;
-import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageInstaller;
 import android.content.pm.IPackageInstallerCallback;
 import android.content.pm.IPackageInstallerSession;
 import android.content.pm.PackageInstaller;
-import android.content.pm.PackageParser;
 import android.content.pm.PackageInstaller.SessionInfo;
 import android.content.pm.PackageInstaller.SessionParams;
-import android.content.pm.PackageParser.PackageLite;
-import android.content.pm.PackageParser.PackageParserException;
 import android.content.pm.PackageManager;
 import android.graphics.Bitmap;
 import android.net.Uri;
 import android.os.Binder;
 import android.os.Bundle;
 import android.os.Environment;
-import android.os.Environment.UserEnvironment;
 import android.os.FileUtils;
 import android.os.Handler;
 import android.os.HandlerThread;
@@ -70,7 +65,6 @@
 import android.os.SELinux;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.os.storage.StorageManager;
 import android.system.ErrnoException;
 import android.system.Os;
 import android.text.TextUtils;
@@ -126,6 +120,7 @@
     private static final String ATTR_CREATED_MILLIS = "createdMillis";
     private static final String ATTR_SESSION_STAGE_DIR = "sessionStageDir";
     private static final String ATTR_SESSION_STAGE_CID = "sessionStageCid";
+    private static final String ATTR_PREPARED = "prepared";
     private static final String ATTR_SEALED = "sealed";
     private static final String ATTR_MODE = "mode";
     private static final String ATTR_INSTALL_FLAGS = "installFlags";
@@ -148,7 +143,6 @@
     private final Context mContext;
     private final PackageManagerService mPm;
     private final AppOpsManager mAppOps;
-    private final StorageManager mStorage;
 
     private final File mStagingDir;
     private final HandlerThread mInstallThread;
@@ -190,7 +184,6 @@
         mContext = context;
         mPm = pm;
         mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
-        mStorage = StorageManager.from(mContext);
 
         mStagingDir = stagingDir;
 
@@ -266,7 +259,9 @@
             try {
                 final int sessionId = allocateSessionIdLocked();
                 mLegacySessions.put(sessionId, true);
-                return prepareInternalStageDir(sessionId);
+                final File stageDir = buildInternalStageDir(sessionId);
+                prepareInternalStageDir(stageDir);
+                return stageDir;
             } catch (IllegalStateException e) {
                 throw new IOException(e);
             }
@@ -345,6 +340,7 @@
         final String stageDirRaw = readStringAttribute(in, ATTR_SESSION_STAGE_DIR);
         final File stageDir = (stageDirRaw != null) ? new File(stageDirRaw) : null;
         final String stageCid = readStringAttribute(in, ATTR_SESSION_STAGE_CID);
+        final boolean prepared = readBooleanAttribute(in, ATTR_PREPARED, true);
         final boolean sealed = readBooleanAttribute(in, ATTR_SEALED);
 
         final SessionParams params = new SessionParams(
@@ -362,7 +358,7 @@
 
         return new PackageInstallerSession(mInternalCallback, mContext, mPm,
                 mInstallThread.getLooper(), sessionId, userId, installerPackageName, params,
-                createdMillis, stageDir, stageCid, sealed);
+                createdMillis, stageDir, stageCid, prepared, sealed);
     }
 
     private void writeSessionsLocked() {
@@ -410,6 +406,7 @@
         if (session.stageCid != null) {
             writeStringAttribute(out, ATTR_SESSION_STAGE_CID, session.stageCid);
         }
+        writeBooleanAttribute(out, ATTR_PREPARED, session.isPrepared());
         writeBooleanAttribute(out, ATTR_SEALED, session.isSealed());
 
         writeIntAttribute(out, ATTR_MODE, params.mode);
@@ -483,14 +480,10 @@
             }
         }
 
-        // TODO: treat INHERIT_EXISTING as install for user
-
-        // Figure out where we're going to be staging session data
-        final boolean stageInternal;
-
-        if (params.mode == SessionParams.MODE_FULL_INSTALL) {
-            // Brand new install, use best resolved location. This also verifies
-            // that target has enough free space for the install.
+        if (params.mode == SessionParams.MODE_FULL_INSTALL
+                || params.mode == SessionParams.MODE_INHERIT_EXISTING) {
+            // Resolve best location for install, based on combination of
+            // requested install flags, delta size, and manifest settings.
             final long ident = Binder.clearCallingIdentity();
             try {
                 final int resolved = PackageHelper.resolveInstallLocation(mContext,
@@ -498,46 +491,15 @@
                         params.installFlags);
 
                 if (resolved == PackageHelper.RECOMMEND_INSTALL_INTERNAL) {
-                    stageInternal = true;
+                    params.setInstallFlagsInternal();
                 } else if (resolved == PackageHelper.RECOMMEND_INSTALL_EXTERNAL) {
-                    stageInternal = false;
+                    params.setInstallFlagsExternal();
                 } else {
                     throw new IOException("No storage with enough free space; res=" + resolved);
                 }
             } finally {
                 Binder.restoreCallingIdentity(ident);
             }
-        } else if (params.mode == SessionParams.MODE_INHERIT_EXISTING) {
-            // Inheriting existing install, so stay on the same storage medium.
-            final ApplicationInfo existingApp = mPm.getApplicationInfo(params.appPackageName, 0,
-                    userId);
-            if (existingApp == null) {
-                throw new IllegalStateException(
-                        "Missing existing app " + params.appPackageName);
-            }
-
-            final long existingSize;
-            try {
-                final PackageLite existingPkg = PackageParser.parsePackageLite(
-                        new File(existingApp.getCodePath()), 0);
-                existingSize = PackageHelper.calculateInstalledSize(existingPkg, false,
-                        params.abiOverride);
-            } catch (PackageParserException e) {
-                throw new IllegalStateException(
-                        "Failed to calculate size of " + params.appPackageName);
-            }
-
-            if ((existingApp.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0) {
-                // Internal we can link existing install into place, so we only
-                // need enough space for the new data.
-                checkInternalStorage(params.sizeBytes);
-                stageInternal = true;
-            } else {
-                // External we're going to copy existing install into our
-                // container, so we need footprint of both.
-                checkExternalStorage(params.sizeBytes + existingSize);
-                stageInternal = false;
-            }
         } else {
             throw new IllegalArgumentException("Invalid install mode: " + params.mode);
         }
@@ -563,15 +525,15 @@
             // We're staging to exactly one location
             File stageDir = null;
             String stageCid = null;
-            if (stageInternal) {
-                stageDir = prepareInternalStageDir(sessionId);
+            if ((params.installFlags & PackageManager.INSTALL_INTERNAL) != 0) {
+                stageDir = buildInternalStageDir(sessionId);
             } else {
-                stageCid = prepareExternalStageCid(sessionId, params.sizeBytes);
+                stageCid = buildExternalStageCid(sessionId);
             }
 
             session = new PackageInstallerSession(mInternalCallback, mContext, mPm,
                     mInstallThread.getLooper(), sessionId, userId, installerPackageName, params,
-                    createdMillis, stageDir, stageCid, false);
+                    createdMillis, stageDir, stageCid, false, false);
             mSessions.put(sessionId, session);
         }
 
@@ -581,6 +543,30 @@
     }
 
     @Override
+    public void updateSessionAppIcon(int sessionId, Bitmap appIcon) {
+        synchronized (mSessions) {
+            final PackageInstallerSession session = mSessions.get(sessionId);
+            if (session == null || !isCallingUidOwner(session)) {
+                throw new SecurityException("Caller has no access to session " + sessionId);
+            }
+            session.params.appIcon = appIcon;
+            mInternalCallback.onSessionBadgingChanged(session);
+        }
+    }
+
+    @Override
+    public void updateSessionAppLabel(int sessionId, String appLabel) {
+        synchronized (mSessions) {
+            final PackageInstallerSession session = mSessions.get(sessionId);
+            if (session == null || !isCallingUidOwner(session)) {
+                throw new SecurityException("Caller has no access to session " + sessionId);
+            }
+            session.params.appLabel = appLabel;
+            mInternalCallback.onSessionBadgingChanged(session);
+        }
+    }
+
+    @Override
     public void abandonSession(int sessionId) {
         synchronized (mSessions) {
             final PackageInstallerSession session = mSessions.get(sessionId);
@@ -591,32 +577,16 @@
         }
     }
 
-    private void checkInternalStorage(long sizeBytes) throws IOException {
-        if (sizeBytes <= 0) return;
-
-        final File target = Environment.getDataDirectory();
-        final long targetBytes = sizeBytes + mStorage.getStorageLowBytes(target);
-
-        mPm.freeStorage(targetBytes);
-        if (target.getUsableSpace() < targetBytes) {
-            throw new IOException("Not enough internal space to write " + sizeBytes + " bytes");
-        }
-    }
-
-    private void checkExternalStorage(long sizeBytes) throws IOException {
-        if (sizeBytes <= 0) return;
-
-        final File target = new UserEnvironment(UserHandle.USER_OWNER)
-                .getExternalStorageDirectory();
-        final long targetBytes = sizeBytes + mStorage.getStorageLowBytes(target);
-
-        if (target.getUsableSpace() < targetBytes) {
-            throw new IOException("Not enough external space to write " + sizeBytes + " bytes");
-        }
-    }
-
     @Override
     public IPackageInstallerSession openSession(int sessionId) {
+        try {
+            return openSessionInternal(sessionId);
+        } catch (IOException e) {
+            throw ExceptionUtils.wrap(e);
+        }
+    }
+
+    private IPackageInstallerSession openSessionInternal(int sessionId) throws IOException {
         synchronized (mSessions) {
             final PackageInstallerSession session = mSessions.get(sessionId);
             if (session == null || !isCallingUidOwner(session)) {
@@ -641,49 +611,43 @@
         throw new IllegalStateException("Failed to allocate session ID");
     }
 
-    private File prepareInternalStageDir(int sessionId) throws IOException {
-        final File file = new File(mStagingDir, "vmdl" + sessionId + ".tmp");
+    private File buildInternalStageDir(int sessionId) {
+        return new File(mStagingDir, "vmdl" + sessionId + ".tmp");
+    }
 
-        if (file.exists()) {
-            throw new IOException("Session dir already exists: " + file);
+    static void prepareInternalStageDir(File stageDir) throws IOException {
+        if (stageDir.exists()) {
+            throw new IOException("Session dir already exists: " + stageDir);
         }
 
         try {
-            Os.mkdir(file.getAbsolutePath(), 0755);
-            Os.chmod(file.getAbsolutePath(), 0755);
+            Os.mkdir(stageDir.getAbsolutePath(), 0755);
+            Os.chmod(stageDir.getAbsolutePath(), 0755);
         } catch (ErrnoException e) {
             // This purposefully throws if directory already exists
-            throw new IOException("Failed to prepare session dir", e);
+            throw new IOException("Failed to prepare session dir: " + stageDir, e);
         }
 
-        if (!SELinux.restorecon(file)) {
-            throw new IOException("Failed to restorecon session dir");
+        if (!SELinux.restorecon(stageDir)) {
+            throw new IOException("Failed to restorecon session dir: " + stageDir);
         }
-
-        return file;
     }
 
-    private String prepareExternalStageCid(int sessionId, long sizeBytes) throws IOException {
-        if (sizeBytes <= 0) {
-            throw new IOException("Session must provide valid size for ASEC");
-        }
+    private String buildExternalStageCid(int sessionId) {
+        return "smdl" + sessionId + ".tmp";
+    }
 
-        final String cid = "smdl" + sessionId + ".tmp";
-        if (PackageHelper.createSdDir(sizeBytes, cid, PackageManagerService.getEncryptKey(),
+    static void prepareExternalStageCid(String stageCid, long sizeBytes) throws IOException {
+        if (PackageHelper.createSdDir(sizeBytes, stageCid, PackageManagerService.getEncryptKey(),
                 Process.SYSTEM_UID, true) == null) {
-            throw new IOException("Failed to create ASEC");
+            throw new IOException("Failed to create session cid: " + stageCid);
         }
-
-        return cid;
     }
 
     @Override
     public SessionInfo getSessionInfo(int sessionId) {
         synchronized (mSessions) {
             final PackageInstallerSession session = mSessions.get(sessionId);
-            if (!isCallingUidOwner(session)) {
-                enforceCallerCanReadSessions();
-            }
             return session != null ? session.generateInfo() : null;
         }
     }
@@ -691,7 +655,6 @@
     @Override
     public List<SessionInfo> getAllSessions(int userId) {
         mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "getAllSessions");
-        enforceCallerCanReadSessions();
 
         final List<SessionInfo> result = new ArrayList<>();
         synchronized (mSessions) {
@@ -755,8 +718,6 @@
     @Override
     public void registerCallback(IPackageInstallerCallback callback, int userId) {
         mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, "registerCallback");
-        enforceCallerCanReadSessions();
-
         mCallbacks.register(callback, userId);
     }
 
@@ -787,21 +748,6 @@
         }
     }
 
-    /**
-     * We allow those with permission, or the current home app.
-     */
-    private void enforceCallerCanReadSessions() {
-        final boolean hasPermission = (mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.READ_INSTALL_SESSIONS)
-                == PackageManager.PERMISSION_GRANTED);
-        final boolean isHomeApp = mPm.checkCallerIsHomeApp();
-        if (hasPermission || isHomeApp) {
-            return;
-        } else {
-            throw new SecurityException("Caller must be current home app to read install sessions");
-        }
-    }
-
     static class PackageDeleteObserverAdapter extends PackageDeleteObserver {
         private final Context mContext;
         private final IntentSender mTarget;
@@ -893,9 +839,9 @@
 
     private static class Callbacks extends Handler {
         private static final int MSG_SESSION_CREATED = 1;
-        private static final int MSG_SESSION_OPENED = 2;
-        private static final int MSG_SESSION_PROGRESS_CHANGED = 3;
-        private static final int MSG_SESSION_CLOSED = 4;
+        private static final int MSG_SESSION_BADGING_CHANGED = 2;
+        private static final int MSG_SESSION_ACTIVE_CHANGED = 3;
+        private static final int MSG_SESSION_PROGRESS_CHANGED = 4;
         private static final int MSG_SESSION_FINISHED = 5;
 
         private final RemoteCallbackList<IPackageInstallerCallback>
@@ -938,15 +884,15 @@
                 case MSG_SESSION_CREATED:
                     callback.onSessionCreated(sessionId);
                     break;
-                case MSG_SESSION_OPENED:
-                    callback.onSessionOpened(sessionId);
+                case MSG_SESSION_BADGING_CHANGED:
+                    callback.onSessionBadgingChanged(sessionId);
+                    break;
+                case MSG_SESSION_ACTIVE_CHANGED:
+                    callback.onSessionActiveChanged(sessionId, (boolean) msg.obj);
                     break;
                 case MSG_SESSION_PROGRESS_CHANGED:
                     callback.onSessionProgressChanged(sessionId, (float) msg.obj);
                     break;
-                case MSG_SESSION_CLOSED:
-                    callback.onSessionClosed(sessionId);
-                    break;
                 case MSG_SESSION_FINISHED:
                     callback.onSessionFinished(sessionId, (boolean) msg.obj);
                     break;
@@ -957,18 +903,18 @@
             obtainMessage(MSG_SESSION_CREATED, sessionId, userId).sendToTarget();
         }
 
-        private void notifySessionOpened(int sessionId, int userId) {
-            obtainMessage(MSG_SESSION_OPENED, sessionId, userId).sendToTarget();
+        private void notifySessionBadgingChanged(int sessionId, int userId) {
+            obtainMessage(MSG_SESSION_BADGING_CHANGED, sessionId, userId).sendToTarget();
+        }
+
+        private void notifySessionActiveChanged(int sessionId, int userId, boolean active) {
+            obtainMessage(MSG_SESSION_ACTIVE_CHANGED, sessionId, userId, active).sendToTarget();
         }
 
         private void notifySessionProgressChanged(int sessionId, int userId, float progress) {
             obtainMessage(MSG_SESSION_PROGRESS_CHANGED, sessionId, userId, progress).sendToTarget();
         }
 
-        private void notifySessionClosed(int sessionId, int userId) {
-            obtainMessage(MSG_SESSION_CLOSED, sessionId, userId).sendToTarget();
-        }
-
         public void notifySessionFinished(int sessionId, int userId, boolean success) {
             obtainMessage(MSG_SESSION_FINISHED, sessionId, userId, success).sendToTarget();
         }
@@ -1006,18 +952,19 @@
     }
 
     class InternalCallback {
+        public void onSessionBadgingChanged(PackageInstallerSession session) {
+            mCallbacks.notifySessionBadgingChanged(session.sessionId, session.userId);
+            writeSessionsAsync();
+        }
+
+        public void onSessionActiveChanged(PackageInstallerSession session, boolean active) {
+            mCallbacks.notifySessionActiveChanged(session.sessionId, session.userId, active);
+        }
+
         public void onSessionProgressChanged(PackageInstallerSession session, float progress) {
             mCallbacks.notifySessionProgressChanged(session.sessionId, session.userId, progress);
         }
 
-        public void onSessionOpened(PackageInstallerSession session) {
-            mCallbacks.notifySessionOpened(session.sessionId, session.userId);
-        }
-
-        public void onSessionClosed(PackageInstallerSession session) {
-            mCallbacks.notifySessionClosed(session.sessionId, session.userId);
-        }
-
         public void onSessionFinished(PackageInstallerSession session, boolean success) {
             mCallbacks.notifySessionFinished(session.sessionId, session.userId, success);
             synchronized (mSessions) {
@@ -1027,6 +974,12 @@
             writeSessionsAsync();
         }
 
+        public void onSessionPrepared(PackageInstallerSession session) {
+            // We prepared the destination to write into; we want to persist
+            // this, but it's not critical enough to block for.
+            writeSessionsAsync();
+        }
+
         public void onSessionSealed(PackageInstallerSession session) {
             // It's very important that we block until we've recorded the
             // session as being sealed, since we never want to allow mutation
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 5264fc4..06f550d 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -17,15 +17,15 @@
 package com.android.server.pm;
 
 import static android.content.pm.PackageManager.INSTALL_FAILED_ABORTED;
-import static android.content.pm.PackageManager.INSTALL_FAILED_ALREADY_EXISTS;
 import static android.content.pm.PackageManager.INSTALL_FAILED_CONTAINER_ERROR;
 import static android.content.pm.PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
 import static android.content.pm.PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
 import static android.content.pm.PackageManager.INSTALL_FAILED_INVALID_APK;
-import static android.content.pm.PackageManager.INSTALL_FAILED_PACKAGE_CHANGED;
 import static android.system.OsConstants.O_CREAT;
 import static android.system.OsConstants.O_RDONLY;
 import static android.system.OsConstants.O_WRONLY;
+import static com.android.server.pm.PackageInstallerService.prepareExternalStageCid;
+import static com.android.server.pm.PackageInstallerService.prepareInternalStageDir;
 
 import android.content.Context;
 import android.content.Intent;
@@ -88,8 +88,6 @@
     // TODO: enforce INSTALL_ALLOW_TEST
     // TODO: enforce INSTALL_ALLOW_DOWNGRADE
 
-    // TODO: treat INHERIT_EXISTING as installExistingPackage()
-
     private final PackageInstallerService.InternalCallback mCallback;
     private final Context mContext;
     private final PackageManagerService mPm;
@@ -108,18 +106,23 @@
     /** Note that UID is not persisted; it's always derived at runtime. */
     final int installerUid;
 
-    private final AtomicInteger mOpenCount = new AtomicInteger();
+    private final AtomicInteger mActiveCount = new AtomicInteger();
 
     private final Object mLock = new Object();
 
     @GuardedBy("mLock")
     private float mClientProgress = 0;
     @GuardedBy("mLock")
+    private float mInternalProgress = 0;
+
+    @GuardedBy("mLock")
     private float mProgress = 0;
     @GuardedBy("mLock")
     private float mReportedProgress = -1;
 
     @GuardedBy("mLock")
+    private boolean mPrepared = false;
+    @GuardedBy("mLock")
     private boolean mSealed = false;
     @GuardedBy("mLock")
     private boolean mPermissionsAccepted = false;
@@ -184,7 +187,7 @@
     public PackageInstallerSession(PackageInstallerService.InternalCallback callback,
             Context context, PackageManagerService pm, Looper looper, int sessionId, int userId,
             String installerPackageName, SessionParams params, long createdMillis,
-            File stageDir, String stageCid, boolean sealed) {
+            File stageDir, String stageCid, boolean prepared, boolean sealed) {
         mCallback = callback;
         mContext = context;
         mPm = pm;
@@ -203,6 +206,7 @@
                     "Exactly one of stageDir or stageCid stage must be set");
         }
 
+        mPrepared = prepared;
         mSealed = sealed;
 
         // Always derived at runtime
@@ -214,8 +218,6 @@
         } else {
             mPermissionsAccepted = false;
         }
-
-        computeProgressLocked();
     }
 
     public SessionInfo generateInfo() {
@@ -227,7 +229,7 @@
                     mResolvedBaseFile.getAbsolutePath() : null;
             info.progress = mProgress;
             info.sealed = mSealed;
-            info.open = mOpenCount.get() > 0;
+            info.active = mActiveCount.get() > 0;
 
             info.mode = params.mode;
             info.sizeBytes = params.sizeBytes;
@@ -238,14 +240,23 @@
         return info;
     }
 
+    public boolean isPrepared() {
+        synchronized (mLock) {
+            return mPrepared;
+        }
+    }
+
     public boolean isSealed() {
         synchronized (mLock) {
             return mSealed;
         }
     }
 
-    private void assertNotSealed(String cookie) {
+    private void assertPreparedAndNotSealed(String cookie) {
         synchronized (mLock) {
+            if (!mPrepared) {
+                throw new IllegalStateException(cookie + " before prepared");
+            }
             if (mSealed) {
                 throw new SecurityException(cookie + " not allowed after commit");
             }
@@ -278,28 +289,26 @@
     @Override
     public void setClientProgress(float progress) {
         synchronized (mLock) {
+            // Always publish first staging movement
+            final boolean forcePublish = (mClientProgress == 0);
             mClientProgress = progress;
-            computeProgressLocked();
+            computeProgressLocked(forcePublish);
         }
-        maybePublishProgress();
     }
 
     @Override
     public void addClientProgress(float progress) {
         synchronized (mLock) {
-            mClientProgress += progress;
-            computeProgressLocked();
+            setClientProgress(mClientProgress + progress);
         }
-        maybePublishProgress();
     }
 
-    private void computeProgressLocked() {
-        mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f);
-    }
+    private void computeProgressLocked(boolean forcePublish) {
+        mProgress = MathUtils.constrain(mClientProgress * 0.8f, 0f, 0.8f)
+                + MathUtils.constrain(mInternalProgress * 0.2f, 0f, 0.2f);
 
-    private void maybePublishProgress() {
         // Only publish when meaningful change
-        if (Math.abs(mProgress - mReportedProgress) > 0.01) {
+        if (forcePublish || Math.abs(mProgress - mReportedProgress) >= 0.01) {
             mReportedProgress = mProgress;
             mCallback.onSessionProgressChanged(this, mProgress);
         }
@@ -307,7 +316,7 @@
 
     @Override
     public String[] getNames() {
-        assertNotSealed("getNames");
+        assertPreparedAndNotSealed("getNames");
         try {
             return resolveStageDir().list();
         } catch (IOException e) {
@@ -331,7 +340,7 @@
         // will block any attempted install transitions.
         final FileBridge bridge;
         synchronized (mLock) {
-            assertNotSealed("openWrite");
+            assertPreparedAndNotSealed("openWrite");
 
             bridge = new FileBridge();
             mBridges.add(bridge);
@@ -385,7 +394,7 @@
     }
 
     private ParcelFileDescriptor openReadInternal(String name) throws IOException {
-        assertNotSealed("openRead");
+        assertPreparedAndNotSealed("openRead");
 
         try {
             if (!FileUtils.isValidExtFilename(name)) {
@@ -405,6 +414,30 @@
     public void commit(IntentSender statusReceiver) {
         Preconditions.checkNotNull(statusReceiver);
 
+        synchronized (mLock) {
+            if (!mSealed) {
+                // Verify that all writers are hands-off
+                for (FileBridge bridge : mBridges) {
+                    if (!bridge.isClosed()) {
+                        throw new SecurityException("Files still open");
+                    }
+                }
+
+                // Persist the fact that we've sealed ourselves to prevent
+                // mutations of any hard links we create.
+                mSealed = true;
+                mCallback.onSessionSealed(this);
+            }
+        }
+
+        // Client staging is fully done at this point
+        mClientProgress = 1f;
+        computeProgressLocked(true);
+
+        // This ongoing commit should keep session active, even though client
+        // will probably close their end.
+        mActiveCount.incrementAndGet();
+
         final PackageInstallObserverAdapter adapter = new PackageInstallObserverAdapter(mContext,
                 statusReceiver, sessionId);
         mHandler.obtainMessage(MSG_COMMIT, adapter.getBinder()).sendToTarget();
@@ -412,22 +445,10 @@
 
     private void commitLocked() throws PackageManagerException {
         if (mDestroyed) {
-            throw new PackageManagerException(INSTALL_FAILED_ALREADY_EXISTS, "Invalid session");
+            throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, "Session destroyed");
         }
-
-        // Verify that all writers are hands-off
         if (!mSealed) {
-            for (FileBridge bridge : mBridges) {
-                if (!bridge.isClosed()) {
-                    throw new PackageManagerException(INSTALL_FAILED_PACKAGE_CHANGED,
-                            "Files still open");
-                }
-            }
-            mSealed = true;
-
-            // Persist the fact that we've sealed ourselves to prevent mutations
-            // of any hard links we create below.
-            mCallback.onSessionSealed(this);
+            throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, "Session not sealed");
         }
 
         try {
@@ -456,6 +477,10 @@
                 mRemoteObserver.onUserActionRequired(intent);
             } catch (RemoteException ignored) {
             }
+
+            // Commit was keeping session marked as active until now; release
+            // that extra refcount so session appears idle.
+            close();
             return;
         }
 
@@ -485,7 +510,8 @@
         }
 
         // TODO: surface more granular state from dexopt
-        mCallback.onSessionProgressChanged(this, 0.9f);
+        mInternalProgress = 0.5f;
+        computeProgressLocked(true);
 
         // Unpack native libraries
         extractNativeLibraries(mResolvedStageDir, params.abiOverride);
@@ -553,8 +579,7 @@
             try {
                 apk = PackageParser.parseApkLite(file, PackageParser.PARSE_COLLECT_CERTIFICATES);
             } catch (PackageParserException e) {
-                throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
-                        "Failed to parse " + file + ": " + e);
+                throw PackageManagerException.from(e);
             }
 
             if (!stagedSplits.add(apk.splitName)) {
@@ -620,8 +645,7 @@
                 existingBase = PackageParser.parseApkLite(new File(app.getBaseCodePath()),
                         PackageParser.PARSE_COLLECT_CERTIFICATES);
             } catch (PackageParserException e) {
-                throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
-                        "Failed to parse existing package " + app.getCodePath() + ": " + e);
+                throw PackageManagerException.from(e);
             }
 
             assertApkConsistent("Existing base", existingBase);
@@ -673,8 +697,7 @@
         try {
             baseApk = PackageParser.parseApkLite(mResolvedBaseFile, 0);
         } catch (PackageParserException e) {
-            throw new PackageManagerException(INSTALL_FAILED_INVALID_APK,
-                    "Failed to parse base package " + mResolvedBaseFile + ": " + e);
+            throw PackageManagerException.from(e);
         }
 
         final List<String> splitPaths = new ArrayList<>();
@@ -828,16 +851,36 @@
         }
     }
 
-    public void open() {
-        if (mOpenCount.getAndIncrement() == 0) {
-            mCallback.onSessionOpened(this);
+    public void open() throws IOException {
+        if (mActiveCount.getAndIncrement() == 0) {
+            mCallback.onSessionActiveChanged(this, true);
+        }
+
+        synchronized (mLock) {
+            if (!mPrepared) {
+                if (stageDir != null) {
+                    prepareInternalStageDir(stageDir);
+                } else if (stageCid != null) {
+                    prepareExternalStageCid(stageCid, params.sizeBytes);
+
+                    // TODO: deliver more granular progress for ASEC allocation
+                    mInternalProgress = 0.25f;
+                    computeProgressLocked(true);
+                } else {
+                    throw new IllegalArgumentException(
+                            "Exactly one of stageDir or stageCid stage must be set");
+                }
+
+                mPrepared = true;
+                mCallback.onSessionPrepared(this);
+            }
         }
     }
 
     @Override
     public void close() {
-        if (mOpenCount.decrementAndGet() == 0) {
-            mCallback.onSessionClosed(this);
+        if (mActiveCount.decrementAndGet() == 0) {
+            mCallback.onSessionActiveChanged(this, false);
         }
     }
 
@@ -866,6 +909,11 @@
         synchronized (mLock) {
             mSealed = true;
             mDestroyed = true;
+
+            // Force shut down all bridges
+            for (FileBridge bridge : mBridges) {
+                bridge.forceClose();
+            }
         }
         if (stageDir != null) {
             FileUtils.deleteContents(stageDir);
diff --git a/services/core/java/com/android/server/pm/PackageManagerException.java b/services/core/java/com/android/server/pm/PackageManagerException.java
index 0cbdcdc..a41636e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerException.java
+++ b/services/core/java/com/android/server/pm/PackageManagerException.java
@@ -16,6 +16,8 @@
 
 package com.android.server.pm;
 
+import android.content.pm.PackageParser.PackageParserException;
+
 /** {@hide} */
 public class PackageManagerException extends Exception {
     public final int error;
@@ -29,4 +31,9 @@
         super(detailMessage, throwable);
         this.error = error;
     }
+
+    public static PackageManagerException from(PackageParserException e)
+            throws PackageManagerException {
+        throw new PackageManagerException(e.error, e.getMessage(), e.getCause());
+    }
 }
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 5aa0294..d821fc1 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -312,11 +312,18 @@
 
     final PackageHandler mHandler;
 
+    /**
+     * Messages for {@link #mHandler} that need to wait for system ready before
+     * being dispatched.
+     */
+    private ArrayList<Message> mPostSystemReadyMessages;
+
     final int mSdkVersion = Build.VERSION.SDK_INT;
 
     final Context mContext;
     final boolean mFactoryTest;
     final boolean mOnlyCore;
+    final boolean mLazyDexOpt;
     final DisplayMetrics mMetrics;
     final int mDefParseFlags;
     final String[] mSeparateProcesses;
@@ -445,9 +452,9 @@
     /** Token for keys in mPendingVerification. */
     private int mPendingVerificationToken = 0;
 
-    boolean mSystemReady;
-    boolean mSafeMode;
-    boolean mHasSystemUidErrors;
+    volatile boolean mSystemReady;
+    volatile boolean mSafeMode;
+    volatile boolean mHasSystemUidErrors;
 
     ApplicationInfo mAndroidApplication;
     final ActivityInfo mResolveActivity = new ActivityInfo();
@@ -1266,6 +1273,7 @@
         mContext = context;
         mFactoryTest = factoryTest;
         mOnlyCore = onlyCore;
+        mLazyDexOpt = "eng".equals(SystemProperties.get("ro.build.type"));
         mMetrics = new DisplayMetrics();
         mSettings = new Settings(context);
         mSettings.addSharedUserLPw("android.uid.system", Process.SYSTEM_UID,
@@ -3035,115 +3043,125 @@
                             (flags & PackageManager.MATCH_DEFAULT_ONLY) != 0, userId)
                     : null;
             if (prefs != null && prefs.size() > 0) {
-                // First figure out how good the original match set is.
-                // We will only allow preferred activities that came
-                // from the same match quality.
-                int match = 0;
+                boolean changed = false;
+                try {
+                    // First figure out how good the original match set is.
+                    // We will only allow preferred activities that came
+                    // from the same match quality.
+                    int match = 0;
 
-                if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Figuring out best match...");
+                    if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Figuring out best match...");
 
-                final int N = query.size();
-                for (int j=0; j<N; j++) {
-                    final ResolveInfo ri = query.get(j);
-                    if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Match for " + ri.activityInfo
-                            + ": 0x" + Integer.toHexString(match));
-                    if (ri.match > match) {
-                        match = ri.match;
-                    }
-                }
-
-                if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Best match: 0x"
-                        + Integer.toHexString(match));
-
-                match &= IntentFilter.MATCH_CATEGORY_MASK;
-                final int M = prefs.size();
-                for (int i=0; i<M; i++) {
-                    final PreferredActivity pa = prefs.get(i);
-                    if (DEBUG_PREFERRED || debug) {
-                        Slog.v(TAG, "Checking PreferredActivity ds="
-                                + (pa.countDataSchemes() > 0 ? pa.getDataScheme(0) : "<none>")
-                                + "\n  component=" + pa.mPref.mComponent);
-                        pa.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), "  ");
-                    }
-                    if (pa.mPref.mMatch != match) {
-                        if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Skipping bad match "
-                                + Integer.toHexString(pa.mPref.mMatch));
-                        continue;
-                    }
-                    // If it's not an "always" type preferred activity and that's what we're
-                    // looking for, skip it.
-                    if (always && !pa.mPref.mAlways) {
-                        if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Skipping mAlways=false entry");
-                        continue;
-                    }
-                    final ActivityInfo ai = getActivityInfo(pa.mPref.mComponent,
-                            flags | PackageManager.GET_DISABLED_COMPONENTS, userId);
-                    if (DEBUG_PREFERRED || debug) {
-                        Slog.v(TAG, "Found preferred activity:");
-                        if (ai != null) {
-                            ai.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), "  ");
-                        } else {
-                            Slog.v(TAG, "  null");
-                        }
-                    }
-                    if (ai == null) {
-                        // This previously registered preferred activity
-                        // component is no longer known.  Most likely an update
-                        // to the app was installed and in the new version this
-                        // component no longer exists.  Clean it up by removing
-                        // it from the preferred activities list, and skip it.
-                        Slog.w(TAG, "Removing dangling preferred activity: "
-                                + pa.mPref.mComponent);
-                        pir.removeFilter(pa);
-                        continue;
-                    }
+                    final int N = query.size();
                     for (int j=0; j<N; j++) {
                         final ResolveInfo ri = query.get(j);
-                        if (!ri.activityInfo.applicationInfo.packageName
-                                .equals(ai.applicationInfo.packageName)) {
+                        if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Match for " + ri.activityInfo
+                                + ": 0x" + Integer.toHexString(match));
+                        if (ri.match > match) {
+                            match = ri.match;
+                        }
+                    }
+
+                    if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Best match: 0x"
+                            + Integer.toHexString(match));
+
+                    match &= IntentFilter.MATCH_CATEGORY_MASK;
+                    final int M = prefs.size();
+                    for (int i=0; i<M; i++) {
+                        final PreferredActivity pa = prefs.get(i);
+                        if (DEBUG_PREFERRED || debug) {
+                            Slog.v(TAG, "Checking PreferredActivity ds="
+                                    + (pa.countDataSchemes() > 0 ? pa.getDataScheme(0) : "<none>")
+                                    + "\n  component=" + pa.mPref.mComponent);
+                            pa.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), "  ");
+                        }
+                        if (pa.mPref.mMatch != match) {
+                            if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Skipping bad match "
+                                    + Integer.toHexString(pa.mPref.mMatch));
                             continue;
                         }
-                        if (!ri.activityInfo.name.equals(ai.name)) {
+                        // If it's not an "always" type preferred activity and that's what we're
+                        // looking for, skip it.
+                        if (always && !pa.mPref.mAlways) {
+                            if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Skipping mAlways=false entry");
                             continue;
                         }
-
-                        if (removeMatches) {
-                            pir.removeFilter(pa);
-                            if (DEBUG_PREFERRED) {
-                                Slog.v(TAG, "Removing match " + pa.mPref.mComponent);
+                        final ActivityInfo ai = getActivityInfo(pa.mPref.mComponent,
+                                flags | PackageManager.GET_DISABLED_COMPONENTS, userId);
+                        if (DEBUG_PREFERRED || debug) {
+                            Slog.v(TAG, "Found preferred activity:");
+                            if (ai != null) {
+                                ai.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), "  ");
+                            } else {
+                                Slog.v(TAG, "  null");
                             }
-                            break;
                         }
-
-                        // Okay we found a previously set preferred or last chosen app.
-                        // If the result set is different from when this
-                        // was created, we need to clear it and re-ask the
-                        // user their preference, if we're looking for an "always" type entry.
-                        if (always && !pa.mPref.sameSet(query, priority)) {
-                            Slog.i(TAG, "Result set changed, dropping preferred activity for "
-                                    + intent + " type " + resolvedType);
-                            if (DEBUG_PREFERRED) {
-                                Slog.v(TAG, "Removing preferred activity since set changed "
-                                        + pa.mPref.mComponent);
-                            }
+                        if (ai == null) {
+                            // This previously registered preferred activity
+                            // component is no longer known.  Most likely an update
+                            // to the app was installed and in the new version this
+                            // component no longer exists.  Clean it up by removing
+                            // it from the preferred activities list, and skip it.
+                            Slog.w(TAG, "Removing dangling preferred activity: "
+                                    + pa.mPref.mComponent);
                             pir.removeFilter(pa);
-                            // Re-add the filter as a "last chosen" entry (!always)
-                            PreferredActivity lastChosen = new PreferredActivity(
-                                    pa, pa.mPref.mMatch, null, pa.mPref.mComponent, false);
-                            pir.addFilter(lastChosen);
-                            mSettings.writePackageRestrictionsLPr(userId);
-                            return null;
+                            changed = true;
+                            continue;
                         }
+                        for (int j=0; j<N; j++) {
+                            final ResolveInfo ri = query.get(j);
+                            if (!ri.activityInfo.applicationInfo.packageName
+                                    .equals(ai.applicationInfo.packageName)) {
+                                continue;
+                            }
+                            if (!ri.activityInfo.name.equals(ai.name)) {
+                                continue;
+                            }
 
-                        // Yay! Either the set matched or we're looking for the last chosen
-                        if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Returning preferred activity: "
-                                + ri.activityInfo.packageName + "/" + ri.activityInfo.name);
+                            if (removeMatches) {
+                                pir.removeFilter(pa);
+                                changed = true;
+                                if (DEBUG_PREFERRED) {
+                                    Slog.v(TAG, "Removing match " + pa.mPref.mComponent);
+                                }
+                                break;
+                            }
+
+                            // Okay we found a previously set preferred or last chosen app.
+                            // If the result set is different from when this
+                            // was created, we need to clear it and re-ask the
+                            // user their preference, if we're looking for an "always" type entry.
+                            if (always && !pa.mPref.sameSet(query, priority)) {
+                                Slog.i(TAG, "Result set changed, dropping preferred activity for "
+                                        + intent + " type " + resolvedType);
+                                if (DEBUG_PREFERRED) {
+                                    Slog.v(TAG, "Removing preferred activity since set changed "
+                                            + pa.mPref.mComponent);
+                                }
+                                pir.removeFilter(pa);
+                                // Re-add the filter as a "last chosen" entry (!always)
+                                PreferredActivity lastChosen = new PreferredActivity(
+                                        pa, pa.mPref.mMatch, null, pa.mPref.mComponent, false);
+                                pir.addFilter(lastChosen);
+                                changed = true;
+                                return null;
+                            }
+
+                            // Yay! Either the set matched or we're looking for the last chosen
+                            if (DEBUG_PREFERRED || debug) Slog.v(TAG, "Returning preferred activity: "
+                                    + ri.activityInfo.packageName + "/" + ri.activityInfo.name);
+                            return ri;
+                        }
+                    }
+                } finally {
+                    if (changed) {
+                        if (DEBUG_PREFERRED) {
+                            Slog.v(TAG, "Preferred activity bookkeeping changed; writing restrictions");
+                        }
                         mSettings.writePackageRestrictionsLPr(userId);
-                        return ri;
                     }
                 }
             }
-            mSettings.writePackageRestrictionsLPr(userId);
         }
         if (DEBUG_PREFERRED || debug) Slog.v(TAG, "No preferred activity to return");
         return null;
@@ -3222,32 +3240,31 @@
         // reader
         synchronized (mPackages) {
             final String pkgName = intent.getPackage();
-            boolean queryCrossProfile = (flags & PackageManager.NO_CROSS_PROFILE) == 0;
             if (pkgName == null) {
                 ResolveInfo resolveInfo = null;
-                if (queryCrossProfile) {
-                    // Check if the intent needs to be forwarded to another user for this package
-                    ArrayList<ResolveInfo> crossProfileResult =
-                            queryIntentActivitiesCrossProfilePackage(
-                                    intent, resolvedType, flags, userId);
-                    if (!crossProfileResult.isEmpty()) {
-                        // Skip the current profile
-                        return crossProfileResult;
-                    }
-                    List<CrossProfileIntentFilter> matchingFilters =
-                            getMatchingCrossProfileIntentFilters(intent, resolvedType, userId);
-                    // Check for results that need to skip the current profile.
-                    resolveInfo = querySkipCurrentProfileIntents(matchingFilters, intent,
-                            resolvedType, flags, userId);
-                    if (resolveInfo != null) {
-                        List<ResolveInfo> result = new ArrayList<ResolveInfo>(1);
-                        result.add(resolveInfo);
-                        return result;
-                    }
-                    // Check for cross profile results.
-                    resolveInfo = queryCrossProfileIntents(
-                            matchingFilters, intent, resolvedType, flags, userId);
+
+                // Check if the intent needs to be forwarded to another user for this package
+                ArrayList<ResolveInfo> crossProfileResult =
+                        queryIntentActivitiesCrossProfilePackage(
+                                intent, resolvedType, flags, userId);
+                if (!crossProfileResult.isEmpty()) {
+                    // Skip the current profile
+                    return crossProfileResult;
                 }
+                List<CrossProfileIntentFilter> matchingFilters =
+                        getMatchingCrossProfileIntentFilters(intent, resolvedType, userId);
+                // Check for results that need to skip the current profile.
+                resolveInfo = querySkipCurrentProfileIntents(matchingFilters, intent,
+                        resolvedType, flags, userId);
+                if (resolveInfo != null) {
+                    List<ResolveInfo> result = new ArrayList<ResolveInfo>(1);
+                    result.add(resolveInfo);
+                    return result;
+                }
+                // Check for cross profile results.
+                resolveInfo = queryCrossProfileIntents(
+                        matchingFilters, intent, resolvedType, flags, userId);
+
                 // Check for results in the current profile.
                 List<ResolveInfo> result = mActivities.queryIntent(
                         intent, resolvedType, flags, userId);
@@ -3259,14 +3276,12 @@
             }
             final PackageParser.Package pkg = mPackages.get(pkgName);
             if (pkg != null) {
-                if (queryCrossProfile) {
-                    ArrayList<ResolveInfo> crossProfileResult =
-                            queryIntentActivitiesCrossProfilePackage(
-                                    intent, resolvedType, flags, userId, pkg, pkgName);
-                    if (!crossProfileResult.isEmpty()) {
-                        // Skip the current profile
-                        return crossProfileResult;
-                    }
+                ArrayList<ResolveInfo> crossProfileResult =
+                        queryIntentActivitiesCrossProfilePackage(
+                                intent, resolvedType, flags, userId, pkg, pkgName);
+                if (!crossProfileResult.isEmpty()) {
+                    // Skip the current profile
+                    return crossProfileResult;
                 }
                 return mActivities.queryIntentForPackage(intent, resolvedType, flags,
                         pkg.activities, userId);
@@ -3765,21 +3780,25 @@
         } else {
             pi = generatePackageInfoFromSettingsLPw(ps.name, flags, userId);
         }
-        if ((flags&PackageManager.GET_PERMISSIONS) == 0) {
-            if (numMatch == permissions.length) {
-                pi.requestedPermissions = permissions;
-            } else {
-                pi.requestedPermissions = new String[numMatch];
-                numMatch = 0;
-                for (int i=0; i<permissions.length; i++) {
-                    if (tmp[i]) {
-                        pi.requestedPermissions[numMatch] = permissions[i];
-                        numMatch++;
+        // The above might return null in cases of uninstalled apps or install-state
+        // skew across users/profiles.
+        if (pi != null) {
+            if ((flags&PackageManager.GET_PERMISSIONS) == 0) {
+                if (numMatch == permissions.length) {
+                    pi.requestedPermissions = permissions;
+                } else {
+                    pi.requestedPermissions = new String[numMatch];
+                    numMatch = 0;
+                    for (int i=0; i<permissions.length; i++) {
+                        if (tmp[i]) {
+                            pi.requestedPermissions[numMatch] = permissions[i];
+                            numMatch++;
+                        }
                     }
                 }
             }
+            list.add(pi);
         }
-        list.add(pi);
     }
 
     @Override
@@ -4143,8 +4162,7 @@
             pp.collectCertificates(pkg, parseFlags);
             pp.collectManifestDigest(pkg);
         } catch (PackageParserException e) {
-            throw new PackageManagerException(e.error, "Failed to collect certificates for "
-                    + pkg.packageName + ": " + e.getMessage());
+            throw PackageManagerException.from(e);
         }
     }
 
@@ -4169,8 +4187,7 @@
         try {
             pkg = pp.parsePackage(scanFile, parseFlags);
         } catch (PackageParserException e) {
-            throw new PackageManagerException(e.error,
-                    "Failed to scan " + scanFile + ": " + e.getMessage());
+            throw PackageManagerException.from(e);
         }
 
         PackageSetting ps = null;
@@ -4441,13 +4458,12 @@
         if (pkgs != null) {
             // Filter out packages that aren't recently used.
             //
-            // The exception is first boot of a non-eng device, which
+            // The exception is first boot of a non-eng device (aka !mLazyDexOpt), which
             // should do a full dexopt.
-            boolean eng = "eng".equals(SystemProperties.get("ro.build.type"));
-            if (eng || (!isFirstBoot() && mPackageUsage.isHistoricalPackageUsageAvailable())) {
+            if (mLazyDexOpt || (!isFirstBoot() && mPackageUsage.isHistoricalPackageUsageAvailable())) {
                 // TODO: add a property to control this?
                 long dexOptLRUThresholdInMinutes;
-                if (eng) {
+                if (mLazyDexOpt) {
                     dexOptLRUThresholdInMinutes = 30; // only last 30 minutes of apps for eng builds.
                 } else {
                     dexOptLRUThresholdInMinutes = 7 * 24 * 60; // apps used in the 7 days for users.
@@ -4501,7 +4517,7 @@
 
     @Override
     public boolean performDexOptIfNeeded(String packageName, String instructionSet) {
-        return performDexOpt(packageName, instructionSet, true);
+        return performDexOpt(packageName, instructionSet, false);
     }
 
     private static String getPrimaryInstructionSet(ApplicationInfo info) {
@@ -4512,7 +4528,13 @@
         return VMRuntime.getInstructionSet(info.primaryCpuAbi);
     }
 
-    public boolean performDexOpt(String packageName, String instructionSet, boolean updateUsage) {
+    public boolean performDexOpt(String packageName, String instructionSet, boolean backgroundDexopt) {
+        boolean dexopt = mLazyDexOpt || backgroundDexopt;
+        boolean updateUsage = !backgroundDexopt;  // Don't update usage if this is just a backgroundDexopt
+        if (!dexopt && !updateUsage) {
+            // We aren't going to dexopt or update usage, so bail early.
+            return false;
+        }
         PackageParser.Package p;
         final String targetInstructionSet;
         synchronized (mPackages) {
@@ -4524,6 +4546,10 @@
                 p.mLastPackageUsageTimeInMills = System.currentTimeMillis();
             }
             mPackageUsage.write(false);
+            if (!dexopt) {
+                // We aren't going to dexopt, so bail early.
+                return false;
+            }
 
             targetInstructionSet = instructionSet != null ? instructionSet :
                     getPrimaryInstructionSet(p.applicationInfo);
@@ -7664,16 +7690,18 @@
     }
 
     void schedulePackageCleaning(String packageName, int userId, boolean andCode) {
-        if (false) {
-            RuntimeException here = new RuntimeException("here");
-            here.fillInStackTrace();
-            Slog.d(TAG, "Schedule cleaning " + packageName + " user=" + userId
-                    + " andCode=" + andCode, here);
+        final Message msg = mHandler.obtainMessage(START_CLEANING_PACKAGE,
+                userId, andCode ? 1 : 0, packageName);
+        if (mSystemReady) {
+            msg.sendToTarget();
+        } else {
+            if (mPostSystemReadyMessages == null) {
+                mPostSystemReadyMessages = new ArrayList<>();
+            }
+            mPostSystemReadyMessages.add(msg);
         }
-        mHandler.sendMessage(mHandler.obtainMessage(START_CLEANING_PACKAGE,
-                userId, andCode ? 1 : 0, packageName));
     }
-    
+
     void startCleaningPackages() {
         // reader
         synchronized (mPackages) {
@@ -10224,8 +10252,18 @@
                 if (bp != null) {
                     // If the defining package is signed with our cert, it's okay.  This
                     // also includes the "updating the same package" case, of course.
-                    if (compareSignatures(bp.packageSetting.signatures.mSignatures,
-                            pkg.mSignatures) != PackageManager.SIGNATURE_MATCH) {
+                    // "updating same package" could also involve key-rotation.
+                    final boolean sigsOk;
+                    if (!bp.sourcePackage.equals(pkg.packageName)
+                            || !(bp.packageSetting instanceof PackageSetting)
+                            || !bp.packageSetting.keySetData.isUsingUpgradeKeySets()
+                            || ((PackageSetting) bp.packageSetting).sharedUser != null) {
+                        sigsOk = compareSignatures(bp.packageSetting.signatures.mSignatures,
+                                pkg.mSignatures) == PackageManager.SIGNATURE_MATCH;
+                    } else {
+                        sigsOk = checkUpgradeKeySetLP((PackageSetting) bp.packageSetting, pkg);
+                    }
+                    if (!sigsOk) {
                         // If the owning package is the system itself, we log but allow
                         // install to proceed; we fail the install on all other permission
                         // redefinitions.
@@ -11707,47 +11745,6 @@
                         preferred.activityInfo.name);
     }
 
-    /**
-     * Check if calling UID is the current home app. This handles both the case
-     * where the user has selected a specific home app, and where there is only
-     * one home app.
-     */
-    public boolean checkCallerIsHomeApp() {
-        final Intent intent = new Intent(Intent.ACTION_MAIN);
-        intent.addCategory(Intent.CATEGORY_HOME);
-
-        final int callingUid = Binder.getCallingUid();
-        final int callingUserId = UserHandle.getCallingUserId();
-        final List<ResolveInfo> allHomes = queryIntentActivities(intent, null, 0, callingUserId);
-        final ResolveInfo preferredHome = findPreferredActivity(intent, null, 0, allHomes, 0, true,
-                false, false, callingUserId);
-
-        if (preferredHome != null) {
-            if (callingUid == preferredHome.activityInfo.applicationInfo.uid) {
-                return true;
-            }
-        } else {
-            for (ResolveInfo info : allHomes) {
-                if (callingUid == info.activityInfo.applicationInfo.uid) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Enforce that calling UID is the current home app. This handles both the
-     * case where the user has selected a specific home app, and where there is
-     * only one home app.
-     */
-    public void enforceCallerIsHomeApp() {
-        if (!checkCallerIsHomeApp()) {
-            throw new SecurityException("Caller is not currently selected home app");
-        }
-    }
-
     @Override
     public void setApplicationEnabledSetting(String appPackageName,
             int newState, int flags, int userId, String callingPackage) {
@@ -12007,6 +12004,14 @@
             }
         }
         sUserManager.systemReady();
+
+        // Kick off any messages waiting for system ready
+        if (mPostSystemReadyMessages != null) {
+            for (Message msg : mPostSystemReadyMessages) {
+                msg.sendToTarget();
+            }
+            mPostSystemReadyMessages = null;
+        }
     }
 
     @Override
@@ -13004,6 +13009,9 @@
         Iterator<PackageSetting> psit = mSettings.mPackages.values().iterator();
         while (psit.hasNext()) {
             PackageSetting ps = psit.next();
+            if (ps.pkg == null) {
+                continue;
+            }
             final String packageName = ps.pkg.packageName;
             // Skip over if system app
             if ((ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0) {
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index c346f71..c1caeac 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -602,11 +602,8 @@
                             // original default value is true), or we are being
                             // asked to install for all users, or this is the
                             // user we are installing for.
-                            // In this context all users (USER_ALL) implies an adb install,
-                            // so we additionally check whether that is allowed for this user.
                             final boolean installed = installUser == null
-                                    || (installUser.getIdentifier() == UserHandle.USER_ALL
-                                            && (!isUnknownSourcesDisallowed(user.id)))
+                                    || installUser.getIdentifier() == UserHandle.USER_ALL
                                     || installUser.getIdentifier() == user.id;
                             p.setUserState(user.id, COMPONENT_ENABLED_STATE_DEFAULT,
                                     installed,
@@ -673,10 +670,7 @@
                 List<UserInfo> users = getAllUsers();
                 if (users != null) {
                     for (UserInfo user : users) {
-                        // Installing for USER_ALL implies an adb install, so we
-                        // additionally check whether that is allowed for this user.
-                        if ((installUser.getIdentifier() == UserHandle.USER_ALL
-                                        && (!isUnknownSourcesDisallowed(user.id)))
+                        if (installUser.getIdentifier() == UserHandle.USER_ALL
                                 || installUser.getIdentifier() == user.id) {
                             boolean installed = p.getInstalled(user.id);
                             if (!installed) {
@@ -691,12 +685,6 @@
         return p;
     }
 
-    boolean isUnknownSourcesDisallowed(int userId) {
-        UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
-        return um.getUserRestrictions(new UserHandle(userId)).getBoolean(
-                UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, false);
-    }
-
     void insertPackageSettingLPw(PackageSetting p, PackageParser.Package pkg) {
         p.pkg = pkg;
         // pkg.mSetEnabled = p.getEnabled(userId);
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 2929939..d032d29 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -21,7 +21,6 @@
 import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.ActivityManagerNative;
-import android.app.ActivityThread;
 import android.app.IStopUserCallback;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -92,6 +91,7 @@
     private static final String ATTR_SERIAL_NO = "serialNumber";
     private static final String ATTR_NEXT_SERIAL_NO = "nextSerialNumber";
     private static final String ATTR_PARTIAL = "partial";
+    private static final String ATTR_GUEST_TO_REMOVE = "guestToRemove";
     private static final String ATTR_USER_VERSION = "version";
     private static final String ATTR_PROFILE_GROUP_ID = "profileGroupId";
     private static final String TAG_GUEST_RESTRICTIONS = "guestRestrictions";
@@ -228,7 +228,7 @@
                 ArrayList<UserInfo> partials = new ArrayList<UserInfo>();
                 for (int i = 0; i < mUsers.size(); i++) {
                     UserInfo ui = mUsers.valueAt(i);
-                    if (ui.partial && i != 0) {
+                    if ((ui.partial || ui.guestToRemove) && i != 0) {
                         partials.add(ui);
                     }
                 }
@@ -519,7 +519,7 @@
         for (int i = 0; i < totalUserCount; i++) {
             UserInfo user = mUsers.valueAt(i);
             if (!mRemovingUserIds.get(user.id)
-                    && !user.isGuest()) {
+                    && !user.isGuest() && !user.partial) {
                 aliveUserCount++;
             }
         }
@@ -759,6 +759,9 @@
             if (userInfo.partial) {
                 serializer.attribute(null, ATTR_PARTIAL, "true");
             }
+            if (userInfo.guestToRemove) {
+                serializer.attribute(null, ATTR_GUEST_TO_REMOVE, "true");
+            }
             if (userInfo.profileGroupId != UserInfo.NO_PROFILE_GROUP_ID) {
                 serializer.attribute(null, ATTR_PROFILE_GROUP_ID,
                         Integer.toString(userInfo.profileGroupId));
@@ -806,7 +809,7 @@
             serializer.attribute(null, ATTR_NEXT_SERIAL_NO, Integer.toString(mNextSerialNumber));
             serializer.attribute(null, ATTR_USER_VERSION, Integer.toString(mUserVersion));
 
-            serializer.startTag(null,  TAG_GUEST_RESTRICTIONS);
+            serializer.startTag(null, TAG_GUEST_RESTRICTIONS);
             writeRestrictionsLocked(serializer, mGuestRestrictions);
             serializer.endTag(null, TAG_GUEST_RESTRICTIONS);
             for (int i = 0; i < mUsers.size(); i++) {
@@ -855,6 +858,8 @@
         writeBoolean(serializer, restrictions, UserManager.DISALLOW_OUTGOING_CALLS);
         writeBoolean(serializer, restrictions, UserManager.DISALLOW_SMS);
         writeBoolean(serializer, restrictions, UserManager.DISALLOW_CREATE_WINDOWS);
+        writeBoolean(serializer, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE);
+        writeBoolean(serializer, restrictions, UserManager.DISALLOW_OUTGOING_BEAM);
         serializer.endTag(null, TAG_RESTRICTIONS);
     }
 
@@ -871,6 +876,7 @@
         int profileGroupId = UserInfo.NO_PROFILE_GROUP_ID;
         long lastAttemptTime = 0L;
         boolean partial = false;
+        boolean guestToRemove = false;
         Bundle restrictions = new Bundle();
 
         FileInputStream fis = null;
@@ -918,6 +924,10 @@
                 if ("true".equals(valueString)) {
                     partial = true;
                 }
+                valueString = parser.getAttributeValue(null, ATTR_GUEST_TO_REMOVE);
+                if ("true".equals(valueString)) {
+                    guestToRemove = true;
+                }
 
                 int outerDepth = parser.getDepth();
                 while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
@@ -942,6 +952,7 @@
             userInfo.creationTime = creationTime;
             userInfo.lastLoggedInTime = lastLoggedInTime;
             userInfo.partial = partial;
+            userInfo.guestToRemove = guestToRemove;
             userInfo.profileGroupId = profileGroupId;
             mUserRestrictions.append(id, restrictions);
             if (salt != 0L) {
@@ -999,6 +1010,8 @@
         readBoolean(parser, restrictions, UserManager.DISALLOW_OUTGOING_CALLS);
         readBoolean(parser, restrictions, UserManager.DISALLOW_SMS);
         readBoolean(parser, restrictions, UserManager.DISALLOW_CREATE_WINDOWS);
+        readBoolean(parser, restrictions, UserManager.DISALLOW_CROSS_PROFILE_COPY_PASTE);
+        readBoolean(parser, restrictions, UserManager.DISALLOW_OUTGOING_BEAM);
     }
 
     private void readBoolean(XmlPullParser parser, Bundle restrictions,
@@ -1119,7 +1132,7 @@
                         return null;
                     }
                     // If we're adding a guest and there already exists one, bail.
-                    if (isGuest && numberOfUsersOfTypeLocked(UserInfo.FLAG_GUEST, true) > 0) {
+                    if (isGuest && findCurrentGuestUserLocked() != null) {
                         return null;
                     }
                     // Limit number of managed profiles that can be created
@@ -1180,6 +1193,65 @@
     }
 
     /**
+     * Find the current guest user. If the Guest user is partial,
+     * then do not include it in the results as it is about to die.
+     * This is different than {@link #numberOfUsersOfTypeLocked(int, boolean)} due to
+     * the special handling of Guests being removed.
+     */
+    private UserInfo findCurrentGuestUserLocked() {
+        final int size = mUsers.size();
+        for (int i = 0; i < size; i++) {
+            final UserInfo user = mUsers.valueAt(i);
+            if (user.isGuest() && !user.guestToRemove && !mRemovingUserIds.get(user.id)) {
+                return user;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Mark this guest user for deletion to allow us to create another guest
+     * and switch to that user before actually removing this guest.
+     * @param userHandle the userid of the current guest
+     * @return whether the user could be marked for deletion
+     */
+    public boolean markGuestForDeletion(int userHandle) {
+        checkManageUsersPermission("Only the system can remove users");
+        if (getUserRestrictions(UserHandle.getCallingUserId()).getBoolean(
+                UserManager.DISALLOW_REMOVE_USER, false)) {
+            Log.w(LOG_TAG, "Cannot remove user. DISALLOW_REMOVE_USER is enabled.");
+            return false;
+        }
+
+        long ident = Binder.clearCallingIdentity();
+        try {
+            final UserInfo user;
+            synchronized (mPackagesLock) {
+                user = mUsers.get(userHandle);
+                if (userHandle == 0 || user == null || mRemovingUserIds.get(userHandle)) {
+                    return false;
+                }
+                if (!user.isGuest()) {
+                    return false;
+                }
+                // We set this to a guest user that is to be removed. This is a temporary state
+                // where we are allowed to add new Guest users, even if this one is still not
+                // removed. This user will still show up in getUserInfo() calls.
+                // If we don't get around to removing this Guest user, it will be purged on next
+                // startup.
+                user.guestToRemove = true;
+                // Mark it as disabled, so that it isn't returned any more when
+                // profiles are queried.
+                user.flags |= UserInfo.FLAG_DISABLED;
+                writeUserLocked(user);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(ident);
+        }
+        return true;
+    }
+
+    /**
      * Removes a user and all data directories created for that user. This method should be called
      * after the user's processes have been terminated.
      * @param userHandle the user's id
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index 5f97a00..7808800 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -91,8 +91,6 @@
     private static final int MSG_SANDMAN = 2;
     // Message: Sent when the screen on blocker is released.
     private static final int MSG_SCREEN_ON_BLOCKER_RELEASED = 3;
-    // Message: Sent to poll whether the boot animation has terminated.
-    private static final int MSG_CHECK_IF_BOOT_ANIMATION_FINISHED = 4;
 
     // Dirty bit: mWakeLocks changed
     private static final int DIRTY_WAKE_LOCKS = 1 << 0;
@@ -154,12 +152,6 @@
     // provider populates the actual default value (R.integer.def_screen_off_timeout).
     private static final int DEFAULT_SCREEN_OFF_TIMEOUT = 15 * 1000;
 
-    // The name of the boot animation service in init.rc.
-    private static final String BOOT_ANIMATION_SERVICE = "bootanim";
-
-    // Poll interval in milliseconds for watching boot animation finished.
-    private static final int BOOT_ANIMATION_POLL_INTERVAL = 200;
-
     // Power hints defined in hardware/libhardware/include/hardware/power.h.
     private static final int POWER_HINT_INTERACTION = 2;
     private static final int POWER_HINT_LOW_POWER = 5;
@@ -478,14 +470,15 @@
 
     @Override
     public void onBootPhase(int phase) {
-        if (phase == PHASE_BOOT_COMPLETED) {
-            // This is our early signal that the system thinks it has finished booting.
-            // However, the boot animation may still be running for a few more seconds
-            // since it is ultimately in charge of when it terminates.
-            // Defer transitioning into the boot completed state until the animation exits.
-            // We do this so that the screen does not start to dim prematurely before
-            // the user has actually had a chance to interact with the device.
-            startWatchingForBootAnimationFinished();
+        synchronized (mLock) {
+            if (phase == PHASE_BOOT_COMPLETED) {
+                final long now = SystemClock.uptimeMillis();
+                mBootCompleted = true;
+                mDirty |= DIRTY_BOOT_COMPLETED;
+                userActivityNoUpdateLocked(
+                        now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
+                updatePowerStateLocked();
+            }
         }
     }
 
@@ -2076,38 +2069,6 @@
         updatePowerStateLocked();
     }
 
-    private void startWatchingForBootAnimationFinished() {
-        mHandler.sendEmptyMessage(MSG_CHECK_IF_BOOT_ANIMATION_FINISHED);
-    }
-
-    private void checkIfBootAnimationFinished() {
-        if (DEBUG) {
-            Slog.d(TAG, "Check if boot animation finished...");
-        }
-
-        if (SystemService.isRunning(BOOT_ANIMATION_SERVICE)) {
-            mHandler.sendEmptyMessageDelayed(MSG_CHECK_IF_BOOT_ANIMATION_FINISHED,
-                    BOOT_ANIMATION_POLL_INTERVAL);
-            return;
-        }
-
-        synchronized (mLock) {
-            if (!mBootCompleted) {
-                Slog.i(TAG, "Boot animation finished.");
-                handleBootCompletedLocked();
-            }
-        }
-    }
-
-    private void handleBootCompletedLocked() {
-        final long now = SystemClock.uptimeMillis();
-        mBootCompleted = true;
-        mDirty |= DIRTY_BOOT_COMPLETED;
-        userActivityNoUpdateLocked(
-                now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
-        updatePowerStateLocked();
-    }
-
     private void shutdownOrRebootInternal(final boolean shutdown, final boolean confirm,
             final String reason, boolean wait) {
         if (mHandler == null || !mSystemReady) {
@@ -2528,9 +2489,6 @@
                 case MSG_SCREEN_ON_BLOCKER_RELEASED:
                     handleScreenOnBlockerReleased();
                     break;
-                case MSG_CHECK_IF_BOOT_ANIMATION_FINISHED:
-                    checkIfBootAnimationFinished();
-                    break;
             }
         }
     }
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 98c3381..fefbe0a 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -33,6 +33,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
@@ -48,6 +49,7 @@
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.provider.Settings;
 import android.service.trust.TrustAgentService;
 import android.util.ArraySet;
 import android.util.AttributeSet;
@@ -97,6 +99,7 @@
     private final SparseBooleanArray mUserHasAuthenticatedSinceBoot = new SparseBooleanArray();
     /* package */ final TrustArchive mArchive = new TrustArchive();
     private final Context mContext;
+    private final LockPatternUtils mLockPatternUtils;
 
     private UserManager mUserManager;
 
@@ -104,6 +107,7 @@
         super(context);
         mContext = context;
         mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
+        mLockPatternUtils = new LockPatternUtils(context);
     }
 
     @Override
@@ -116,7 +120,8 @@
         if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY && !isSafeMode()) {
             mPackageMonitor.register(mContext, mHandler.getLooper(), UserHandle.ALL, true);
             mReceiver.register(mContext);
-            refreshAgentList();
+            maybeEnableFactoryTrustAgents(mLockPatternUtils, UserHandle.USER_OWNER);
+            refreshAgentList(UserHandle.USER_ALL);
         }
     }
 
@@ -157,19 +162,32 @@
         dispatchOnTrustChanged(aggregateIsTrusted(userId), userId, initiatedByUser);
     }
 
-    void refreshAgentList() {
+    void refreshAgentList(int userId) {
         if (DEBUG) Slog.d(TAG, "refreshAgentList()");
+        if (userId != UserHandle.USER_ALL && userId < UserHandle.USER_OWNER) {
+            Log.e(TAG, "refreshAgentList(userId=" + userId + "): Invalid user handle,"
+                    + " must be USER_ALL or a specific user.", new Throwable("here"));
+            userId = UserHandle.USER_ALL;
+        }
         PackageManager pm = mContext.getPackageManager();
 
-        List<UserInfo> userInfos = mUserManager.getUsers(true /* excludeDying */);
-        LockPatternUtils lockPatternUtils = new LockPatternUtils(mContext);
+        List<UserInfo> userInfos;
+        if (userId == UserHandle.USER_ALL) {
+            userInfos = mUserManager.getUsers(true /* excludeDying */);
+        } else {
+            userInfos = new ArrayList<>();
+            userInfos.add(mUserManager.getUserInfo(userId));
+        }
+        LockPatternUtils lockPatternUtils = mLockPatternUtils;
 
         ArraySet<AgentInfo> obsoleteAgents = new ArraySet<>();
         obsoleteAgents.addAll(mActiveAgents);
 
         for (UserInfo userInfo : userInfos) {
-            if (lockPatternUtils.getKeyguardStoredPasswordQuality()
+            if (!userInfo.supportsSwitchTo()) continue;
+            if (lockPatternUtils.getKeyguardStoredPasswordQuality(userInfo.id)
                     == DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) continue;
+            if (!mUserHasAuthenticatedSinceBoot.get(userInfo.id)) continue;
             DevicePolicyManager dpm = lockPatternUtils.getDevicePolicyManager();
             int disabledFeatures = dpm.getKeyguardDisabledFeatures(null, userInfo.id);
             final boolean disableTrustAgents =
@@ -179,22 +197,11 @@
             if (enabledAgents == null) {
                 continue;
             }
-            List<ResolveInfo> resolveInfos = pm.queryIntentServicesAsUser(TRUST_AGENT_INTENT,
-                    PackageManager.GET_META_DATA, userInfo.id);
+            List<ResolveInfo> resolveInfos = resolveAllowedTrustAgents(pm, userInfo.id);
             for (ResolveInfo resolveInfo : resolveInfos) {
-                if (resolveInfo.serviceInfo == null) continue;
-
-                String packageName = resolveInfo.serviceInfo.packageName;
-                if (pm.checkPermission(PERMISSION_PROVIDE_AGENT, packageName)
-                        != PackageManager.PERMISSION_GRANTED) {
-                    Log.w(TAG, "Skipping agent because package " + packageName
-                            + " does not have permission " + PERMISSION_PROVIDE_AGENT + ".");
-                    continue;
-                }
-
                 ComponentName name = getComponentName(resolveInfo);
-                if (!enabledAgents.contains(name)) continue;
 
+                if (!enabledAgents.contains(name)) continue;
                 if (disableTrustAgents) {
                     List<String> features =
                             dpm.getTrustAgentFeaturesEnabled(null /* admin */, name);
@@ -221,11 +228,13 @@
         boolean trustMayHaveChanged = false;
         for (int i = 0; i < obsoleteAgents.size(); i++) {
             AgentInfo info = obsoleteAgents.valueAt(i);
-            if (info.agent.isManagingTrust()) {
-                trustMayHaveChanged = true;
+            if (userId == UserHandle.USER_ALL || userId == info.userId) {
+                if (info.agent.isManagingTrust()) {
+                    trustMayHaveChanged = true;
+                }
+                info.agent.unbind();
+                mActiveAgents.remove(info);
             }
-            info.agent.unbind();
-            mActiveAgents.remove(info);
         }
 
         if (trustMayHaveChanged) {
@@ -233,7 +242,7 @@
         }
     }
 
-    void updateDevicePolicyFeatures(int userId) {
+    void updateDevicePolicyFeatures() {
         for (int i = 0; i < mActiveAgents.size(); i++) {
             AgentInfo info = mActiveAgents.valueAt(i);
             if (info.agent.isConnected()) {
@@ -276,7 +285,7 @@
         if (trustMayHaveChanged) {
             updateTrust(userId, false);
         }
-        refreshAgentList();
+        refreshAgentList(userId);
     }
 
     private ComponentName getSettingsComponentName(PackageManager pm, ResolveInfo resolveInfo) {
@@ -335,6 +344,54 @@
         return new ComponentName(resolveInfo.serviceInfo.packageName, resolveInfo.serviceInfo.name);
     }
 
+    private void maybeEnableFactoryTrustAgents(LockPatternUtils utils, int userId) {
+        if (0 != Settings.Secure.getIntForUser(mContext.getContentResolver(),
+                Settings.Secure.TRUST_AGENTS_INITIALIZED, 0, userId)) {
+            return;
+        }
+        PackageManager pm = mContext.getPackageManager();
+        List<ResolveInfo> resolveInfos = resolveAllowedTrustAgents(pm, userId);
+        ArraySet<ComponentName> discoveredAgents = new ArraySet<>();
+        for (ResolveInfo resolveInfo : resolveInfos) {
+            ComponentName componentName = getComponentName(resolveInfo);
+            int applicationInfoFlags = resolveInfo.serviceInfo.applicationInfo.flags;
+            if ((applicationInfoFlags & ApplicationInfo.FLAG_SYSTEM) == 0) {
+                Log.i(TAG, "Leaving agent " + componentName + " disabled because package "
+                        + "is not a system package.");
+                continue;
+            }
+            discoveredAgents.add(componentName);
+        }
+
+        List<ComponentName> previouslyEnabledAgents = utils.getEnabledTrustAgents(userId);
+        if (previouslyEnabledAgents != null) {
+            discoveredAgents.addAll(previouslyEnabledAgents);
+        }
+        utils.setEnabledTrustAgents(discoveredAgents, userId);
+        Settings.Secure.putIntForUser(mContext.getContentResolver(),
+                Settings.Secure.TRUST_AGENTS_INITIALIZED, 1, userId);
+    }
+
+    private List<ResolveInfo> resolveAllowedTrustAgents(PackageManager pm, int userId) {
+        List<ResolveInfo> resolveInfos = pm.queryIntentServicesAsUser(TRUST_AGENT_INTENT,
+                0 /* flags */, userId);
+        ArrayList<ResolveInfo> allowedAgents = new ArrayList<>(resolveInfos.size());
+        for (ResolveInfo resolveInfo : resolveInfos) {
+            if (resolveInfo.serviceInfo == null) continue;
+            if (resolveInfo.serviceInfo.applicationInfo == null) continue;
+            String packageName = resolveInfo.serviceInfo.packageName;
+            if (pm.checkPermission(PERMISSION_PROVIDE_AGENT, packageName)
+                    != PackageManager.PERMISSION_GRANTED) {
+                ComponentName name = getComponentName(resolveInfo);
+                Log.w(TAG, "Skipping agent " + name + " because package does not have"
+                        + " permission " + PERMISSION_PROVIDE_AGENT + ".");
+                continue;
+            }
+            allowedAgents.add(resolveInfo);
+        }
+        return allowedAgents;
+    }
+
     // Agent dispatch and aggregation
 
     private boolean aggregateIsTrusted(int userId) {
@@ -383,7 +440,7 @@
     private void updateUserHasAuthenticated(int userId) {
         if (!mUserHasAuthenticatedSinceBoot.get(userId)) {
             mUserHasAuthenticatedSinceBoot.put(userId, true);
-            updateTrust(userId, false);
+            refreshAgentList(userId);
         }
     }
 
@@ -391,10 +448,10 @@
     private void requireCredentialEntry(int userId) {
         if (userId == UserHandle.USER_ALL) {
             mUserHasAuthenticatedSinceBoot.clear();
-            updateTrustAll();
+            refreshAgentList(UserHandle.USER_ALL);
         } else {
             mUserHasAuthenticatedSinceBoot.put(userId, false);
-            updateTrust(userId, false);
+            refreshAgentList(userId);
         }
     }
 
@@ -407,6 +464,7 @@
             }
         }
         mTrustListeners.add(listener);
+        updateTrustAll();
     }
 
     private void removeListener(ITrustListener listener) {
@@ -578,7 +636,7 @@
                     dispatchUnlockAttempt(msg.arg1 != 0, msg.arg2);
                     break;
                 case MSG_ENABLED_AGENTS_CHANGED:
-                    refreshAgentList();
+                    refreshAgentList(UserHandle.USER_ALL);
                     break;
                 case MSG_REQUIRE_CREDENTIAL_ENTRY:
                     requireCredentialEntry(msg.arg1);
@@ -590,7 +648,7 @@
     private final PackageMonitor mPackageMonitor = new PackageMonitor() {
         @Override
         public void onSomePackagesChanged() {
-            refreshAgentList();
+            refreshAgentList(UserHandle.USER_ALL);
         }
 
         @Override
@@ -609,12 +667,19 @@
 
         @Override
         public void onReceive(Context context, Intent intent) {
-            if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(
-                    intent.getAction())) {
-                refreshAgentList();
-                updateDevicePolicyFeatures(getSendingUserId());
-            } else if (Intent.ACTION_USER_PRESENT.equals(intent.getAction())) {
+            String action = intent.getAction();
+            if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(action)) {
+                refreshAgentList(getSendingUserId());
+                updateDevicePolicyFeatures();
+            } else if (Intent.ACTION_USER_PRESENT.equals(action)) {
                 updateUserHasAuthenticated(getSendingUserId());
+            } else if (Intent.ACTION_USER_ADDED.equals(action)) {
+                int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -100);
+                if (userId > 0) {
+                    maybeEnableFactoryTrustAgents(mLockPatternUtils, userId);
+                } else {
+                    Log.wtf(TAG, "EXTRA_USER_HANDLE missing or invalid, value=" + userId);
+                }
             }
         }
 
@@ -622,6 +687,7 @@
             IntentFilter filter = new IntentFilter();
             filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
             filter.addAction(Intent.ACTION_USER_PRESENT);
+            filter.addAction(Intent.ACTION_USER_ADDED);
             context.registerReceiverAsUser(this,
                     UserHandle.ALL,
                     filter,
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index d22912c..adae84fd 100644
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -85,6 +85,7 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -139,7 +140,7 @@
             registerBroadcastReceivers();
         } else if (phase == SystemService.PHASE_THIRD_PARTY_APPS_CAN_START) {
             synchronized (mLock) {
-                buildTvInputListLocked(mCurrentUserId);
+                buildTvInputListLocked(mCurrentUserId, null);
                 buildTvContentRatingSystemListLocked(mCurrentUserId);
             }
         }
@@ -148,19 +149,64 @@
 
     private void registerBroadcastReceivers() {
         PackageMonitor monitor = new PackageMonitor() {
+            private void buildTvInputList(String[] packages) {
+                synchronized (mLock) {
+                    buildTvInputListLocked(getChangingUserId(), packages);
+                    buildTvContentRatingSystemListLocked(getChangingUserId());
+                }
+            }
+
+            @Override
+            public void onPackageUpdateFinished(String packageName, int uid) {
+                if (DEBUG) Slog.d(TAG, "onPackageUpdateFinished(packageName=" + packageName + ")");
+                // This callback is invoked when the TV input is reinstalled.
+                // In this case, isReplacing() always returns true.
+                buildTvInputList(new String[] { packageName });
+            }
+
+            @Override
+            public void onPackagesAvailable(String[] packages) {
+                if (DEBUG) {
+                    Slog.d(TAG, "onPackagesAvailable(packages=" + Arrays.toString(packages) + ")");
+                }
+                // This callback is invoked when the media on which some packages exist become
+                // available.
+                if (isReplacing()) {
+                    buildTvInputList(packages);
+                }
+            }
+
+            @Override
+            public void onPackagesUnavailable(String[] packages) {
+                // This callback is invoked when the media on which some packages exist become
+                // unavailable.
+                if (DEBUG)  {
+                    Slog.d(TAG, "onPackagesUnavailable(packages=" + Arrays.toString(packages)
+                            + ")");
+                }
+                if (isReplacing()) {
+                    buildTvInputList(packages);
+                }
+            }
+
             @Override
             public void onSomePackagesChanged() {
+                // TODO: Use finer-grained methods(e.g. onPackageAdded, onPackageRemoved) to manage
+                // the TV inputs.
                 if (DEBUG) Slog.d(TAG, "onSomePackagesChanged()");
-                synchronized (mLock) {
-                    buildTvInputListLocked(mCurrentUserId);
-                    buildTvContentRatingSystemListLocked(mCurrentUserId);
+                if (isReplacing()) {
+                    if (DEBUG) Slog.d(TAG, "Skipped building TV input list due to replacing");
+                    // When the package is updated, buildTvInputListLocked is called in other
+                    // methods instead.
+                    return;
                 }
+                buildTvInputList(null);
             }
 
             @Override
             public void onPackageRemoved(String packageName, int uid) {
                 synchronized (mLock) {
-                    UserState userState = getUserStateLocked(mCurrentUserId);
+                    UserState userState = getUserStateLocked(getChangingUserId());
                     if (!userState.packageSet.contains(packageName)) {
                         // Not a TV input package.
                         return;
@@ -218,13 +264,11 @@
                 component.getPackageName()) == PackageManager.PERMISSION_GRANTED;
     }
 
-    private void buildTvInputListLocked(int userId) {
+    private void buildTvInputListLocked(int userId, String[] updatedPackages) {
         UserState userState = getUserStateLocked(userId);
         userState.packageSet.clear();
 
-        if (DEBUG) {
-            Slog.d(TAG, "buildTvInputList");
-        }
+        if (DEBUG) Slog.d(TAG, "buildTvInputList");
         PackageManager pm = mContext.getPackageManager();
         List<ResolveInfo> services = pm.queryIntentServices(
                 new Intent(TvInputService.SERVICE_INTERFACE),
@@ -247,6 +291,7 @@
                     // let it add TvInputInfo objects to mInputList if there's any.
                     serviceState = new ServiceState(component, userId);
                     userState.serviceStateMap.put(component, serviceState);
+                    updateServiceConnectionLocked(component, userId);
                 } else {
                     inputList.addAll(serviceState.inputList);
                 }
@@ -277,6 +322,15 @@
         for (String inputId : inputMap.keySet()) {
             if (!userState.inputMap.containsKey(inputId)) {
                 notifyInputAddedLocked(userState, inputId);
+            } else if (updatedPackages != null) {
+                // Notify the package updates
+                TvInputState inputState = inputMap.get(inputId);
+                for (String updatedPackage : updatedPackages) {
+                    if (inputState.info.getComponent().getPackageName().equals(updatedPackage)) {
+                        notifyInputUpdatedLocked(userState, inputId);
+                        break;
+                    }
+                }
             }
         }
 
@@ -336,7 +390,7 @@
                 userState = new UserState(mContext, userId);
             }
             mUserStates.put(userId, userState);
-            buildTvInputListLocked(userId);
+            buildTvInputListLocked(userId, null);
             buildTvContentRatingSystemListLocked(userId);
         }
     }
@@ -648,6 +702,19 @@
         }
     }
 
+    private void notifyInputUpdatedLocked(UserState userState, String inputId) {
+        if (DEBUG) {
+            Slog.d(TAG, "notifyInputUpdatedLocked(inputId=" + inputId + ")");
+        }
+        for (ITvInputManagerCallback callback : userState.callbackSet) {
+            try {
+                callback.onInputUpdated(inputId);
+            } catch (RemoteException e) {
+                Slog.e(TAG, "failed to report updated input to callback", e);
+            }
+        }
+    }
+
     private void notifyInputStateChangedLocked(UserState userState, String inputId,
             int state, ITvInputManagerCallback targetCallback) {
         if (DEBUG) {
@@ -1812,7 +1879,7 @@
         private void addTvInputLocked(TvInputInfo inputInfo) {
             ServiceState serviceState = getServiceStateLocked(mComponent, mUserId);
             serviceState.inputList.add(inputInfo);
-            buildTvInputListLocked(mUserId);
+            buildTvInputListLocked(mUserId, null);
         }
 
         @Override
@@ -1850,7 +1917,7 @@
                     }
                 }
                 if (removed) {
-                    buildTvInputListLocked(mUserId);
+                    buildTvInputListLocked(mUserId, null);
                     mTvInputHardwareManager.removeTvInput(inputId);
                 } else {
                     Slog.e(TAG, "failed to remove input " + inputId);
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 3eb2d5f..e1ade63 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -42,6 +42,7 @@
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.graphics.Point;
+import android.graphics.Rect;
 import android.os.Binder;
 import android.os.Bundle;
 import android.os.Environment;
@@ -85,6 +86,7 @@
 import com.android.internal.content.PackageMonitor;
 import com.android.internal.util.FastXmlSerializer;
 import com.android.internal.util.JournaledFile;
+import com.android.internal.R;
 
 public class WallpaperManagerService extends IWallpaperManager.Stub {
     static final String TAG = "WallpaperManagerService";
@@ -99,12 +101,6 @@
     static final long MIN_WALLPAPER_CRASH_TIME = 10000;
     static final String WALLPAPER = "wallpaper";
     static final String WALLPAPER_INFO = "wallpaper_info.xml";
-    /**
-     * Name of the component used to display bitmap wallpapers from either the gallery or
-     * built-in wallpapers.
-     */
-    static final ComponentName IMAGE_WALLPAPER = new ComponentName("com.android.systemui",
-            "com.android.systemui.ImageWallpaper");
 
     /**
      * Observes the wallpaper for changes and notifies all IWallpaperServiceCallbacks
@@ -146,7 +142,7 @@
                         if (event == CLOSE_WRITE) {
                             mWallpaper.imageWallpaperPending = false;
                         }
-                        bindWallpaperComponentLocked(IMAGE_WALLPAPER, true,
+                        bindWallpaperComponentLocked(mImageWallpaper, true,
                                 false, mWallpaper, null);
                         saveSettingsLocked(mWallpaper);
                     }
@@ -161,6 +157,12 @@
     final MyPackageMonitor mMonitor;
     WallpaperData mLastWallpaper;
 
+    /**
+     * Name of the component used to display bitmap wallpapers from either the gallery or
+     * built-in wallpapers.
+     */
+    final ComponentName mImageWallpaper;
+
     SparseArray<WallpaperData> mWallpaperMap = new SparseArray<WallpaperData>();
 
     int mCurrentUserId;
@@ -205,6 +207,8 @@
         int width = -1;
         int height = -1;
 
+        final Rect padding = new Rect(0, 0, 0, 0);
+
         WallpaperData(int userId) {
             this.userId = userId;
             wallpaperFile = new File(getWallpaperDir(userId), WALLPAPER);
@@ -221,6 +225,7 @@
         IRemoteCallback mReply;
 
         boolean mDimensionsChanged = false;
+        boolean mPaddingChanged = false;
 
         public WallpaperConnection(WallpaperInfo info, WallpaperData wallpaper) {
             mInfo = info;
@@ -282,6 +287,14 @@
                     }
                     mDimensionsChanged = false;
                 }
+                if (mPaddingChanged) {
+                    try {
+                        mEngine.setDisplayPadding(mWallpaper.padding);
+                    } catch (RemoteException e) {
+                        Slog.w(TAG, "Failed to set wallpaper padding", e);
+                    }
+                    mPaddingChanged = false;
+                }
             }
         }
 
@@ -447,6 +460,8 @@
     public WallpaperManagerService(Context context) {
         if (DEBUG) Slog.v(TAG, "WallpaperService startup");
         mContext = context;
+        mImageWallpaper = ComponentName.unflattenFromString(
+                context.getResources().getString(R.string.image_wallpaper_component));
         mIWindowManager = IWindowManager.Stub.asInterface(
                 ServiceManager.getService(Context.WINDOW_SERVICE));
         mIPackageManager = AppGlobals.getPackageManager();
@@ -599,33 +614,35 @@
             f.delete();
         }
         final long ident = Binder.clearCallingIdentity();
-        RuntimeException e = null;
         try {
-            wallpaper.imageWallpaperPending = false;
-            if (userId != mCurrentUserId) return;
-            if (bindWallpaperComponentLocked(defaultFailed
-                    ? IMAGE_WALLPAPER
-                    : null, true, false, wallpaper, reply)) {
-                return;
+            RuntimeException e = null;
+            try {
+                wallpaper.imageWallpaperPending = false;
+                if (userId != mCurrentUserId) return;
+                if (bindWallpaperComponentLocked(defaultFailed
+                        ? mImageWallpaper
+                                : null, true, false, wallpaper, reply)) {
+                    return;
+                }
+            } catch (IllegalArgumentException e1) {
+                e = e1;
             }
-        } catch (IllegalArgumentException e1) {
-            e = e1;
+
+            // This can happen if the default wallpaper component doesn't
+            // exist.  This should be a system configuration problem, but
+            // let's not let it crash the system and just live with no
+            // wallpaper.
+            Slog.e(TAG, "Default wallpaper component not found!", e);
+            clearWallpaperComponentLocked(wallpaper);
+            if (reply != null) {
+                try {
+                    reply.sendResult(null);
+                } catch (RemoteException e1) {
+                }
+            }
         } finally {
             Binder.restoreCallingIdentity(ident);
         }
-        
-        // This can happen if the default wallpaper component doesn't
-        // exist.  This should be a system configuration problem, but
-        // let's not let it crash the system and just live with no
-        // wallpaper.
-        Slog.e(TAG, "Default wallpaper component not found!", e);
-        clearWallpaperComponentLocked(wallpaper);
-        if (reply != null) {
-            try {
-                reply.sendResult(null);
-            } catch (RemoteException e1) {
-            }
-        }
     }
 
     public boolean hasNamedWallpaper(String name) {
@@ -714,6 +731,40 @@
         }
     }
 
+    public void setDisplayPadding(Rect padding) {
+        checkPermission(android.Manifest.permission.SET_WALLPAPER_HINTS);
+        synchronized (mLock) {
+            int userId = UserHandle.getCallingUserId();
+            WallpaperData wallpaper = mWallpaperMap.get(userId);
+            if (wallpaper == null) {
+                throw new IllegalStateException("Wallpaper not yet initialized for user " + userId);
+            }
+            if (padding.left < 0 || padding.top < 0 || padding.right < 0 || padding.bottom < 0) {
+                throw new IllegalArgumentException("padding must be positive: " + padding);
+            }
+
+            if (!padding.equals(wallpaper.padding)) {
+                wallpaper.padding.set(padding);
+                saveSettingsLocked(wallpaper);
+                if (mCurrentUserId != userId) return; // Don't change the properties now
+                if (wallpaper.connection != null) {
+                    if (wallpaper.connection.mEngine != null) {
+                        try {
+                            wallpaper.connection.mEngine.setDisplayPadding(padding);
+                        } catch (RemoteException e) {
+                        }
+                        notifyCallbacksLocked(wallpaper);
+                    } else if (wallpaper.connection.mService != null) {
+                        // We've attached to the service but the engine hasn't attached back to us
+                        // yet. This means it will be created with the previous dimensions, so we
+                        // need to update it to the new dimensions once it attaches.
+                        wallpaper.connection.mPaddingChanged = true;
+                    }
+                }
+            }
+        }
+    }
+
     public ParcelFileDescriptor getWallpaper(IWallpaperManagerCallback cb,
             Bundle outParams) {
         synchronized (mLock) {
@@ -848,7 +899,7 @@
                 componentName = WallpaperManager.getDefaultWallpaperComponent(mContext);
                 if (componentName == null) {
                     // Fall back to static image wallpaper
-                    componentName = IMAGE_WALLPAPER;
+                    componentName = mImageWallpaper;
                     //clearWallpaperComponentLocked();
                     //return;
                     if (DEBUG) Slog.v(TAG, "Using image wallpaper");
@@ -876,7 +927,7 @@
             WallpaperInfo wi = null;
             
             Intent intent = new Intent(WallpaperService.SERVICE_INTERFACE);
-            if (componentName != null && !componentName.equals(IMAGE_WALLPAPER)) {
+            if (componentName != null && !componentName.equals(mImageWallpaper)) {
                 // Make sure the selected service is actually a wallpaper service.
                 List<ResolveInfo> ris =
                         mIPackageManager.queryIntentServices(intent,
@@ -1001,7 +1052,7 @@
         try {
             conn.mService.attach(conn, conn.mToken,
                     WindowManager.LayoutParams.TYPE_WALLPAPER, false,
-                    wallpaper.width, wallpaper.height);
+                    wallpaper.width, wallpaper.height, wallpaper.padding);
         } catch (RemoteException e) {
             Slog.w(TAG, "Failed attaching wallpaper; clearing", e);
             if (!wallpaper.wallpaperUpdating) {
@@ -1050,9 +1101,21 @@
             out.startTag(null, "wp");
             out.attribute(null, "width", Integer.toString(wallpaper.width));
             out.attribute(null, "height", Integer.toString(wallpaper.height));
+            if (wallpaper.padding.left != 0) {
+                out.attribute(null, "paddingLeft", Integer.toString(wallpaper.padding.left));
+            }
+            if (wallpaper.padding.top != 0) {
+                out.attribute(null, "paddingTop", Integer.toString(wallpaper.padding.top));
+            }
+            if (wallpaper.padding.right != 0) {
+                out.attribute(null, "paddingRight", Integer.toString(wallpaper.padding.right));
+            }
+            if (wallpaper.padding.bottom != 0) {
+                out.attribute(null, "paddingBottom", Integer.toString(wallpaper.padding.bottom));
+            }
             out.attribute(null, "name", wallpaper.name);
             if (wallpaper.wallpaperComponent != null
-                    && !wallpaper.wallpaperComponent.equals(IMAGE_WALLPAPER)) {
+                    && !wallpaper.wallpaperComponent.equals(mImageWallpaper)) {
                 out.attribute(null, "component",
                         wallpaper.wallpaperComponent.flattenToShortString());
             }
@@ -1086,6 +1149,14 @@
         }
     }
 
+    private int getAttributeInt(XmlPullParser parser, String name, int defValue) {
+        String value = parser.getAttributeValue(null, name);
+        if (value == null) {
+            return defValue;
+        }
+        return Integer.parseInt(value);
+    }
+
     private void loadSettingsLocked(int userId) {
         if (DEBUG) Slog.v(TAG, "loadSettingsLocked");
         
@@ -1116,6 +1187,10 @@
                         wallpaper.width = Integer.parseInt(parser.getAttributeValue(null, "width"));
                         wallpaper.height = Integer.parseInt(parser
                                 .getAttributeValue(null, "height"));
+                        wallpaper.padding.left = getAttributeInt(parser, "paddingLeft", 0);
+                        wallpaper.padding.top = getAttributeInt(parser, "paddingTop", 0);
+                        wallpaper.padding.right = getAttributeInt(parser, "paddingRight", 0);
+                        wallpaper.padding.bottom = getAttributeInt(parser, "paddingBottom", 0);
                         wallpaper.name = parser.getAttributeValue(null, "name");
                         String comp = parser.getAttributeValue(null, "component");
                         wallpaper.nextWallpaperComponent = comp != null
@@ -1124,7 +1199,7 @@
                         if (wallpaper.nextWallpaperComponent == null
                                 || "android".equals(wallpaper.nextWallpaperComponent
                                         .getPackageName())) {
-                            wallpaper.nextWallpaperComponent = IMAGE_WALLPAPER;
+                            wallpaper.nextWallpaperComponent = mImageWallpaper;
                         }
                           
                         if (DEBUG) {
@@ -1162,6 +1237,7 @@
         if (!success) {
             wallpaper.width = -1;
             wallpaper.height = -1;
+            wallpaper.padding.set(0, 0, 0, 0);
             wallpaper.name = "";
         }
 
@@ -1196,7 +1272,7 @@
             loadSettingsLocked(0);
             wallpaper = mWallpaperMap.get(0);
             if (wallpaper.nextWallpaperComponent != null
-                    && !wallpaper.nextWallpaperComponent.equals(IMAGE_WALLPAPER)) {
+                    && !wallpaper.nextWallpaperComponent.equals(mImageWallpaper)) {
                 if (!bindWallpaperComponentLocked(wallpaper.nextWallpaperComponent, false, false,
                         wallpaper, null)) {
                     // No such live wallpaper or other failure; fall back to the default
@@ -1325,13 +1401,12 @@
                 WallpaperData wallpaper = mWallpaperMap.valueAt(i);
                 pw.println(" User " + wallpaper.userId + ":");
                 pw.print("  mWidth=");
-                pw.print(wallpaper.width);
-                pw.print(" mHeight=");
-                pw.println(wallpaper.height);
-                pw.print("  mName=");
-                pw.println(wallpaper.name);
-                pw.print("  mWallpaperComponent=");
-                pw.println(wallpaper.wallpaperComponent);
+                    pw.print(wallpaper.width);
+                    pw.print(" mHeight=");
+                    pw.println(wallpaper.height);
+                pw.print("  mPadding="); pw.println(wallpaper.padding);
+                pw.print("  mName=");  pw.println(wallpaper.name);
+                pw.print("  mWallpaperComponent="); pw.println(wallpaper.wallpaperComponent);
                 if (wallpaper.connection != null) {
                     WallpaperConnection conn = wallpaper.connection;
                     pw.print("  Wallpaper connection ");
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index 61ad7aa..fa1c0ff 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -457,7 +457,7 @@
                 availableBounds.set(0, 0, screenWidth, screenHeight);
 
                 Region nonMagnifiedBounds = mTempRegion4;
-                nonMagnifiedBounds.set(0,  0,  0,  0);
+                nonMagnifiedBounds.set(0, 0, 0, 0);
 
                 SparseArray<WindowState> visibleWindows = mTempWindowStates;
                 visibleWindows.clear();
@@ -566,7 +566,7 @@
             public void setMagnifiedRegionBorderShownLocked(boolean shown, boolean animate) {
                 if (shown) {
                     mFullRedrawNeeded = true;
-                    mOldMagnifiedBounds.set(0,  0,  0,  0);
+                    mOldMagnifiedBounds.set(0, 0, 0, 0);
                 }
                 mWindow.setShown(shown, animate);
             }
@@ -614,19 +614,15 @@
             private final class ViewportWindow {
                 private static final String SURFACE_TITLE = "Magnification Overlay";
 
-                private static final String PROPERTY_NAME_ALPHA = "alpha";
-
-                private static final int MIN_ALPHA = 0;
-                private static final int MAX_ALPHA = 255;
-
                 private final Region mBounds = new Region();
                 private final Rect mDirtyRect = new Rect();
                 private final Paint mPaint = new Paint();
 
-                private final ValueAnimator mShowHideFrameAnimator;
                 private final SurfaceControl mSurfaceControl;
                 private final Surface mSurface = new Surface();
 
+                private final AnimationController mAnimationController;
+
                 private boolean mShown;
                 private int mAlpha;
 
@@ -651,6 +647,9 @@
                     mSurfaceControl.setPosition(0, 0);
                     mSurface.copyFrom(mSurfaceControl);
 
+                    mAnimationController = new AnimationController(context,
+                            mWindowManagerService.mH.getLooper());
+
                     TypedValue typedValue = new TypedValue();
                     context.getTheme().resolveAttribute(R.attr.colorActivatedHighlight,
                             typedValue, true);
@@ -660,14 +659,6 @@
                     mPaint.setStrokeWidth(mBorderWidth);
                     mPaint.setColor(borderColor);
 
-                    Interpolator interpolator = new DecelerateInterpolator(2.5f);
-                    final long longAnimationDuration = context.getResources().getInteger(
-                            com.android.internal.R.integer.config_longAnimTime);
-
-                    mShowHideFrameAnimator = ObjectAnimator.ofInt(this, PROPERTY_NAME_ALPHA,
-                            MIN_ALPHA, MAX_ALPHA);
-                    mShowHideFrameAnimator.setInterpolator(interpolator);
-                    mShowHideFrameAnimator.setDuration(longAnimationDuration);
                     mInvalidated = true;
                 }
 
@@ -677,24 +668,7 @@
                             return;
                         }
                         mShown = shown;
-                        if (animate) {
-                            if (mShowHideFrameAnimator.isRunning()) {
-                                mShowHideFrameAnimator.reverse();
-                            } else {
-                                if (shown) {
-                                    mShowHideFrameAnimator.start();
-                                } else {
-                                    mShowHideFrameAnimator.reverse();
-                                }
-                            }
-                        } else {
-                            mShowHideFrameAnimator.cancel();
-                            if (shown) {
-                                setAlpha(MAX_ALPHA);
-                            } else {
-                                setAlpha(MIN_ALPHA);
-                            }
-                        }
+                        mAnimationController.onFrameShownStateChanged(shown, animate);
                         if (DEBUG_VIEWPORT_WINDOW) {
                             Slog.i(LOG_TAG, "ViewportWindow shown: " + mShown);
                         }
@@ -801,6 +775,64 @@
                     mSurfaceControl.release();
                     mSurface.release();
                 }
+
+                private final class AnimationController extends Handler {
+                    private static final String PROPERTY_NAME_ALPHA = "alpha";
+
+                    private static final int MIN_ALPHA = 0;
+                    private static final int MAX_ALPHA = 255;
+
+                    private static final int MSG_FRAME_SHOWN_STATE_CHANGED = 1;
+
+                    private final ValueAnimator mShowHideFrameAnimator;
+
+                    public AnimationController(Context context, Looper looper) {
+                        super(looper);
+                        mShowHideFrameAnimator = ObjectAnimator.ofInt(ViewportWindow.this,
+                                PROPERTY_NAME_ALPHA, MIN_ALPHA, MAX_ALPHA);
+
+                        Interpolator interpolator = new DecelerateInterpolator(2.5f);
+                        final long longAnimationDuration = context.getResources().getInteger(
+                                com.android.internal.R.integer.config_longAnimTime);
+
+                        mShowHideFrameAnimator.setInterpolator(interpolator);
+                        mShowHideFrameAnimator.setDuration(longAnimationDuration);
+                    }
+
+                    public void onFrameShownStateChanged(boolean shown, boolean animate) {
+                        obtainMessage(MSG_FRAME_SHOWN_STATE_CHANGED,
+                                shown ? 1 : 0, animate ? 1 : 0).sendToTarget();
+                    }
+
+                    @Override
+                    public void handleMessage(Message message) {
+                        switch (message.what) {
+                            case MSG_FRAME_SHOWN_STATE_CHANGED: {
+                                final boolean shown = message.arg1 == 1;
+                                final boolean animate = message.arg2 == 1;
+
+                                if (animate) {
+                                    if (mShowHideFrameAnimator.isRunning()) {
+                                        mShowHideFrameAnimator.reverse();
+                                    } else {
+                                        if (shown) {
+                                            mShowHideFrameAnimator.start();
+                                        } else {
+                                            mShowHideFrameAnimator.reverse();
+                                        }
+                                    }
+                                } else {
+                                    mShowHideFrameAnimator.cancel();
+                                    if (shown) {
+                                        setAlpha(MAX_ALPHA);
+                                    } else {
+                                        setAlpha(MIN_ALPHA);
+                                    }
+                                }
+                            } break;
+                        }
+                    }
+                }
             }
         }
 
diff --git a/services/core/java/com/android/server/wm/AppTransition.java b/services/core/java/com/android/server/wm/AppTransition.java
index aabb8f7..bfc7659 100644
--- a/services/core/java/com/android/server/wm/AppTransition.java
+++ b/services/core/java/com/android/server/wm/AppTransition.java
@@ -569,9 +569,9 @@
             int appWidth, int appHeight, int orientation, int transit, Rect containingFrame,
             Rect contentInsets, boolean isFullScreen) {
         Animation a;
-        final int thumbWidthI = mNextAppTransitionThumbnail.getWidth();
+        final int thumbWidthI = mNextAppTransitionStartWidth;
         final float thumbWidth = thumbWidthI > 0 ? thumbWidthI : 1;
-        final int thumbHeightI = mNextAppTransitionThumbnail.getHeight();
+        final int thumbHeightI = mNextAppTransitionStartHeight;
         final float thumbHeight = thumbHeightI > 0 ? thumbHeightI : 1;
 
         // Used for the ENTER_SCALE_UP and EXIT_SCALE_DOWN transitions
@@ -993,7 +993,7 @@
     }
 
     void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX, int startY,
-            IRemoteCallback startedCallback, boolean scaleUp) {
+            int targetWidth, int targetHeight, IRemoteCallback startedCallback, boolean scaleUp) {
         if (isTransitionSet()) {
             mNextAppTransitionType = scaleUp ? NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_UP
                     : NEXT_TRANSIT_TYPE_THUMBNAIL_ASPECT_SCALE_DOWN;
@@ -1002,6 +1002,8 @@
             mNextAppTransitionScaleUp = scaleUp;
             mNextAppTransitionStartX = startX;
             mNextAppTransitionStartY = startY;
+            mNextAppTransitionStartWidth = targetWidth;
+            mNextAppTransitionStartHeight = targetHeight;
             postAnimationCallback();
             mNextAppTransitionCallback = startedCallback;
         } else {
@@ -1138,6 +1140,10 @@
                         pw.print(mNextAppTransitionStartX);
                         pw.print(" mNextAppTransitionStartY=");
                         pw.println(mNextAppTransitionStartY);
+                        pw.print(" mNextAppTransitionStartWidth=");
+                        pw.print(mNextAppTransitionStartWidth);
+                        pw.print(" mNextAppTransitionStartHeight=");
+                        pw.println(mNextAppTransitionStartHeight);
                 pw.print("  mNextAppTransitionScaleUp="); pw.println(mNextAppTransitionScaleUp);
                 break;
         }
diff --git a/services/core/java/com/android/server/wm/CircularDisplayMask.java b/services/core/java/com/android/server/wm/CircularDisplayMask.java
index 64b852b..a7d41fa 100644
--- a/services/core/java/com/android/server/wm/CircularDisplayMask.java
+++ b/services/core/java/com/android/server/wm/CircularDisplayMask.java
@@ -63,8 +63,14 @@
 
         SurfaceControl ctrl = null;
         try {
-            ctrl = new SurfaceControl(session, "CircularDisplayMask",
-                mScreenSize.x, mScreenSize.y, PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
+            if (WindowManagerService.DEBUG_SURFACE_TRACE) {
+                ctrl = new WindowStateAnimator.SurfaceTrace(session, "CircularDisplayMask",
+                        mScreenSize.x, mScreenSize.y, PixelFormat.TRANSLUCENT,
+                        SurfaceControl.HIDDEN);
+            } else {
+                ctrl = new SurfaceControl(session, "CircularDisplayMask", mScreenSize.x,
+                        mScreenSize.y, PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
+            }
             ctrl.setLayerStack(display.getLayerStack());
             ctrl.setLayer(zOrder);
             ctrl.setPosition(0, 0);
diff --git a/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java b/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java
new file mode 100644
index 0000000..62f2b48
--- /dev/null
+++ b/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java
@@ -0,0 +1,127 @@
+/*
+ * 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.server.wm;
+
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.PixelFormat;
+import android.graphics.Point;
+import android.graphics.PorterDuff;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.util.Slog;
+import android.view.Display;
+import android.view.Surface;
+import android.view.Surface.OutOfResourcesException;
+import android.view.SurfaceControl;
+import android.view.SurfaceSession;
+
+class EmulatorDisplayOverlay {
+    private static final String TAG = "EmulatorDisplayOverlay";
+
+    // Display dimensions
+    private Point mScreenSize;
+
+    private final SurfaceControl mSurfaceControl;
+    private final Surface mSurface = new Surface();
+    private int mLastDW;
+    private int mLastDH;
+    private boolean mDrawNeeded;
+    private Drawable mOverlay;
+    private int mRotation;
+    private boolean mVisible;
+
+    public EmulatorDisplayOverlay(Context context, Display display, SurfaceSession session,
+            int zOrder) {
+        mScreenSize = new Point();
+        display.getSize(mScreenSize);
+
+        SurfaceControl ctrl = null;
+        try {
+            if (WindowManagerService.DEBUG_SURFACE_TRACE) {
+                ctrl = new WindowStateAnimator.SurfaceTrace(session, "EmulatorDisplayOverlay",
+                        mScreenSize.x, mScreenSize.y, PixelFormat.TRANSLUCENT,
+                        SurfaceControl.HIDDEN);
+            } else {
+                ctrl = new SurfaceControl(session, "EmulatorDisplayOverlay", mScreenSize.x,
+                        mScreenSize.y, PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
+            }
+            ctrl.setLayerStack(display.getLayerStack());
+            ctrl.setLayer(zOrder);
+            ctrl.setPosition(0, 0);
+            ctrl.show();
+            mSurface.copyFrom(ctrl);
+        } catch (OutOfResourcesException e) {
+        }
+        mSurfaceControl = ctrl;
+        mDrawNeeded = true;
+        mOverlay = context.getDrawable(
+                com.android.internal.R.drawable.emulator_circular_window_overlay);
+    }
+
+    private void drawIfNeeded() {
+        if (!mDrawNeeded || !mVisible) {
+            return;
+        }
+        mDrawNeeded = false;
+
+        Rect dirty = new Rect(0, 0, mScreenSize.x, mScreenSize.y);
+        Canvas c = null;
+        try {
+            c = mSurface.lockCanvas(dirty);
+        } catch (IllegalArgumentException e) {
+        } catch (OutOfResourcesException e) {
+        }
+        if (c == null) {
+            return;
+        }
+        c.drawColor(Color.TRANSPARENT, PorterDuff.Mode.SRC);
+        mSurfaceControl.setPosition(0, 0);
+        mOverlay.setBounds(0, 0, mScreenSize.x, mScreenSize.y);
+        mOverlay.draw(c);
+        mSurface.unlockCanvasAndPost(c);
+    }
+
+    // Note: caller responsible for being inside
+    // Surface.openTransaction() / closeTransaction()
+    public void setVisibility(boolean on) {
+        if (mSurfaceControl == null) {
+            return;
+        }
+        mVisible = on;
+        drawIfNeeded();
+        if (on) {
+            mSurfaceControl.show();
+        } else {
+            mSurfaceControl.hide();
+        }
+    }
+
+    void positionSurface(int dw, int dh, int rotation) {
+        if (mLastDW == dw && mLastDH == dh && mRotation == rotation) {
+            return;
+        }
+        mLastDW = dw;
+        mLastDH = dh;
+        mDrawNeeded = true;
+        mRotation = rotation;
+        drawIfNeeded();
+    }
+
+}
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index f02c0e6..46aefb6 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -352,6 +352,12 @@
         mService.mPolicy.notifyLidSwitchChanged(whenNanos, lidOpen);
     }
 
+    /* Notifies that the camera lens cover state has changed. */
+    @Override
+    public void notifyCameraLensCoverSwitchChanged(long whenNanos, boolean lensCovered) {
+        mService.mPolicy.notifyCameraLensCoverSwitchChanged(whenNanos, lensCovered);
+    }
+
     /* Provides an opportunity for the window manager policy to intercept early key
      * processing as soon as the key has been read from the device. */
     @Override
@@ -359,12 +365,13 @@
         return mService.mPolicy.interceptKeyBeforeQueueing(event, policyFlags);
     }
 
-    /* Provides an opportunity for the window manager policy to intercept early
-     * motion event processing when the screen is off since these events are normally
+    /* Provides an opportunity for the window manager policy to intercept early motion event
+     * processing when the device is in a non-interactive state since these events are normally
      * dropped. */
     @Override
-    public int interceptWakeMotionBeforeQueueing(long whenNanos, int policyFlags) {
-        return mService.mPolicy.interceptWakeMotionBeforeQueueing(whenNanos, policyFlags);
+    public int interceptMotionBeforeQueueingNonInteractive(long whenNanos, int policyFlags) {
+        return mService.mPolicy.interceptMotionBeforeQueueingNonInteractive(
+                whenNanos, policyFlags);
     }
 
     /* Provides an opportunity for the window manager policy to process a key before
diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java
index f2703ad..d737e7f 100644
--- a/services/core/java/com/android/server/wm/Session.java
+++ b/services/core/java/com/android/server/wm/Session.java
@@ -415,6 +415,18 @@
         mService.wallpaperOffsetsComplete(window);
     }
 
+    public void setWallpaperDisplayOffset(IBinder window, int x, int y) {
+        synchronized(mService.mWindowMap) {
+            long ident = Binder.clearCallingIdentity();
+            try {
+                mService.setWindowWallpaperDisplayOffsetLocked(
+                        mService.windowForClientLocked(this, window, true), x, y);
+            } finally {
+                Binder.restoreCallingIdentity(ident);
+            }
+        }
+    }
+
     public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
             int z, Bundle extras, boolean sync) {
         synchronized(mService.mWindowMap) {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index c70cb22..54af851 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -20,6 +20,8 @@
 
 import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
 import android.app.AppOpsManager;
+import android.os.Build;
+import android.os.SystemService;
 import android.util.ArraySet;
 import android.util.TimeUtils;
 import android.view.IWindowId;
@@ -271,6 +273,12 @@
     // Default input dispatching timeout in nanoseconds.
     static final long DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS = 5000 * 1000000L;
 
+    // Poll interval in milliseconds for watching boot animation finished.
+    private static final int BOOT_ANIMATION_POLL_INTERVAL = 200;
+
+    // The name of the boot animation service in init.rc.
+    private static final String BOOT_ANIMATION_SERVICE = "bootanim";
+
     /** Minimum value for attachStack and resizeStack weight value */
     public static final float STACK_WEIGHT_MIN = 0.2f;
 
@@ -295,6 +303,8 @@
     private static final int SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN =
             View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
 
+    private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular";
+
     final private KeyguardDisableHandler mKeyguardDisableHandler;
 
     final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@@ -441,6 +451,7 @@
     Watermark mWatermark;
     StrictModeFlash mStrictModeFlash;
     CircularDisplayMask mCircularDisplayMask;
+    EmulatorDisplayOverlay mEmulatorDisplayOverlay;
     FocusedStackFrame mFocusedStackFrame;
 
     int mFocusedStackLayer;
@@ -454,6 +465,7 @@
     boolean mSystemBooted = false;
     boolean mForceDisplayEnabled = false;
     boolean mShowingBootMessages = false;
+    boolean mBootAnimationStopped = false;
 
     String mLastANRState;
 
@@ -572,6 +584,8 @@
     float mLastWallpaperY = -1;
     float mLastWallpaperXStep = -1;
     float mLastWallpaperYStep = -1;
+    int mLastWallpaperDisplayOffsetX = Integer.MIN_VALUE;
+    int mLastWallpaperDisplayOffsetY = Integer.MIN_VALUE;
     // This is set when we are waiting for a wallpaper to tell us it is done
     // changing its scroll position.
     WindowState mWaitingOnWallpaper;
@@ -879,6 +893,7 @@
         }
 
         showCircularDisplayMaskIfNeeded();
+        showEmulatorDisplayOverlayIfNeeded();
     }
 
     public InputMonitor getInputMonitor() {
@@ -1892,6 +1907,12 @@
                 mLastWallpaperY = mWallpaperTarget.mWallpaperY;
                 mLastWallpaperYStep = mWallpaperTarget.mWallpaperYStep;
             }
+            if (mWallpaperTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetX = mWallpaperTarget.mWallpaperDisplayOffsetX;
+            }
+            if (mWallpaperTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetY = mWallpaperTarget.mWallpaperDisplayOffsetY;
+            }
         }
 
         // Start stepping backwards from here, ensuring that our wallpaper windows
@@ -2030,6 +2051,9 @@
         float wpxs = mLastWallpaperXStep >= 0 ? mLastWallpaperXStep : -1.0f;
         int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw;
         int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0;
+        if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE) {
+            offset += mLastWallpaperDisplayOffsetX;
+        }
         changed = wallpaperWin.mXOffset != offset;
         if (changed) {
             if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
@@ -2046,6 +2070,9 @@
         float wpys = mLastWallpaperYStep >= 0 ? mLastWallpaperYStep : -1.0f;
         int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh;
         offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0;
+        if (mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+            offset += mLastWallpaperDisplayOffsetY;
+        }
         if (wallpaperWin.mYOffset != offset) {
             if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
                     + wallpaperWin + " y: " + offset);
@@ -2130,6 +2157,16 @@
             } else if (changingTarget.mWallpaperY >= 0) {
                 mLastWallpaperY = changingTarget.mWallpaperY;
             }
+            if (target.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetX = target.mWallpaperDisplayOffsetX;
+            } else if (changingTarget.mWallpaperDisplayOffsetX != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetX = changingTarget.mWallpaperDisplayOffsetX;
+            }
+            if (target.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetY = target.mWallpaperDisplayOffsetY;
+            } else if (changingTarget.mWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+                mLastWallpaperDisplayOffsetY = changingTarget.mWallpaperDisplayOffsetY;
+            }
         }
 
         int curTokenIndex = mWallpaperTokens.size();
@@ -2826,6 +2863,14 @@
         }
     }
 
+    public void setWindowWallpaperDisplayOffsetLocked(WindowState window, int x, int y) {
+        if (window.mWallpaperDisplayOffsetX != x || window.mWallpaperDisplayOffsetY != y)  {
+            window.mWallpaperDisplayOffsetX = x;
+            window.mWallpaperDisplayOffsetY = y;
+            updateWallpaperOffsetLocked(window, true);
+        }
+    }
+
     public Bundle sendWindowWallpaperCommandLocked(WindowState window,
             String action, int x, int y, int z, Bundle extras, boolean sync) {
         if (window == mWallpaperTarget || window == mLowerWallpaperTarget
@@ -4031,10 +4076,11 @@
 
     @Override
     public void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX,
-            int startY, IRemoteCallback startedCallback, boolean scaleUp) {
+            int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
+            boolean scaleUp) {
         synchronized(mWindowMap) {
             mAppTransition.overridePendingAppTransitionAspectScaledThumb(srcThumb, startX,
-                    startY, startedCallback, scaleUp);
+                    startY, targetWidth, targetHeight, startedCallback, scaleUp);
         }
     }
 
@@ -4303,24 +4349,28 @@
     }
 
     public void setAppFullscreen(IBinder token, boolean toOpaque) {
-        AppWindowToken atoken = findAppWindowToken(token);
-        if (atoken != null) {
-            atoken.appFullscreen = toOpaque;
-            // When making translucent, wait until windows below have been drawn.
-            if (toOpaque) {
-                // Making opaque so do it now.
-                setWindowOpaque(token, true);
+        synchronized (mWindowMap) {
+            AppWindowToken atoken = findAppWindowToken(token);
+            if (atoken != null) {
+                atoken.appFullscreen = toOpaque;
+                setWindowOpaqueLocked(token, toOpaque);
+                requestTraversalLocked();
             }
-            requestTraversal();
         }
     }
 
     public void setWindowOpaque(IBinder token, boolean isOpaque) {
+        synchronized (mWindowMap) {
+            setWindowOpaqueLocked(token, isOpaque);
+        }
+    }
+
+    public void setWindowOpaqueLocked(IBinder token, boolean isOpaque) {
         AppWindowToken wtoken = findAppWindowToken(token);
         if (wtoken != null) {
             WindowState win = wtoken.findMainWindow();
             if (win != null) {
-                win.mWinAnimator.setOpaque(isOpaque);
+                win.mWinAnimator.setOpaqueLocked(isOpaque);
             }
         }
     }
@@ -5436,6 +5486,23 @@
         }
     }
 
+    // Called by window manager policy. Not exposed externally.
+    @Override
+    public int getCameraLensCoverState() {
+        int sw = mInputManager.getSwitchState(-1, InputDevice.SOURCE_ANY,
+                InputManagerService.SW_CAMERA_LENS_COVER);
+        if (sw > 0) {
+            // Switch state: AKEY_STATE_DOWN or AKEY_STATE_VIRTUAL.
+            return CAMERA_LENS_COVERED;
+        } else if (sw == 0) {
+            // Switch state: AKEY_STATE_UP.
+            return CAMERA_LENS_UNCOVERED;
+        } else {
+            // Switch state: AKEY_STATE_UNKNOWN.
+            return CAMERA_LENS_COVER_ABSENT;
+        }
+    }
+
     // Called by window manager policy.  Not exposed externally.
     @Override
     public void switchKeyboardLayout(int deviceId, int direction) {
@@ -5548,17 +5615,70 @@
         performEnableScreen();
     }
 
+    private boolean checkWaitingForWindowsLocked() {
+
+        boolean haveBootMsg = false;
+        boolean haveApp = false;
+        // if the wallpaper service is disabled on the device, we're never going to have
+        // wallpaper, don't bother waiting for it
+        boolean haveWallpaper = false;
+        boolean wallpaperEnabled = mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_enableWallpaperService)
+                && !mOnlyCore;
+        boolean haveKeyguard = true;
+        // TODO(multidisplay): Expand to all displays?
+        final WindowList windows = getDefaultWindowListLocked();
+        final int N = windows.size();
+        for (int i=0; i<N; i++) {
+            WindowState w = windows.get(i);
+            if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) {
+                return true;
+            }
+            if (w.isDrawnLw()) {
+                if (w.mAttrs.type == TYPE_BOOT_PROGRESS) {
+                    haveBootMsg = true;
+                } else if (w.mAttrs.type == TYPE_APPLICATION) {
+                    haveApp = true;
+                } else if (w.mAttrs.type == TYPE_WALLPAPER) {
+                    haveWallpaper = true;
+                } else if (w.mAttrs.type == TYPE_STATUS_BAR) {
+                    haveKeyguard = mPolicy.isKeyguardDrawnLw();
+                }
+            }
+        }
+
+        if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
+            Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
+                    + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
+                    + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled
+                    + " haveKeyguard=" + haveKeyguard);
+        }
+
+        // If we are turning on the screen to show the boot message,
+        // don't do it until the boot message is actually displayed.
+        if (!mSystemBooted && !haveBootMsg) {
+            return true;
+        }
+
+        // If we are turning on the screen after the boot is completed
+        // normally, don't do so until we have the application and
+        // wallpaper.
+        if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
+                (wallpaperEnabled && !haveWallpaper))) {
+            return true;
+        }
+
+        return false;
+    }
+
     public void performEnableScreen() {
         synchronized(mWindowMap) {
-            if (DEBUG_BOOT) {
-                RuntimeException here = new RuntimeException("here");
-                here.fillInStackTrace();
-                Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
-                        + " mForceDisplayEnabled=" + mForceDisplayEnabled
-                        + " mShowingBootMessages=" + mShowingBootMessages
-                        + " mSystemBooted=" + mSystemBooted
-                        + " mOnlyCore=" + mOnlyCore, here);
-            }
+            if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: mDisplayEnabled=" + mDisplayEnabled
+                    + " mForceDisplayEnabled=" + mForceDisplayEnabled
+                    + " mShowingBootMessages=" + mShowingBootMessages
+                    + " mSystemBooted=" + mSystemBooted
+                    + " mOnlyCore=" + mOnlyCore,
+                    new RuntimeException("here").fillInStackTrace());
             if (mDisplayEnabled) {
                 return;
             }
@@ -5566,94 +5686,64 @@
                 return;
             }
 
-            if (!mForceDisplayEnabled) {
-                // Don't enable the screen until all existing windows
-                // have been drawn.
-                boolean haveBootMsg = false;
-                boolean haveApp = false;
-                // if the wallpaper service is disabled on the device, we're never going to have
-                // wallpaper, don't bother waiting for it
-                boolean haveWallpaper = false;
-                boolean wallpaperEnabled = mContext.getResources().getBoolean(
-                        com.android.internal.R.bool.config_enableWallpaperService)
-                        && !mOnlyCore;
-                boolean haveKeyguard = true;
-                // TODO(multidisplay): Expand to all displays?
-                final WindowList windows = getDefaultWindowListLocked();
-                final int N = windows.size();
-                for (int i=0; i<N; i++) {
-                    WindowState w = windows.get(i);
-                    if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) {
-                        return;
+            // Don't enable the screen until all existing windows have been drawn.
+            if (!mForceDisplayEnabled && checkWaitingForWindowsLocked()) {
+                return;
+            }
+
+            if (!mBootAnimationStopped) {
+                // Do this one time.
+                try {
+                    IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
+                    if (surfaceFlinger != null) {
+                        //Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
+                        Parcel data = Parcel.obtain();
+                        data.writeInterfaceToken("android.ui.ISurfaceComposer");
+                        surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
+                                data, null, 0);
+                        data.recycle();
                     }
-                    if (w.isDrawnLw()) {
-                        if (w.mAttrs.type == TYPE_BOOT_PROGRESS) {
-                            haveBootMsg = true;
-                        } else if (w.mAttrs.type == TYPE_APPLICATION) {
-                            haveApp = true;
-                        } else if (w.mAttrs.type == TYPE_WALLPAPER) {
-                            haveWallpaper = true;
-                        } else if (w.mAttrs.type == TYPE_STATUS_BAR) {
-                            haveKeyguard = mPolicy.isKeyguardDrawnLw();
-                        }
-                    }
+                } catch (RemoteException ex) {
+                    Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
                 }
+                mBootAnimationStopped = true;
+            }
 
-                if (DEBUG_SCREEN_ON || DEBUG_BOOT) {
-                    Slog.i(TAG, "******** booted=" + mSystemBooted + " msg=" + mShowingBootMessages
-                            + " haveBoot=" + haveBootMsg + " haveApp=" + haveApp
-                            + " haveWall=" + haveWallpaper + " wallEnabled=" + wallpaperEnabled
-                            + " haveKeyguard=" + haveKeyguard);
-                }
-
-                // If we are turning on the screen to show the boot message,
-                // don't do it until the boot message is actually displayed.
-                if (!mSystemBooted && !haveBootMsg) {
-                    return;
-                }
-
-                // If we are turning on the screen after the boot is completed
-                // normally, don't do so until we have the application and
-                // wallpaper.
-                if (mSystemBooted && ((!haveApp && !haveKeyguard) ||
-                        (wallpaperEnabled && !haveWallpaper))) {
-                    return;
-                }
+            if (!mForceDisplayEnabled && !checkBootAnimationCompleteLocked()) {
+                if (DEBUG_BOOT) Slog.i(TAG, "performEnableScreen: Waiting for anim complete");
+                return;
             }
 
             mDisplayEnabled = true;
             if (DEBUG_SCREEN_ON || DEBUG_BOOT) Slog.i(TAG, "******************** ENABLING SCREEN!");
-            if (false) {
-                StringWriter sw = new StringWriter();
-                PrintWriter pw = new FastPrintWriter(sw, false, 1024);
-                this.dump(null, pw, null);
-                pw.flush();
-                Slog.i(TAG, sw.toString());
-            }
-            try {
-                IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
-                if (surfaceFlinger != null) {
-                    //Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
-                    Parcel data = Parcel.obtain();
-                    data.writeInterfaceToken("android.ui.ISurfaceComposer");
-                    surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
-                                            data, null, 0);
-                    data.recycle();
-                }
-            } catch (RemoteException ex) {
-                Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
-            }
 
             // Enable input dispatch.
             mInputMonitor.setEventDispatchingLw(mEventDispatchingEnabled);
         }
 
+        try {
+            mActivityManager.bootAnimationComplete();
+        } catch (RemoteException e) {
+        }
+
         mPolicy.enableScreenAfterBoot();
 
         // Make sure the last requested orientation has been applied.
         updateRotationUnchecked(false, false);
     }
 
+    private boolean checkBootAnimationCompleteLocked() {
+        if (SystemService.isRunning(BOOT_ANIMATION_SERVICE)) {
+            mH.removeMessages(H.CHECK_IF_BOOT_ANIMATION_FINISHED);
+            mH.sendEmptyMessageDelayed(H.CHECK_IF_BOOT_ANIMATION_FINISHED,
+                    BOOT_ANIMATION_POLL_INTERVAL);
+            if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Waiting for anim complete");
+            return false;
+        }
+        if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Animation complete!");
+        return true;
+    }
+
     public void showBootMessage(final CharSequence msg, final boolean always) {
         boolean first = false;
         synchronized(mWindowMap) {
@@ -5713,7 +5803,16 @@
                 com.android.internal.R.bool.config_windowIsRound)
                 && mContext.getResources().getBoolean(
                 com.android.internal.R.bool.config_windowShowCircularMask)) {
-            mH.sendMessage(mH.obtainMessage(H.SHOW_DISPLAY_MASK));
+            mH.sendMessage(mH.obtainMessage(H.SHOW_CIRCULAR_DISPLAY_MASK));
+        }
+    }
+
+    public void showEmulatorDisplayOverlayIfNeeded() {
+        if (mContext.getResources().getBoolean(
+                com.android.internal.R.bool.config_windowEnableCircularEmulatorDisplayOverlay)
+                && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false)
+                && Build.HARDWARE.contains("goldfish")) {
+            mH.sendMessage(mH.obtainMessage(H.SHOW_EMULATOR_DISPLAY_OVERLAY));
         }
     }
 
@@ -5721,12 +5820,12 @@
         synchronized(mWindowMap) {
 
             if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
-                    ">>> OPEN TRANSACTION showDisplayMask");
+                    ">>> OPEN TRANSACTION showCircularMask");
             SurfaceControl.openTransaction();
             try {
                 // TODO(multi-display): support multiple displays
                 if (mCircularDisplayMask == null) {
-                    int screenOffset = (int) mContext.getResources().getDimensionPixelSize(
+                    int screenOffset = mContext.getResources().getDimensionPixelSize(
                             com.android.internal.R.dimen.circular_display_mask_offset);
 
                     mCircularDisplayMask = new CircularDisplayMask(
@@ -5740,7 +5839,32 @@
             } finally {
                 SurfaceControl.closeTransaction();
                 if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
-                        "<<< CLOSE TRANSACTION showDisplayMask");
+                        "<<< CLOSE TRANSACTION showCircularMask");
+            }
+        }
+    }
+
+    public void showEmulatorDisplayOverlay() {
+        synchronized(mWindowMap) {
+
+            if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
+                    ">>> OPEN TRANSACTION showEmulatorDisplayOverlay");
+            SurfaceControl.openTransaction();
+            try {
+                if (mEmulatorDisplayOverlay == null) {
+                    mEmulatorDisplayOverlay = new EmulatorDisplayOverlay(
+                            mContext,
+                            getDefaultDisplayContentLocked().getDisplay(),
+                            mFxSession,
+                            mPolicy.windowTypeToLayerLw(
+                                    WindowManager.LayoutParams.TYPE_POINTER)
+                                    * TYPE_LAYER_MULTIPLIER + 10);
+                }
+                mEmulatorDisplayOverlay.setVisibility(true);
+            } finally {
+                SurfaceControl.closeTransaction();
+                if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
+                        "<<< CLOSE TRANSACTION showEmulatorDisplayOverlay");
             }
         }
     }
@@ -5838,7 +5962,7 @@
     @Override
     public Bitmap screenshotApplications(IBinder appToken, int displayId, int width,
             int height, boolean force565) {
-        if (!checkCallingPermission(android.Manifest.permission.READ_FRAME_BUFFER,
+        if (!checkCallingPermission(Manifest.permission.READ_FRAME_BUFFER,
                 "screenshotApplications()")) {
             throw new SecurityException("Requires READ_FRAME_BUFFER permission");
         }
@@ -5858,7 +5982,7 @@
             return null;
         }
 
-        Bitmap rawss = null;
+        Bitmap bm = null;
 
         int maxLayer = 0;
         final Rect frame = new Rect();
@@ -5999,10 +6123,8 @@
 
                 // The screenshot API does not apply the current screen rotation.
                 rot = getDefaultDisplayContentLocked().getDisplay().getRotation();
+
                 if (rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270) {
-                    final int tmp = width;
-                    width = height;
-                    height = tmp;
                     rot = (rot == Surface.ROTATION_90) ? Surface.ROTATION_270 : Surface.ROTATION_90;
                 }
 
@@ -6028,9 +6150,9 @@
                 if (DEBUG_SCREENSHOT && inRotation) Slog.v(TAG,
                         "Taking screenshot while rotating");
 
-                rawss = SurfaceControl.screenshot(crop, width, height, minLayer, maxLayer,
-                        inRotation);
-                if (rawss == null) {
+                bm = SurfaceControl.screenshot(crop, width, height, minLayer, maxLayer,
+                        inRotation, rot);
+                if (bm == null) {
                     Slog.w(TAG, "Screenshot failure taking screenshot for (" + dw + "x" + dh
                             + ") to layer " + maxLayer);
                     return null;
@@ -6040,17 +6162,6 @@
             break;
         }
 
-        Bitmap bm = Bitmap.createBitmap(width, height, force565 ?
-                Config.RGB_565 : rawss.getConfig());
-        if (DEBUG_SCREENSHOT) {
-            bm.eraseColor(0xFF000000);
-        }
-        Matrix matrix = new Matrix();
-        ScreenRotationAnimation.createRotationMatrix(rot, width, height, matrix);
-        Canvas canvas = new Canvas(bm);
-        canvas.drawBitmap(rawss, matrix, null);
-        canvas.setBitmap(null);
-
         if (DEBUG_SCREENSHOT) {
             // TEST IF IT's ALL BLACK
             int[] buffer = new int[bm.getWidth() * bm.getHeight()];
@@ -6071,9 +6182,12 @@
             }
         }
 
-        rawss.recycle();
-
-        return bm;
+        // Copy the screenshot bitmap to another buffer so that the gralloc backed
+        // bitmap will not have a long lifetime. Gralloc memory can be pinned or
+        // duplicated and might have a higher cost than a skia backed buffer.
+        Bitmap ret = bm.copy(bm.getConfig(),true);
+        bm.recycle();
+        return ret;
     }
 
     /**
@@ -7371,7 +7485,10 @@
 
         public static final int NEW_ANIMATOR_SCALE = 34;
 
-        public static final int SHOW_DISPLAY_MASK = 35;
+        public static final int SHOW_CIRCULAR_DISPLAY_MASK = 35;
+        public static final int SHOW_EMULATOR_DISPLAY_OVERLAY = 36;
+
+        public static final int CHECK_IF_BOOT_ANIMATION_FINISHED = 37;
 
         @Override
         public void handleMessage(Message msg) {
@@ -7767,11 +7884,16 @@
                     break;
                 }
 
-                case SHOW_DISPLAY_MASK: {
+                case SHOW_CIRCULAR_DISPLAY_MASK: {
                     showCircularMask();
                     break;
                 }
 
+                case SHOW_EMULATOR_DISPLAY_OVERLAY: {
+                    showEmulatorDisplayOverlay();
+                    break;
+                }
+
                 case DO_ANIMATION_CALLBACK: {
                     try {
                         ((IRemoteCallback)msg.obj).sendResult(null);
@@ -7852,6 +7974,17 @@
                     }
                 }
                 break;
+                case CHECK_IF_BOOT_ANIMATION_FINISHED: {
+                    final boolean bootAnimationComplete;
+                    synchronized (mWindowMap) {
+                        if (DEBUG_BOOT) Slog.i(TAG, "CHECK_IF_BOOT_ANIMATION_FINISHED:");
+                        bootAnimationComplete = checkBootAnimationCompleteLocked();
+                    }
+                    if (bootAnimationComplete) {
+                        performEnableScreen();
+                    }
+                }
+                break;
             }
             if (DEBUG_WINDOW_TRACE) {
                 Slog.v(TAG, "handleMessage: exit");
@@ -9341,6 +9474,9 @@
             if (mCircularDisplayMask != null) {
                 mCircularDisplayMask.positionSurface(defaultDw, defaultDh, mRotation);
             }
+            if (mEmulatorDisplayOverlay != null) {
+                mEmulatorDisplayOverlay.positionSurface(defaultDw, defaultDh, mRotation);
+            }
 
             boolean focusDisplayed = false;
 
@@ -10867,6 +11003,12 @@
             }
             pw.print("  mLastWallpaperX="); pw.print(mLastWallpaperX);
                     pw.print(" mLastWallpaperY="); pw.println(mLastWallpaperY);
+            if (mLastWallpaperDisplayOffsetX != Integer.MIN_VALUE
+                    || mLastWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+                pw.print("  mLastWallpaperDisplayOffsetX="); pw.print(mLastWallpaperDisplayOffsetX);
+                        pw.print(" mLastWallpaperDisplayOffsetY=");
+                        pw.println(mLastWallpaperDisplayOffsetY);
+            }
             if (mInputMethodAnimLayerAdjustment != 0 ||
                     mWallpaperAnimLayerAdjustment != 0) {
                 pw.print("  mInputMethodAnimLayerAdjustment=");
@@ -11402,7 +11544,8 @@
                 final WindowList windows = getDefaultWindowListLocked();
                 for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
                     final WindowState win = windows.get(winNdx);
-                    if (win.mHasSurface && win.mAppToken != null) {
+                    if (win.mHasSurface
+                            && (win.mAppToken != null || mPolicy.isForceHiding(win.mAttrs))) {
                         win.mWinAnimator.mDrawState = WindowStateAnimator.DRAW_PENDING;
                         // Force add to mResizingWindows.
                         win.mLastContentInsets.set(-1, -1, -1, -1);
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index e74de38..0baa2be 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -247,6 +247,11 @@
     float mWallpaperXStep = -1;
     float mWallpaperYStep = -1;
 
+    // If a window showing a wallpaper: a raw pixel offset to forcibly apply
+    // to its window; if a wallpaper window: not used.
+    int mWallpaperDisplayOffsetX = Integer.MIN_VALUE;
+    int mWallpaperDisplayOffsetY = Integer.MIN_VALUE;
+
     // Wallpaper windows: pixels offset based on above variables.
     int mXOffset;
     int mYOffset;
@@ -1584,6 +1589,13 @@
             pw.print(prefix); pw.print("mWallpaperXStep="); pw.print(mWallpaperXStep);
                     pw.print(" mWallpaperYStep="); pw.println(mWallpaperYStep);
         }
+        if (mWallpaperDisplayOffsetX != Integer.MIN_VALUE
+                || mWallpaperDisplayOffsetY != Integer.MIN_VALUE) {
+            pw.print(prefix); pw.print("mWallpaperDisplayOffsetX=");
+                    pw.print(mWallpaperDisplayOffsetX);
+                    pw.print(" mWallpaperDisplayOffsetY=");
+                    pw.println(mWallpaperDisplayOffsetY);
+        }
     }
 
     String makeInputChannelName() {
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 4b7dd08..dd611ce 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -524,6 +524,7 @@
         private boolean mShown = false;
         private int mLayerStack;
         private boolean mIsOpaque;
+        private float mDsdx, mDtdx, mDsdy, mDtdy;
         private final String mName;
 
         public SurfaceTrace(SurfaceSession s,
@@ -619,6 +620,19 @@
         }
 
         @Override
+        public void setMatrix(float dsdx, float dtdx, float dsdy, float dtdy) {
+            if (dsdx != mDsdx || dtdx != mDtdx || dsdy != mDsdy || dtdy != mDtdy) {
+                Slog.v(SURFACE_TAG, "setMatrix(" + dsdx + "," + dtdx + "," + dsdy + "," + dtdy +
+                        "): OLD:" + this + ". Called by " + Debug.getCallers(3));
+                mDsdx = dsdx;
+                mDtdx = dtdx;
+                mDsdy = dsdy;
+                mDtdy = dtdy;
+            }
+            super.setMatrix(dsdx, dtdx, dsdy, dtdy);
+        }
+
+        @Override
         public void hide() {
             if (mShown) {
                 Slog.v(SURFACE_TAG, "hide: OLD:" + this + ". Called by " + Debug.getCallers(3));
@@ -665,7 +679,8 @@
                     + " alpha=" + mSurfaceTraceAlpha + " " + mPosition.x + "," + mPosition.y
                     + " " + mSize.x + "x" + mSize.y
                     + " crop=" + mWindowCrop.toShortString()
-                    + " opaque=" + mIsOpaque;
+                    + " opaque=" + mIsOpaque
+                    + " (" + mDsdx + "," + mDtdx + "," + mDsdy + "," + mDtdy + ")";
         }
     }
 
@@ -1068,6 +1083,14 @@
                     mShownAlpha *= appTransformation.getAlpha();
                     if (appTransformation.hasClipRect()) {
                         mClipRect.set(appTransformation.getClipRect());
+                        if (mWin.mHScale > 0) {
+                            mClipRect.left /= mWin.mHScale;
+                            mClipRect.right /= mWin.mHScale;
+                        }
+                        if (mWin.mVScale > 0) {
+                            mClipRect.top /= mWin.mVScale;
+                            mClipRect.bottom /= mWin.mVScale;
+                        }
                         mHasClipRect = true;
                     }
                 }
@@ -1418,10 +1441,10 @@
             w.mLastVScale = w.mVScale;
             if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(w,
                     "alpha=" + mShownAlpha + " layer=" + mAnimLayer
-                    + " matrix=[" + (mDsDx*w.mHScale)
-                    + "," + (mDtDx*w.mVScale)
-                    + "][" + (mDsDy*w.mHScale)
-                    + "," + (mDtDy*w.mVScale) + "]", null);
+                    + " matrix=[" + mDsDx + "*" + w.mHScale
+                    + "," + mDtDx + "*" + w.mVScale
+                    + "][" + mDsDy + "*" + w.mHScale
+                    + "," + mDtDy + "*" + w.mVScale + "]", null);
             if (mSurfaceControl != null) {
                 try {
                     mSurfaceAlpha = mShownAlpha;
@@ -1503,8 +1526,9 @@
     }
 
     void setWallpaperOffset(RectF shownFrame) {
-        final int left = (int) shownFrame.left;
-        final int top = (int) shownFrame.top;
+        final LayoutParams attrs = mWin.getAttrs();
+        final int left = ((int) shownFrame.left) - attrs.surfaceInsets.left;
+        final int top = ((int) shownFrame.top) - attrs.surfaceInsets.top;
         if (mSurfaceX != left || mSurfaceY != top) {
             mSurfaceX = left;
             mSurfaceY = top;
@@ -1533,11 +1557,11 @@
         }
     }
 
-    void setOpaque(boolean isOpaque) {
+    void setOpaqueLocked(boolean isOpaque) {
         if (mSurfaceControl == null) {
             return;
         }
-        if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION setOpaque");
+        if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION setOpaqueLocked");
         SurfaceControl.openTransaction();
         try {
             if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(mWin, "isOpaque=" + isOpaque,
@@ -1545,7 +1569,7 @@
             mSurfaceControl.setOpaque(isOpaque);
         } finally {
             SurfaceControl.closeTransaction();
-            if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION setOpaque");
+            if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION setOpaqueLocked");
         }
     }
 
diff --git a/services/core/jni/Android.mk b/services/core/jni/Android.mk
index 1f377c7..d81cdd9 100644
--- a/services/core/jni/Android.mk
+++ b/services/core/jni/Android.mk
@@ -11,7 +11,6 @@
     $(LOCAL_REL_DIR)/com_android_server_connectivity_Vpn.cpp \
     $(LOCAL_REL_DIR)/com_android_server_ConsumerIrService.cpp \
     $(LOCAL_REL_DIR)/com_android_server_hdmi_HdmiCecController.cpp \
-    $(LOCAL_REL_DIR)/com_android_server_hdmi_HdmiMhlController.cpp \
     $(LOCAL_REL_DIR)/com_android_server_input_InputApplicationHandle.cpp \
     $(LOCAL_REL_DIR)/com_android_server_input_InputManagerService.cpp \
     $(LOCAL_REL_DIR)/com_android_server_input_InputWindowHandle.cpp \
diff --git a/services/core/jni/com_android_server_UsbHostManager.cpp b/services/core/jni/com_android_server_UsbHostManager.cpp
index bc866d3..65a28c0 100644
--- a/services/core/jni/com_android_server_UsbHostManager.cpp
+++ b/services/core/jni/com_android_server_UsbHostManager.cpp
@@ -21,7 +21,6 @@
 #include "JNIHelp.h"
 #include "android_runtime/AndroidRuntime.h"
 #include "android_runtime/Log.h"
-#include "utils/Vector.h"
 
 #include <usbhost/usbhost.h>
 
@@ -68,8 +67,6 @@
 
     JNIEnv* env = AndroidRuntime::getJNIEnv();
     jobject thiz = (jobject)client_data;
-    Vector<int> interfaceValues;
-    Vector<int> endpointValues;
     const usb_device_descriptor* deviceDesc = usb_device_get_device_descriptor(device);
 
     char *manufacturer = usb_device_get_manufacturer_name(device);
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index 8ed74be..cddca92 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -71,7 +71,7 @@
     jmethodID notifyANR;
     jmethodID filterInputEvent;
     jmethodID interceptKeyBeforeQueueing;
-    jmethodID interceptWakeMotionBeforeQueueing;
+    jmethodID interceptMotionBeforeQueueingNonInteractive;
     jmethodID interceptKeyBeforeDispatching;
     jmethodID dispatchUnhandledKey;
     jmethodID checkInjectEventsPermission;
@@ -854,7 +854,9 @@
 
         handleInterceptActions(wmActions, when, /*byref*/ policyFlags);
     } else {
-        policyFlags |= POLICY_FLAG_PASS_TO_USER;
+        if (mInteractive) {
+            policyFlags |= POLICY_FLAG_PASS_TO_USER;
+        }
     }
 }
 
@@ -870,20 +872,22 @@
     if ((policyFlags & POLICY_FLAG_TRUSTED) && !(policyFlags & POLICY_FLAG_INJECTED)) {
         if (policyFlags & POLICY_FLAG_INTERACTIVE) {
             policyFlags |= POLICY_FLAG_PASS_TO_USER;
-        } else if (policyFlags & POLICY_FLAG_WAKE) {
+        } else {
             JNIEnv* env = jniEnv();
             jint wmActions = env->CallIntMethod(mServiceObj,
-                        gServiceClassInfo.interceptWakeMotionBeforeQueueing,
+                        gServiceClassInfo.interceptMotionBeforeQueueingNonInteractive,
                         when, policyFlags);
             if (checkAndClearExceptionFromCallback(env,
-                    "interceptWakeMotionBeforeQueueing")) {
+                    "interceptMotionBeforeQueueingNonInteractive")) {
                 wmActions = 0;
             }
 
             handleInterceptActions(wmActions, when, /*byref*/ policyFlags);
         }
     } else {
-        policyFlags |= POLICY_FLAG_PASS_TO_USER;
+        if (mInteractive) {
+            policyFlags |= POLICY_FLAG_PASS_TO_USER;
+        }
     }
 }
 
@@ -1441,8 +1445,8 @@
     GET_METHOD_ID(gServiceClassInfo.interceptKeyBeforeQueueing, clazz,
             "interceptKeyBeforeQueueing", "(Landroid/view/KeyEvent;I)I");
 
-    GET_METHOD_ID(gServiceClassInfo.interceptWakeMotionBeforeQueueing, clazz,
-            "interceptWakeMotionBeforeQueueing", "(JI)I");
+    GET_METHOD_ID(gServiceClassInfo.interceptMotionBeforeQueueingNonInteractive, clazz,
+            "interceptMotionBeforeQueueingNonInteractive", "(JI)I");
 
     GET_METHOD_ID(gServiceClassInfo.interceptKeyBeforeDispatching, clazz,
             "interceptKeyBeforeDispatching",
diff --git a/services/core/jni/com_android_server_location_GpsLocationProvider.cpp b/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
index c398908..6958087 100644
--- a/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -65,6 +65,7 @@
 static const GpsGeofencingInterface* sGpsGeofencingInterface = NULL;
 static const GpsMeasurementInterface* sGpsMeasurementInterface = NULL;
 static const GpsNavigationMessageInterface* sGpsNavigationMessageInterface = NULL;
+static const GnssConfigurationInterface* sGnssConfigurationInterface = NULL;
 
 // temporary storage for GPS callbacks
 static GpsSvStatus  sGpsSvStatus;
@@ -502,6 +503,9 @@
         sGpsNavigationMessageInterface =
             (const GpsNavigationMessageInterface*)sGpsInterface->get_extension(
                     GPS_NAVIGATION_MESSAGE_INTERFACE);
+        sGnssConfigurationInterface =
+            (const GnssConfigurationInterface*)sGpsInterface->get_extension(
+                    GNSS_CONFIGURATION_INTERFACE);
     }
 }
 
@@ -901,55 +905,57 @@
 
     if (flags & GPS_CLOCK_HAS_LEAP_SECOND) {
         jmethodID setterMethod = env->GetMethodID(gpsClockClass, "setLeapSecond", "(S)V");
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->leap_second);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->leap_second);
    }
 
    jmethodID typeSetterMethod = env->GetMethodID(gpsClockClass, "setType", "(B)V");
-   env->CallObjectMethod(gpsClockObject, typeSetterMethod, clock->type);
+   env->CallVoidMethod(gpsClockObject, typeSetterMethod, clock->type);
 
     jmethodID setterMethod = env->GetMethodID(gpsClockClass, "setTimeInNs", longSignature);
-    env->CallObjectMethod(gpsClockObject, setterMethod, clock->time_ns);
+    env->CallVoidMethod(gpsClockObject, setterMethod, clock->time_ns);
 
     if (flags & GPS_CLOCK_HAS_TIME_UNCERTAINTY) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsClockClass, "setTimeUncertaintyInNs", doubleSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->time_uncertainty_ns);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->time_uncertainty_ns);
     }
 
     if (flags & GPS_CLOCK_HAS_FULL_BIAS) {
         jmethodID setterMethod = env->GetMethodID(gpsClockClass, "setFullBiasInNs", longSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->full_bias_ns);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->full_bias_ns);
     }
 
     if (flags & GPS_CLOCK_HAS_BIAS) {
         jmethodID setterMethod = env->GetMethodID(gpsClockClass, "setBiasInNs", doubleSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->bias_ns);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->bias_ns);
     }
 
     if (flags & GPS_CLOCK_HAS_BIAS_UNCERTAINTY) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsClockClass, "setBiasUncertaintyInNs", doubleSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->bias_uncertainty_ns);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->bias_uncertainty_ns);
     }
 
     if (flags & GPS_CLOCK_HAS_DRIFT) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsClockClass, "setDriftInNsPerSec", doubleSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->drift_nsps);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->drift_nsps);
     }
 
     if (flags & GPS_CLOCK_HAS_DRIFT_UNCERTAINTY) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsClockClass, "setDriftUncertaintyInNsPerSec", doubleSignature);
-        env->CallObjectMethod(gpsClockObject, setterMethod, clock->drift_uncertainty_nsps);
+        env->CallVoidMethod(gpsClockObject, setterMethod, clock->drift_uncertainty_nsps);
     }
 
+    env->DeleteLocalRef(gpsClockClass);
     return gpsClockObject;
 }
 
 static jobject translate_gps_measurement(JNIEnv* env, GpsMeasurement* measurement) {
     const char* byteSignature = "(B)V";
     const char* shortSignature = "(S)V";
+    const char* intSignature = "(I)V";
     const char* longSignature = "(J)V";
     const char* floatSignature = "(F)V";
     const char* doubleSignature = "(D)V";
@@ -961,21 +967,21 @@
     GpsMeasurementFlags flags = measurement->flags;
 
     jmethodID prnSetterMethod = env->GetMethodID(gpsMeasurementClass, "setPrn", byteSignature);
-    env->CallObjectMethod(gpsMeasurementObject, prnSetterMethod, measurement->prn);
+    env->CallVoidMethod(gpsMeasurementObject, prnSetterMethod, measurement->prn);
 
     jmethodID timeOffsetSetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setTimeOffsetInNs", doubleSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             timeOffsetSetterMethod,
             measurement->time_offset_ns);
 
     jmethodID stateSetterMethod = env->GetMethodID(gpsMeasurementClass, "setState", shortSignature);
-    env->CallObjectMethod(gpsMeasurementObject, stateSetterMethod, measurement->state);
+    env->CallVoidMethod(gpsMeasurementObject, stateSetterMethod, measurement->state);
 
     jmethodID receivedGpsTowSetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setReceivedGpsTowInNs", longSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             receivedGpsTowSetterMethod,
             measurement->received_gps_tow_ns);
@@ -991,13 +997,13 @@
 
     jmethodID cn0SetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setCn0InDbHz", doubleSignature);
-    env->CallObjectMethod(gpsMeasurementObject, cn0SetterMethod, measurement->c_n0_dbhz);
+    env->CallVoidMethod(gpsMeasurementObject, cn0SetterMethod, measurement->c_n0_dbhz);
 
     jmethodID pseudorangeRateSetterMethod = env->GetMethodID(
             gpsMeasurementClass,
             "setPseudorangeRateInMetersPerSec",
             doubleSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             pseudorangeRateSetterMethod,
             measurement->pseudorange_rate_mps);
@@ -1006,14 +1012,14 @@
             gpsMeasurementClass,
             "setPseudorangeRateUncertaintyInMetersPerSec",
             doubleSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             pseudorangeRateUncertaintySetterMethod,
             measurement->pseudorange_rate_uncertainty_mps);
 
     jmethodID accumulatedDeltaRangeStateSetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setAccumulatedDeltaRangeState", shortSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             accumulatedDeltaRangeStateSetterMethod,
             measurement->accumulated_delta_range_state);
@@ -1039,7 +1045,7 @@
     if (flags & GPS_MEASUREMENT_HAS_PSEUDORANGE) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setPseudorangeInMeters", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->pseudorange_m);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->pseudorange_m);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_PSEUDORANGE_UNCERTAINTY) {
@@ -1047,7 +1053,7 @@
                 gpsMeasurementClass,
                 "setPseudorangeUncertaintyInMeters",
                 doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->pseudorange_uncertainty_m);
@@ -1056,7 +1062,7 @@
     if (flags & GPS_MEASUREMENT_HAS_CODE_PHASE) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setCodePhaseInChips", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->code_phase_chips);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->code_phase_chips);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_CODE_PHASE_UNCERTAINTY) {
@@ -1064,7 +1070,7 @@
                 gpsMeasurementClass,
                 "setCodePhaseUncertaintyInChips",
                 doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->code_phase_uncertainty_chips);
@@ -1073,7 +1079,7 @@
     if (flags & GPS_MEASUREMENT_HAS_CARRIER_FREQUENCY) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setCarrierFrequencyInHz", floatSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->carrier_frequency_hz);
@@ -1082,13 +1088,13 @@
     if (flags & GPS_MEASUREMENT_HAS_CARRIER_CYCLES) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setCarrierCycles", longSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->carrier_cycles);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->carrier_cycles);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_CARRIER_PHASE) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setCarrierPhase", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->carrier_phase);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->carrier_phase);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY) {
@@ -1096,7 +1102,7 @@
                 gpsMeasurementClass,
                 "setCarrierPhaseUncertainty",
                 doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->carrier_phase_uncertainty);
@@ -1104,18 +1110,18 @@
 
     jmethodID lossOfLockSetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setLossOfLock", byteSignature);
-    env->CallObjectMethod(gpsMeasurementObject, lossOfLockSetterMethod, measurement->loss_of_lock);
+    env->CallVoidMethod(gpsMeasurementObject, lossOfLockSetterMethod, measurement->loss_of_lock);
 
     if (flags & GPS_MEASUREMENT_HAS_BIT_NUMBER) {
         jmethodID setterMethod =
-                env->GetMethodID(gpsMeasurementClass, "setBitNumber", shortSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->bit_number);
+                env->GetMethodID(gpsMeasurementClass, "setBitNumber", intSignature);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->bit_number);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_TIME_FROM_LAST_BIT) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setTimeFromLastBitInMs", shortSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->time_from_last_bit_ms);
@@ -1124,7 +1130,7 @@
     if (flags & GPS_MEASUREMENT_HAS_DOPPLER_SHIFT) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setDopplerShiftInHz", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->doppler_shift_hz);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->doppler_shift_hz);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_DOPPLER_SHIFT_UNCERTAINTY) {
@@ -1132,7 +1138,7 @@
                 gpsMeasurementClass,
                 "setDopplerShiftUncertaintyInHz",
                 doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->doppler_shift_uncertainty_hz);
@@ -1140,7 +1146,7 @@
 
     jmethodID multipathIndicatorSetterMethod =
             env->GetMethodID(gpsMeasurementClass, "setMultipathIndicator", byteSignature);
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             multipathIndicatorSetterMethod,
             measurement->multipath_indicator);
@@ -1148,19 +1154,19 @@
     if (flags & GPS_MEASUREMENT_HAS_SNR) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setSnrInDb", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->snr_db);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->snr_db);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_ELEVATION) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setElevationInDeg", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->elevation_deg);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->elevation_deg);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_ELEVATION_UNCERTAINTY) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setElevationUncertaintyInDeg", doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->elevation_uncertainty_deg);
@@ -1169,7 +1175,7 @@
     if (flags & GPS_MEASUREMENT_HAS_AZIMUTH) {
         jmethodID setterMethod =
                 env->GetMethodID(gpsMeasurementClass, "setAzimuthInDeg", doubleSignature);
-        env->CallObjectMethod(gpsMeasurementObject, setterMethod, measurement->azimuth_deg);
+        env->CallVoidMethod(gpsMeasurementObject, setterMethod, measurement->azimuth_deg);
     }
 
     if (flags & GPS_MEASUREMENT_HAS_AZIMUTH_UNCERTAINTY) {
@@ -1177,14 +1183,14 @@
                 gpsMeasurementClass,
                 "setAzimuthUncertaintyInDeg",
                 doubleSignature);
-        env->CallObjectMethod(
+        env->CallVoidMethod(
                 gpsMeasurementObject,
                 setterMethod,
                 measurement->azimuth_uncertainty_deg);
     }
 
     jmethodID usedInFixSetterMethod = env->GetMethodID(gpsMeasurementClass, "setUsedInFix", "(Z)V");
-    env->CallObjectMethod(
+    env->CallVoidMethod(
             gpsMeasurementObject,
             usedInFixSetterMethod,
             (flags & GPS_MEASUREMENT_HAS_USED_IN_FIX) && measurement->used_in_fix);
@@ -1240,6 +1246,11 @@
 
         env->CallVoidMethod(mCallbacksObj, method_reportMeasurementData, gpsMeasurementsEvent);
         checkAndClearExceptionFromCallback(env, __FUNCTION__);
+
+        env->DeleteLocalRef(gpsClock);
+        env->DeleteLocalRef(measurementArray);
+        env->DeleteLocalRef(gpsMeasurementsEventClass);
+        env->DeleteLocalRef(gpsMeasurementsEvent);
     } else {
         ALOGE("Invalid GpsData size found in gps_measurement_callback, size=%d", data->size);
     }
@@ -1318,6 +1329,8 @@
     jmethodID setDataMethod = env->GetMethodID(navigationMessageClass, "setData", "([B)V");
     env->CallVoidMethod(navigationMessageObject, setDataMethod, dataArray);
 
+    env->DeleteLocalRef(navigationMessageClass);
+    env->DeleteLocalRef(dataArray);
     return navigationMessageObject;
 }
 
@@ -1344,6 +1357,10 @@
 
         env->CallVoidMethod(mCallbacksObj, method_reportNavigationMessages, navigationMessageEvent);
         checkAndClearExceptionFromCallback(env, __FUNCTION__);
+
+        env->DeleteLocalRef(navigationMessage);
+        env->DeleteLocalRef(navigationMessageEventClass);
+        env->DeleteLocalRef(navigationMessageEvent);
     } else {
         ALOGE("Invalid GpsNavigationMessage size found: %d", message->size);
     }
@@ -1392,6 +1409,20 @@
     return JNI_TRUE;
 }
 
+static void android_location_GpsLocationProvider_configuration_update(JNIEnv* env, jobject obj,
+        jstring config_content)
+{
+    if (!sGnssConfigurationInterface) {
+        ALOGE("no GPS configuration interface in configuraiton_update");
+        return;
+    }
+    const char *data = env->GetStringUTFChars(config_content, NULL);
+    ALOGD("GPS configuration:\n %s", data);
+    sGnssConfigurationInterface->configuration_update(
+            data, env->GetStringUTFLength(config_content));
+    env->ReleaseStringUTFChars(config_content, data);
+}
+
 static JNINativeMethod sMethods[] = {
      /* name, signature, funcPtr */
     {"class_init_native", "()V", (void *)android_location_GpsLocationProvider_class_init_native},
@@ -1479,6 +1510,9 @@
     {"native_stop_navigation_message_collection",
             "()Z",
             (void*) android_location_GpsLocationProvider_stop_navigation_message_collection},
+    {"native_configuration_update",
+            "(Ljava/lang/String;)V",
+            (void*)android_location_GpsLocationProvider_configuration_update},
 };
 
 int register_android_server_location_GpsLocationProvider(JNIEnv* env)
diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp
index 39b70a8..7b2e408 100644
--- a/services/core/jni/onload.cpp
+++ b/services/core/jni/onload.cpp
@@ -38,7 +38,6 @@
 int register_android_server_location_FlpHardwareProvider(JNIEnv* env);
 int register_android_server_connectivity_Vpn(JNIEnv* env);
 int register_android_server_hdmi_HdmiCecController(JNIEnv* env);
-int register_android_server_hdmi_HdmiMhlController(JNIEnv* env);
 int register_android_server_tv_TvInputHal(JNIEnv* env);
 int register_android_server_PersistentDataBlockService(JNIEnv* env);
 int register_android_server_fingerprint_FingerprintService(JNIEnv* env);
@@ -76,7 +75,6 @@
     register_android_server_ConsumerIrService(env);
     register_android_server_BatteryStatsService(env);
     register_android_server_hdmi_HdmiCecController(env);
-    register_android_server_hdmi_HdmiMhlController(env);
     register_android_server_tv_TvInputHal(env);
     register_android_server_PersistentDataBlockService(env);
     register_android_server_fingerprint_FingerprintService(env);
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 564a3df..09584f4 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -40,7 +40,6 @@
 import android.content.IntentFilter;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
-import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
@@ -70,7 +69,6 @@
 import android.os.UserManager;
 import android.provider.Settings;
 import android.security.Credentials;
-import android.security.IKeyChainService;
 import android.security.KeyChain;
 import android.security.KeyChain.KeyChainConnection;
 import android.util.Log;
@@ -2749,7 +2747,8 @@
         return !"".equals(state);
     }
 
-    public boolean installCaCert(ComponentName who, byte[] certBuffer) throws RemoteException {
+    @Override
+    public void enforceCanManageCaCerts(ComponentName who) {
         if (who == null) {
             mContext.enforceCallingOrSelfPermission(MANAGE_CA_CERTIFICATES, null);
         } else {
@@ -2757,6 +2756,11 @@
                 getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
             }
         }
+    }
+
+    @Override
+    public boolean installCaCert(ComponentName admin, byte[] certBuffer) throws RemoteException {
+        enforceCanManageCaCerts(admin);
 
         byte[] pemCert;
         try {
@@ -2791,21 +2795,15 @@
         return false;
     }
 
-    private static X509Certificate parseCert(byte[] certBuffer)
-            throws CertificateException, IOException {
+    private static X509Certificate parseCert(byte[] certBuffer) throws CertificateException {
         CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
         return (X509Certificate) certFactory.generateCertificate(new ByteArrayInputStream(
                 certBuffer));
     }
 
-    public void uninstallCaCert(ComponentName who, String alias) {
-        if (who == null) {
-            mContext.enforceCallingOrSelfPermission(MANAGE_CA_CERTIFICATES, null);
-        } else {
-            synchronized (this) {
-                getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
-            }
-        }
+    @Override
+    public void uninstallCaCert(ComponentName admin, String alias) {
+        enforceCanManageCaCerts(admin);
 
         final UserHandle userHandle = new UserHandle(UserHandle.getCallingUserId());
         final long id = Binder.clearCallingIdentity();
@@ -2998,10 +2996,12 @@
         mContext.enforceCallingOrSelfPermission(
                 android.Manifest.permission.BIND_DEVICE_ADMIN, null);
 
-        synchronized (this) {
-            DevicePolicyData policy = getUserData(userHandle);
-            long ident = Binder.clearCallingIdentity();
-            try {
+        long ident = Binder.clearCallingIdentity();
+        try {
+            boolean wipeData = false;
+            int identifier = 0;
+            synchronized (this) {
+                DevicePolicyData policy = getUserData(userHandle);
                 policy.mFailedPasswordAttempts++;
                 saveSettingsLocked(userHandle);
                 if (mHasFeature) {
@@ -3013,15 +3013,20 @@
                         // Wipe the user/profile associated with the policy that was violated. This
                         // is not necessarily calling user: if the policy that fired was from a
                         // managed profile rather than the main user profile, we wipe former only.
-                        wipeDeviceOrUserLocked(0, strictestAdmin.getUserHandle().getIdentifier());
+                        wipeData = true;
+                        identifier = strictestAdmin.getUserHandle().getIdentifier();
                     }
                     sendAdminCommandToSelfAndProfilesLocked(
                             DeviceAdminReceiver.ACTION_PASSWORD_FAILED,
                             DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, userHandle);
                 }
-            } finally {
-                Binder.restoreCallingIdentity(ident);
             }
+            if (wipeData) {
+                // Call without holding lock.
+                wipeDeviceOrUserLocked(0, identifier);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(ident);
         }
     }
 
@@ -3656,11 +3661,15 @@
         }
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.MANAGE_USERS, null);
 
-        if (mUserManager.getUserInfo(userHandle) == null) {
+        UserInfo info = mUserManager.getUserInfo(userHandle);
+        if (info == null) {
             // User doesn't exist.
             throw new IllegalArgumentException(
                     "Attempted to set profile owner for invalid userId: " + userHandle);
         }
+        if (info.isGuest()) {
+            throw new IllegalStateException("Cannot set a profile owner on a guest");
+        }
 
         if (who == null
                 || !DeviceOwner.isInstalledForUser(who.getPackageName(), userHandle)) {
diff --git a/services/print/java/com/android/server/print/PrintManagerService.java b/services/print/java/com/android/server/print/PrintManagerService.java
index ce91f3d..6785cb8 100644
--- a/services/print/java/com/android/server/print/PrintManagerService.java
+++ b/services/print/java/com/android/server/print/PrintManagerService.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.pm.UserInfo;
@@ -626,26 +627,40 @@
             return userState;
         }
 
-        private void handleUserStarted(int userId) {
-            UserState userState;
-            synchronized (mLock) {
-                userState = getOrCreateUserStateLocked(userId);
-                userState.updateIfNeededLocked();
-            }
-            // This is the first time we switch to this user after boot, so
-            // now is the time to remove obsolete print jobs since they
-            // are from the last boot and no application would query them.
-            userState.removeObsoletePrintJobs();
+        private void handleUserStarted(final int userId) {
+            // This code will touch the remote print spooler which
+            // must be called off the main thread, so post the work.
+            BackgroundThread.getHandler().post(new Runnable() {
+                @Override
+                public void run() {
+                    UserState userState;
+                    synchronized (mLock) {
+                        userState = getOrCreateUserStateLocked(userId);
+                        userState.updateIfNeededLocked();
+                    }
+                    // This is the first time we switch to this user after boot, so
+                    // now is the time to remove obsolete print jobs since they
+                    // are from the last boot and no application would query them.
+                    userState.removeObsoletePrintJobs();
+                }
+            });
         }
 
-        private void handleUserStopped(int userId) {
-            synchronized (mLock) {
-                UserState userState = mUserStates.get(userId);
-                if (userState != null) {
-                    userState.destroyLocked();
-                    mUserStates.remove(userId);
+        private void handleUserStopped(final int userId) {
+            // This code will touch the remote print spooler which
+            // must be called off the main thread, so post the work.
+            BackgroundThread.getHandler().post(new Runnable() {
+                @Override
+                public void run() {
+                    synchronized (mLock) {
+                        UserState userState = mUserStates.get(userId);
+                        if (userState != null) {
+                            userState.destroyLocked();
+                            mUserStates.remove(userId);
+                        }
+                    }
                 }
-            }
+            });
         }
 
         private int resolveCallingProfileParentLocked(int userId) {
@@ -730,7 +745,14 @@
                     PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT, null,
                     userHandle);
 
-            Notification.Builder builder = new Notification.Builder(mContext)
+            Context builderContext = mContext;
+            try {
+                builderContext = mContext.createPackageContextAsUser(mContext.getPackageName(), 0,
+                        userHandle);
+            } catch (NameNotFoundException e) {
+                // Ignore can't find the package the system is running as.
+            }
+            Notification.Builder builder = new Notification.Builder(builderContext)
                     .setSmallIcon(R.drawable.ic_print)
                     .setContentTitle(mContext.getString(R.string.print_service_installed_title,
                             label))
diff --git a/services/restrictions/java/com/android/server/restrictions/RestrictionsManagerService.java b/services/restrictions/java/com/android/server/restrictions/RestrictionsManagerService.java
index fb29b6a..218f899 100644
--- a/services/restrictions/java/com/android/server/restrictions/RestrictionsManagerService.java
+++ b/services/restrictions/java/com/android/server/restrictions/RestrictionsManagerService.java
@@ -139,7 +139,7 @@
         }
 
         @Override
-        public Intent getLocalApprovalIntent() throws RemoteException {
+        public Intent createLocalApprovalIntent() throws RemoteException {
             if (DEBUG) {
                 Log.i(LOG_TAG, "requestPermission");
             }
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 6e13732..a0b8c94 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
@@ -125,7 +125,8 @@
                 UserInfo.FLAG_MANAGED_PROFILE, UserHandle.USER_OWNER);
         assertNotNull(userInfo1);
         assertNull(userInfo2);
-
+        // Verify that current user is not a managed profile
+        assertFalse(mUserManager.isManagedProfile());
         // Cleanup
         removeUser(userInfo1.id);
     }
diff --git a/services/usage/java/com/android/server/usage/IntervalStats.java b/services/usage/java/com/android/server/usage/IntervalStats.java
index dc036e2..5f639ab 100644
--- a/services/usage/java/com/android/server/usage/IntervalStats.java
+++ b/services/usage/java/com/android/server/usage/IntervalStats.java
@@ -15,9 +15,11 @@
  */
 package com.android.server.usage;
 
+import android.app.usage.ConfigurationStats;
 import android.app.usage.TimeSparseArray;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
+import android.content.res.Configuration;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 
@@ -25,7 +27,9 @@
     public long beginTime;
     public long endTime;
     public long lastTimeSaved;
-    public final ArrayMap<String, UsageStats> stats = new ArrayMap<>();
+    public final ArrayMap<String, UsageStats> packageStats = new ArrayMap<>();
+    public final ArrayMap<Configuration, ConfigurationStats> configurations = new ArrayMap<>();
+    public Configuration activeConfiguration;
     public TimeSparseArray<UsageEvents.Event> events;
 
     // A string cache. This is important as when we're parsing XML files, we don't want to
@@ -34,18 +38,49 @@
     // strings that had identical copies in the cache.
     private final ArraySet<String> mStringCache = new ArraySet<>();
 
+    /**
+     * Gets the UsageStats object for the given package, or creates one and adds it internally.
+     */
     UsageStats getOrCreateUsageStats(String packageName) {
-        UsageStats usageStats = stats.get(packageName);
+        UsageStats usageStats = packageStats.get(packageName);
         if (usageStats == null) {
             usageStats = new UsageStats();
-            usageStats.mPackageName = packageName;
+            usageStats.mPackageName = getCachedStringRef(packageName);
             usageStats.mBeginTimeStamp = beginTime;
             usageStats.mEndTimeStamp = endTime;
-            stats.put(packageName, usageStats);
+            packageStats.put(usageStats.mPackageName, usageStats);
         }
         return usageStats;
     }
 
+    /**
+     * Gets the ConfigurationStats object for the given configuration, or creates one and adds it
+     * internally.
+     */
+    ConfigurationStats getOrCreateConfigurationStats(Configuration config) {
+        ConfigurationStats configStats = configurations.get(config);
+        if (configStats == null) {
+            configStats = new ConfigurationStats();
+            configStats.mBeginTimeStamp = beginTime;
+            configStats.mEndTimeStamp = endTime;
+            configStats.mConfiguration = config;
+            configurations.put(config, configStats);
+        }
+        return configStats;
+    }
+
+    /**
+     * Builds a UsageEvents.Event, but does not add it internally.
+     */
+    UsageEvents.Event buildEvent(String packageName, String className) {
+        UsageEvents.Event event = new UsageEvents.Event();
+        event.mPackage = getCachedStringRef(packageName);
+        if (className != null) {
+            event.mClass = getCachedStringRef(className);
+        }
+        return event;
+    }
+
     void update(String packageName, long timeStamp, int eventType) {
         UsageStats usageStats = getOrCreateUsageStats(packageName);
 
@@ -61,6 +96,28 @@
         usageStats.mLastEvent = eventType;
         usageStats.mLastTimeUsed = timeStamp;
         usageStats.mEndTimeStamp = timeStamp;
+
+        if (eventType == UsageEvents.Event.MOVE_TO_FOREGROUND) {
+            usageStats.mLaunchCount += 1;
+        }
+
+        endTime = timeStamp;
+    }
+
+    void updateConfigurationStats(Configuration config, long timeStamp) {
+        if (activeConfiguration != null) {
+            ConfigurationStats activeStats = configurations.get(activeConfiguration);
+            activeStats.mTotalTimeActive += timeStamp - activeStats.mLastTimeActive;
+            activeStats.mLastTimeActive = timeStamp - 1;
+        }
+
+        if (config != null) {
+            ConfigurationStats configStats = getOrCreateConfigurationStats(config);
+            configStats.mLastTimeActive = timeStamp;
+            configStats.mActivationCount += 1;
+            activeConfiguration = configStats.mConfiguration;
+        }
+
         endTime = timeStamp;
     }
 
@@ -72,13 +129,4 @@
         }
         return mStringCache.valueAt(index);
     }
-
-    UsageEvents.Event buildEvent(String packageName, String className) {
-        UsageEvents.Event event = new UsageEvents.Event();
-        event.mPackage = getCachedStringRef(packageName);
-        if (className != null) {
-            event.mClass = getCachedStringRef(className);
-        }
-        return event;
-    }
 }
diff --git a/services/usage/java/com/android/server/usage/UnixCalendar.java b/services/usage/java/com/android/server/usage/UnixCalendar.java
new file mode 100644
index 0000000..ce06a91
--- /dev/null
+++ b/services/usage/java/com/android/server/usage/UnixCalendar.java
@@ -0,0 +1,99 @@
+/**
+ * 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.server.usage;
+
+import android.app.usage.UsageStatsManager;
+
+/**
+ * A handy calendar object that knows nothing of Locale's or TimeZones. This simplifies
+ * interval book-keeping. It is *NOT* meant to be used as a user-facing calendar, as it has
+ * no concept of Locale or TimeZone.
+ */
+public class UnixCalendar {
+    private static final long DAY_IN_MILLIS = 24 * 60 * 60 * 1000;
+    private static final long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS;
+    private static final long MONTH_IN_MILLIS = 30 * DAY_IN_MILLIS;
+    private static final long YEAR_IN_MILLIS = 365 * DAY_IN_MILLIS;
+    private long mTime;
+
+    public UnixCalendar(long time) {
+        mTime = time;
+    }
+
+    public void truncateToDay() {
+        mTime -= mTime % DAY_IN_MILLIS;
+    }
+
+    public void truncateToWeek() {
+        mTime -= mTime % WEEK_IN_MILLIS;
+    }
+
+    public void truncateToMonth() {
+        mTime -= mTime % MONTH_IN_MILLIS;
+    }
+
+    public void truncateToYear() {
+        mTime -= mTime % YEAR_IN_MILLIS;
+    }
+
+    public void addDays(int val) {
+        mTime += val * DAY_IN_MILLIS;
+    }
+
+    public void addWeeks(int val) {
+        mTime += val * WEEK_IN_MILLIS;
+    }
+
+    public void addMonths(int val) {
+        mTime += val * MONTH_IN_MILLIS;
+    }
+
+    public void addYears(int val) {
+        mTime += val * YEAR_IN_MILLIS;
+    }
+
+    public void setTimeInMillis(long time) {
+        mTime = time;
+    }
+
+    public long getTimeInMillis() {
+        return mTime;
+    }
+
+    public static void truncateTo(UnixCalendar calendar, int intervalType) {
+        switch (intervalType) {
+            case UsageStatsManager.INTERVAL_YEARLY:
+                calendar.truncateToYear();
+                break;
+
+            case UsageStatsManager.INTERVAL_MONTHLY:
+                calendar.truncateToMonth();
+                break;
+
+            case UsageStatsManager.INTERVAL_WEEKLY:
+                calendar.truncateToWeek();
+                break;
+
+            case UsageStatsManager.INTERVAL_DAILY:
+                calendar.truncateToDay();
+                break;
+
+            default:
+                throw new UnsupportedOperationException("Can't truncate date to interval " +
+                        intervalType);
+        }
+    }
+}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
index e6ce0fe..62a7ec0 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
@@ -17,29 +17,34 @@
 package com.android.server.usage;
 
 import android.app.usage.TimeSparseArray;
-import android.app.usage.UsageStats;
 import android.app.usage.UsageStatsManager;
 import android.util.AtomicFile;
 import android.util.Slog;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
 import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.List;
 
 /**
  * Provides an interface to query for UsageStat data from an XML database.
  */
 class UsageStatsDatabase {
+    private static final int CURRENT_VERSION = 2;
+
     private static final String TAG = "UsageStatsDatabase";
     private static final boolean DEBUG = UsageStatsService.DEBUG;
 
     private final Object mLock = new Object();
     private final File[] mIntervalDirs;
     private final TimeSparseArray<AtomicFile>[] mSortedStatFiles;
-    private final Calendar mCal;
+    private final UnixCalendar mCal;
+    private final File mVersionFile;
 
     public UsageStatsDatabase(File dir) {
         mIntervalDirs = new File[] {
@@ -48,8 +53,9 @@
                 new File(dir, "monthly"),
                 new File(dir, "yearly"),
         };
+        mVersionFile = new File(dir, "version");
         mSortedStatFiles = new TimeSparseArray[mIntervalDirs.length];
-        mCal = Calendar.getInstance();
+        mCal = new UnixCalendar(0);
     }
 
     /**
@@ -65,6 +71,8 @@
                 }
             }
 
+            checkVersionLocked();
+
             final FilenameFilter backupFileFilter = new FilenameFilter() {
                 @Override
                 public boolean accept(File dir, String name) {
@@ -82,7 +90,45 @@
                     }
 
                     for (File f : files) {
-                        mSortedStatFiles[i].put(Long.parseLong(f.getName()), new AtomicFile(f));
+                        final AtomicFile af = new AtomicFile(f);
+                        mSortedStatFiles[i].put(UsageStatsXml.parseBeginTime(af), af);
+                    }
+                }
+            }
+        }
+    }
+
+    private void checkVersionLocked() {
+        int version;
+        try (BufferedReader reader = new BufferedReader(new FileReader(mVersionFile))) {
+            version = Integer.parseInt(reader.readLine());
+        } catch (NumberFormatException | IOException e) {
+            version = 0;
+        }
+
+        if (version != CURRENT_VERSION) {
+            Slog.i(TAG, "Upgrading from version " + version + " to " + CURRENT_VERSION);
+            doUpgradeLocked(version);
+
+            try (BufferedWriter writer = new BufferedWriter(new FileWriter(mVersionFile))) {
+                writer.write(Integer.toString(CURRENT_VERSION));
+            } catch (IOException e) {
+                Slog.e(TAG, "Failed to write new version");
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    private void doUpgradeLocked(int thisVersion) {
+        if (thisVersion < 2) {
+            // Delete all files if we are version 0. This is a pre-release version,
+            // so this is fine.
+            Slog.i(TAG, "Deleting all usage stats files");
+            for (int i = 0; i < mIntervalDirs.length; i++) {
+                File[] files = mIntervalDirs[i].listFiles();
+                if (files != null) {
+                    for (File f : files) {
+                        f.delete();
                     }
                 }
             }
@@ -133,33 +179,77 @@
     }
 
     /**
-     * Find all {@link UsageStats} for the given range and interval type.
+     * Figures out what to extract from the given IntervalStats object.
      */
-    public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) {
+    interface StatCombiner<T> {
+
+        /**
+         * Implementations should extract interesting from <code>stats</code> and add it
+         * to the <code>accumulatedResult</code> list.
+         *
+         * If the <code>stats</code> object is mutable, <code>mutable</code> will be true,
+         * which means you should make a copy of the data before adding it to the
+         * <code>accumulatedResult</code> list.
+         *
+         * @param stats The {@link IntervalStats} object selected.
+         * @param mutable Whether or not the data inside the stats object is mutable.
+         * @param accumulatedResult The list to which to add extracted data.
+         */
+        void combine(IntervalStats stats, boolean mutable, List<T> accumulatedResult);
+    }
+
+    /**
+     * Find all {@link IntervalStats} for the given range and interval type.
+     */
+    public <T> List<T> queryUsageStats(int intervalType, long beginTime, long endTime,
+            StatCombiner<T> combiner) {
         synchronized (mLock) {
             if (intervalType < 0 || intervalType >= mIntervalDirs.length) {
                 throw new IllegalArgumentException("Bad interval type " + intervalType);
             }
 
-            if (endTime < beginTime) {
+            final TimeSparseArray<AtomicFile> intervalStats = mSortedStatFiles[intervalType];
+
+            if (endTime <= beginTime) {
+                if (DEBUG) {
+                    Slog.d(TAG, "endTime(" + endTime + ") <= beginTime(" + beginTime + ")");
+                }
                 return null;
             }
 
-            final int startIndex = mSortedStatFiles[intervalType].closestIndexOnOrBefore(beginTime);
+            int startIndex = intervalStats.closestIndexOnOrBefore(beginTime);
             if (startIndex < 0) {
+                // All the stats available have timestamps after beginTime, which means they all
+                // match.
+                startIndex = 0;
+            }
+
+            int endIndex = intervalStats.closestIndexOnOrBefore(endTime);
+            if (endIndex < 0) {
+                // All the stats start after this range ends, so nothing matches.
+                if (DEBUG) {
+                    Slog.d(TAG, "No results for this range. All stats start after.");
+                }
                 return null;
             }
 
-            int endIndex = mSortedStatFiles[intervalType].closestIndexOnOrAfter(endTime);
-            if (endIndex < 0) {
-                endIndex = mSortedStatFiles[intervalType].size() - 1;
+            if (intervalStats.keyAt(endIndex) == endTime) {
+                // The endTime is exclusive, so if we matched exactly take the one before.
+                endIndex--;
+                if (endIndex < 0) {
+                    // All the stats start after this range ends, so nothing matches.
+                    if (DEBUG) {
+                        Slog.d(TAG, "No results for this range. All stats start after.");
+                    }
+                    return null;
+                }
             }
 
             try {
                 IntervalStats stats = new IntervalStats();
-                ArrayList<UsageStats> results = new ArrayList<>();
+                ArrayList<T> results = new ArrayList<>();
                 for (int i = startIndex; i <= endIndex; i++) {
-                    final AtomicFile f = mSortedStatFiles[intervalType].valueAt(i);
+                    final AtomicFile f = intervalStats.valueAt(i);
 
                     if (DEBUG) {
                         Slog.d(TAG, "Reading stat file " + f.getBaseFile().getAbsolutePath());
@@ -167,7 +257,7 @@
 
                     UsageStatsXml.read(f, stats);
                     if (beginTime < stats.endTime) {
-                        results.addAll(stats.stats.values());
+                        combiner.combine(stats, false, results);
                     }
                 }
                 return results;
@@ -209,19 +299,23 @@
     public void prune() {
         synchronized (mLock) {
             long timeNow = System.currentTimeMillis();
+            mCal.setTimeInMillis(timeNow);
+            mCal.addYears(-3);
+            pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_YEARLY],
+                    mCal.getTimeInMillis());
 
             mCal.setTimeInMillis(timeNow);
-            mCal.add(Calendar.MONTH, -6);
+            mCal.addMonths(-6);
             pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_MONTHLY],
                     mCal.getTimeInMillis());
 
             mCal.setTimeInMillis(timeNow);
-            mCal.add(Calendar.WEEK_OF_YEAR, -4);
+            mCal.addWeeks(-4);
             pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_WEEKLY],
                     mCal.getTimeInMillis());
 
             mCal.setTimeInMillis(timeNow);
-            mCal.add(Calendar.DAY_OF_YEAR, -7);
+            mCal.addDays(-7);
             pruneFilesOlderThan(mIntervalDirs[UsageStatsManager.INTERVAL_DAILY],
                     mCal.getTimeInMillis());
         }
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 0e8b427..2dcdcc4 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -18,6 +18,7 @@
 
 import android.Manifest;
 import android.app.AppOpsManager;
+import android.app.usage.ConfigurationStats;
 import android.app.usage.IUsageStatsManager;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
@@ -30,11 +31,14 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ParceledListSlice;
 import android.content.pm.UserInfo;
+import android.content.res.Configuration;
 import android.os.Binder;
 import android.os.Environment;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
+import android.os.RemoteException;
+import android.os.SystemClock;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.util.ArraySet;
@@ -59,9 +63,7 @@
     static final boolean DEBUG = false;
     private static final long TEN_SECONDS = 10 * 1000;
     private static final long TWENTY_MINUTES = 20 * 60 * 1000;
-    private static final long TWO_MINUTES = 2 * 60 * 1000;
     private static final long FLUSH_INTERVAL = DEBUG ? TEN_SECONDS : TWENTY_MINUTES;
-    private static final long END_TIME_DELAY = DEBUG ? 0 : TWO_MINUTES;
 
     // Handler message types.
     static final int MSG_REPORT_EVENT = 0;
@@ -75,6 +77,8 @@
 
     private final SparseArray<UserUsageStatsService> mUserState = new SparseArray<>();
     private File mUsageStatsDir;
+    long mRealTimeSnapshot;
+    long mSystemTimeSnapshot;
 
     public UsageStatsService(Context context) {
         super(context);
@@ -101,6 +105,9 @@
             cleanUpRemovedUsersLocked();
         }
 
+        mRealTimeSnapshot = SystemClock.elapsedRealtime();
+        mSystemTimeSnapshot = System.currentTimeMillis();
+
         publishLocalService(UsageStatsManagerInternal.class, new LocalService());
         publishBinderService(Context.USAGE_STATS_SERVICE, new BinderService());
     }
@@ -175,7 +182,7 @@
     }
 
     /**
-     * Called by the Bunder stub
+     * Called by the Binder stub
      */
     void shutdown() {
         synchronized (mLock) {
@@ -218,8 +225,7 @@
      * Called by the Binder stub.
      */
     List<UsageStats> queryUsageStats(int userId, int bucketType, long beginTime, long endTime) {
-        final long timeNow = System.currentTimeMillis();
-        if (beginTime > timeNow) {
+        if (!validRange(beginTime, endTime)) {
             return null;
         }
 
@@ -232,15 +238,23 @@
     /**
      * Called by the Binder stub.
      */
+    List<ConfigurationStats> queryConfigurationStats(int userId, int bucketType, long beginTime,
+            long endTime) {
+        if (!validRange(beginTime, endTime)) {
+            return null;
+        }
+
+        synchronized (mLock) {
+            UserUsageStatsService service = getUserDataAndInitializeIfNeededLocked(userId);
+            return service.queryConfigurationStats(bucketType, beginTime, endTime);
+        }
+    }
+
+    /**
+     * Called by the Binder stub.
+     */
     UsageEvents queryEvents(int userId, long beginTime, long endTime) {
-        final long timeNow = System.currentTimeMillis();
-
-        // Adjust the endTime so that we don't query for the latest events.
-        // This is to prevent apps from making decision based on what app launched them,
-        // etc.
-        endTime = Math.min(endTime, timeNow - END_TIME_DELAY);
-
-        if (beginTime > endTime) {
+        if (!validRange(beginTime, endTime)) {
             return null;
         }
 
@@ -250,6 +264,11 @@
         }
     }
 
+    private static boolean validRange(long beginTime, long endTime) {
+        final long timeNow = System.currentTimeMillis();
+        return beginTime <= timeNow && beginTime < endTime;
+    }
+
     private void flushToDiskLocked() {
         final int userCount = mUserState.size();
         for (int i = 0; i < userCount; i++) {
@@ -323,6 +342,28 @@
         }
 
         @Override
+        public ParceledListSlice<ConfigurationStats> queryConfigurationStats(int bucketType,
+                long beginTime, long endTime, String callingPackage) throws RemoteException {
+            if (!hasPermission(callingPackage)) {
+                return null;
+            }
+
+            final int userId = UserHandle.getCallingUserId();
+            final long token = Binder.clearCallingIdentity();
+            try {
+                final List<ConfigurationStats> results =
+                        UsageStatsService.this.queryConfigurationStats(userId, bucketType,
+                                beginTime, endTime);
+                if (results != null) {
+                    return new ParceledListSlice<>(results);
+                }
+            } finally {
+                Binder.restoreCallingIdentity(token);
+            }
+            return null;
+        }
+
+        @Override
         public UsageEvents queryEvents(long beginTime, long endTime, String callingPackage) {
             if (!hasPermission(callingPackage)) {
                 return null;
@@ -345,9 +386,16 @@
      */
     private class LocalService extends UsageStatsManagerInternal {
 
+        /**
+         * The system may have its time change, so at least make sure the events
+         * are monotonic in order.
+         */
+        private long computeMonotonicSystemTime(long realTime) {
+            return (realTime - mRealTimeSnapshot) + mSystemTimeSnapshot;
+        }
+
         @Override
-        public void reportEvent(ComponentName component, int userId,
-                long timeStamp, int eventType) {
+        public void reportEvent(ComponentName component, int userId, int eventType) {
             if (component == null) {
                 Slog.w(TAG, "Event reported without a component name");
                 return;
@@ -356,12 +404,27 @@
             UsageEvents.Event event = new UsageEvents.Event();
             event.mPackage = component.getPackageName();
             event.mClass = component.getClassName();
-            event.mTimeStamp = timeStamp;
+            event.mTimeStamp = computeMonotonicSystemTime(SystemClock.elapsedRealtime());
             event.mEventType = eventType;
             mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
         }
 
         @Override
+        public void reportConfigurationChange(Configuration config, int userId) {
+            if (config == null) {
+                Slog.w(TAG, "Configuration event reported with a null config");
+                return;
+            }
+
+            UsageEvents.Event event = new UsageEvents.Event();
+            event.mPackage = "android";
+            event.mTimeStamp = computeMonotonicSystemTime(SystemClock.elapsedRealtime());
+            event.mEventType = UsageEvents.Event.CONFIGURATION_CHANGE;
+            event.mConfiguration = new Configuration(config);
+            mHandler.obtainMessage(MSG_REPORT_EVENT, userId, 0, event).sendToTarget();
+        }
+
+        @Override
         public void prepareShutdown() {
             // This method *WILL* do IO work, but we must block until it is finished or else
             // we might not shutdown cleanly. This is ok to do with the 'am' lock held, because
diff --git a/services/usage/java/com/android/server/usage/UsageStatsUtils.java b/services/usage/java/com/android/server/usage/UsageStatsUtils.java
deleted file mode 100644
index dd5f3b9..0000000
--- a/services/usage/java/com/android/server/usage/UsageStatsUtils.java
+++ /dev/null
@@ -1,63 +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.server.usage;
-
-import android.app.usage.UsageStatsManager;
-
-import java.util.Calendar;
-
-/**
- * A collection of utility methods used by the UsageStatsService and accompanying classes.
- */
-final class UsageStatsUtils {
-    private UsageStatsUtils() {}
-
-    /**
-     * Truncates the date to the given UsageStats bucket. For example, if the bucket is
-     * {@link UsageStatsManager#INTERVAL_YEARLY}, the date is truncated to the 1st day of the year,
-     * with the time set to 00:00:00.
-     *
-     * @param bucket The UsageStats bucket to truncate to.
-     * @param cal The date to truncate.
-     */
-    public static void truncateDateTo(int bucket, Calendar cal) {
-        cal.set(Calendar.HOUR_OF_DAY, 0);
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-
-        switch (bucket) {
-            case UsageStatsManager.INTERVAL_YEARLY:
-                cal.set(Calendar.DAY_OF_YEAR, 0);
-                break;
-
-            case UsageStatsManager.INTERVAL_MONTHLY:
-                cal.set(Calendar.DAY_OF_MONTH, 0);
-                break;
-
-            case UsageStatsManager.INTERVAL_WEEKLY:
-                cal.set(Calendar.DAY_OF_WEEK, 0);
-                break;
-
-            case UsageStatsManager.INTERVAL_DAILY:
-                break;
-
-            default:
-                throw new UnsupportedOperationException("Can't truncate date to bucket " + bucket);
-        }
-    }
-}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXml.java b/services/usage/java/com/android/server/usage/UsageStatsXml.java
index 48881d0..9ce6d63 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsXml.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsXml.java
@@ -37,10 +37,15 @@
     private static final String USAGESTATS_TAG = "usagestats";
     private static final String VERSION_ATTR = "version";
 
+    public static long parseBeginTime(AtomicFile file) {
+        return Long.parseLong(file.getBaseFile().getName());
+    }
+
     public static void read(AtomicFile file, IntervalStats statsOut) throws IOException {
         try {
             FileInputStream in = file.openRead();
             try {
+                statsOut.beginTime = parseBeginTime(file);
                 read(in, statsOut);
                 statsOut.lastTimeSaved = file.getLastModifiedTime();
             } finally {
diff --git a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
index 374429a..ef95a7b 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsXmlV1.java
@@ -15,16 +15,17 @@
  */
 package com.android.server.usage;
 
-import com.android.internal.util.FastXmlSerializer;
 import com.android.internal.util.XmlUtils;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
 
+import android.app.usage.ConfigurationStats;
 import android.app.usage.TimeSparseArray;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
-import android.content.ComponentName;
+import android.content.res.Configuration;
 
 import java.io.IOException;
 import java.net.ProtocolException;
@@ -33,103 +34,144 @@
  * UsageStats reader/writer for version 1 of the XML format.
  */
 final class UsageStatsXmlV1 {
-    private static final String BEGIN_TIME_ATTR = "beginTime";
-    private static final String END_TIME_ATTR = "endTime";
+    private static final String PACKAGES_TAG = "packages";
     private static final String PACKAGE_TAG = "package";
-    private static final String NAME_ATTR = "name";
+
+    private static final String CONFIGURATIONS_TAG = "configurations";
+    private static final String CONFIG_TAG = "config";
+
+    private static final String EVENT_LOG_TAG = "event-log";
+    private static final String EVENT_TAG = "event";
+
+    // Attributes
     private static final String PACKAGE_ATTR = "package";
     private static final String CLASS_ATTR = "class";
-    private static final String TOTAL_TIME_ACTIVE_ATTR = "totalTimeActive";
-    private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
+    private static final String TOTAL_TIME_ACTIVE_ATTR = "timeActive";
+    private static final String COUNT_ATTR = "count";
+    private static final String ACTIVE_ATTR = "active";
     private static final String LAST_EVENT_ATTR = "lastEvent";
-    private static final String EVENT_LOG_TAG = "event-log";
     private static final String TYPE_ATTR = "type";
+
+    // Time attributes stored as an offset of the beginTime.
+    private static final String LAST_TIME_ACTIVE_ATTR = "lastTimeActive";
+    private static final String END_TIME_ATTR = "endTime";
     private static final String TIME_ATTR = "time";
 
-    private static UsageStats readNextUsageStats(XmlPullParser parser)
+    private static void loadUsageStats(XmlPullParser parser, IntervalStats statsOut)
             throws XmlPullParserException, IOException {
-        if (parser.getEventType() != XmlPullParser.START_TAG) {
-            XmlUtils.nextElement(parser);
+        final String pkg = parser.getAttributeValue(null, PACKAGE_ATTR);
+        if (pkg == null) {
+            throw new ProtocolException("no " + PACKAGE_ATTR + " attribute present");
         }
 
-        if (parser.getEventType() != XmlPullParser.START_TAG ||
-                !parser.getName().equals(PACKAGE_TAG)) {
-            return null;
-        }
+        final UsageStats stats = statsOut.getOrCreateUsageStats(pkg);
 
-        final String name = parser.getAttributeValue(null, NAME_ATTR);
-        if (name == null) {
-            throw new ProtocolException("no " + NAME_ATTR + " attribute present");
-        }
+        // Apply the offset to the beginTime to find the absolute time.
+        stats.mLastTimeUsed = statsOut.beginTime + XmlUtils.readLongAttribute(
+                parser, LAST_TIME_ACTIVE_ATTR);
 
-        UsageStats stats = new UsageStats();
-        stats.mPackageName = name;
         stats.mTotalTimeInForeground = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR);
-        stats.mLastTimeUsed = XmlUtils.readLongAttribute(parser, LAST_TIME_ACTIVE_ATTR);
         stats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR);
-        XmlUtils.skipCurrentTag(parser);
-        return stats;
     }
 
-    private static UsageEvents.Event readNextEvent(XmlPullParser parser, IntervalStats statsOut)
+    private static void loadConfigStats(XmlPullParser parser, IntervalStats statsOut)
             throws XmlPullParserException, IOException {
-        if (parser.getEventType() != XmlPullParser.START_TAG) {
-            XmlUtils.nextElement(parser);
-        }
+        final Configuration config = new Configuration();
+        Configuration.readXmlAttrs(parser, config);
 
-        if (parser.getEventType() != XmlPullParser.START_TAG ||
-                !parser.getName().equals(EVENT_LOG_TAG)) {
-            return null;
-        }
+        final ConfigurationStats configStats = statsOut.getOrCreateConfigurationStats(config);
 
-        String packageName = XmlUtils.readStringAttribute(parser, PACKAGE_ATTR);
-        String className;
+        // Apply the offset to the beginTime to find the absolute time.
+        configStats.mLastTimeActive = statsOut.beginTime + XmlUtils.readLongAttribute(
+                parser, LAST_TIME_ACTIVE_ATTR);
+
+        configStats.mTotalTimeActive = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR);
+        configStats.mActivationCount = XmlUtils.readIntAttribute(parser, COUNT_ATTR);
+        if (XmlUtils.readBooleanAttribute(parser, ACTIVE_ATTR)) {
+            statsOut.activeConfiguration = configStats.mConfiguration;
+        }
+    }
+
+    private static void loadEvent(XmlPullParser parser, IntervalStats statsOut)
+            throws XmlPullParserException, IOException {
+        final String packageName = XmlUtils.readStringAttribute(parser, PACKAGE_ATTR);
         if (packageName == null) {
-            // Try getting the component name if it exists.
-            final String componentName = XmlUtils.readStringAttribute(parser, NAME_ATTR);
-            if (componentName == null) {
-                throw new ProtocolException("no " + NAME_ATTR + " or " + PACKAGE_ATTR +
-                        " attribute present");
-            }
-            ComponentName component = ComponentName.unflattenFromString(componentName);
-            if (component == null) {
-                throw new ProtocolException("ComponentName " + componentName + " is invalid");
-            }
-
-            packageName = component.getPackageName();
-            className = component.getClassName();
-        } else {
-            className = XmlUtils.readStringAttribute(parser, CLASS_ATTR);
+            throw new ProtocolException("no " + PACKAGE_ATTR + " attribute present");
         }
 
-        UsageEvents.Event event = statsOut.buildEvent(packageName, className);
+        final String className = XmlUtils.readStringAttribute(parser, CLASS_ATTR);
+
+        final UsageEvents.Event event = statsOut.buildEvent(packageName, className);
+
+        // Apply the offset to the beginTime to find the absolute time of this event.
+        event.mTimeStamp = statsOut.beginTime + XmlUtils.readLongAttribute(parser, TIME_ATTR);
+
         event.mEventType = XmlUtils.readIntAttribute(parser, TYPE_ATTR);
-        event.mTimeStamp = XmlUtils.readLongAttribute(parser, TIME_ATTR);
-        XmlUtils.skipCurrentTag(parser);
-        return event;
-    }
-
-    private static void writeUsageStats(FastXmlSerializer serializer, UsageStats stats)
-            throws IOException {
-        serializer.startTag(null, PACKAGE_TAG);
-        serializer.attribute(null, NAME_ATTR, stats.mPackageName);
-        serializer.attribute(null, TOTAL_TIME_ACTIVE_ATTR,
-                Long.toString(stats.mTotalTimeInForeground));
-        serializer.attribute(null, LAST_TIME_ACTIVE_ATTR, Long.toString(stats.mLastTimeUsed));
-        serializer.attribute(null, LAST_EVENT_ATTR, Integer.toString(stats.mLastEvent));
-        serializer.endTag(null, PACKAGE_TAG);
-    }
-
-    private static void writeEvent(FastXmlSerializer serializer, UsageEvents.Event event)
-            throws IOException {
-        serializer.startTag(null, EVENT_LOG_TAG);
-        serializer.attribute(null, PACKAGE_ATTR, event.mPackage);
-        if (event.mClass != null) {
-            serializer.attribute(null, CLASS_ATTR, event.mClass);
+        if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE) {
+            event.mConfiguration = new Configuration();
+            Configuration.readXmlAttrs(parser, event.mConfiguration);
         }
-        serializer.attribute(null, TYPE_ATTR, Integer.toString(event.getEventType()));
-        serializer.attribute(null, TIME_ATTR, Long.toString(event.getTimeStamp()));
-        serializer.endTag(null, EVENT_LOG_TAG);
+
+        if (statsOut.events == null) {
+            statsOut.events = new TimeSparseArray<>();
+        }
+        statsOut.events.put(event.mTimeStamp, event);
+    }
+
+    private static void writeUsageStats(XmlSerializer xml, final IntervalStats stats,
+            final UsageStats usageStats) throws IOException {
+        xml.startTag(null, PACKAGE_TAG);
+
+        // Write the time offset.
+        XmlUtils.writeLongAttribute(xml, LAST_TIME_ACTIVE_ATTR,
+                usageStats.mLastTimeUsed - stats.beginTime);
+
+        XmlUtils.writeStringAttribute(xml, PACKAGE_ATTR, usageStats.mPackageName);
+        XmlUtils.writeLongAttribute(xml, TOTAL_TIME_ACTIVE_ATTR, usageStats.mTotalTimeInForeground);
+        XmlUtils.writeIntAttribute(xml, LAST_EVENT_ATTR, usageStats.mLastEvent);
+
+        xml.endTag(null, PACKAGE_TAG);
+    }
+
+    private static void writeConfigStats(XmlSerializer xml, final IntervalStats stats,
+            final ConfigurationStats configStats, boolean isActive) throws IOException {
+        xml.startTag(null, CONFIG_TAG);
+
+        // Write the time offset.
+        XmlUtils.writeLongAttribute(xml, LAST_TIME_ACTIVE_ATTR,
+                configStats.mLastTimeActive - stats.beginTime);
+
+        XmlUtils.writeLongAttribute(xml, TOTAL_TIME_ACTIVE_ATTR, configStats.mTotalTimeActive);
+        XmlUtils.writeIntAttribute(xml, COUNT_ATTR, configStats.mActivationCount);
+        if (isActive) {
+            XmlUtils.writeBooleanAttribute(xml, ACTIVE_ATTR, true);
+        }
+
+        // Now write the attributes representing the configuration object.
+        Configuration.writeXmlAttrs(xml, configStats.mConfiguration);
+
+        xml.endTag(null, CONFIG_TAG);
+    }
+
+    private static void writeEvent(XmlSerializer xml, final IntervalStats stats,
+            final UsageEvents.Event event) throws IOException {
+        xml.startTag(null, EVENT_TAG);
+
+        // Store the time offset.
+        XmlUtils.writeLongAttribute(xml, TIME_ATTR, event.mTimeStamp - stats.beginTime);
+
+        XmlUtils.writeStringAttribute(xml, PACKAGE_ATTR, event.mPackage);
+        if (event.mClass != null) {
+            XmlUtils.writeStringAttribute(xml, CLASS_ATTR, event.mClass);
+        }
+        XmlUtils.writeIntAttribute(xml, TYPE_ATTR, event.mEventType);
+
+        if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE
+                && event.mConfiguration != null) {
+            Configuration.writeXmlAttrs(xml, event.mConfiguration);
+        }
+
+        xml.endTag(null, EVENT_TAG);
     }
 
     /**
@@ -141,55 +183,74 @@
      */
     public static void read(XmlPullParser parser, IntervalStats statsOut)
             throws XmlPullParserException, IOException {
-        statsOut.stats.clear();
+        statsOut.packageStats.clear();
+        statsOut.configurations.clear();
+        statsOut.activeConfiguration = null;
 
         if (statsOut.events != null) {
             statsOut.events.clear();
         }
 
-        statsOut.beginTime = XmlUtils.readLongAttribute(parser, BEGIN_TIME_ATTR);
         statsOut.endTime = XmlUtils.readLongAttribute(parser, END_TIME_ATTR);
-        XmlUtils.nextElement(parser);
 
-        UsageStats pkgStats;
-        while ((pkgStats = readNextUsageStats(parser)) != null) {
-            pkgStats.mBeginTimeStamp = statsOut.beginTime;
-            pkgStats.mEndTimeStamp = statsOut.endTime;
-            statsOut.stats.put(pkgStats.mPackageName, pkgStats);
-        }
-
-        UsageEvents.Event event;
-        while ((event = readNextEvent(parser, statsOut)) != null) {
-            if (statsOut.events == null) {
-                statsOut.events = new TimeSparseArray<>();
+        int eventCode;
+        int outerDepth = parser.getDepth();
+        while ((eventCode = parser.next()) != XmlPullParser.END_DOCUMENT
+                && (eventCode != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+            if (eventCode != XmlPullParser.START_TAG) {
+                continue;
             }
-            statsOut.events.put(event.getTimeStamp(), event);
+
+            final String tag = parser.getName();
+            switch (tag) {
+                case PACKAGE_TAG:
+                    loadUsageStats(parser, statsOut);
+                    break;
+
+                case CONFIG_TAG:
+                    loadConfigStats(parser, statsOut);
+                    break;
+
+                case EVENT_TAG:
+                    loadEvent(parser, statsOut);
+                    break;
+            }
         }
     }
 
     /**
-     * Writes the stats object to an XML file. The {@link FastXmlSerializer}
+     * Writes the stats object to an XML file. The {@link XmlSerializer}
      * has already written the <code><usagestats></code> tag, but attributes may still
      * be added.
      *
-     * @param serializer The serializer to which to write the stats data.
+     * @param xml The serializer to which to write the packageStats data.
      * @param stats The stats object to write to the XML file.
      */
-    public static void write(FastXmlSerializer serializer, IntervalStats stats) throws IOException {
-        serializer.attribute(null, BEGIN_TIME_ATTR, Long.toString(stats.beginTime));
-        serializer.attribute(null, END_TIME_ATTR, Long.toString(stats.endTime));
+    public static void write(XmlSerializer xml, IntervalStats stats) throws IOException {
+        XmlUtils.writeLongAttribute(xml, END_TIME_ATTR, stats.endTime - stats.beginTime);
 
-        final int statsCount = stats.stats.size();
+        xml.startTag(null, PACKAGES_TAG);
+        final int statsCount = stats.packageStats.size();
         for (int i = 0; i < statsCount; i++) {
-            writeUsageStats(serializer, stats.stats.valueAt(i));
+            writeUsageStats(xml, stats, stats.packageStats.valueAt(i));
         }
+        xml.endTag(null, PACKAGES_TAG);
 
-        if (stats.events != null) {
-            final int eventCount = stats.events.size();
-            for (int i = 0; i < eventCount; i++) {
-                writeEvent(serializer, stats.events.valueAt(i));
-            }
+
+        xml.startTag(null, CONFIGURATIONS_TAG);
+        final int configCount = stats.configurations.size();
+        for (int i = 0; i < configCount; i++) {
+            boolean active = stats.activeConfiguration.equals(stats.configurations.keyAt(i));
+            writeConfigStats(xml, stats, stats.configurations.valueAt(i), active);
         }
+        xml.endTag(null, CONFIGURATIONS_TAG);
+
+        xml.startTag(null, EVENT_LOG_TAG);
+        final int eventCount = stats.events != null ? stats.events.size() : 0;
+        for (int i = 0; i < eventCount; i++) {
+            writeEvent(xml, stats, stats.events.valueAt(i));
+        }
+        xml.endTag(null, EVENT_LOG_TAG);
     }
 
     private UsageStatsXmlV1() {
diff --git a/services/usage/java/com/android/server/usage/UserUsageStatsService.java b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
index 6951590..2769666 100644
--- a/services/usage/java/com/android/server/usage/UserUsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UserUsageStatsService.java
@@ -16,19 +16,22 @@
 
 package com.android.server.usage;
 
+import android.app.usage.ConfigurationStats;
 import android.app.usage.TimeSparseArray;
 import android.app.usage.UsageEvents;
 import android.app.usage.UsageStats;
 import android.app.usage.UsageStatsManager;
+import android.content.res.Configuration;
 import android.util.ArraySet;
 import android.util.Slog;
 
+import com.android.server.usage.UsageStatsDatabase.StatCombiner;
+
 import java.io.File;
 import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Calendar;
 import java.util.List;
 
 /**
@@ -43,7 +46,7 @@
     private final UsageStatsDatabase mDatabase;
     private final IntervalStats[] mCurrentStats;
     private boolean mStatsChanged = false;
-    private final Calendar mDailyExpiryDate;
+    private final UnixCalendar mDailyExpiryDate;
     private final StatsUpdatedListener mListener;
     private final String mLogPrefix;
 
@@ -52,7 +55,7 @@
     }
 
     UserUsageStatsService(int userId, File usageStatsDir, StatsUpdatedListener listener) {
-        mDailyExpiryDate = Calendar.getInstance();
+        mDailyExpiryDate = new UnixCalendar(0);
         mDatabase = new UsageStatsDatabase(usageStatsDir);
         mCurrentStats = new IntervalStats[UsageStatsManager.INTERVAL_COUNT];
         mListener = listener;
@@ -62,6 +65,7 @@
     void init() {
         mDatabase.init();
 
+        final long timeNow = System.currentTimeMillis();
         int nullCount = 0;
         for (int i = 0; i < mCurrentStats.length; i++) {
             mCurrentStats[i] = mDatabase.getLatestUsageStats(i);
@@ -69,6 +73,11 @@
                 // Find out how many intervals we don't have data for.
                 // Ideally it should be all or none.
                 nullCount++;
+            } else if (mCurrentStats[i].beginTime > timeNow) {
+                Slog.e(TAG, mLogPrefix + "Interval " + i + " has stat in the future " +
+                        mCurrentStats[i].beginTime);
+                mCurrentStats[i] = null;
+                nullCount++;
             }
         }
 
@@ -90,17 +99,18 @@
             // that is reported.
             mDailyExpiryDate.setTimeInMillis(
                     mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime);
-            mDailyExpiryDate.add(Calendar.DAY_OF_YEAR, 1);
-            UsageStatsUtils.truncateDateTo(UsageStatsManager.INTERVAL_DAILY, mDailyExpiryDate);
-            Slog.i(TAG, mLogPrefix + "Rollover scheduled for "
-                    + sDateFormat.format(mDailyExpiryDate.getTime()));
+            mDailyExpiryDate.addDays(1);
+            mDailyExpiryDate.truncateToDay();
+            Slog.i(TAG, mLogPrefix + "Rollover scheduled @ " +
+                    sDateFormat.format(mDailyExpiryDate.getTimeInMillis()) +
+                    "(" + mDailyExpiryDate.getTimeInMillis() + ")");
         }
 
         // Now close off any events that were open at the time this was saved.
         for (IntervalStats stat : mCurrentStats) {
-            final int pkgCount = stat.stats.size();
+            final int pkgCount = stat.packageStats.size();
             for (int i = 0; i < pkgCount; i++) {
-                UsageStats pkgStats = stat.stats.valueAt(i);
+                UsageStats pkgStats = stat.packageStats.valueAt(i);
                 if (pkgStats.mLastEvent == UsageEvents.Event.MOVE_TO_FOREGROUND ||
                         pkgStats.mLastEvent == UsageEvents.Event.CONTINUE_PREVIOUS_DAY) {
                     stat.update(pkgStats.mPackageName, stat.lastTimeSaved,
@@ -108,121 +118,202 @@
                     notifyStatsChanged();
                 }
             }
+
+            stat.updateConfigurationStats(null, stat.lastTimeSaved);
         }
     }
 
     void reportEvent(UsageEvents.Event event) {
         if (DEBUG) {
             Slog.d(TAG, mLogPrefix + "Got usage event for " + event.mPackage
-                    + "[" + event.getTimeStamp() + "]: "
-                    + eventToString(event.getEventType()));
+                    + "[" + event.mTimeStamp + "]: "
+                    + eventToString(event.mEventType));
         }
 
-        if (event.getTimeStamp() >= mDailyExpiryDate.getTimeInMillis()) {
+        if (event.mTimeStamp >= mDailyExpiryDate.getTimeInMillis()) {
             // Need to rollover
             rolloverStats();
         }
 
-        if (mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events == null) {
-            mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events = new TimeSparseArray<>();
+        final IntervalStats currentDailyStats = mCurrentStats[UsageStatsManager.INTERVAL_DAILY];
+
+        final Configuration newFullConfig = event.mConfiguration;
+        if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE &&
+                currentDailyStats.activeConfiguration != null) {
+            // Make the event configuration a delta.
+            event.mConfiguration = Configuration.generateDelta(
+                    currentDailyStats.activeConfiguration, newFullConfig);
         }
-        mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events.put(event.getTimeStamp(), event);
+
+        // Add the event to the daily list.
+        if (currentDailyStats.events == null) {
+            currentDailyStats.events = new TimeSparseArray<>();
+        }
+        currentDailyStats.events.put(event.mTimeStamp, event);
 
         for (IntervalStats stats : mCurrentStats) {
-            stats.update(event.mPackage, event.getTimeStamp(),
-                    event.getEventType());
+            if (event.mEventType == UsageEvents.Event.CONFIGURATION_CHANGE) {
+                stats.updateConfigurationStats(newFullConfig, event.mTimeStamp);
+            } else {
+                stats.update(event.mPackage, event.mTimeStamp, event.mEventType);
+            }
         }
 
         notifyStatsChanged();
     }
 
-    List<UsageStats> queryUsageStats(int bucketType, long beginTime, long endTime) {
-        if (bucketType == UsageStatsManager.INTERVAL_BEST) {
-            bucketType = mDatabase.findBestFitBucket(beginTime, endTime);
+    private static final StatCombiner<UsageStats> sUsageStatsCombiner =
+            new StatCombiner<UsageStats>() {
+                @Override
+                public void combine(IntervalStats stats, boolean mutable,
+                        List<UsageStats> accResult) {
+                    if (!mutable) {
+                        accResult.addAll(stats.packageStats.values());
+                        return;
+                    }
+
+                    final int statCount = stats.packageStats.size();
+                    for (int i = 0; i < statCount; i++) {
+                        accResult.add(new UsageStats(stats.packageStats.valueAt(i)));
+                    }
+                }
+            };
+
+    private static final StatCombiner<ConfigurationStats> sConfigStatsCombiner =
+            new StatCombiner<ConfigurationStats>() {
+                @Override
+                public void combine(IntervalStats stats, boolean mutable,
+                        List<ConfigurationStats> accResult) {
+                    if (!mutable) {
+                        accResult.addAll(stats.configurations.values());
+                        return;
+                    }
+
+                    final int configCount = stats.configurations.size();
+                    for (int i = 0; i < configCount; i++) {
+                        accResult.add(new ConfigurationStats(stats.configurations.valueAt(i)));
+                    }
+                }
+            };
+
+    /**
+     * Generic query method that selects the appropriate IntervalStats for the specified time range
+     * and bucket, then calls the {@link com.android.server.usage.UsageStatsDatabase.StatCombiner}
+     * provided to select the stats to use from the IntervalStats object.
+     */
+    private <T> List<T> queryStats(int intervalType, final long beginTime, final long endTime,
+            StatCombiner<T> combiner) {
+        if (intervalType == UsageStatsManager.INTERVAL_BEST) {
+            intervalType = mDatabase.findBestFitBucket(beginTime, endTime);
+            if (intervalType < 0) {
+                // Nothing saved to disk yet, so every stat is just as equal (no rollover has
+                // occurred.
+                intervalType = UsageStatsManager.INTERVAL_DAILY;
+            }
         }
 
-        if (bucketType < 0 || bucketType >= mCurrentStats.length) {
+        if (intervalType < 0 || intervalType >= mCurrentStats.length) {
             if (DEBUG) {
-                Slog.d(TAG, mLogPrefix + "Bad bucketType used " + bucketType);
+                Slog.d(TAG, mLogPrefix + "Bad intervalType used " + intervalType);
             }
             return null;
         }
 
-        if (beginTime >= mCurrentStats[bucketType].endTime) {
-            if (DEBUG) {
-                Slog.d(TAG, mLogPrefix + "Requesting stats after " + beginTime + " but latest is "
-                        + mCurrentStats[bucketType].endTime);
-            }
-            // Nothing newer available.
-            return null;
-
-        } else if (beginTime >= mCurrentStats[bucketType].beginTime) {
-            if (DEBUG) {
-                Slog.d(TAG, mLogPrefix + "Returning in-memory stats for bucket " + bucketType);
-            }
-            // Fast path for retrieving in-memory state.
-            ArrayList<UsageStats> results = new ArrayList<>();
-            final int packageCount = mCurrentStats[bucketType].stats.size();
-            for (int i = 0; i < packageCount; i++) {
-                results.add(new UsageStats(mCurrentStats[bucketType].stats.valueAt(i)));
-            }
-            return results;
-        }
-
-        // Flush any changes that were made to disk before we do a disk query.
-        // If we're not grabbing the ongoing stats, no need to persist.
-        persistActiveStats();
+        final IntervalStats currentStats = mCurrentStats[intervalType];
 
         if (DEBUG) {
-            Slog.d(TAG, mLogPrefix + "SELECT * FROM " + bucketType + " WHERE beginTime >= "
+            Slog.d(TAG, mLogPrefix + "SELECT * FROM " + intervalType + " WHERE beginTime >= "
                     + beginTime + " AND endTime < " + endTime);
         }
 
-        final List<UsageStats> results = mDatabase.queryUsageStats(bucketType, beginTime, endTime);
+        if (beginTime >= currentStats.endTime) {
+            if (DEBUG) {
+                Slog.d(TAG, mLogPrefix + "Requesting stats after " + beginTime + " but latest is "
+                        + currentStats.endTime);
+            }
+            // Nothing newer available.
+            return null;
+        }
+
+        // Truncate the endTime to just before the in-memory stats. Then, we'll append the
+        // in-memory stats to the results (if necessary) so as to avoid writing to disk too
+        // often.
+        final long truncatedEndTime = Math.min(currentStats.beginTime, endTime);
+
+        // Get the stats from disk.
+        List<T> results = mDatabase.queryUsageStats(intervalType, beginTime,
+                truncatedEndTime, combiner);
         if (DEBUG) {
-            Slog.d(TAG, mLogPrefix + "Results: " + (results == null ? 0 : results.size()));
+            Slog.d(TAG, "Got " + (results != null ? results.size() : 0) + " results from disk");
+            Slog.d(TAG, "Current stats beginTime=" + currentStats.beginTime +
+                    " endTime=" + currentStats.endTime);
+        }
+
+        // Now check if the in-memory stats match the range and add them if they do.
+        if (beginTime < currentStats.endTime && endTime > currentStats.beginTime) {
+            if (DEBUG) {
+                Slog.d(TAG, mLogPrefix + "Returning in-memory stats");
+            }
+
+            if (results == null) {
+                results = new ArrayList<>();
+            }
+            combiner.combine(currentStats, true, results);
+        }
+
+        if (DEBUG) {
+            Slog.d(TAG, mLogPrefix + "Results: " + (results != null ? results.size() : 0));
         }
         return results;
     }
 
-    UsageEvents queryEvents(long beginTime, long endTime) {
-        if (endTime > mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime) {
-            if (beginTime > mCurrentStats[UsageStatsManager.INTERVAL_DAILY].endTime) {
-                return null;
-            }
+    List<UsageStats> queryUsageStats(int bucketType, long beginTime, long endTime) {
+        return queryStats(bucketType, beginTime, endTime, sUsageStatsCombiner);
+    }
 
-            TimeSparseArray<UsageEvents.Event> events =
-                    mCurrentStats[UsageStatsManager.INTERVAL_DAILY].events;
-            if (events == null) {
-                return null;
-            }
+    List<ConfigurationStats> queryConfigurationStats(int bucketType, long beginTime, long endTime) {
+        return queryStats(bucketType, beginTime, endTime, sConfigStatsCombiner);
+    }
 
-            final int startIndex = events.closestIndexOnOrAfter(beginTime);
-            if (startIndex < 0) {
-                return null;
-            }
+    UsageEvents queryEvents(final long beginTime, final long endTime) {
+        final ArraySet<String> names = new ArraySet<>();
+        List<UsageEvents.Event> results = queryStats(UsageStatsManager.INTERVAL_DAILY,
+                beginTime, endTime, new StatCombiner<UsageEvents.Event>() {
+                    @Override
+                    public void combine(IntervalStats stats, boolean mutable,
+                            List<UsageEvents.Event> accumulatedResult) {
+                        if (stats.events == null) {
+                            return;
+                        }
 
-            ArraySet<String> names = new ArraySet<>();
-            ArrayList<UsageEvents.Event> results = new ArrayList<>();
-            final int size = events.size();
-            for (int i = startIndex; i < size; i++) {
-                if (events.keyAt(i) >= endTime) {
-                    break;
-                }
-                final UsageEvents.Event event = events.valueAt(i);
-                names.add(event.mPackage);
-                if (event.mClass != null) {
-                    names.add(event.mClass);
-                }
-                results.add(event);
-            }
-            String[] table = names.toArray(new String[names.size()]);
-            Arrays.sort(table);
-            return new UsageEvents(results, table);
+                        final int startIndex = stats.events.closestIndexOnOrAfter(beginTime);
+                        if (startIndex < 0) {
+                            return;
+                        }
+
+                        final int size = stats.events.size();
+                        for (int i = startIndex; i < size; i++) {
+                            if (stats.events.keyAt(i) >= endTime) {
+                                return;
+                            }
+
+                            final UsageEvents.Event event = stats.events.valueAt(i);
+                            names.add(event.mPackage);
+                            if (event.mClass != null) {
+                                names.add(event.mClass);
+                            }
+                            accumulatedResult.add(event);
+                        }
+                    }
+                });
+
+        if (results == null || results.isEmpty()) {
+            return null;
         }
 
-        // TODO(adamlesinski): Query the previous days.
-        return null;
+        String[] table = names.toArray(new String[names.size()]);
+        Arrays.sort(table);
+        return new UsageEvents(results, table);
     }
 
     void persistActiveStats() {
@@ -245,19 +336,23 @@
 
         // Finish any ongoing events with an END_OF_DAY event. Make a note of which components
         // need a new CONTINUE_PREVIOUS_DAY entry.
+        final Configuration previousConfig =
+                mCurrentStats[UsageStatsManager.INTERVAL_DAILY].activeConfiguration;
         ArraySet<String> continuePreviousDay = new ArraySet<>();
         for (IntervalStats stat : mCurrentStats) {
-            final int pkgCount = stat.stats.size();
+            final int pkgCount = stat.packageStats.size();
             for (int i = 0; i < pkgCount; i++) {
-                UsageStats pkgStats = stat.stats.valueAt(i);
+                UsageStats pkgStats = stat.packageStats.valueAt(i);
                 if (pkgStats.mLastEvent == UsageEvents.Event.MOVE_TO_FOREGROUND ||
                         pkgStats.mLastEvent == UsageEvents.Event.CONTINUE_PREVIOUS_DAY) {
                     continuePreviousDay.add(pkgStats.mPackageName);
-                    stat.update(pkgStats.mPackageName,
-                            mDailyExpiryDate.getTimeInMillis() - 1, UsageEvents.Event.END_OF_DAY);
+                    stat.update(pkgStats.mPackageName, mDailyExpiryDate.getTimeInMillis() - 1,
+                            UsageEvents.Event.END_OF_DAY);
                     mStatsChanged = true;
                 }
             }
+
+            stat.updateConfigurationStats(null, mDailyExpiryDate.getTimeInMillis() - 1);
         }
 
         persistActiveStats();
@@ -267,9 +362,10 @@
         final int continueCount = continuePreviousDay.size();
         for (int i = 0; i < continueCount; i++) {
             String name = continuePreviousDay.valueAt(i);
+            final long beginTime = mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime;
             for (IntervalStats stat : mCurrentStats) {
-                stat.update(name, mCurrentStats[UsageStatsManager.INTERVAL_DAILY].beginTime,
-                        UsageEvents.Event.CONTINUE_PREVIOUS_DAY);
+                stat.update(name, beginTime, UsageEvents.Event.CONTINUE_PREVIOUS_DAY);
+                stat.updateConfigurationStats(previousConfig, beginTime);
                 mStatsChanged = true;
             }
         }
@@ -290,54 +386,53 @@
     private void loadActiveStats() {
         final long timeNow = System.currentTimeMillis();
 
-        Calendar tempCal = mDailyExpiryDate;
-        for (int bucketType = 0; bucketType < mCurrentStats.length; bucketType++) {
+        final UnixCalendar tempCal = mDailyExpiryDate;
+        for (int intervalType = 0; intervalType < mCurrentStats.length; intervalType++) {
             tempCal.setTimeInMillis(timeNow);
-            UsageStatsUtils.truncateDateTo(bucketType, tempCal);
+            UnixCalendar.truncateTo(tempCal, intervalType);
 
-            if (mCurrentStats[bucketType] != null &&
-                    mCurrentStats[bucketType].beginTime == tempCal.getTimeInMillis()) {
+            if (mCurrentStats[intervalType] != null &&
+                    mCurrentStats[intervalType].beginTime == tempCal.getTimeInMillis()) {
                 // These are the same, no need to load them (in memory stats are always newer
                 // than persisted stats).
                 continue;
             }
 
-            final long lastBeginTime = mDatabase.getLatestUsageStatsBeginTime(bucketType);
-            if (lastBeginTime >= tempCal.getTimeInMillis()) {
+            final long lastBeginTime = mDatabase.getLatestUsageStatsBeginTime(intervalType);
+            if (lastBeginTime > timeNow) {
+                Slog.e(TAG, mLogPrefix + "Latest usage stats for interval " +
+                        intervalType + " begins in the future");
+                mCurrentStats[intervalType] = null;
+            } else if (lastBeginTime >= tempCal.getTimeInMillis()) {
                 if (DEBUG) {
-                    Slog.d(TAG, mLogPrefix + "Loading existing stats (" + lastBeginTime +
-                            ") for bucket " + bucketType);
+                    Slog.d(TAG, mLogPrefix + "Loading existing stats @ " +
+                            sDateFormat.format(lastBeginTime) + "(" + lastBeginTime +
+                            ") for interval " + intervalType);
                 }
-                mCurrentStats[bucketType] = mDatabase.getLatestUsageStats(bucketType);
-                if (DEBUG) {
-                    if (mCurrentStats[bucketType] != null) {
-                        Slog.d(TAG, mLogPrefix + "Found " +
-                                (mCurrentStats[bucketType].events == null ?
-                                        0 : mCurrentStats[bucketType].events.size()) +
-                                " events");
-                    }
-                }
+                mCurrentStats[intervalType] = mDatabase.getLatestUsageStats(intervalType);
             } else {
-                mCurrentStats[bucketType] = null;
+                mCurrentStats[intervalType] = null;
             }
 
-            if (mCurrentStats[bucketType] == null) {
+            if (mCurrentStats[intervalType] == null) {
                 if (DEBUG) {
-                    Slog.d(TAG, "Creating new stats (" + tempCal.getTimeInMillis() +
-                            ") for bucket " + bucketType);
+                    Slog.d(TAG, "Creating new stats @ " +
+                            sDateFormat.format(tempCal.getTimeInMillis()) + "(" +
+                            tempCal.getTimeInMillis() + ") for interval " + intervalType);
 
                 }
-                mCurrentStats[bucketType] = new IntervalStats();
-                mCurrentStats[bucketType].beginTime = tempCal.getTimeInMillis();
-                mCurrentStats[bucketType].endTime = timeNow;
+                mCurrentStats[intervalType] = new IntervalStats();
+                mCurrentStats[intervalType].beginTime = tempCal.getTimeInMillis();
+                mCurrentStats[intervalType].endTime = timeNow;
             }
         }
         mStatsChanged = false;
         mDailyExpiryDate.setTimeInMillis(timeNow);
-        mDailyExpiryDate.add(Calendar.DAY_OF_YEAR, 1);
-        UsageStatsUtils.truncateDateTo(UsageStatsManager.INTERVAL_DAILY, mDailyExpiryDate);
-        Slog.i(TAG, mLogPrefix + "Rollover scheduled for "
-                + sDateFormat.format(mDailyExpiryDate.getTime()));
+        mDailyExpiryDate.addDays(1);
+        mDailyExpiryDate.truncateToDay();
+        Slog.i(TAG, mLogPrefix + "Rollover scheduled @ " +
+                sDateFormat.format(mDailyExpiryDate.getTimeInMillis()) + "(" +
+                tempCal.getTimeInMillis() + ")");
     }
 
 
@@ -353,6 +448,8 @@
                 return "END_OF_DAY";
             case UsageEvents.Event.CONTINUE_PREVIOUS_DAY:
                 return "CONTINUE_PREVIOUS_DAY";
+            case UsageEvents.Event.CONFIGURATION_CHANGE:
+                return "CONFIGURATION_CHANGE";
             default:
                 return "UNKNOWN";
         }
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index c078cb2..c63eb18 100644
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -30,6 +30,7 @@
 import android.database.ContentObserver;
 import android.hardware.usb.UsbAccessory;
 import android.hardware.usb.UsbManager;
+import android.media.AudioManager;
 import android.os.FileUtils;
 import android.os.Handler;
 import android.os.Looper;
@@ -587,7 +588,7 @@
                     UsbManager.USB_FUNCTION_AUDIO_SOURCE);
             if (enabled != mAudioSourceEnabled) {
                 // send a sticky broadcast containing current USB state
-                Intent intent = new Intent(Intent.ACTION_USB_AUDIO_ACCESSORY_PLUG);
+                Intent intent = new Intent(AudioManager.ACTION_USB_AUDIO_ACCESSORY_PLUG);
                 intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
                 intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                 intent.putExtra("state", (enabled ? 1 : 0));
diff --git a/services/usb/java/com/android/server/usb/UsbHostManager.java b/services/usb/java/com/android/server/usb/UsbHostManager.java
index 5860fc7..06febb3 100644
--- a/services/usb/java/com/android/server/usb/UsbHostManager.java
+++ b/services/usb/java/com/android/server/usb/UsbHostManager.java
@@ -25,6 +25,7 @@
 import android.hardware.usb.UsbDevice;
 import android.hardware.usb.UsbEndpoint;
 import android.hardware.usb.UsbInterface;
+import android.media.AudioManager;
 import android.os.Bundle;
 import android.os.ParcelFileDescriptor;
 import android.os.Parcelable;
@@ -124,7 +125,7 @@
     private void sendDeviceNotification(int card, int device, boolean enabled,
             boolean hasPlayback, boolean hasCapture, boolean hasMIDI) {
         // send a sticky broadcast containing current USB state
-        Intent intent = new Intent(Intent.ACTION_USB_AUDIO_DEVICE_PLUG);
+        Intent intent = new Intent(AudioManager.ACTION_USB_AUDIO_DEVICE_PLUG);
         intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
         intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
         intent.putExtra("state", enabled ? 1 : 0);
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java
index 376230b..ad38b22 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/SoundTriggerHelper.java
@@ -67,7 +67,7 @@
     final ModuleProperties moduleProperties;
 
     /** The properties for the DSP module */
-    private final SoundTriggerModule mModule;
+    private SoundTriggerModule mModule;
     private final Object mLock = new Object();
     private final Context mContext;
     private final TelephonyManager mTelephonyManager;
@@ -105,7 +105,6 @@
         } else {
             // TODO: Figure out how to determine which module corresponds to the DSP hardware.
             moduleProperties = modules.get(0);
-            mModule = SoundTrigger.attachModule(moduleProperties.id, this, null);
         }
     }
 
@@ -155,10 +154,17 @@
                 mIsPowerSaveMode = mPowerManager.isPowerSaveMode();
             }
 
-            if (moduleProperties == null || mModule == null) {
+            if (moduleProperties == null) {
                 Slog.w(TAG, "Attempting startRecognition without the capability");
                 return STATUS_ERROR;
             }
+            if (mModule == null) {
+                mModule = SoundTrigger.attachModule(moduleProperties.id, this, null);
+                if (mModule == null) {
+                    Slog.w(TAG, "startRecognition cannot attach to sound trigger module");
+                    return STATUS_ERROR;
+                }
+            }
 
             if (mCurrentSoundModelHandle != INVALID_VALUE
                     && !soundModel.uuid.equals(mCurrentSoundModelUuid)) {
@@ -446,6 +452,10 @@
             Slog.w(TAG, "RemoteException in onError", e);
         } finally {
             internalClearStateLocked();
+            if (mModule != null) {
+                mModule.detach();
+                mModule = null;
+            }
         }
     }
 
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index 45fa923..7c7b732 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -39,6 +39,7 @@
 import android.os.IBinder;
 import android.os.Parcel;
 import android.os.RemoteException;
+import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.service.voice.IVoiceInteractionService;
@@ -412,6 +413,9 @@
                 final int callingPid = Binder.getCallingPid();
                 final int callingUid = Binder.getCallingUid();
                 final long caller = Binder.clearCallingIdentity();
+                if (!SystemProperties.getBoolean("persist.test.voice_interaction", false)) {
+                    throw new SecurityException("Voice interaction not supported");
+                }
                 try {
                     return mImpl.startVoiceActivityLocked(callingPid, callingUid, token,
                             intent, resolvedType);
diff --git a/telecomm/java/android/telecomm/AudioState.java b/telecomm/java/android/telecomm/AudioState.java
index a5fda79..314704b 100644
--- a/telecomm/java/android/telecomm/AudioState.java
+++ b/telecomm/java/android/telecomm/AudioState.java
@@ -34,7 +34,7 @@
     /** Direct the audio stream through a wired headset. */
     public static final int ROUTE_WIRED_HEADSET = 0x00000004;
 
-    /** Direct the audio stream through the device's spakerphone. */
+    /** Direct the audio stream through the device's speakerphone. */
     public static final int ROUTE_SPEAKER       = 0x00000008;
 
     /**
@@ -43,7 +43,10 @@
      */
     public static final int ROUTE_WIRED_OR_EARPIECE = ROUTE_EARPIECE | ROUTE_WIRED_HEADSET;
 
-    /** Bit mask of all possible audio routes. */
+    /** Bit mask of all possible audio routes.
+     *
+     * @hide
+     */
     public static final int ROUTE_ALL = ROUTE_EARPIECE | ROUTE_BLUETOOTH | ROUTE_WIRED_HEADSET |
             ROUTE_SPEAKER;
 
diff --git a/telecomm/java/android/telecomm/Call.java b/telecomm/java/android/telecomm/Call.java
index 7c596c1..c3aa2a0 100644
--- a/telecomm/java/android/telecomm/Call.java
+++ b/telecomm/java/android/telecomm/Call.java
@@ -347,14 +347,6 @@
         public void onVideoCallChanged(Call call, InCallService.VideoCall videoCall) {}
 
         /**
-         * Launches an activity for this connection on top of the in-call UI.
-         *
-         * @param call The {@code Call} invoking this method.
-         * @param intent The intent to use to start the activity.
-         */
-        public void onStartActivity(Call call, PendingIntent intent) {}
-
-        /**
          * Invoked when the {@code Call} is destroyed. Clients should refrain from cleaning
          * up their UI for the {@code Call} in response to state transitions. Specifically,
          * clients should not assume that a {@link #onStateChanged(Call, int)} with a state of
@@ -525,6 +517,20 @@
     }
 
     /**
+     * Merges the calls within this conference. See {@link PhoneCapabilities#MERGE_CONFERENCE}.
+     */
+    public void mergeConference() {
+        mInCallAdapter.mergeConference(mTelecommCallId);
+    }
+
+    /**
+     * Swaps the calls within this conference. See {@link PhoneCapabilities#SWAP_CONFERENCE}.
+     */
+    public void swapConference() {
+        mInCallAdapter.swapConference(mTelecommCallId);
+    }
+
+    /**
      * 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
@@ -753,11 +759,6 @@
     }
 
     /** {@hide} */
-    final void internalStartActivity(PendingIntent intent) {
-        fireStartActivity(intent);
-    }
-
-    /** {@hide} */
     final void internalSetDisconnected() {
         if (mState != Call.STATE_DISCONNECTED) {
             mState = Call.STATE_DISCONNECTED;
@@ -809,12 +810,6 @@
         }
     }
 
-    private void fireStartActivity(PendingIntent intent) {
-        for (Listener listener : mListeners) {
-            listener.onStartActivity(this, intent);
-        }
-    }
-
     private void fireCallDestroyed() {
         for (Listener listener : mListeners) {
             listener.onCallDestroyed(this);
diff --git a/telecomm/java/android/telecomm/Conference.java b/telecomm/java/android/telecomm/Conference.java
index 879ff66..a4f9c2c 100644
--- a/telecomm/java/android/telecomm/Conference.java
+++ b/telecomm/java/android/telecomm/Conference.java
@@ -50,22 +50,47 @@
     private int mCapabilities;
     private String mDisconnectMessage;
 
+    /**
+     * Constructs a new Conference with a mandatory {@link PhoneAccountHandle}
+     *
+     * @param phoneAccount The {@code PhoneAccountHandle} associated with the conference.
+     */
     public Conference(PhoneAccountHandle phoneAccount) {
         mPhoneAccount = phoneAccount;
     }
 
-    public final PhoneAccountHandle getPhoneAccount() {
+    /**
+     * Returns the {@link PhoneAccountHandle} the conference call is being placed through.
+     *
+     * @return A {@code PhoneAccountHandle} object representing the PhoneAccount of the conference.
+     */
+    public final PhoneAccountHandle getPhoneAccountHandle() {
         return mPhoneAccount;
     }
 
+    /**
+     * Returns the list of connections currently associated with the conference call.
+     *
+     * @return A list of {@code Connection} objects which represent the children of the conference.
+     */
     public final List<Connection> getConnections() {
         return mUnmodifiableChildConnections;
     }
 
+    /**
+     * Gets the state of the conference call. See {@link Connection} for valid values.
+     *
+     * @return A constant representing the state the conference call is currently in.
+     */
     public final int getState() {
         return mState;
     }
 
+    /**
+     * Returns the capabilities of a conference. See {@link PhoneCapabilities} for valid values.
+     *
+     * @return A bitmask of the {@code PhoneCapabilities} of the conference call.
+     */
     public final int getCapabilities() {
         return mCapabilities;
     }
@@ -93,6 +118,18 @@
     public void onUnhold() {}
 
     /**
+     * Invoked when the child calls should be merged. Only invoked if the conference contains the
+     * capability {@link PhoneCapabilities#MERGE_CONFERENCE}.
+     */
+    public void onMerge() {}
+
+    /**
+     * Invoked when the child calls should be swapped. Only invoked if the conference contains the
+     * capability {@link PhoneCapabilities#SWAP_CONFERENCE}.
+     */
+    public void onSwap() {}
+
+    /**
      * Sets state to be on hold.
      */
     public final void setOnHold() {
@@ -123,7 +160,9 @@
     }
 
     /**
-     * Sets the capabilities of a conference.
+     * Sets the capabilities of a conference. See {@link PhoneCapabilities} for valid values.
+     *
+     * @param capabilities A bitmask of the {@code PhoneCapabilities} of the conference call.
      */
     public final void setCapabilities(int capabilities) {
         if (capabilities != mCapabilities) {
@@ -141,7 +180,7 @@
      * @param connection The connection to add.
      * @return True if the connection was successfully added.
      */
-    public boolean addConnection(Connection connection) {
+    public final boolean addConnection(Connection connection) {
         if (connection != null && !mChildConnections.contains(connection)) {
             if (connection.setConference(this)) {
                 mChildConnections.add(connection);
@@ -158,9 +197,8 @@
      * Removes the specified connection as a child of this conference.
      *
      * @param connection The connection to remove.
-     * @return True if the connection was successfully removed.
      */
-    public void removeConnection(Connection connection) {
+    public final void removeConnection(Connection connection) {
         Log.d(this, "removing %s from %s", connection, mChildConnections);
         if (connection != null && mChildConnections.remove(connection)) {
             connection.resetConference();
@@ -171,9 +209,9 @@
     }
 
     /**
-     * Tears down the conference object and any of it's current connections.
+     * Tears down the conference object and any of its current connections.
      */
-    public void destroy() {
+    public final void destroy() {
         Log.d(this, "destroying conference : %s", this);
         // Tear down the children.
         for (Connection connection : mChildConnections) {
diff --git a/telecomm/java/android/telecomm/Connection.java b/telecomm/java/android/telecomm/Connection.java
index f349659..03db1c3 100644
--- a/telecomm/java/android/telecomm/Connection.java
+++ b/telecomm/java/android/telecomm/Connection.java
@@ -81,7 +81,6 @@
                 Connection c, VideoProvider videoProvider) {}
         public void onAudioModeIsVoipChanged(Connection c, boolean isVoip) {}
         public void onStatusHintsChanged(Connection c, StatusHints statusHints) {}
-        public void onStartActivityFromInCall(Connection c, PendingIntent intent) {}
         public void onConferenceableConnectionsChanged(
                 Connection c, List<Connection> conferenceableConnections) {}
         public void onConferenceChanged(Connection c, Conference conference) {}
@@ -140,7 +139,7 @@
          */
         public static final int SESSION_MODIFY_REQUEST_INVALID = 3;
 
-        private static final int MSG_SET_VIDEO_LISTENER = 1;
+        private static final int MSG_SET_VIDEO_CALLBACK = 1;
         private static final int MSG_SET_CAMERA = 2;
         private static final int MSG_SET_PREVIEW_SURFACE = 3;
         private static final int MSG_SET_DISPLAY_SURFACE = 4;
@@ -155,7 +154,7 @@
         private final VideoProvider.VideoProviderHandler
                 mMessageHandler = new VideoProvider.VideoProviderHandler();
         private final VideoProvider.VideoProviderBinder mBinder;
-        private IVideoCallback mVideoListener;
+        private IVideoCallback mVideoCallback;
 
         /**
          * Default handler used to consolidate binder method calls onto a single thread.
@@ -164,8 +163,8 @@
             @Override
             public void handleMessage(Message msg) {
                 switch (msg.what) {
-                    case MSG_SET_VIDEO_LISTENER:
-                        mVideoListener = IVideoCallback.Stub.asInterface((IBinder) msg.obj);
+                    case MSG_SET_VIDEO_CALLBACK:
+                        mVideoCallback = IVideoCallback.Stub.asInterface((IBinder) msg.obj);
                         break;
                     case MSG_SET_CAMERA:
                         onSetCamera((String) msg.obj);
@@ -207,9 +206,9 @@
          * IVideoProvider stub implementation.
          */
         private final class VideoProviderBinder extends IVideoProvider.Stub {
-            public void setVideoListener(IBinder videoListenerBinder) {
+            public void setVideoCallback(IBinder videoCallbackBinder) {
                 mMessageHandler.obtainMessage(
-                        MSG_SET_VIDEO_LISTENER, videoListenerBinder).sendToTarget();
+                        MSG_SET_VIDEO_CALLBACK, videoCallbackBinder).sendToTarget();
             }
 
             public void setCamera(String cameraId) {
@@ -351,9 +350,9 @@
          * @param videoProfile The requested video call profile.
          */
         public void receiveSessionModifyRequest(VideoProfile videoProfile) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.receiveSessionModifyRequest(videoProfile);
+                    mVideoCallback.receiveSessionModifyRequest(videoProfile);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -371,9 +370,9 @@
          */
         public void receiveSessionModifyResponse(int status,
                 VideoProfile requestedProfile, VideoProfile responseProfile) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.receiveSessionModifyResponse(
+                    mVideoCallback.receiveSessionModifyResponse(
                             status, requestedProfile, responseProfile);
                 } catch (RemoteException ignored) {
                 }
@@ -391,9 +390,9 @@
          * @param event The event.
          */
         public void handleCallSessionEvent(int event) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.handleCallSessionEvent(event);
+                    mVideoCallback.handleCallSessionEvent(event);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -406,9 +405,9 @@
          * @param height The updated peer video height.
          */
         public void changePeerDimensions(int width, int height) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.changePeerDimensions(width, height);
+                    mVideoCallback.changePeerDimensions(width, height);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -420,9 +419,9 @@
          * @param dataUsage The updated data usage.
          */
         public void changeCallDataUsage(int dataUsage) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.changeCallDataUsage(dataUsage);
+                    mVideoCallback.changeCallDataUsage(dataUsage);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -434,9 +433,9 @@
          * @param cameraCapabilities The changed camera capabilities.
          */
         public void changeCameraCapabilities(CameraCapabilities cameraCapabilities) {
-            if (mVideoListener != null) {
+            if (mVideoCallback != null) {
                 try {
-                    mVideoListener.changeCameraCapabilities(cameraCapabilities);
+                    mVideoCallback.changeCameraCapabilities(cameraCapabilities);
                 } catch (RemoteException ignored) {
                 }
             }
@@ -942,20 +941,6 @@
     }
 
     /**
-     * Launches an activity for this connection on top of the in-call UI.
-     *
-     * @param intent The intent to use to start the activity.
-     */
-    public final void startActivityFromInCall(PendingIntent intent) {
-        if (!intent.isActivity()) {
-            throw new IllegalArgumentException("Activity intent required.");
-        }
-        for (Listener l : mListeners) {
-            l.onStartActivityFromInCall(this, intent);
-        }
-    }
-
-    /**
      * Notifies this Connection that the {@link #getAudioState()} property has a new value.
      *
      * @param state The new call audio state.
@@ -1083,10 +1068,10 @@
         if (mState != state) {
             Log.d(this, "setState: %s", stateToString(state));
             mState = state;
+            onSetState(state);
             for (Listener l : mListeners) {
                 l.onStateChanged(this, state);
             }
-            onSetState(state);
         }
     }
 
diff --git a/telecomm/java/android/telecomm/ConnectionRequest.java b/telecomm/java/android/telecomm/ConnectionRequest.java
index 39ae59a..d5a6aa5 100644
--- a/telecomm/java/android/telecomm/ConnectionRequest.java
+++ b/telecomm/java/android/telecomm/ConnectionRequest.java
@@ -29,31 +29,25 @@
 
     // TODO: Token to limit recursive invocations
     private final PhoneAccountHandle mAccountHandle;
-    private final Uri mHandle;
-    private final int mHandlePresentation;
+    private final Uri mAddress;
     private final Bundle mExtras;
     private final int mVideoState;
 
     /**
      * @param accountHandle The accountHandle which should be used to place the call.
      * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
-     * @param handlePresentation The {@link PropertyPresentation} which controls how the handle
-     *         is shown.
      * @param extras Application-specific extra data.
      */
     public ConnectionRequest(
             PhoneAccountHandle accountHandle,
             Uri handle,
-            int handlePresentation,
             Bundle extras) {
-        this(accountHandle, handle, handlePresentation, extras, VideoProfile.VideoState.AUDIO_ONLY);
+        this(accountHandle, handle, extras, VideoProfile.VideoState.AUDIO_ONLY);
     }
 
     /**
      * @param accountHandle The accountHandle which should be used to place the call.
      * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect.
-     * @param handlePresentation The {@link PropertyPresentation} which controls how the handle
-     *         is shown.
      * @param extras Application-specific extra data.
      * @param videoState Determines the video state for the connection.
      * @hide
@@ -61,20 +55,17 @@
     public ConnectionRequest(
             PhoneAccountHandle accountHandle,
             Uri handle,
-            int handlePresentation,
             Bundle extras,
             int videoState) {
         mAccountHandle = accountHandle;
-        mHandle = handle;
-        mHandlePresentation = handlePresentation;
+        mAddress = handle;
         mExtras = extras;
         mVideoState = videoState;
     }
 
     private ConnectionRequest(Parcel in) {
         mAccountHandle = in.readParcelable(getClass().getClassLoader());
-        mHandle = in.readParcelable(getClass().getClassLoader());
-        mHandlePresentation = in.readInt();
+        mAddress = in.readParcelable(getClass().getClassLoader());
         mExtras = in.readParcelable(getClass().getClassLoader());
         mVideoState = in.readInt();
     }
@@ -87,12 +78,7 @@
     /**
      * The handle (e.g., phone number) to which the {@link Connection} is to connect.
      */
-    public Uri getHandle() { return mHandle; }
-
-    /**
-     * The {@link PropertyPresentation} which controls how the handle is shown.
-     */
-    public int getHandlePresentation() { return mHandlePresentation; }
+    public Uri getAddress() { return mAddress; }
 
     /**
      * Application-specific extra data. Used for passing back information from an incoming
@@ -118,9 +104,9 @@
     @Override
     public String toString() {
         return String.format("ConnectionRequest %s %s",
-                mHandle == null
+                mAddress == null
                         ? Uri.EMPTY
-                        : Connection.toLogSafePhoneNumber(mHandle.toString()),
+                        : Connection.toLogSafePhoneNumber(mAddress.toString()),
                 mExtras == null ? "" : mExtras);
     }
 
@@ -147,8 +133,7 @@
     @Override
     public void writeToParcel(Parcel destination, int flags) {
         destination.writeParcelable(mAccountHandle, 0);
-        destination.writeParcelable(mHandle, 0);
-        destination.writeInt(mHandlePresentation);
+        destination.writeParcelable(mAddress, 0);
         destination.writeParcelable(mExtras, 0);
         destination.writeInt(mVideoState);
     }
diff --git a/telecomm/java/android/telecomm/ConnectionService.java b/telecomm/java/android/telecomm/ConnectionService.java
index 19cf622..39365b6 100644
--- a/telecomm/java/android/telecomm/ConnectionService.java
+++ b/telecomm/java/android/telecomm/ConnectionService.java
@@ -72,6 +72,8 @@
     private static final int MSG_ON_PHONE_ACCOUNT_CLICKED = 15;
     private static final int MSG_REMOVE_CONNECTION_SERVICE_ADAPTER = 16;
     private static final int MSG_ANSWER_VIDEO = 17;
+    private static final int MSG_MERGE_CONFERENCE = 18;
+    private static final int MSG_SWAP_CONFERENCE = 19;
 
     private static Connection sNullConnection;
 
@@ -182,6 +184,16 @@
         }
 
         @Override
+        public void mergeConference(String callId) {
+            mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget();
+        }
+
+        @Override
+        public void swapConference(String callId) {
+            mHandler.obtainMessage(MSG_SWAP_CONFERENCE, callId).sendToTarget();
+        }
+
+        @Override
         public void onPostDialContinue(String callId, boolean proceed) {
             SomeArgs args = SomeArgs.obtain();
             args.arg1 = callId;
@@ -298,6 +310,12 @@
                 case MSG_SPLIT_FROM_CONFERENCE:
                     splitFromConference((String) msg.obj);
                     break;
+                case MSG_MERGE_CONFERENCE:
+                    mergeConference((String) msg.obj);
+                    break;
+                case MSG_SWAP_CONFERENCE:
+                    swapConference((String) msg.obj);
+                    break;
                 case MSG_ON_POST_DIAL_CONTINUE: {
                     SomeArgs args = (SomeArgs) msg.obj;
                     try {
@@ -463,12 +481,6 @@
         }
 
         @Override
-        public void onStartActivityFromInCall(Connection c, PendingIntent intent) {
-            String id = mIdByConnection.get(c);
-            mAdapter.startActivityFromInCall(id, intent);
-        }
-
-        @Override
         public void onConferenceableConnectionsChanged(
                 Connection connection, List<Connection> conferenceableConnections) {
             mAdapter.setConferenceableConnections(
@@ -645,6 +657,22 @@
         }
     }
 
+    private void mergeConference(String callId) {
+        Log.d(this, "mergeConference(%s)", callId);
+        Conference conference = findConferenceForAction(callId, "mergeConference");
+        if (conference != null) {
+            conference.onMerge();
+        }
+    }
+
+    private void swapConference(String callId) {
+        Log.d(this, "swapConference(%s)", callId);
+        Conference conference = findConferenceForAction(callId, "swapConference");
+        if (conference != null) {
+            conference.onSwap();
+        }
+    }
+
     private void onPostDialContinue(String callId, boolean proceed) {
         Log.d(this, "onPostDialContinue(%s)", callId);
         findConnectionForAction(callId, "stopDtmfTone").onPostDialContinue(proceed);
@@ -753,7 +781,7 @@
                 }
             }
             ParcelableConference parcelableConference = new ParcelableConference(
-                    conference.getPhoneAccount(),
+                    conference.getPhoneAccountHandle(),
                     conference.getState(),
                     conference.getCapabilities(),
                     connectionIds);
@@ -834,24 +862,6 @@
      */
     public void onConference(Connection connection1, Connection connection2) {}
 
-    /**
-     * Notifies that a connection has been added to this connection service and sent to Telecomm.
-     *
-     * @param connection The connection which was added.
-     */
-    public void onConnectionAdded(Connection connection) {}
-
-    /**
-     * Notified that a connection has been removed from this connection service.
-     * <p>
-     * TODO: Deprecate this since we can listen to the Connection onDestroyed() to determine when
-     * it is destroyed. This then percolates down to the RemoteConference stuff, where we can also
-     * have a callback for one being added, but we don't need one for being destroyed.
-     *
-     * @param connection The connection which was removed.
-     */
-    public void onConnectionRemoved(Connection connection) {}
-
     public void onRemoteConferenceAdded(RemoteConference conference) {}
 
     /**
@@ -879,7 +889,6 @@
         mIdByConnection.put(connection, callId);
         connection.addConnectionListener(mConnectionListener);
         connection.setConnectionService(this);
-        onConnectionAdded(connection);
     }
 
     private void removeConnection(Connection connection) {
@@ -888,7 +897,6 @@
         connection.removeConnectionListener(mConnectionListener);
         mConnectionById.remove(mIdByConnection.get(connection));
         mIdByConnection.remove(connection);
-        onConnectionRemoved(connection);
         mAdapter.removeCall(id);
     }
 
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java b/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
index cb63646..e3dc713 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
+++ b/telecomm/java/android/telecomm/ConnectionServiceAdapter.java
@@ -346,13 +346,4 @@
             }
         }
     }
-
-    void startActivityFromInCall(String callId, PendingIntent intent) {
-        for (IConnectionServiceAdapter adapter : mAdapters) {
-            try {
-                adapter.startActivityFromInCall(callId, intent);
-            } catch (RemoteException e) {
-            }
-        }
-    }
 }
diff --git a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
index 0e1c516..21e99db 100644
--- a/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
+++ b/telecomm/java/android/telecomm/ConnectionServiceAdapterServant.java
@@ -57,8 +57,7 @@
     private static final int MSG_SET_STATUS_HINTS = 17;
     private static final int MSG_SET_HANDLE = 18;
     private static final int MSG_SET_CALLER_DISPLAY_NAME = 19;
-    private static final int MSG_START_ACTIVITY_FROM_IN_CALL = 20;
-    private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 21;
+    private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
 
     private final IConnectionServiceAdapter mDelegate;
 
@@ -192,16 +191,6 @@
                     }
                     break;
                 }
-                case MSG_START_ACTIVITY_FROM_IN_CALL: {
-                    SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        mDelegate.startActivityFromInCall(
-                                (String) args.arg1, (PendingIntent) args.arg2);
-                    } finally {
-                        args.recycle();
-                    }
-                    break;
-                }
                 case MSG_SET_CONFERENCEABLE_CONNECTIONS: {
                     SomeArgs args = (SomeArgs) msg.obj;
                     try {
@@ -352,14 +341,6 @@
         }
 
         @Override
-        public final void startActivityFromInCall(String connectionId, PendingIntent intent) {
-            SomeArgs args = SomeArgs.obtain();
-            args.arg1 = connectionId;
-            args.arg2 = intent;
-            mHandler.obtainMessage(MSG_START_ACTIVITY_FROM_IN_CALL, args).sendToTarget();
-        }
-
-        @Override
         public final void setConferenceableConnections(
                 String connectionId, List<String> conferenceableConnectionIds) {
             SomeArgs args = SomeArgs.obtain();
diff --git a/telecomm/java/android/telecomm/InCallAdapter.java b/telecomm/java/android/telecomm/InCallAdapter.java
index 80f7b57..96ea5a6 100644
--- a/telecomm/java/android/telecomm/InCallAdapter.java
+++ b/telecomm/java/android/telecomm/InCallAdapter.java
@@ -241,6 +241,26 @@
     }
 
     /**
+     * Instructs Telecomm to merge child calls of the specified conference call.
+     */
+    public void mergeConference(String callId) {
+        try {
+            mAdapter.mergeConference(callId);
+        } catch (RemoteException ignored) {
+        }
+    }
+
+    /**
+     * Instructs Telecomm to swap the child calls of the specified conference call.
+     */
+    public void swapConference(String callId) {
+        try {
+            mAdapter.swapConference(callId);
+        } catch (RemoteException ignored) {
+        }
+    }
+
+    /**
      * Instructs Telecomm to turn the proximity sensor on.
      */
     public void turnProximitySensorOn() {
diff --git a/telecomm/java/android/telecomm/InCallService.java b/telecomm/java/android/telecomm/InCallService.java
index cbcee75..51cd537 100644
--- a/telecomm/java/android/telecomm/InCallService.java
+++ b/telecomm/java/android/telecomm/InCallService.java
@@ -55,7 +55,6 @@
     private static final int MSG_SET_POST_DIAL_WAIT = 4;
     private static final int MSG_ON_AUDIO_STATE_CHANGED = 5;
     private static final int MSG_BRING_TO_FOREGROUND = 6;
-    private static final int MSG_START_ACTIVITY = 7;
 
     /** Default Handler used to consolidate binder method calls onto a single thread. */
     private final Handler mHandler = new Handler(Looper.getMainLooper()) {
@@ -89,15 +88,6 @@
                 case MSG_BRING_TO_FOREGROUND:
                     mPhone.internalBringToForeground(msg.arg1 == 1);
                     break;
-                case MSG_START_ACTIVITY:
-                    SomeArgs args = (SomeArgs) msg.obj;
-                    try {
-                        mPhone.internalStartActivity(
-                                (String) args.arg1, (PendingIntent) args.arg2);
-                    } finally {
-                        args.recycle();
-                    }
-                    break;
                 default:
                     break;
             }
@@ -143,14 +133,6 @@
         public void bringToForeground(boolean showDialpad) {
             mHandler.obtainMessage(MSG_BRING_TO_FOREGROUND, showDialpad ? 1 : 0, 0).sendToTarget();
         }
-
-        @Override
-        public void startActivity(String callId, PendingIntent intent) {
-            SomeArgs args = SomeArgs.obtain();
-            args.arg1 = callId;
-            args.arg2 = intent;
-            mHandler.obtainMessage(MSG_START_ACTIVITY, args).sendToTarget();
-        }
     }
 
     private Phone mPhone;
@@ -165,11 +147,13 @@
 
     @Override
     public boolean onUnbind(Intent intent) {
-        Phone oldPhone = mPhone;
-        mPhone = null;
+        if (mPhone != null) {
+            Phone oldPhone = mPhone;
+            mPhone = null;
 
-        oldPhone.destroy();
-        onPhoneDestroyed(oldPhone);
+            oldPhone.destroy();
+            onPhoneDestroyed(oldPhone);
+        }
         return false;
     }
 
diff --git a/telecomm/java/android/telecomm/Log.java b/telecomm/java/android/telecomm/Log.java
index b8dfb11..446ae75 100644
--- a/telecomm/java/android/telecomm/Log.java
+++ b/telecomm/java/android/telecomm/Log.java
@@ -31,7 +31,7 @@
     // Generic tag for all Telecomm Framework logging
     private static final String TAG = "TelecommFramework";
 
-    public static final boolean FORCE_LOGGING = true; /* STOP SHIP if true */
+    public static final boolean FORCE_LOGGING = false; /* STOP SHIP if true */
     public static final boolean DEBUG = isLoggable(android.util.Log.DEBUG);
     public static final boolean INFO = isLoggable(android.util.Log.INFO);
     public static final boolean VERBOSE = isLoggable(android.util.Log.VERBOSE);
diff --git a/telecomm/java/android/telecomm/Phone.java b/telecomm/java/android/telecomm/Phone.java
index d90d954..8831f8f 100644
--- a/telecomm/java/android/telecomm/Phone.java
+++ b/telecomm/java/android/telecomm/Phone.java
@@ -150,14 +150,6 @@
         fireBringToForeground(showDialpad);
     }
 
-    /** {@hide} */
-    final void internalStartActivity(String telecommId, PendingIntent intent) {
-        Call call = mCallByTelecommCallId.get(telecommId);
-        if (call != null) {
-            call.internalStartActivity(intent);
-        }
-    }
-
     /**
      * Called to destroy the phone and cleanup any lingering calls.
      * @hide
diff --git a/telecomm/java/android/telecomm/PhoneAccount.java b/telecomm/java/android/telecomm/PhoneAccount.java
index 5b46409..f709a86 100644
--- a/telecomm/java/android/telecomm/PhoneAccount.java
+++ b/telecomm/java/android/telecomm/PhoneAccount.java
@@ -23,7 +23,12 @@
 import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.text.TextUtils;
 
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import java.util.MissingResourceException;
 
 /**
@@ -77,90 +82,143 @@
      */
     public static final int CAPABILITY_VIDEO_CALLING = 0x8;
 
+    /**
+     * URI scheme for telephone number URIs.
+     */
+    public static final String SCHEME_TEL = "tel";
+
+    /**
+     * URI scheme for voicemail URIs.
+     */
+    public static final String SCHEME_VOICEMAIL = "voicemail";
+
+    /**
+     * URI scheme for SIP URIs.
+     */
+    public static final String SCHEME_SIP = "sip";
+
     private final PhoneAccountHandle mAccountHandle;
-    private final Uri mHandle;
-    private final String mSubscriptionNumber;
+    private final Uri mAddress;
+    private final Uri mSubscriptionAddress;
     private final int mCapabilities;
     private final int mIconResId;
     private final CharSequence mLabel;
     private final CharSequence mShortDescription;
+    private final List<String> mSupportedUriSchemes;
 
     public static class Builder {
         private PhoneAccountHandle mAccountHandle;
-        private Uri mHandle;
-        private String mSubscriptionNumber;
+        private Uri mAddress;
+        private Uri mSubscriptionAddress;
         private int mCapabilities;
         private int mIconResId;
         private CharSequence mLabel;
         private CharSequence mShortDescription;
+        private List<String> mSupportedUriSchemes = new ArrayList<String>();
 
-        public Builder() {}
+        public Builder(PhoneAccountHandle accountHandle, CharSequence label) {
+            this.mAccountHandle = accountHandle;
+            this.mLabel = label;
+        }
 
-        public Builder withAccountHandle(PhoneAccountHandle value) {
-            this.mAccountHandle = value;
+        public Builder setAddress(Uri value) {
+            this.mAddress = value;
             return this;
         }
 
-        public Builder withHandle(Uri value) {
-            this.mHandle = value;
+        public Builder setSubscriptionAddress(Uri value) {
+            this.mSubscriptionAddress = value;
             return this;
         }
 
-        public Builder withSubscriptionNumber(String value) {
-            this.mSubscriptionNumber = value;
-            return this;
-        }
-
-        public Builder withCapabilities(int value) {
+        public Builder setCapabilities(int value) {
             this.mCapabilities = value;
             return this;
         }
 
-        public Builder withIconResId(int value) {
+        public Builder setIconResId(int value) {
             this.mIconResId = value;
             return this;
         }
 
-        public Builder withLabel(CharSequence value) {
-            this.mLabel = value;
-            return this;
-        }
-
-        public Builder withShortDescription(CharSequence value) {
+        public Builder setShortDescription(CharSequence value) {
             this.mShortDescription = value;
             return this;
         }
 
+        /**
+         * Specifies an additional URI scheme supported by the {@link PhoneAccount}.
+         *
+         * @param uriScheme The URI scheme.
+         * @return The Builder.
+         * @hide
+         */
+        public Builder addSupportedUriScheme(String uriScheme) {
+            if (!TextUtils.isEmpty(uriScheme) && !mSupportedUriSchemes.contains(uriScheme)) {
+                this.mSupportedUriSchemes.add(uriScheme);
+            }
+            return this;
+        }
+
+        /**
+         * Specifies the URI schemes supported by the {@link PhoneAccount}.
+         *
+         * @param uriSchemes The URI schemes.
+         * @return The Builder.
+         */
+        public Builder setSupportedUriSchemes(List<String> uriSchemes) {
+            mSupportedUriSchemes.clear();
+
+            if (uriSchemes != null && !uriSchemes.isEmpty()) {
+                for (String uriScheme : uriSchemes) {
+                    addSupportedUriScheme(uriScheme);
+                }
+            }
+            return this;
+        }
+
         public PhoneAccount build() {
+            // If no supported URI schemes were defined, assume "tel" is supported.
+            if (mSupportedUriSchemes.isEmpty()) {
+                addSupportedUriScheme(SCHEME_TEL);
+            }
+
             return new PhoneAccount(
                     mAccountHandle,
-                    mHandle,
-                    mSubscriptionNumber,
+                    mAddress,
+                    mSubscriptionAddress,
                     mCapabilities,
                     mIconResId,
                     mLabel,
-                    mShortDescription);
+                    mShortDescription,
+                    mSupportedUriSchemes);
         }
     }
 
     private PhoneAccount(
             PhoneAccountHandle account,
-            Uri handle,
-            String subscriptionNumber,
+            Uri address,
+            Uri subscriptionAddress,
             int capabilities,
             int iconResId,
             CharSequence label,
-            CharSequence shortDescription) {
+            CharSequence shortDescription,
+            List<String> supportedUriSchemes) {
         mAccountHandle = account;
-        mHandle = handle;
-        mSubscriptionNumber = subscriptionNumber;
+        mAddress = address;
+        mSubscriptionAddress = subscriptionAddress;
         mCapabilities = capabilities;
         mIconResId = iconResId;
         mLabel = label;
         mShortDescription = shortDescription;
+        mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes);
     }
 
-    public static Builder builder() { return new Builder(); }
+    public static Builder builder(
+            PhoneAccountHandle accountHandle,
+            CharSequence label) {
+        return new Builder(accountHandle, label);
+    }
 
     /**
      * The unique identifier of this {@code PhoneAccount}.
@@ -172,32 +230,29 @@
     }
 
     /**
-     * The handle (e.g., a phone number) associated with this {@code PhoneAccount}. This
+     * The address (e.g., a phone number) associated with this {@code PhoneAccount}. This
      * represents the destination from which outgoing calls using this {@code PhoneAccount}
      * will appear to come, if applicable, and the destination to which incoming calls using this
      * {@code PhoneAccount} may be addressed.
      *
-     * @return A handle expressed as a {@code Uri}, for example, a phone number.
+     * @return A address expressed as a {@code Uri}, for example, a phone number.
      */
-    public Uri getHandle() {
-        return mHandle;
+    public Uri getAddress() {
+        return mAddress;
     }
 
     /**
      * The raw callback number used for this {@code PhoneAccount}, as distinct from
-     * {@link #getHandle()}. For the majority of {@code PhoneAccount}s this should be registered
+     * {@link #getAddress()}. For the majority of {@code PhoneAccount}s this should be registered
      * as {@code null}.  It is used by the system for SIM-based {@code PhoneAccount} registration
      * where {@link android.telephony.TelephonyManager#setLine1NumberForDisplay(String, String)}
-     * or {@link android.telephony.TelephonyManager#setLine1NumberForDisplay(long, String, String)}
      * has been used to alter the callback number.
      * <p>
-     * TODO: Should this also be a URI, for consistency? Should it be called the
-     * "subscription handle"?
      *
      * @return The subscription number, suitable for display to the user.
      */
-    public String getSubscriptionNumber() {
-        return mSubscriptionNumber;
+    public Uri getSubscriptionAddress() {
+        return mSubscriptionAddress;
     }
 
     /**
@@ -228,6 +283,36 @@
     }
 
     /**
+     * The URI schemes supported by this {@code PhoneAccount}.
+     *
+     * @return The URI schemes.
+     */
+    public List<String> getSupportedUriSchemes() {
+        return mSupportedUriSchemes;
+    }
+
+    /**
+     * Determines if the {@link PhoneAccount} supports calls to/from addresses with a specified URI
+     * scheme.
+     *
+     * @param uriScheme The URI scheme to check.
+     * @return {@code True} if the {@code PhoneAccount} supports calls to/from addresses with the
+     * specified URI scheme.
+     */
+    public boolean supportsUriScheme(String uriScheme) {
+        if (mSupportedUriSchemes == null || uriScheme == null) {
+            return false;
+        }
+
+        for (String scheme : mSupportedUriSchemes) {
+            if (scheme != null && scheme.equals(uriScheme)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
      * The icon resource ID for the icon of this {@code PhoneAccount}.
      *
      * @return A resource ID.
@@ -275,12 +360,13 @@
     @Override
     public void writeToParcel(Parcel out, int flags) {
         out.writeParcelable(mAccountHandle, 0);
-        out.writeParcelable(mHandle, 0);
-        out.writeString(mSubscriptionNumber);
+        out.writeParcelable(mAddress, 0);
+        out.writeParcelable(mSubscriptionAddress, 0);
         out.writeInt(mCapabilities);
         out.writeInt(mIconResId);
         out.writeCharSequence(mLabel);
         out.writeCharSequence(mShortDescription);
+        out.writeList(mSupportedUriSchemes);
     }
 
     public static final Creator<PhoneAccount> CREATOR
@@ -297,12 +383,18 @@
     };
 
     private PhoneAccount(Parcel in) {
+        ClassLoader classLoader = PhoneAccount.class.getClassLoader();
+
         mAccountHandle = in.readParcelable(getClass().getClassLoader());
-        mHandle = in.readParcelable(getClass().getClassLoader());
-        mSubscriptionNumber = in.readString();
+        mAddress = in.readParcelable(getClass().getClassLoader());
+        mSubscriptionAddress = in.readParcelable(getClass().getClassLoader());
         mCapabilities = in.readInt();
         mIconResId = in.readInt();
         mLabel = in.readCharSequence();
         mShortDescription = in.readCharSequence();
+
+        List<String> supportedUriSchemes = new ArrayList<>();
+        in.readList(supportedUriSchemes, classLoader);
+        mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes);
     }
 }
diff --git a/telecomm/java/android/telecomm/PhoneCapabilities.java b/telecomm/java/android/telecomm/PhoneCapabilities.java
index 3d76608..7a338b4 100644
--- a/telecomm/java/android/telecomm/PhoneCapabilities.java
+++ b/telecomm/java/android/telecomm/PhoneCapabilities.java
@@ -27,11 +27,17 @@
     /** Call supports the hold feature. */
     public static final int SUPPORT_HOLD       = 0x00000002;
 
-    /** Call can currently be merged. */
-    public static final int MERGE_CALLS        = 0x00000004;
+    /**
+     * Calls within a conference can be merged. Some connection services create a conference call
+     * only after two calls have been merged.  However, a conference call can also be added the
+     * moment there are more than one call. CDMA calls are implemented in this way because the call
+     * actions are more limited when more than one call exists. This flag allows merge to be exposed
+     * as a capability on the conference call instead of individual calls.
+     */
+    public static final int MERGE_CONFERENCE   = 0x00000004;
 
-    /** Call can currently be swapped with another call. */
-    public static final int SWAP_CALLS         = 0x00000008;
+    /** Calls withing a conference can be swapped between foreground and background. */
+    public static final int SWAP_CONFERENCE    = 0x00000008;
 
     /** Call currently supports adding another call to this one. */
     public static final int ADD_CALL           = 0x00000010;
@@ -42,8 +48,11 @@
     /** Call can be muted. */
     public static final int MUTE               = 0x00000040;
 
-    /** Call supports generic conference mode. */
-    public static final int GENERIC_CONFERENCE = 0x00000080;
+    /**
+     * Call supports conference call management. This capability only applies to conference calls
+     * which can have other calls as children.
+     */
+    public static final int MANAGE_CONFERENCE = 0x00000080;
 
     /**
      * Local device supports video telephony.
@@ -69,8 +78,8 @@
      */
     public static final int VoWIFI = 0x00000800;
 
-    public static final int ALL = HOLD | SUPPORT_HOLD | MERGE_CALLS | SWAP_CALLS | ADD_CALL
-            | RESPOND_VIA_TEXT | MUTE | GENERIC_CONFERENCE;
+    public static final int ALL = HOLD | SUPPORT_HOLD | MERGE_CONFERENCE | SWAP_CONFERENCE | ADD_CALL
+            | RESPOND_VIA_TEXT | MUTE | MANAGE_CONFERENCE;
 
     public static String toString(int capabilities) {
         StringBuilder builder = new StringBuilder();
@@ -81,11 +90,11 @@
         if ((capabilities & SUPPORT_HOLD) != 0) {
             builder.append(" SUPPORT_HOLD");
         }
-        if ((capabilities & MERGE_CALLS) != 0) {
-            builder.append(" MERGE_CALLS");
+        if ((capabilities & MERGE_CONFERENCE) != 0) {
+            builder.append(" MERGE_CONFERENCE");
         }
-        if ((capabilities & SWAP_CALLS) != 0) {
-            builder.append(" SWAP_CALLS");
+        if ((capabilities & SWAP_CONFERENCE) != 0) {
+            builder.append(" SWAP_CONFERENCE");
         }
         if ((capabilities & ADD_CALL) != 0) {
             builder.append(" ADD_CALL");
@@ -96,8 +105,8 @@
         if ((capabilities & MUTE) != 0) {
             builder.append(" MUTE");
         }
-        if ((capabilities & GENERIC_CONFERENCE) != 0) {
-            builder.append(" GENERIC_CONFERENCE");
+        if ((capabilities & MANAGE_CONFERENCE) != 0) {
+            builder.append(" MANAGE_CONFERENCE");
         }
         if ((capabilities & SUPPORTS_VT_LOCAL) != 0) {
             builder.append(" SUPPORTS_VT_LOCAL");
diff --git a/telecomm/java/android/telecomm/RemoteConference.java b/telecomm/java/android/telecomm/RemoteConference.java
index 02f6de6..b073827 100644
--- a/telecomm/java/android/telecomm/RemoteConference.java
+++ b/telecomm/java/android/telecomm/RemoteConference.java
@@ -32,7 +32,7 @@
  */
 public final class RemoteConference {
 
-    public abstract static class Listener {
+    public abstract static class Callback {
         public void onStateChanged(RemoteConference conference, int oldState, int newState) {}
         public void onDisconnected(RemoteConference conference, int cause, String message) {}
         public void onConnectionAdded(RemoteConference conference, RemoteConnection connection) {}
@@ -44,7 +44,7 @@
     private final String mId;
     private final IConnectionService mConnectionService;
 
-    private final Set<Listener> mListeners = new CopyOnWriteArraySet<>();
+    private final Set<Callback> mCallbacks = new CopyOnWriteArraySet<>();
     private final List<RemoteConnection> mChildConnections = new CopyOnWriteArrayList<>();
     private final List<RemoteConnection> mUnmodifiableChildConnections =
             Collections.unmodifiableList(mChildConnections);
@@ -70,8 +70,8 @@
         for (RemoteConnection connection : mChildConnections) {
             connection.setConference(null);
         }
-        for (Listener l : mListeners) {
-            l.onDestroyed(this);
+        for (Callback c : mCallbacks) {
+            c.onDestroyed(this);
         }
     }
 
@@ -88,8 +88,8 @@
         if (mState != newState) {
             int oldState = mState;
             mState = newState;
-            for (Listener l : mListeners) {
-                l.onStateChanged(this, oldState, newState);
+            for (Callback c : mCallbacks) {
+                c.onStateChanged(this, oldState, newState);
             }
         }
     }
@@ -99,8 +99,8 @@
         if (!mChildConnections.contains(connection)) {
             mChildConnections.add(connection);
             connection.setConference(this);
-            for (Listener l : mListeners) {
-                l.onConnectionAdded(this, connection);
+            for (Callback c : mCallbacks) {
+                c.onConnectionAdded(this, connection);
             }
         }
     }
@@ -110,8 +110,8 @@
         if (mChildConnections.contains(connection)) {
             mChildConnections.remove(connection);
             connection.setConference(null);
-            for (Listener l : mListeners) {
-                l.onConnectionRemoved(this, connection);
+            for (Callback c : mCallbacks) {
+                c.onConnectionRemoved(this, connection);
             }
         }
     }
@@ -120,8 +120,8 @@
     void setCallCapabilities(int capabilities) {
         if (mCallCapabilities != capabilities) {
             mCallCapabilities = capabilities;
-            for (Listener l : mListeners) {
-                l.onCapabilitiesChanged(this, mCallCapabilities);
+            for (Callback c : mCallbacks) {
+                c.onCapabilitiesChanged(this, mCallCapabilities);
             }
         }
     }
@@ -132,8 +132,8 @@
             mDisconnectCause = cause;
             mDisconnectMessage = message;
             setState(Connection.STATE_DISCONNECTED);
-            for (Listener l : mListeners) {
-                l.onDisconnected(this, cause, message);
+            for (Callback c : mCallbacks) {
+                c.onDisconnected(this, cause, message);
             }
         }
     }
@@ -188,11 +188,11 @@
         return mDisconnectMessage;
     }
 
-    public final void addListener(Listener listener) {
-        mListeners.add(listener);
+    public final void addCallback(Callback callback) {
+        mCallbacks.add(callback);
     }
 
-    public final void removeListener(Listener listener) {
-        mListeners.remove(listener);
+    public final void removeCallback(Callback callback) {
+        mCallbacks.remove(callback);
     }
 }
diff --git a/telecomm/java/android/telecomm/RemoteConnection.java b/telecomm/java/android/telecomm/RemoteConnection.java
index b7e4b2a..8ad8d19 100644
--- a/telecomm/java/android/telecomm/RemoteConnection.java
+++ b/telecomm/java/android/telecomm/RemoteConnection.java
@@ -17,15 +17,18 @@
 package android.telecomm;
 
 import com.android.internal.telecomm.IConnectionService;
+import com.android.internal.telecomm.IVideoCallback;
+import com.android.internal.telecomm.IVideoProvider;
 
 import android.app.PendingIntent;
 import android.net.Uri;
+import android.os.IBinder;
 import android.os.RemoteException;
 import android.telephony.DisconnectCause;
+import android.view.Surface;
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -163,16 +166,6 @@
         public void onVideoStateChanged(RemoteConnection connection, int videoState) {}
 
         /**
-         * Indicates that this {@code RemoteConnection} is requesting that the in-call UI
-         * launch the specified activity.
-         *
-         * @param connection The {@code RemoteConnection} invoking this method.
-         * @param intent A {@link PendingIntent} that the {@code RemoteConnection} wishes to
-         *         have launched on its behalf.
-         */
-        public void onStartActivityFromInCall(RemoteConnection connection, PendingIntent intent) {}
-
-        /**
          * Indicates that this {@code RemoteConnection} has been destroyed. No further requests
          * should be made to the {@code RemoteConnection}, and references to it should be cleared.
          *
@@ -193,6 +186,18 @@
                 List<RemoteConnection> conferenceableConnections) {}
 
         /**
+         * Indicates that the {@code VideoProvider} associated with this {@code RemoteConnection}
+         * has changed.
+         *
+         * @param connection The {@code RemoteConnection} invoking this method.
+         * @param videoProvider The new {@code VideoProvider} associated with this
+         *         {@code RemoteConnection}.
+         * @hide
+         */
+        public void onVideoProviderChanged(
+                RemoteConnection connection, VideoProvider videoProvider) {}
+
+        /**
          * Indicates that the {@code RemoteConference} that this {@code RemoteConnection} is a part
          * of has changed.
          *
@@ -205,6 +210,185 @@
                 RemoteConference conference) {}
     }
 
+    /** {@hide} */
+    public static class VideoProvider {
+
+        public abstract static class Listener {
+            public void onReceiveSessionModifyRequest(
+                    VideoProvider videoProvider,
+                    VideoProfile videoProfile) {}
+
+            public void onReceiveSessionModifyResponse(
+                    VideoProvider videoProvider,
+                    int status,
+                    VideoProfile requestedProfile,
+                    VideoProfile responseProfile) {}
+
+            public void onHandleCallSessionEvent(VideoProvider videoProvider, int event) {}
+
+            public void onPeerDimensionsChanged(VideoProvider videoProvider, int width, int height) {}
+
+            public void onCallDataUsageChanged(VideoProvider videoProvider, int dataUsage) {}
+
+            public void onCameraCapabilitiesChanged(
+                    VideoProvider videoProvider,
+                    CameraCapabilities cameraCapabilities) {}
+        }
+
+        private final IVideoCallback mVideoCallbackDelegate = new IVideoCallback() {
+            @Override
+            public void receiveSessionModifyRequest(VideoProfile videoProfile) {
+                for (Listener l : mListeners) {
+                    l.onReceiveSessionModifyRequest(VideoProvider.this, videoProfile);
+                }
+            }
+
+            @Override
+            public void receiveSessionModifyResponse(int status, VideoProfile requestedProfile,
+                    VideoProfile responseProfile) {
+                for (Listener l : mListeners) {
+                    l.onReceiveSessionModifyResponse(
+                            VideoProvider.this,
+                            status,
+                            requestedProfile,
+                            responseProfile);
+                }
+            }
+
+            @Override
+            public void handleCallSessionEvent(int event) {
+                for (Listener l : mListeners) {
+                    l.onHandleCallSessionEvent(VideoProvider.this, event);
+                }
+            }
+
+            @Override
+            public void changePeerDimensions(int width, int height) {
+                for (Listener l : mListeners) {
+                    l.onPeerDimensionsChanged(VideoProvider.this, width, height);
+                }
+            }
+
+            @Override
+            public void changeCallDataUsage(int dataUsage) {
+                for (Listener l : mListeners) {
+                    l.onCallDataUsageChanged(VideoProvider.this, dataUsage);
+                }
+            }
+
+            @Override
+            public void changeCameraCapabilities(CameraCapabilities cameraCapabilities) {
+                for (Listener l : mListeners) {
+                    l.onCameraCapabilitiesChanged(VideoProvider.this, cameraCapabilities);
+                }
+            }
+
+            @Override
+            public IBinder asBinder() {
+                return null;
+            }
+        };
+
+        private final VideoCallbackServant mVideoCallbackServant =
+                new VideoCallbackServant(mVideoCallbackDelegate);
+
+        private final IVideoProvider mVideoProviderBinder;
+
+        /**
+         * ConcurrentHashMap constructor params: 8 is initial table size, 0.9f is
+         * load factor before resizing, 1 means we only expect a single thread to
+         * access the map so make only a single shard
+         */
+        private final Set<Listener> mListeners = Collections.newSetFromMap(
+                new ConcurrentHashMap<Listener, Boolean>(8, 0.9f, 1));
+
+        public VideoProvider(IVideoProvider videoProviderBinder) {
+            mVideoProviderBinder = videoProviderBinder;
+            try {
+                mVideoProviderBinder.setVideoCallback(mVideoCallbackServant.getStub().asBinder());
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void addListener(Listener l) {
+            mListeners.add(l);
+        }
+
+        public void removeListener(Listener l) {
+            mListeners.remove(l);
+        }
+
+        public void setCamera(String cameraId) {
+            try {
+                mVideoProviderBinder.setCamera(cameraId);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void setPreviewSurface(Surface surface) {
+            try {
+                mVideoProviderBinder.setPreviewSurface(surface);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void setDisplaySurface(Surface surface) {
+            try {
+                mVideoProviderBinder.setDisplaySurface(surface);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void setDeviceOrientation(int rotation) {
+            try {
+                mVideoProviderBinder.setDeviceOrientation(rotation);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void setZoom(float value) {
+            try {
+                mVideoProviderBinder.setZoom(value);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void sendSessionModifyRequest(VideoProfile reqProfile) {
+            try {
+                mVideoProviderBinder.sendSessionModifyRequest(reqProfile);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void sendSessionModifyResponse(VideoProfile responseProfile) {
+            try {
+                mVideoProviderBinder.sendSessionModifyResponse(responseProfile);
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void requestCameraCapabilities() {
+            try {
+                mVideoProviderBinder.requestCameraCapabilities();
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void requestCallDataUsage() {
+            try {
+                mVideoProviderBinder.requestCallDataUsage();
+            } catch (RemoteException e) {
+            }
+        }
+
+        public void setPauseImage(String uri) {
+            try {
+                mVideoProviderBinder.setPauseImage(uri);
+            } catch (RemoteException e) {
+            }
+        }
+    }
+
     private IConnectionService mConnectionService;
     private final String mConnectionId;
     /**
@@ -225,6 +409,7 @@
     private boolean mConnected;
     private int mCallCapabilities;
     private int mVideoState;
+    private VideoProvider mVideoProvider;
     private boolean mAudioModeIsVoip;
     private StatusHints mStatusHints;
     private Uri mHandle;
@@ -390,6 +575,14 @@
     }
 
     /**
+     * @return The video provider associated with this {@code RemoteConnection}.
+     * @hide
+     */
+    public final VideoProvider getVideoProvider() {
+        return mVideoProvider;
+    }
+
+    /**
      * @return The failure code ({@see DisconnectCause}) associated with this failed
      * {@code RemoteConnection}.
      */
@@ -694,6 +887,16 @@
         }
     }
 
+    /**
+     * @hide
+     */
+    void setVideoProvider(VideoProvider videoProvider) {
+        mVideoProvider = videoProvider;
+        for (Listener l : mListeners) {
+            l.onVideoProviderChanged(this, videoProvider);
+        }
+    }
+
     /** @hide */
     void setAudioModeIsVoip(boolean isVoip) {
         mAudioModeIsVoip = isVoip;
@@ -729,13 +932,6 @@
     }
 
     /** @hide */
-    void startActivityFromInCall(PendingIntent intent) {
-        for (Listener l : mListeners) {
-            l.onStartActivityFromInCall(this, intent);
-        }
-    }
-
-    /** @hide */
     void setConferenceableConnections(List<RemoteConnection> conferenceableConnections) {
         mConferenceableConnections.clear();
         mConferenceableConnections.addAll(conferenceableConnections);
diff --git a/telecomm/java/android/telecomm/RemoteConnectionService.java b/telecomm/java/android/telecomm/RemoteConnectionService.java
index 51722fe..8b8e8eb 100644
--- a/telecomm/java/android/telecomm/RemoteConnectionService.java
+++ b/telecomm/java/android/telecomm/RemoteConnectionService.java
@@ -60,13 +60,14 @@
             if (connection != NULL_CONNECTION && mPendingConnections.contains(connection)) {
                 mPendingConnections.remove(connection);
                 // Unconditionally initialize the connection ...
-                connection.setState(parcel.getState());
                 connection.setCallCapabilities(parcel.getCapabilities());
                 connection.setHandle(
                         parcel.getHandle(), parcel.getHandlePresentation());
                 connection.setCallerDisplayName(
                         parcel.getCallerDisplayName(),
                         parcel.getCallerDisplayNamePresentation());
+                // Set state after handle so that the client can identify the connection.
+                connection.setState(parcel.getState());
                 List<RemoteConnection> conferenceable = new ArrayList<>();
                 for (String confId : parcel.getConferenceableConnectionIds()) {
                     if (mConnectionById.containsKey(confId)) {
@@ -74,7 +75,7 @@
                     }
                 }
                 connection.setConferenceableConnections(conferenceable);
-                // TODO: Do we need to support video providers for remote connections?
+                connection.setVideoState(parcel.getVideoState());
                 if (connection.getState() == Connection.STATE_DISCONNECTED) {
                     // ... then, if it was created in a disconnected state, that indicates
                     // failure on the providing end, so immediately mark it destroyed
@@ -191,7 +192,7 @@
             conference.setState(parcel.getState());
             conference.setCallCapabilities(parcel.getCapabilities());
             mConferenceById.put(callId, conference);
-            conference.addListener(new RemoteConference.Listener() {
+            conference.addCallback(new RemoteConference.Callback() {
                 @Override
                 public void onDestroyed(RemoteConference c) {
                     mConferenceById.remove(callId);
@@ -226,7 +227,8 @@
 
         @Override
         public void setVideoProvider(String callId, IVideoProvider videoProvider) {
-            // not supported for remote connections.
+            findConnectionForAction(callId, "setVideoProvider")
+                    .setVideoProvider(new RemoteConnection.VideoProvider(videoProvider));
         }
 
         @Override
@@ -261,12 +263,6 @@
         }
 
         @Override
-        public void startActivityFromInCall(String callId, PendingIntent intent) {
-            findConnectionForAction(callId, "startActivityFromInCall")
-                    .startActivityFromInCall(intent);
-        }
-
-        @Override
         public IBinder asBinder() {
             throw new UnsupportedOperationException();
         }
@@ -331,8 +327,7 @@
         final String id = UUID.randomUUID().toString();
         final ConnectionRequest newRequest = new ConnectionRequest(
                 request.getAccountHandle(),
-                request.getHandle(),
-                request.getHandlePresentation(),
+                request.getAddress(),
                 request.getExtras(),
                 request.getVideoState());
         try {
diff --git a/telecomm/java/android/telecomm/StatusHints.java b/telecomm/java/android/telecomm/StatusHints.java
index f7c4f2f..ff96a5b 100644
--- a/telecomm/java/android/telecomm/StatusHints.java
+++ b/telecomm/java/android/telecomm/StatusHints.java
@@ -32,23 +32,24 @@
  */
 public final class StatusHints implements Parcelable {
 
-    private final ComponentName mComponentName;
+    private final ComponentName mPackageName;
     private final CharSequence mLabel;
     private final int mIconResId;
     private final Bundle mExtras;
 
-    public StatusHints(ComponentName componentName, CharSequence label, int iconResId, Bundle extras) {
-        mComponentName = componentName;
+    public StatusHints(ComponentName packageName, CharSequence label, int iconResId,
+            Bundle extras) {
+        mPackageName = packageName;
         mLabel = label;
         mIconResId = iconResId;
         mExtras = extras;
     }
 
     /**
-     * @return A component used to load the icon.
+     * @return A package used to load the icon.
      */
-    public ComponentName getComponentName() {
-        return mComponentName;
+    public ComponentName getPackageName() {
+        return mPackageName;
     }
 
     /**
@@ -88,7 +89,7 @@
 
     @Override
     public void writeToParcel(Parcel out, int flags) {
-        out.writeParcelable(mComponentName, flags);
+        out.writeParcelable(mPackageName, flags);
         out.writeCharSequence(mLabel);
         out.writeInt(mIconResId);
         out.writeParcelable(mExtras, 0);
@@ -106,7 +107,7 @@
     };
 
     private StatusHints(Parcel in) {
-        mComponentName = in.readParcelable(getClass().getClassLoader());
+        mPackageName = in.readParcelable(getClass().getClassLoader());
         mLabel = in.readCharSequence();
         mIconResId = in.readInt();
         mExtras = in.readParcelable(getClass().getClassLoader());
@@ -115,16 +116,16 @@
     private Drawable getIcon(Context context, int resId) {
         Context packageContext;
         try {
-            packageContext = context.createPackageContext(mComponentName.getPackageName(), 0);
+            packageContext = context.createPackageContext(mPackageName.getPackageName(), 0);
         } catch (PackageManager.NameNotFoundException e) {
-            Log.e(this, e, "Cannot find package %s", mComponentName.getPackageName());
+            Log.e(this, e, "Cannot find package %s", mPackageName.getPackageName());
             return null;
         }
         try {
             return packageContext.getDrawable(resId);
         } catch (MissingResourceException e) {
             Log.e(this, e, "Cannot find icon %d in package %s",
-                    resId, mComponentName.getPackageName());
+                    resId, mPackageName.getPackageName());
             return null;
         }
     }
@@ -133,7 +134,7 @@
     public boolean equals(Object other) {
         if (other != null && other instanceof StatusHints) {
             StatusHints otherHints = (StatusHints) other;
-            return Objects.equals(otherHints.getComponentName(), getComponentName()) &&
+            return Objects.equals(otherHints.getPackageName(), getPackageName()) &&
                     Objects.equals(otherHints.getLabel(), getLabel()) &&
                     otherHints.getIconResId() == getIconResId() &&
                     Objects.equals(otherHints.getExtras(), getExtras());
@@ -143,7 +144,7 @@
 
     @Override
     public int hashCode() {
-        return Objects.hashCode(mComponentName) + Objects.hashCode(mLabel) + mIconResId +
+        return Objects.hashCode(mPackageName) + Objects.hashCode(mLabel) + mIconResId +
                 Objects.hashCode(mExtras);
     }
 }
diff --git a/telecomm/java/android/telecomm/TelecommManager.java b/telecomm/java/android/telecomm/TelecommManager.java
index 2243288..5e9e6d0 100644
--- a/telecomm/java/android/telecomm/TelecommManager.java
+++ b/telecomm/java/android/telecomm/TelecommManager.java
@@ -46,27 +46,34 @@
      *
      * @hide
      */
-    public static final String ACTION_INCOMING_CALL = "android.intent.action.INCOMING_CALL";
+    public static final String ACTION_INCOMING_CALL = "android.telecomm.action.INCOMING_CALL";
 
     /**
      * The {@link android.content.Intent} action used to configure a
      * {@link android.telecomm.ConnectionService}.
      */
     public static final String ACTION_CONNECTION_SERVICE_CONFIGURE =
-            "android.intent.action.CONNECTION_SERVICE_CONFIGURE";
+            "android.telecomm.action.CONNECTION_SERVICE_CONFIGURE";
 
     /**
      * The {@link android.content.Intent} action used to show the call settings page.
      */
     public static final String ACTION_SHOW_CALL_SETTINGS =
-            "android.telecomm.intent.action.SHOW_CALL_SETTINGS";
+            "android.telecomm.action.SHOW_CALL_SETTINGS";
+
+    /**
+     * The {@link android.content.Intent} action used to show the settings page used to configure
+     * {@link PhoneAccount} preferences.
+     */
+    public static final String ACTION_CHANGE_PHONE_ACCOUNTS =
+            "android.telecomm.action.CHANGE_PHONE_ACCOUNTS";
 
     /**
      * Optional extra for {@link android.content.Intent#ACTION_CALL} containing a boolean that
      * determines whether the speakerphone should be automatically turned on for an outgoing call.
      */
     public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE =
-            "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
+            "android.telecomm.extra.START_CALL_WITH_SPEAKERPHONE";
 
     /**
      * Optional extra for {@link android.content.Intent#ACTION_CALL} containing an integer that
@@ -79,7 +86,7 @@
      * @hide
      */
     public static final String EXTRA_START_CALL_WITH_VIDEO_STATE =
-            "android.intent.extra.START_CALL_WITH_VIDEO_STATE";
+            "android.telecomm.extra.START_CALL_WITH_VIDEO_STATE";
 
     /**
      * The extra used with an {@link android.content.Intent#ACTION_CALL} and
@@ -89,7 +96,7 @@
      * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
      */
     public static final String EXTRA_PHONE_ACCOUNT_HANDLE =
-            "android.intent.extra.PHONE_ACCOUNT_HANDLE";
+            "android.telecomm.extra.PHONE_ACCOUNT_HANDLE";
 
     /**
      * Optional extra for {@link #ACTION_INCOMING_CALL} containing a {@link Bundle} which contains
@@ -99,7 +106,7 @@
      * @hide
      */
     public static final String EXTRA_INCOMING_CALL_EXTRAS =
-            "android.intent.extra.INCOMING_CALL_EXTRAS";
+            "android.telecomm.extra.INCOMING_CALL_EXTRAS";
 
     /**
      * Optional extra for {@link android.content.Intent#ACTION_CALL} and
@@ -110,7 +117,7 @@
      * @hide
      */
     public static final String EXTRA_OUTGOING_CALL_EXTRAS =
-            "android.intent.extra.OUTGOING_CALL_EXTRAS";
+            "android.telecomm.extra.OUTGOING_CALL_EXTRAS";
 
     /**
      * Optional extra for {@link android.telephony.TelephonyManager#ACTION_PHONE_STATE_CHANGED}
@@ -196,7 +203,7 @@
      * @hide
      */
     public static final String ACTION_CURRENT_TTY_MODE_CHANGED =
-            "android.telecomm.intent.action.CURRENT_TTY_MODE_CHANGED";
+            "android.telecomm.action.CURRENT_TTY_MODE_CHANGED";
 
     /**
      * The lookup key for an int that indicates the current TTY mode.
@@ -219,7 +226,7 @@
      * @hide
      */
     public static final String ACTION_TTY_PREFERRED_MODE_CHANGED =
-            "android.telecomm.intent.action.TTY_PREFERRED_MODE_CHANGED";
+            "android.telecomm.action.TTY_PREFERRED_MODE_CHANGED";
 
     /**
      * The lookup key for an int that indicates preferred TTY mode. Valid modes are: -
@@ -258,8 +265,8 @@
 
     /**
      * Return the {@link PhoneAccount} which is the user-chosen default for making outgoing phone
-     * calls. This {@code PhoneAccount} will always be a member of the list which is returned from
-     * calling {@link #getEnabledPhoneAccounts()}.
+     * calls with a specified URI scheme. This {@code PhoneAccount} will always be a member of the
+     * list which is returned from calling {@link #getEnabledPhoneAccounts()}.
      * <p>
      * Apps must be prepared for this method to return {@code null}, indicating that there currently
      * exists no user-chosen default {@code PhoneAccount}. In this case, apps wishing to initiate a
@@ -272,11 +279,13 @@
      * {@code Intent} with no {@link TelecommManager#EXTRA_PHONE_ACCOUNT_HANDLE} is valid, and
      * subsequent steps in the phone call flow are responsible for presenting the user with an
      * affordance, if necessary, to choose a {@code PhoneAccount}.
+     *
+     * @param uriScheme The URI scheme.
      */
-    public PhoneAccountHandle getDefaultOutgoingPhoneAccount() {
+    public PhoneAccountHandle getDefaultOutgoingPhoneAccount(String uriScheme) {
         try {
             if (isServiceConnected()) {
-                return getTelecommService().getDefaultOutgoingPhoneAccount();
+                return getTelecommService().getDefaultOutgoingPhoneAccount(uriScheme);
             }
         } catch (RemoteException e) {
             Log.e(TAG, "Error calling ITelecommService#getDefaultOutgoingPhoneAccount", e);
@@ -285,16 +294,38 @@
     }
 
     /**
+     * Return the {@link PhoneAccount} which is the user-chosen default for making outgoing phone
+     * calls. This {@code PhoneAccount} will always be a member of the list which is returned from
+     * calling {@link #getEnabledPhoneAccounts()}
+     *
+     * Apps must be prepared for this method to return {@code null}, indicating that there currently
+     * exists no user-chosen default {@code PhoneAccount}.
+     *
+     * @return The user outgoing phone account selected by the user.
+     * @hide
+     */
+    public PhoneAccountHandle getUserSelectedOutgoingPhoneAccount() {
+        try {
+            if (isServiceConnected()) {
+                return getTelecommService().getUserSelectedOutgoingPhoneAccount();
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelecommService#getUserSelectedOutgoingPhoneAccount", e);
+        }
+        return null;
+    }
+
+    /**
      * Sets the default account for making outgoing phone calls.
      * @hide
      */
-    public void setDefaultOutgoingPhoneAccount(PhoneAccountHandle accountHandle) {
+    public void setUserSelectedOutgoingPhoneAccount(PhoneAccountHandle accountHandle) {
         try {
             if (isServiceConnected()) {
-                getTelecommService().setDefaultOutgoingPhoneAccount(accountHandle);
+                getTelecommService().setUserSelectedOutgoingPhoneAccount(accountHandle);
             }
         } catch (RemoteException e) {
-            Log.e(TAG, "Error calling ITelecommService#setDefaultOutgoingPhoneAccount");
+            Log.e(TAG, "Error calling ITelecommService#setUserSelectedOutgoingPhoneAccount");
         }
     }
 
@@ -366,6 +397,40 @@
     }
 
     /**
+     * Returns the current connection manager. Apps must be prepared for this method to return
+     * {@code null}, indicating that there currently exists no user-chosen default
+     * {@code PhoneAccount}.
+     *
+     * @return The phone account handle of the current connection manager.
+     */
+    public PhoneAccountHandle getConnectionManager() {
+        return getSimCallManager();
+    }
+
+    /**
+     * Returns a list of {@link PhoneAccountHandle}s which can be used to make and receive phone
+     * calls which support the specified URI scheme.
+     * <P>
+     * For example, invoking with {@code "tel"} will find all {@link PhoneAccountHandle}s which
+     * support telephone calls (e.g. URIs such as {@code tel:555-555-1212}).  Invoking with
+     * {@code "sip"} will find all {@link PhoneAccountHandle}s which support SIP calls (e.g. URIs
+     * such as {@code sip:example@sipexample.com}).
+     *
+     * @param uriScheme The URI scheme.
+     * @return A list of {@code PhoneAccountHandle} objects supporting the URI scheme.
+     */
+    public List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(String uriScheme) {
+        try {
+            if (isServiceConnected()) {
+                return getTelecommService().getPhoneAccountsSupportingScheme(uriScheme);
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error calling ITelecommService#getPhoneAccountsSupportingScheme", e);
+        }
+        return new ArrayList<>();
+    }
+
+    /**
      * Determine whether the device has more than one account registered and enabled.
      *
      * @return {@code true} if the device has more than one account registered and enabled and
@@ -677,4 +742,4 @@
         }
         return isConnected;
     }
-}
\ No newline at end of file
+}
diff --git a/telecomm/java/android/telecomm/VideoCallImpl.java b/telecomm/java/android/telecomm/VideoCallImpl.java
index c10865f..d33a351 100644
--- a/telecomm/java/android/telecomm/VideoCallImpl.java
+++ b/telecomm/java/android/telecomm/VideoCallImpl.java
@@ -157,7 +157,7 @@
         mVideoProvider.asBinder().linkToDeath(mDeathRecipient, 0);
 
         mBinder = new VideoCallListenerBinder();
-        mVideoProvider.setVideoListener(mBinder);
+        mVideoProvider.setVideoCallback(mBinder);
     }
 
     /** {@inheritDoc} */
diff --git a/telecomm/java/android/telecomm/VideoCallbackServant.java b/telecomm/java/android/telecomm/VideoCallbackServant.java
new file mode 100644
index 0000000..060b8a9
--- /dev/null
+++ b/telecomm/java/android/telecomm/VideoCallbackServant.java
@@ -0,0 +1,160 @@
+/*
+ * 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
+ R* limitations under the License.
+ */
+
+package android.telecomm;
+
+import com.android.internal.os.SomeArgs;
+import com.android.internal.telecomm.IVideoCallback;
+
+import android.os.Handler;
+import android.os.Message;
+import android.os.RemoteException;
+
+/**
+ * A component that provides an RPC servant implementation of {@link IVideoCallback},
+ * posting incoming messages on the main thread on a client-supplied delegate object.
+ *
+ * TODO: Generate this and similar classes using a compiler starting from AIDL interfaces.
+ *
+ * @hide
+ */
+final class VideoCallbackServant {
+    private static final int MSG_RECEIVE_SESSION_MODIFY_REQUEST = 0;
+    private static final int MSG_RECEIVE_SESSION_MODIFY_RESPONSE = 1;
+    private static final int MSG_HANDLE_CALL_SESSION_EVENT = 2;
+    private static final int MSG_CHANGE_PEER_DIMENSIONS = 3;
+    private static final int MSG_CHANGE_CALL_DATA_USAGE = 4;
+    private static final int MSG_CHANGE_CAMERA_CAPABILITIES = 5;
+
+    private final IVideoCallback mDelegate;
+
+    private final Handler mHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            try {
+                internalHandleMessage(msg);
+            } catch (RemoteException e) {
+            }
+        }
+
+        // Internal method defined to centralize handling of RemoteException
+        private void internalHandleMessage(Message msg) throws RemoteException {
+            switch (msg.what) {
+                case MSG_RECEIVE_SESSION_MODIFY_REQUEST: {
+                    mDelegate.receiveSessionModifyRequest((VideoProfile) msg.obj);
+                    break;
+                }
+                case MSG_RECEIVE_SESSION_MODIFY_RESPONSE: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        mDelegate.receiveSessionModifyResponse(
+                                args.argi1,
+                                (VideoProfile) args.arg1,
+                                (VideoProfile) args.arg2);
+                    } finally {
+                        args.recycle();
+                    }
+                    break;
+                }
+                case MSG_HANDLE_CALL_SESSION_EVENT: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        mDelegate.handleCallSessionEvent(args.argi1);
+                    } finally {
+                        args.recycle();
+                    }
+                    break;
+                }
+                case MSG_CHANGE_PEER_DIMENSIONS: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        mDelegate.changePeerDimensions(args.argi1, args.argi2);
+                    } finally {
+                        args.recycle();
+                    }
+                    break;
+                }
+                case MSG_CHANGE_CALL_DATA_USAGE: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        mDelegate.changeCallDataUsage(args.argi1);
+                    } finally {
+                        args.recycle();
+                    }
+                    break;
+                }
+                case MSG_CHANGE_CAMERA_CAPABILITIES: {
+                    mDelegate.changeCameraCapabilities((CameraCapabilities) msg.obj);
+                    break;
+                }
+            }
+        }
+    };
+
+    private final IVideoCallback mStub = new IVideoCallback.Stub() {
+        @Override
+        public void receiveSessionModifyRequest(VideoProfile videoProfile) throws RemoteException {
+            mHandler.obtainMessage(MSG_RECEIVE_SESSION_MODIFY_REQUEST, videoProfile).sendToTarget();
+        }
+
+        @Override
+        public void receiveSessionModifyResponse(int status, VideoProfile requestedProfile,
+                VideoProfile responseProfile) throws RemoteException {
+            SomeArgs args = SomeArgs.obtain();
+            args.argi1 = status;
+            args.arg1 = requestedProfile;
+            args.arg2 = responseProfile;
+            mHandler.obtainMessage(MSG_RECEIVE_SESSION_MODIFY_RESPONSE, args).sendToTarget();
+        }
+
+        @Override
+        public void handleCallSessionEvent(int event) throws RemoteException {
+            SomeArgs args = SomeArgs.obtain();
+            args.argi1 = event;
+            mHandler.obtainMessage(MSG_HANDLE_CALL_SESSION_EVENT, args).sendToTarget();
+        }
+
+        @Override
+        public void changePeerDimensions(int width, int height) throws RemoteException {
+            SomeArgs args = SomeArgs.obtain();
+            args.argi1 = width;
+            args.argi2 = height;
+            mHandler.obtainMessage(MSG_CHANGE_PEER_DIMENSIONS, args).sendToTarget();
+        }
+
+        @Override
+        public void changeCallDataUsage(int dataUsage) throws RemoteException {
+            SomeArgs args = SomeArgs.obtain();
+            args.argi1 = dataUsage;
+            mHandler.obtainMessage(MSG_CHANGE_CALL_DATA_USAGE, args).sendToTarget();
+        }
+
+        @Override
+        public void changeCameraCapabilities(CameraCapabilities cameraCapabilities)
+                throws RemoteException {
+            mHandler.obtainMessage(MSG_CHANGE_CAMERA_CAPABILITIES, cameraCapabilities)
+                    .sendToTarget();
+        }
+    };
+
+    public VideoCallbackServant(IVideoCallback delegate) {
+        mDelegate = delegate;
+    }
+
+    public IVideoCallback getStub() {
+        return mStub;
+    }
+}
diff --git a/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl b/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl
index 32b877d..a673733 100644
--- a/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IConnectionService.aidl
@@ -65,6 +65,10 @@
 
     void splitFromConference(String callId);
 
+    void mergeConference(String conferenceCallId);
+
+    void swapConference(String conferenceCallId);
+
     void onPostDialContinue(String callId, boolean proceed);
 
     void onPhoneAccountClicked(String callId);
diff --git a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
index ef1769f..610178e 100644
--- a/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IConnectionServiceAdapter.aidl
@@ -76,6 +76,4 @@
     void setCallerDisplayName(String callId, String callerDisplayName, int presentation);
 
     void setConferenceableConnections(String callId, in List<String> conferenceableCallIds);
-
-    void startActivityFromInCall(String callId, in PendingIntent intent);
 }
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
index 2ce5c6b..626bb91 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl
@@ -54,6 +54,10 @@
 
     void splitFromConference(String callId);
 
+    void mergeConference(String callId);
+
+    void swapConference(String callId);
+
     void turnOnProximitySensor();
 
     void turnOffProximitySensor(boolean screenOnImmediately);
diff --git a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
index 5d4992f..23dbaf4 100644
--- a/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IInCallService.aidl
@@ -43,6 +43,4 @@
     void onAudioStateChanged(in AudioState audioState);
 
     void bringToForeground(boolean showDialpad);
-
-    void startActivity(String callId, in PendingIntent intent);
 }
diff --git a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl b/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
index 131307a..6ab78c4 100644
--- a/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
+++ b/telecomm/java/com/android/internal/telecomm/ITelecommService.aidl
@@ -37,12 +37,17 @@
     /**
      * @see TelecommServiceImpl#getDefaultOutgoingPhoneAccount
      */
-    PhoneAccountHandle getDefaultOutgoingPhoneAccount();
+    PhoneAccountHandle getDefaultOutgoingPhoneAccount(in String uriScheme);
 
     /**
-     * @see TelecommServiceImpl#setDefaultOutgoingPhoneAccount
+     * @see TelecommServiceImpl#getUserSelectedOutgoingPhoneAccount
      */
-    void setDefaultOutgoingPhoneAccount(in PhoneAccountHandle account);
+    PhoneAccountHandle getUserSelectedOutgoingPhoneAccount();
+
+    /**
+     * @see TelecommServiceImpl#setUserSelectedOutgoingPhoneAccount
+     */
+    void setUserSelectedOutgoingPhoneAccount(in PhoneAccountHandle account);
 
     /**
      * @see TelecommServiceImpl#getOutgoingPhoneAccounts
@@ -50,7 +55,12 @@
     List<PhoneAccountHandle> getOutgoingPhoneAccounts();
 
     /**
-     * @see TelecommServiceImpl#getPhoneAccount
+     * @see TelecommManager#getPhoneAccountsSupportingScheme
+     */
+    List<PhoneAccountHandle> getPhoneAccountsSupportingScheme(in String uriScheme);
+
+    /**
+     * @see TelecommManager#getPhoneAccount
      */
     PhoneAccount getPhoneAccount(in PhoneAccountHandle account);
 
diff --git a/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl b/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl
index 9d3ad7f..b0aa988 100644
--- a/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl
+++ b/telecomm/java/com/android/internal/telecomm/IVideoProvider.aidl
@@ -25,7 +25,7 @@
  * @hide
  */
 oneway interface IVideoProvider {
-    void setVideoListener(IBinder videoListenerBinder);
+    void setVideoCallback(IBinder videoCallbackBinder);
 
     void setCamera(String cameraId);
 
diff --git a/telephony/java/android/telephony/IccOpenLogicalChannelResponse.java b/telephony/java/android/telephony/IccOpenLogicalChannelResponse.java
index dbe38ea..4621f91 100644
--- a/telephony/java/android/telephony/IccOpenLogicalChannelResponse.java
+++ b/telephony/java/android/telephony/IccOpenLogicalChannelResponse.java
@@ -27,7 +27,7 @@
     /**
      * Indicates an invalid channel.
      */
-    public static int INVALID_CHANNEL = -1;
+    public static final int INVALID_CHANNEL = -1;
 
     /**
      * Possible status values returned by open channel command.
@@ -37,10 +37,10 @@
      * STATUS_NO_SUCH_ELEMENT: AID not found on UICC.
      * STATUS_UNKNOWN_ERROR: Unknown error in open channel command.
      */
-    public static int STATUS_NO_ERROR = 1;
-    public static int STATUS_MISSING_RESOURCE = 2;
-    public static int STATUS_NO_SUCH_ELEMENT = 3;
-    public static int STATUS_UNKNOWN_ERROR = 4;
+    public static final int STATUS_NO_ERROR = 1;
+    public static final int STATUS_MISSING_RESOURCE = 2;
+    public static final int STATUS_NO_SUCH_ELEMENT = 3;
+    public static final int STATUS_UNKNOWN_ERROR = 4;
 
     private final int mChannel;
     private final int mStatus;
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index acb97a0..30799f8 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -38,8 +38,8 @@
 
 import static com.android.internal.telephony.PhoneConstants.SUBSCRIPTION_KEY;
 import static com.android.internal.telephony.TelephonyProperties.PROPERTY_ICC_OPERATOR_ISO_COUNTRY;
-import static com.android.internal.telephony.TelephonyProperties.PROPERTY_IDP_STRING;
 import static com.android.internal.telephony.TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY;
+import static com.android.internal.telephony.TelephonyProperties.PROPERTY_OPERATOR_IDP_STRING;
 
 import java.util.Locale;
 import java.util.regex.Matcher;
@@ -164,14 +164,6 @@
             return uri.getSchemeSpecificPart();
         }
 
-        // TODO: We don't check for SecurityException here (requires
-        // CALL_PRIVILEGED permission).
-        if (scheme.equals("voicemail")) {
-            long subId = intent.getLongExtra(SUBSCRIPTION_KEY,
-                    SubscriptionManager.getDefaultVoiceSubId());
-            return TelephonyManager.getDefault().getCompleteVoiceMailNumber(subId);
-        }
-
         if (context == null) {
             return null;
         }
@@ -2223,81 +2215,79 @@
     cdmaCheckAndProcessPlusCodeByNumberFormat(String dialStr,int currFormat,int defaultFormat) {
         String retStr = dialStr;
 
+        boolean useNanp = (currFormat == defaultFormat) && (currFormat == FORMAT_NANP);
+
         // Checks if the plus sign character is in the passed-in dial string
         if (dialStr != null &&
             dialStr.lastIndexOf(PLUS_SIGN_STRING) != -1) {
-            // Format the string based on the rules for the country the number is from,
-            // and the current country the phone is camped on.
-            if ((currFormat == defaultFormat) && (currFormat == FORMAT_NANP)) {
-                // Handle case where default and current telephone numbering plans are NANP.
-                String postDialStr = null;
-                String tempDialStr = dialStr;
 
-                // Sets the retStr to null since the conversion will be performed below.
-                retStr = null;
-                if (DBG) log("checkAndProcessPlusCode,dialStr=" + dialStr);
-                // This routine is to process the plus sign in the dial string by loop through
-                // the network portion, post dial portion 1, post dial portion 2... etc. if
-                // applied
-                do {
-                    String networkDialStr;
+            // Handle case where default and current telephone numbering plans are NANP.
+            String postDialStr = null;
+            String tempDialStr = dialStr;
+
+            // Sets the retStr to null since the conversion will be performed below.
+            retStr = null;
+            if (DBG) log("checkAndProcessPlusCode,dialStr=" + dialStr);
+            // This routine is to process the plus sign in the dial string by loop through
+            // the network portion, post dial portion 1, post dial portion 2... etc. if
+            // applied
+            do {
+                String networkDialStr;
+                // Format the string based on the rules for the country the number is from,
+                // and the current country the phone is camped
+                if (useNanp) {
                     networkDialStr = extractNetworkPortion(tempDialStr);
-                    // Handles the conversion within NANP
-                    networkDialStr = processPlusCodeWithinNanp(networkDialStr);
+                } else  {
+                    networkDialStr = extractNetworkPortionAlt(tempDialStr);
 
-                    // Concatenates the string that is converted from network portion
-                    if (!TextUtils.isEmpty(networkDialStr)) {
-                        if (retStr == null) {
-                            retStr = networkDialStr;
-                        } else {
-                            retStr = retStr.concat(networkDialStr);
-                        }
+                }
+
+                networkDialStr = processPlusCode(networkDialStr, useNanp);
+
+                // Concatenates the string that is converted from network portion
+                if (!TextUtils.isEmpty(networkDialStr)) {
+                    if (retStr == null) {
+                        retStr = networkDialStr;
                     } else {
-                        // This should never happen since we checked the if dialStr is null
-                        // and if it contains the plus sign in the beginning of this function.
-                        // The plus sign is part of the network portion.
-                        Rlog.e("checkAndProcessPlusCode: null newDialStr", networkDialStr);
-                        return dialStr;
+                        retStr = retStr.concat(networkDialStr);
                     }
-                    postDialStr = extractPostDialPortion(tempDialStr);
-                    if (!TextUtils.isEmpty(postDialStr)) {
-                        int dialableIndex = findDialableIndexFromPostDialStr(postDialStr);
+                } else {
+                    // This should never happen since we checked the if dialStr is null
+                    // and if it contains the plus sign in the beginning of this function.
+                    // The plus sign is part of the network portion.
+                    Rlog.e("checkAndProcessPlusCode: null newDialStr", networkDialStr);
+                    return dialStr;
+                }
+                postDialStr = extractPostDialPortion(tempDialStr);
+                if (!TextUtils.isEmpty(postDialStr)) {
+                    int dialableIndex = findDialableIndexFromPostDialStr(postDialStr);
 
-                        // dialableIndex should always be greater than 0
-                        if (dialableIndex >= 1) {
-                            retStr = appendPwCharBackToOrigDialStr(dialableIndex,
-                                     retStr,postDialStr);
-                            // Skips the P/W character, extracts the dialable portion
-                            tempDialStr = postDialStr.substring(dialableIndex);
-                        } else {
-                            // Non-dialable character such as P/W should not be at the end of
-                            // the dial string after P/W processing in CdmaConnection.java
-                            // Set the postDialStr to "" to break out of the loop
-                            if (dialableIndex < 0) {
-                                postDialStr = "";
-                            }
-                            Rlog.e("wrong postDialStr=", postDialStr);
+                    // dialableIndex should always be greater than 0
+                    if (dialableIndex >= 1) {
+                        retStr = appendPwCharBackToOrigDialStr(dialableIndex,
+                                 retStr,postDialStr);
+                        // Skips the P/W character, extracts the dialable portion
+                        tempDialStr = postDialStr.substring(dialableIndex);
+                    } else {
+                        // Non-dialable character such as P/W should not be at the end of
+                        // the dial string after P/W processing in CdmaConnection.java
+                        // Set the postDialStr to "" to break out of the loop
+                        if (dialableIndex < 0) {
+                            postDialStr = "";
                         }
+                        Rlog.e("wrong postDialStr=", postDialStr);
                     }
-                    if (DBG) log("checkAndProcessPlusCode,postDialStr=" + postDialStr);
-                } while (!TextUtils.isEmpty(postDialStr) && !TextUtils.isEmpty(tempDialStr));
-            } else {
-                // TODO: Support NANP international conversion and other telephone numbering plans.
-                // Currently the phone is never used in non-NANP system, so return the original
-                // dial string.
-                Rlog.e("checkAndProcessPlusCode:non-NANP not supported", dialStr);
-            }
+                }
+                if (DBG) log("checkAndProcessPlusCode,postDialStr=" + postDialStr);
+            } while (!TextUtils.isEmpty(postDialStr) && !TextUtils.isEmpty(tempDialStr));
         }
         return retStr;
-     }
+    }
 
-    // This function gets the default international dialing prefix
-    private static String getDefaultIdp( ) {
-        String ps = null;
-        SystemProperties.get(PROPERTY_IDP_STRING, ps);
-        if (TextUtils.isEmpty(ps)) {
-            ps = NANP_IDP_STRING;
-        }
+    private static String getCurrentIdp(boolean useNanp) {
+        // in case, there is no IDD is found, we shouldn't convert it.
+        String ps = SystemProperties.get(
+                PROPERTY_OPERATOR_IDP_STRING, useNanp ? NANP_IDP_STRING : PLUS_SIGN_STRING);
         return ps;
     }
 
@@ -2326,8 +2316,9 @@
     /**
      * This function checks if the passed in string conforms to the NANP format
      * i.e. NXX-NXX-XXXX, N is any digit 2-9 and X is any digit 0-9
+     * @hide
      */
-    private static boolean isNanp (String dialStr) {
+    public static boolean isNanp (String dialStr) {
         boolean retVal = false;
         if (dialStr != null) {
             if (dialStr.length() == NANP_LENGTH) {
@@ -2407,31 +2398,32 @@
     }
 
     /**
-     * This function handles the plus code conversion within NANP CDMA network
+     * This function handles the plus code conversion
      * If the number format is
      * 1)+1NANP,remove +,
      * 2)other than +1NANP, any + numbers,replace + with the current IDP
      */
-    private static String processPlusCodeWithinNanp(String networkDialStr) {
+    private static String processPlusCode(String networkDialStr, boolean useNanp) {
         String retStr = networkDialStr;
 
-        if (DBG) log("processPlusCodeWithinNanp,networkDialStr=" + networkDialStr);
+        if (DBG) log("processPlusCode, networkDialStr = " + networkDialStr
+                + "for NANP = " + useNanp);
         // If there is a plus sign at the beginning of the dial string,
         // Convert the plus sign to the default IDP since it's an international number
         if (networkDialStr != null &&
             networkDialStr.charAt(0) == PLUS_SIGN_CHAR &&
             networkDialStr.length() > 1) {
             String newStr = networkDialStr.substring(1);
-            if (isOneNanp(newStr)) {
+            // TODO: for nonNanp, should the '+' be removed if following number is country code
+            if (useNanp && isOneNanp(newStr)) {
                 // Remove the leading plus sign
                 retStr = newStr;
-             } else {
-                 String idpStr = getDefaultIdp();
-                 // Replaces the plus sign with the default IDP
-                 retStr = networkDialStr.replaceFirst("[+]", idpStr);
+            } else {
+                // Replaces the plus sign with the default IDP
+                retStr = networkDialStr.replaceFirst("[+]", getCurrentIdp(useNanp));
             }
         }
-        if (DBG) log("processPlusCodeWithinNanp,retStr=" + retStr);
+        if (DBG) log("processPlusCode, retStr=" + retStr);
         return retStr;
     }
 
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 350c27e..34da1c9 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -221,18 +221,39 @@
 
     private final Handler mHandler;
 
+    /**
+     * Create a PhoneStateListener for the Phone with the default subscription.
+     * This class requires Looper.myLooper() not return null. To supply your
+     * own non-null looper use PhoneStateListener(Looper looper) below.
+     */
     public PhoneStateListener() {
         this(SubscriptionManager.DEFAULT_SUB_ID, Looper.myLooper());
     }
 
     /**
+     * Create a PhoneStateListener for the Phone with the default subscription
+     * using a particular non-null Looper.
+     * @hide
+     */
+    public PhoneStateListener(Looper looper) {
+        this(SubscriptionManager.DEFAULT_SUB_ID, looper);
+    }
+
+    /**
+     * Create a PhoneStateListener for the Phone using the specified subscription.
+     * This class requires Looper.myLooper() not return null. To supply your
+     * own non-null Looper use PhoneStateListener(long subId, Looper looper) below.
      * @hide
      */
     public PhoneStateListener(long subId) {
         this(subId, Looper.myLooper());
     }
 
-    /** @hide */
+    /**
+     * Create a PhoneStateListener for the Phone using the specified subscription
+     * and non-null Looper.
+     * @hide
+     */
     public PhoneStateListener(long subId, Looper looper) {
         if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
         mSubId = subId;
diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubInfoRecord.java
index ced8e2f..805f787 100644
--- a/telephony/java/android/telephony/SubInfoRecord.java
+++ b/telephony/java/android/telephony/SubInfoRecord.java
@@ -1,18 +1,18 @@
 /*
-* Copyright (C) 2011-2014 MediaTek Inc.
-*
-* 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.
-*/
+ * 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 android.telephony;
 
@@ -20,96 +20,148 @@
 import android.os.Parcelable;
 
 /**
- *  A parcelable holder class of byte[] for ISms aidl implementation
- *  @hide
+ * A Parcelable class for Subscription Information.
+ * @hide - to be unhidden
  */
-
 public class SubInfoRecord implements Parcelable {
 
-    public long mSubId;
-    public String mIccId;
-    public int mSlotId;
-    public String mDisplayName;
-    public int mNameSource;
-    public int mColor;
-    public String mNumber;
-    public int mDispalyNumberFormat;
-    public int mDataRoaming;
-    public int[] mSimIconRes;
+    /**
+     * Subscription Identifier, this is a device unique number
+     * and not an index into an array
+     */
+    public long subId;
+    /** The GID for a SIM that maybe associated with this subscription, empty if unknown */
+    public String iccId;
+    /**
+     * The slot identifier for that currently contains the subscription
+     * and not necessarily unique and maybe INVALID_SLOT_ID if unknown
+     */
+    public int slotId;
+    /**
+     * The string displayed to the user that identifies this subscription
+     */
+    public String displayName;
+    /**
+     * The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
+     * NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
+     */
+    public int nameSource;
+    /**
+     * The color to be used for when displaying to the user
+     */
+    public int color;
+    /**
+     * A number presented to the user identify this subscription
+     */
+    public String number;
+    /**
+     * How to display the phone number, DISPLAY_NUMBER_NONE, DISPLAY_NUMBER_FIRST,
+     * DISPLAY_NUMBER_LAST
+     */
+    public int displayNumberFormat;
+    /**
+     * Data roaming state, DATA_RAOMING_ENABLE, DATA_RAOMING_DISABLE
+     */
+    public int dataRoaming;
+    /**
+     * SIM Icon resource identifiers. FIXME: Check with MTK what it really is
+     */
+    public int[] simIconRes;
+    /**
+     * Mobile Country Code
+     */
+    public int mcc;
+    /**
+     * Mobile Network Code
+     */
+    public int mnc;
 
     public SubInfoRecord() {
-        this.mSubId = -1;
-        this.mIccId = "";
-        this.mSlotId = -1;
-        this.mDisplayName = "";
-        this.mNameSource = 0;
-        this.mColor = 0;
-        this.mNumber = "";
-        this.mDispalyNumberFormat = 0;
-        this.mDataRoaming = 0;
-        this.mSimIconRes = new int[2];
+        this.subId = SubscriptionManager.INVALID_SUB_ID;
+        this.iccId = "";
+        this.slotId = SubscriptionManager.INVALID_SLOT_ID;
+        this.displayName = "";
+        this.nameSource = 0;
+        this.color = 0;
+        this.number = "";
+        this.displayNumberFormat = 0;
+        this.dataRoaming = 0;
+        this.simIconRes = new int[2];
+        this.mcc = 0;
+        this.mnc = 0;
     }
 
-
-    public SubInfoRecord(long subId, String iccId, int slotId, String displayname, int nameSource,
-            int mColor, String mNumber, int displayFormat, int roaming, int[] iconRes) {
-        this.mSubId = subId;
-        this.mIccId = iccId;
-        this.mSlotId = slotId;
-        this.mDisplayName = displayname;
-        this.mNameSource = nameSource;
-        this.mColor = mColor;
-        this.mNumber = mNumber;
-        this.mDispalyNumberFormat = displayFormat;
-        this.mDataRoaming = roaming;
-        this.mSimIconRes = iconRes;
+    public SubInfoRecord(long subId, String iccId, int slotId, String displayName, int nameSource,
+            int color, String number, int displayFormat, int roaming, int[] iconRes,
+            int mcc, int mnc) {
+        this.subId = subId;
+        this.iccId = iccId;
+        this.slotId = slotId;
+        this.displayName = displayName;
+        this.nameSource = nameSource;
+        this.color = color;
+        this.number = number;
+        this.displayNumberFormat = displayFormat;
+        this.dataRoaming = roaming;
+        this.simIconRes = iconRes;
+        this.mcc = mcc;
+        this.mnc = mnc;
     }
 
     public static final Parcelable.Creator<SubInfoRecord> CREATOR = new Parcelable.Creator<SubInfoRecord>() {
+        @Override
         public SubInfoRecord createFromParcel(Parcel source) {
-            long mSubId = source.readLong();
-            String mIccId = source.readString();
-            int mSlotId = source.readInt();
-            String mDisplayName = source.readString();
-            int mNameSource = source.readInt();
-            int mColor = source.readInt();
-            String mNumber = source.readString();
-            int mDispalyNumberFormat = source.readInt();
-            int mDataRoaming = source.readInt();
+            long subId = source.readLong();
+            String iccId = source.readString();
+            int slotId = source.readInt();
+            String displayName = source.readString();
+            int nameSource = source.readInt();
+            int color = source.readInt();
+            String number = source.readString();
+            int displayNumberFormat = source.readInt();
+            int dataRoaming = source.readInt();
             int[] iconRes = new int[2];
             source.readIntArray(iconRes);
+            int mcc = source.readInt();
+            int mnc = source.readInt();
 
-            return new SubInfoRecord(mSubId, mIccId, mSlotId, mDisplayName, mNameSource, mColor, mNumber,
-                mDispalyNumberFormat, mDataRoaming, iconRes);
+            return new SubInfoRecord(subId, iccId, slotId, displayName, nameSource, color, number,
+                displayNumberFormat, dataRoaming, iconRes, mcc, mnc);
         }
 
+        @Override
         public SubInfoRecord[] newArray(int size) {
             return new SubInfoRecord[size];
         }
     };
 
+    @Override
     public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mSubId);
-        dest.writeString(mIccId);
-        dest.writeInt(mSlotId);
-        dest.writeString(mDisplayName);
-        dest.writeInt(mNameSource);
-        dest.writeInt(mColor);
-        dest.writeString(mNumber);
-        dest.writeInt(mDispalyNumberFormat);
-        dest.writeInt(mDataRoaming);
-        dest.writeIntArray(mSimIconRes);
+        dest.writeLong(subId);
+        dest.writeString(iccId);
+        dest.writeInt(slotId);
+        dest.writeString(displayName);
+        dest.writeInt(nameSource);
+        dest.writeInt(color);
+        dest.writeString(number);
+        dest.writeInt(displayNumberFormat);
+        dest.writeInt(dataRoaming);
+        dest.writeIntArray(simIconRes);
+        dest.writeInt(mcc);
+        dest.writeInt(mnc);
     }
 
+    @Override
     public int describeContents() {
         return 0;
     }
 
+    @Override
     public String toString() {
-        return "{mSubId=" + mSubId + ", mIccId=" + mIccId + " mSlotId=" + mSlotId
-                + " mDisplayName=" + mDisplayName + " mNameSource=" + mNameSource
-                + " mColor=" + mColor + " mNumber=" + mNumber
-                + " mDispalyNumberFormat=" + mDispalyNumberFormat + " mDataRoaming=" + mDataRoaming
-                + " mSimIconRes=" + mSimIconRes + "}";
+        return "{mSubId=" + subId + ", mIccId=" + iccId + " mSlotId=" + slotId
+                + " mDisplayName=" + displayName + " mNameSource=" + nameSource
+                + " mColor=" + color + " mNumber=" + number
+                + " mDisplayNumberFormat=" + displayNumberFormat + " mDataRoaming=" + dataRoaming
+                + " mSimIconRes=" + simIconRes + " mMcc " + mcc + " mMnc " + mnc + "}";
     }
 }
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 79e9fd5..d0f355e 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -1,31 +1,24 @@
 /*
-* Copyright (C) 2011-2014 MediaTek Inc.
-*
-* 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.
-*/
+ * 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 android.telephony;
 
-import static android.Manifest.permission.READ_PHONE_STATE;
-
-import android.app.ActivityManagerNative;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
 import android.content.Intent;
-import android.database.Cursor;
-import android.os.UserHandle;
 import android.net.Uri;
 import android.provider.BaseColumns;
 import android.telephony.Rlog;
@@ -34,149 +27,247 @@
 
 import com.android.internal.telephony.ISub;
 import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyIntents;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map.Entry;
 
 /**
- *@hide
+ * SubscriptionManager is the application interface to SubscriptionController
+ * and provides information about the current Telephony Subscriptions.
+ *
+ * The android.Manifest.permission.READ_PHONE_STATE to retrieve the information, except
+ * getActiveSubIdList and getActiveSubIdCount for which no permission is needed.
+ *
+ * @hide - to be unhidden
  */
 public class SubscriptionManager implements BaseColumns {
     private static final String LOG_TAG = "SUB";
     private static final boolean DBG = true;
     private static final boolean VDBG = false;
 
-    // An invalid subscription identifier
-    public static final long INVALID_SUB_ID = Long.MAX_VALUE;
+    /** An invalid phone identifier */
+    /** @hide - to be unhidden */
+    public static final int INVALID_PHONE_ID = -1000;
 
-    // The default subscription identifier
-    public static final long DEFAULT_SUB_ID = Long.MAX_VALUE - 1;
+    /** Indicates the caller wants the default phone id. */
+    /** @hide - to be unhidden */
+    public static final int DEFAULT_PHONE_ID = Integer.MAX_VALUE;
 
+    /** An invalid slot identifier */
+    /** @hide - to be unhidden */
+    public static final int INVALID_SLOT_ID = -1000;
+
+    /** Indicates the caller wants the default slot id. */
+    /** @hide */
+    public static final int DEFAULT_SLOT_ID = Integer.MAX_VALUE;
+
+    /** Indicates the user should be asked which sub to use. */
+    /** @hide */
+    public static final long ASK_USER_SUB_ID = -1001;
+
+    /** An invalid subscription identifier */
+    public static final long INVALID_SUB_ID = -1000;
+
+    /** Indicates the caller wants the default sub id. */
+    /** @hide - to be unhidden */
+    public static final long DEFAULT_SUB_ID = Long.MAX_VALUE;
+
+    /** @hide */
     public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
 
+    /** @hide */
     public static final int DEFAULT_INT_VALUE = -100;
 
+    /** @hide */
     public static final String DEFAULT_STRING_VALUE = "N/A";
 
+    /** @hide */
     public static final int EXTRA_VALUE_NEW_SIM = 1;
+
+    /** @hide */
     public static final int EXTRA_VALUE_REMOVE_SIM = 2;
+    /** @hide */
     public static final int EXTRA_VALUE_REPOSITION_SIM = 3;
+    /** @hide */
     public static final int EXTRA_VALUE_NOCHANGE = 4;
 
+    /** @hide */
     public static final String INTENT_KEY_DETECT_STATUS = "simDetectStatus";
+    /** @hide */
     public static final String INTENT_KEY_SIM_COUNT = "simCount";
+    /** @hide */
     public static final String INTENT_KEY_NEW_SIM_SLOT = "newSIMSlot";
+    /** @hide */
     public static final String INTENT_KEY_NEW_SIM_STATUS = "newSIMStatus";
 
     /**
      * The ICC ID of a SIM.
      * <P>Type: TEXT (String)</P>
      */
+    /** @hide */
     public static final String ICC_ID = "icc_id";
 
     /**
      * <P>Type: INTEGER (int)</P>
      */
+    /** @hide */
     public static final String SIM_ID = "sim_id";
 
+    /** SIM is not inserted */
+    /** @hide - to be unhidden */
     public static final int SIM_NOT_INSERTED = -1;
 
     /**
-     * The display name of a SIM.
+     * TelephonyProvider column name for user displayed name.
      * <P>Type: TEXT (String)</P>
      */
+    /** @hide */
     public static final String DISPLAY_NAME = "display_name";
 
+    /**
+     * Default name resource
+     * @hide
+     */
     public static final int DEFAULT_NAME_RES = com.android.internal.R.string.unknownName;
 
     /**
-     * The display name source of a SIM.
-     * <P>Type: INT (int)</P>
+     * TelephonyProvider column name for source of the user displayed name.
+     * <P>Type: INT (int)</P> with one of the NAME_SOURCE_XXXX values below
+     *
+     * @hide
      */
     public static final String NAME_SOURCE = "name_source";
 
-    public static final int DEFAULT_SOURCE = 0;
-
-    public static final int SIM_SOURCE = 1;
-
-    public static final int USER_INPUT = 2;
+    /**
+     * The name_source is undefined
+     * @hide
+     */
+    public static final int NAME_SOURCE_UNDEFINDED = -1;
 
     /**
-     * The color of a SIM.
+     * The name_source is the default
+     * @hide
+     */
+    public static final int NAME_SOURCE_DEFAULT_SOURCE = 0;
+
+    /**
+     * The name_source is from the SIM
+     * @hide
+     */
+    public static final int NAME_SOURCE_SIM_SOURCE = 1;
+
+    /**
+     * The name_source is from the user
+     * @hide
+     */
+    public static final int NAME_SOURCE_USER_INPUT = 2;
+
+    /**
+     * TelephonyProvider column name for the color of a SIM.
      * <P>Type: INTEGER (int)</P>
      */
+    /** @hide */
     public static final String COLOR = "color";
 
+    /** @hide */
     public static final int COLOR_1 = 0;
 
+    /** @hide */
     public static final int COLOR_2 = 1;
 
+    /** @hide */
     public static final int COLOR_3 = 2;
 
+    /** @hide */
     public static final int COLOR_4 = 3;
 
+    /** @hide */
     public static final int COLOR_DEFAULT = COLOR_1;
 
     /**
-     * The phone number of a SIM.
+     * TelephonyProvider column name for the phone number of a SIM.
      * <P>Type: TEXT (String)</P>
      */
+    /** @hide */
     public static final String NUMBER = "number";
 
     /**
-     * The number display format of a SIM.
+     * TelephonyProvider column name for the number display format of a SIM.
      * <P>Type: INTEGER (int)</P>
      */
+    /** @hide */
     public static final String DISPLAY_NUMBER_FORMAT = "display_number_format";
 
-    public static final int DISPALY_NUMBER_NONE = 0;
+    /** @hide */
+    public static final int DISPLAY_NUMBER_NONE = 0;
 
+    /** @hide */
     public static final int DISPLAY_NUMBER_FIRST = 1;
 
+    /** @hide */
     public static final int DISPLAY_NUMBER_LAST = 2;
 
+    /** @hide */
     public static final int DISLPAY_NUMBER_DEFAULT = DISPLAY_NUMBER_FIRST;
 
     /**
-     * Permission for data roaming of a SIM.
+     * TelephonyProvider column name for permission for data roaming of a SIM.
      * <P>Type: INTEGER (int)</P>
      */
+    /** @hide */
     public static final String DATA_ROAMING = "data_roaming";
 
+    /** @hide */
     public static final int DATA_ROAMING_ENABLE = 1;
 
+    /** @hide */
     public static final int DATA_ROAMING_DISABLE = 0;
 
+    /** @hide */
     public static final int DATA_ROAMING_DEFAULT = DATA_ROAMING_DISABLE;
 
+    /**
+     * TelephonyProvider column name for the MCC associated with a SIM.
+     * <P>Type: INTEGER (int)</P>
+     */
+    public static final String MCC = "mcc";
+
+    /**
+     * TelephonyProvider column name for the MNC associated with a SIM.
+     * <P>Type: INTEGER (int)</P>
+     */
+    public static final String MNC = "mnc";
+
+
     private static final int RES_TYPE_BACKGROUND_DARK = 0;
 
     private static final int RES_TYPE_BACKGROUND_LIGHT = 1;
 
     private static final int[] sSimBackgroundDarkRes = setSimResource(RES_TYPE_BACKGROUND_DARK);
 
-    private static final int[] sSimBackgroundLightRes = setSimResource(RES_TYPE_BACKGROUND_LIGHT);
+    /**
+     * Broadcast Action: The user has changed one of the default subs related to
+     * data, phone calls, or sms</p>
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String SUB_DEFAULT_CHANGED_ACTION =
+        "android.intent.action.SUB_DEFAULT_CHANGED";
 
-    private static HashMap<Integer, Long> mSimInfo = new HashMap<Integer, Long>();
-
+    /** @hide */
     public SubscriptionManager() {
         if (DBG) logd("SubscriptionManager created");
     }
 
     /**
-     * Get the SubInfoRecord according to an index
-     * @param context Context provided by caller
+     * Get the SubInfoRecord associated with the subId
      * @param subId The unique SubInfoRecord index in database
      * @return SubInfoRecord, maybe null
+     * @hide - to be unhidden
      */
-    public static SubInfoRecord getSubInfoUsingSubId(Context context, long subId) {
-        if (VDBG) logd("[getSubInfoUsingSubIdx]+ subId:" + subId);
-        if (subId <= 0) {
-            if (VDBG) logd("[getSubInfoUsingSubIdx]- subId <= 0");
+    public static SubInfoRecord getSubInfoForSubscriber(long subId) {
+        if (!isValidSubId(subId)) {
+            logd("[getSubInfoForSubscriberx]- invalid subId");
             return null;
         }
 
@@ -185,7 +276,7 @@
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
             if (iSub != null) {
-                subInfo = iSub.getSubInfoUsingSubId(subId);
+                subInfo = iSub.getSubInfoForSubscriber(subId);
             }
         } catch (RemoteException ex) {
             // ignore it
@@ -197,11 +288,11 @@
 
     /**
      * Get the SubInfoRecord according to an IccId
-     * @param context Context provided by caller
      * @param iccId the IccId of SIM card
-     * @return SubInfoRecord, maybe null
+     * @return SubInfoRecord List, maybe empty but not null
+     * @hide
      */
-    public static List<SubInfoRecord> getSubInfoUsingIccId(Context context, String iccId) {
+    public static List<SubInfoRecord> getSubInfoUsingIccId(String iccId) {
         if (VDBG) logd("[getSubInfoUsingIccId]+ iccId=" + iccId);
         if (iccId == null) {
             logd("[getSubInfoUsingIccId]- null iccid");
@@ -219,19 +310,23 @@
             // ignore it
         }
 
+
+        if (result == null) {
+            result = new ArrayList<SubInfoRecord>();
+        }
         return result;
     }
 
     /**
      * Get the SubInfoRecord according to slotId
-     * @param context Context provided by caller
      * @param slotId the slot which the SIM is inserted
-     * @return SubInfoRecord, maybe null
+     * @return SubInfoRecord list, maybe empty but not null
+     * @hide - to be unhidden
      */
-    public static List<SubInfoRecord> getSubInfoUsingSlotId(Context context, int slotId) {
-        if (VDBG) logd("[getSubInfoUsingSlotId]- slotId=" + slotId);
-        if (slotId < 0) {
-            logd("[getSubInfoUsingSlotId]- return null, slotId < 0");
+    public static List<SubInfoRecord> getSubInfoUsingSlotId(int slotId) {
+        // FIXME: Consider never returning null
+        if (!isValidSlotId(slotId)) {
+            logd("[getSubInfoUsingSlotId]- invalid slotId");
             return null;
         }
 
@@ -246,15 +341,20 @@
             // ignore it
         }
 
+
+        if (result == null) {
+            result = new ArrayList<SubInfoRecord>();
+        }
         return result;
     }
 
     /**
-     * Get all the SubInfoRecord(s) in subinfo database
-     * @param context Context provided by caller
-     * @return Array list of all SubInfoRecords in database, include thsoe that were inserted before
+     * Get all the SubInfoRecord(s) in subInfo database
+     * @return List of all SubInfoRecords in database, include those that were inserted before
+     * maybe empty but not null.
+     * @hide
      */
-    public static List<SubInfoRecord> getAllSubInfoList(Context context) {
+    public static List<SubInfoRecord> getAllSubInfoList() {
         if (VDBG) logd("[getAllSubInfoList]+");
 
         List<SubInfoRecord> result = null;
@@ -268,37 +368,41 @@
             // ignore it
         }
 
+        if (result == null) {
+            result = new ArrayList<SubInfoRecord>();
+        }
         return result;
     }
 
     /**
      * Get the SubInfoRecord(s) of the currently inserted SIM(s)
-     * @param context Context provided by caller
-     * @return Array list of currently inserted SubInfoRecord(s)
+     * @return Array list of currently inserted SubInfoRecord(s) maybe empty but not null
+     * @hide - to be unhidden
      */
-    public static List<SubInfoRecord> getActivatedSubInfoList(Context context) {
-        if (VDBG) logd("[getActivatedSubInfoList]+");
-
+    public static List<SubInfoRecord> getActiveSubInfoList() {
         List<SubInfoRecord> result = null;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
             if (iSub != null) {
-                result = iSub.getActivatedSubInfoList();
+                result = iSub.getActiveSubInfoList();
             }
         } catch (RemoteException ex) {
             // ignore it
         }
 
+        if (result == null) {
+            result = new ArrayList<SubInfoRecord>();
+        }
         return result;
     }
 
     /**
      * Get the SUB count of all SUB(s) in subinfo database
-     * @param context Context provided by caller
      * @return all SIM count in database, include what was inserted before
+     * @hide
      */
-    public static int getAllSubInfoCount(Context context) {
+    public static int getAllSubInfoCount() {
         if (VDBG) logd("[getAllSubInfoCount]+");
 
         int result = 0;
@@ -316,17 +420,40 @@
     }
 
     /**
+     * Get the count of active SUB(s)
+     * @return active SIM count
+     * @hide
+     */
+    public static int getActiveSubInfoCount() {
+        int result = 0;
+
+        try {
+            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+            if (iSub != null) {
+                result = iSub.getActiveSubInfoCount();
+            }
+        } catch (RemoteException ex) {
+            // ignore it
+        }
+
+        return result;
+    }
+
+    /**
      * Add a new SubInfoRecord to subinfo database if needed
-     * @param context Context provided by caller
      * @param iccId the IccId of the SIM card
      * @param slotId the slot which the SIM is inserted
      * @return the URL of the newly created row or the updated row
+     * @hide
      */
-    public static Uri addSubInfoRecord(Context context, String iccId, int slotId) {
+    public static Uri addSubInfoRecord(String iccId, int slotId) {
         if (VDBG) logd("[addSubInfoRecord]+ iccId:" + iccId + " slotId:" + slotId);
         if (iccId == null) {
             logd("[addSubInfoRecord]- null iccId");
         }
+        if (!isValidSlotId(slotId)) {
+            logd("[addSubInfoRecord]- invalid slotId");
+        }
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -345,15 +472,15 @@
 
     /**
      * Set SIM color by simInfo index
-     * @param context Context provided by caller
      * @param color the color of the SIM
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
+     * @hide
      */
-    public static int setColor(Context context, int color, long subId) {
+    public static int setColor(int color, long subId) {
         if (VDBG) logd("[setColor]+ color:" + color + " subId:" + subId);
         int size = sSimBackgroundDarkRes.length;
-        if (subId <= 0 || color < 0 || color >= size) {
+        if (!isValidSubId(subId) || color < 0 || color >= size) {
             logd("[setColor]- fail");
             return -1;
         }
@@ -375,26 +502,30 @@
 
     /**
      * Set display name by simInfo index
-     * @param context Context provided by caller
      * @param displayName the display name of SIM card
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
+     * @hide
      */
-    public static int setDisplayName(Context context, String displayName, long subId) {
-        return setDisplayName(context, displayName, subId, -1);
+    public static int setDisplayName(String displayName, long subId) {
+        return setDisplayName(displayName, subId, NAME_SOURCE_UNDEFINDED);
     }
 
     /**
      * Set display name by simInfo index with name source
-     * @param context Context provided by caller
      * @param displayName the display name of SIM card
      * @param subId the unique SubInfoRecord index in database
-     * @param nameSource, 0: DEFAULT_SOURCE, 1: SIM_SOURCE, 2: USER_INPUT
-     * @return the number of records updated
+     * @param nameSource 0: NAME_SOURCE_DEFAULT_SOURCE, 1: NAME_SOURCE_SIM_SOURCE,
+     *                   2: NAME_SOURCE_USER_INPUT, -1 NAME_SOURCE_UNDEFINED
+     * @return the number of records updated or -1 if invalid subId
+     * @hide
      */
-    public static int setDisplayName(Context context, String displayName, long subId, long nameSource) {
-        if (VDBG) logd("[setDisplayName]+  displayName:" + displayName + " subId:" + subId + " nameSource:" + nameSource);
-        if (subId <= 0) {
+    public static int setDisplayName(String displayName, long subId, long nameSource) {
+        if (VDBG) {
+            logd("[setDisplayName]+  displayName:" + displayName + " subId:" + subId
+                    + " nameSource:" + nameSource);
+        }
+        if (!isValidSubId(subId)) {
             logd("[setDisplayName]- fail");
             return -1;
         }
@@ -416,15 +547,14 @@
 
     /**
      * Set phone number by subId
-     * @param context Context provided by caller
      * @param number the phone number of the SIM
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
+     * @hide
      */
-    public static int setDispalyNumber(Context context, String number, long subId) {
-        if (VDBG) logd("[setDispalyNumber]+ number:" + number + " subId:" + subId);
-        if (number == null || subId <= 0) {
-            logd("[setDispalyNumber]- fail");
+    public static int setDisplayNumber(String number, long subId) {
+        if (number == null || !isValidSubId(subId)) {
+            logd("[setDisplayNumber]- fail");
             return -1;
         }
 
@@ -433,7 +563,7 @@
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
             if (iSub != null) {
-                result = iSub.setDispalyNumber(number, subId);
+                result = iSub.setDisplayNumber(number, subId);
             }
         } catch (RemoteException ex) {
             // ignore it
@@ -445,14 +575,14 @@
 
     /**
      * Set number display format. 0: none, 1: the first four digits, 2: the last four digits
-     * @param context Context provided by caller
      * @param format the display format of phone number
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
+     * @hide
      */
-    public static int setDisplayNumberFormat(Context context, int format, long subId) {
+    public static int setDisplayNumberFormat(int format, long subId) {
         if (VDBG) logd("[setDisplayNumberFormat]+ format:" + format + " subId:" + subId);
-        if (format < 0 || subId <= 0) {
+        if (format < 0 || !isValidSubId(subId)) {
             logd("[setDisplayNumberFormat]- fail, return -1");
             return -1;
         }
@@ -474,14 +604,14 @@
 
     /**
      * Set data roaming by simInfo index
-     * @param context Context provided by caller
      * @param roaming 0:Don't allow data when roaming, 1:Allow data when roaming
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
+     * @hide
      */
-    public static int setDataRoaming(Context context, int roaming, long subId) {
+    public static int setDataRoaming(int roaming, long subId) {
         if (VDBG) logd("[setDataRoaming]+ roaming:" + roaming + " subId:" + subId);
-        if (roaming < 0 || subId <= 0) {
+        if (roaming < 0 || !isValidSubId(subId)) {
             logd("[setDataRoaming]- fail");
             return -1;
         }
@@ -500,10 +630,18 @@
         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 INVALID_SLOT_ID.
+     * @hide - to be unhidden
+     */
     public static int getSlotId(long subId) {
-        if (VDBG) logd("[getSlotId]+ subId:" + subId);
+        if (!isValidSubId(subId)) {
+            logd("[getSlotId]- fail");
+        }
 
-        int result = 0;
+        int result = INVALID_SLOT_ID;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -518,8 +656,12 @@
 
     }
 
+    /** @hide */
     public static long[] getSubId(int slotId) {
-        if (VDBG) logd("[getSubId]+ slotId:" + slotId);
+        if (!isValidSlotId(slotId)) {
+            logd("[getSubId]- fail");
+            return null;
+        }
 
         long[] subId = null;
 
@@ -535,10 +677,14 @@
         return subId;
     }
 
+    /** @hide */
     public static int getPhoneId(long subId) {
-        if (VDBG) logd("[getPhoneId]+ subId=" + subId);
+        if (!isValidSubId(subId)) {
+            logd("[getPhoneId]- fail");
+            return INVALID_PHONE_ID;
+        }
 
-        int result = 0;
+        int result = INVALID_PHONE_ID;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -549,7 +695,7 @@
             // ignore it
         }
 
-        if (VDBG) logd("[getPhoneId]- phonId=" + result);
+        if (VDBG) logd("[getPhoneId]- phoneId=" + result);
         return result;
 
     }
@@ -583,23 +729,14 @@
         Rlog.d(LOG_TAG, "[SubManager] " + msg);
     }
 
-    public static long normalizeSubId(long subId) {
-        long retVal = (subId == DEFAULT_SUB_ID) ? getDefaultSubId() : subId;
-        Rlog.d(LOG_TAG, "[SubManager] normalizeSubId subId=" + retVal);
-        return retVal;
-    }
-
-    public static boolean validSubId(long subId) {
-        return (subId != DEFAULT_SUB_ID) && (subId != -1);
-    }
-
     /**
      * @return the "system" defaultSubId on a voice capable device this
      * will be getDefaultVoiceSubId() and on a data only device it will be
      * getDefaultDataSubId().
+     * @hide
      */
     public static long getDefaultSubId() {
-        long subId = 1;
+        long subId = INVALID_SUB_ID;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -614,8 +751,9 @@
         return subId;
     }
 
+    /** @hide */
     public static long getDefaultVoiceSubId() {
-        long subId = 1;
+        long subId = INVALID_SUB_ID;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
@@ -626,10 +764,11 @@
             // ignore it
         }
 
-        if (VDBG) logd("getDefaultSubId, sub id = " + subId);
+        if (VDBG) logd("getDefaultVoiceSubId, sub id = " + subId);
         return subId;
     }
 
+    /** @hide */
     public static void setDefaultVoiceSubId(long subId) {
         if (VDBG) logd("setDefaultVoiceSubId sub id = " + subId);
         try {
@@ -638,34 +777,81 @@
                 iSub.setDefaultVoiceSubId(subId);
             }
         } catch (RemoteException ex) {
-         // ignore it
+            // ignore it
         }
     }
 
-    public static long getPreferredSmsSubId() {
-        // FIXME add framework support to get the preferred sub
-        return getDefaultSubId();
+    /** @hide */
+    public static SubInfoRecord getDefaultVoiceSubInfo() {
+        return getSubInfoForSubscriber(getDefaultVoiceSubId());
     }
 
-    public static long getPreferredDataSubId() {
-        // FIXME add framework support to get the preferred sub
-        return getDefaultSubId();
+    /** @hide */
+    public static int getDefaultVoicePhoneId() {
+        return getPhoneId(getDefaultVoiceSubId());
     }
 
-    public static long getDefaultDataSubId() {
+    /**
+     * @return subId of the DefaultSms subscription or the value INVALID_SUB_ID if an error.
+     * @hide - to be unhidden
+     */
+    public static long getDefaultSmsSubId() {
+        long subId = INVALID_SUB_ID;
 
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
             if (iSub != null) {
-                return iSub.getDefaultDataSubId();
-            } else {
-                return -1;
+                subId = iSub.getDefaultSmsSubId();
             }
         } catch (RemoteException ex) {
-            return -1;
+            // ignore it
+        }
+
+        if (VDBG) logd("getDefaultSmsSubId, sub id = " + subId);
+        return subId;
+    }
+
+    /** @hide */
+    public static void setDefaultSmsSubId(long subId) {
+        if (VDBG) logd("setDefaultSmsSubId sub id = " + subId);
+        try {
+            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+            if (iSub != null) {
+                iSub.setDefaultSmsSubId(subId);
+            }
+        } catch (RemoteException ex) {
+            // ignore it
         }
     }
 
+    /** @hide */
+    public static SubInfoRecord getDefaultSmsSubInfo() {
+        return getSubInfoForSubscriber(getDefaultSmsSubId());
+    }
+
+    /** @hide */
+    public static int getDefaultSmsPhoneId() {
+        return getPhoneId(getDefaultSmsSubId());
+    }
+
+    /** @hide */
+    public static long getDefaultDataSubId() {
+        long subId = INVALID_SUB_ID;
+
+        try {
+            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+            if (iSub != null) {
+                subId = iSub.getDefaultDataSubId();
+            }
+        } catch (RemoteException ex) {
+            // ignore it
+        }
+
+        if (VDBG) logd("getDefaultDataSubId, sub id = " + subId);
+        return subId;
+    }
+
+    /** @hide */
     public static void setDefaultDataSubId(long subId) {
         if (VDBG) logd("setDataSubscription sub id = " + subId);
         try {
@@ -674,14 +860,22 @@
                 iSub.setDefaultDataSubId(subId);
             }
         } catch (RemoteException ex) {
-         // ignore it
+            // ignore it
         }
     }
 
-    public static void clearSubInfo()
-    {
-        if (VDBG) logd("[clearSubInfo]+");
+    /** @hide */
+    public static SubInfoRecord getDefaultDataSubInfo() {
+        return getSubInfoForSubscriber(getDefaultDataSubId());
+    }
 
+    /** @hide */
+    public static int getDefaultDataPhoneId() {
+        return getPhoneId(getDefaultDataSubId());
+    }
+
+    /** @hide */
+    public static void clearSubInfo() {
         try {
             ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
             if (iSub != null) {
@@ -694,19 +888,100 @@
         return;
     }
 
+    //FIXME this is vulnerable to race conditions
+    /** @hide */
+    public static boolean allDefaultsSelected() {
+        if (getDefaultDataSubId() == INVALID_SUB_ID) {
+            return false;
+        }
+        if (getDefaultSmsSubId() == INVALID_SUB_ID) {
+            return false;
+        }
+        if (getDefaultVoiceSubId() == INVALID_SUB_ID) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * If a default is set to subscription which is not active, this will reset that default back to
+     * INVALID_SUB_ID.
+     * @hide
+     */
+    public static void clearDefaultsForInactiveSubIds() {
+        if (VDBG) logd("clearDefaultsForInactiveSubIds");
+        try {
+            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+            if (iSub != null) {
+                iSub.clearDefaultsForInactiveSubIds();
+            }
+        } catch (RemoteException ex) {
+            // ignore it
+        }
+    }
+
+    /**
+     * @return true if a valid subId else false
+     * @hide - to be unhidden
+     */
+    public static boolean isValidSubId(long subId) {
+        return subId > INVALID_SUB_ID ;
+    }
+
+    /** @hide */
+    public static boolean isValidSlotId(int slotId) {
+        return slotId > INVALID_SLOT_ID && slotId < TelephonyManager.getDefault().getSimCount();
+    }
+
+    /** @hide */
+    public static boolean isValidPhoneId(int phoneId) {
+        return phoneId > INVALID_PHONE_ID
+                && phoneId < TelephonyManager.getDefault().getPhoneCount();
+    }
+
+    /** @hide */
     public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) {
-        long [] subId = SubscriptionManager.getSubId(phoneId);
-        if ((subId != null) && (subId.length >= 1)) {
-            putPhoneIdAndSubIdExtra(intent, phoneId, subId[0]);
+        long[] subIds = SubscriptionManager.getSubId(phoneId);
+        if (subIds != null && subIds.length > 0) {
+            putPhoneIdAndSubIdExtra(intent, phoneId, subIds[0]);
         } else {
             logd("putPhoneIdAndSubIdExtra: no valid subs");
         }
     }
 
+    /** @hide */
     public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId, long subId) {
         if (VDBG) logd("putPhoneIdAndSubIdExtra: phoneId=" + phoneId + " subId=" + subId);
-        intent.putExtra(PhoneConstants.SLOT_KEY, phoneId); //FIXME: RENAME TO PHONE_ID_KEY ??
         intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
+        intent.putExtra(PhoneConstants.PHONE_KEY, phoneId);
+        //FIXME this is using phoneId and slotId interchangeably
+        //Eventually, this should be removed as it is not the slot id
+        intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
+    }
+
+    /**
+     * @return the list of subId's that are active,
+     *         is never null but the length maybe 0.
+     * @hide
+     */
+    public static long[] getActiveSubIdList() {
+        long[] subId = null;
+
+        try {
+            ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
+            if (iSub != null) {
+                subId = iSub.getActiveSubIdList();
+            }
+        } catch (RemoteException ex) {
+            // ignore it
+        }
+
+        if (subId == null) {
+            subId = new long[0];
+        }
+
+        return subId;
+
     }
 }
 
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index cdee3de..d53be4f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -608,7 +608,7 @@
     public String getDeviceId(int slotId) {
         long[] subId = SubscriptionManager.getSubId(slotId);
         try {
-            return getSubscriberInfo().getDeviceIdUsingSubId(subId[0]);
+            return getSubscriberInfo().getDeviceIdForSubscriber(subId[0]);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -639,7 +639,7 @@
     public String getImei(int slotId) {
         long[] subId = SubscriptionManager.getSubId(slotId);
         try {
-            return getSubscriberInfo().getImeiUsingSubId(subId[0]);
+            return getSubscriberInfo().getImeiForSubscriber(subId[0]);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -703,7 +703,7 @@
     /** @hide */
     public void enableLocationUpdates(long subId) {
         try {
-            getITelephony().enableLocationUpdatesUsingSubId(subId);
+            getITelephony().enableLocationUpdatesForSubscriber(subId);
         } catch (RemoteException ex) {
         } catch (NullPointerException ex) {
         }
@@ -725,7 +725,7 @@
     /** @hide */
     public void disableLocationUpdates(long subId) {
         try {
-            getITelephony().disableLocationUpdatesUsingSubId(subId);
+            getITelephony().disableLocationUpdatesForSubscriber(subId);
         } catch (RemoteException ex) {
         } catch (NullPointerException ex) {
         }
@@ -772,6 +772,7 @@
      *
      * {@hide}
      */
+    @SystemApi
     public int getCurrentPhoneType() {
         return getCurrentPhoneType(getDefaultSubscription());
     }
@@ -786,12 +787,13 @@
      * @param subId for which phone type is returned
      */
     /** {@hide} */
+    @SystemApi
     public int getCurrentPhoneType(long subId) {
 
         try{
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                return telephony.getActivePhoneTypeUsingSubId(subId);
+                return telephony.getActivePhoneTypeForSubscriber(subId);
             } else {
                 // This can happen when the ITelephony interface is not up yet.
                 return getPhoneTypeFromProperty(subId);
@@ -1157,7 +1159,7 @@
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
-               return telephony.getNetworkTypeUsingSubId(subId);
+               return telephony.getNetworkTypeForSubscriber(subId);
            } else {
                // This can happen when the ITelephony interface is not up yet.
                return NETWORK_TYPE_UNKNOWN;
@@ -1211,7 +1213,7 @@
         try{
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                return telephony.getDataNetworkTypeUsingSubId(subId);
+                return telephony.getDataNetworkTypeForSubscriber(subId);
             } else {
                 // This can happen when the ITelephony interface is not up yet.
                 return NETWORK_TYPE_UNKNOWN;
@@ -1243,7 +1245,7 @@
         try{
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                return telephony.getVoiceNetworkTypeUsingSubId(subId);
+                return telephony.getVoiceNetworkTypeForSubscriber(subId);
             } else {
                 // This can happen when the ITelephony interface is not up yet.
                 return NETWORK_TYPE_UNKNOWN;
@@ -1570,7 +1572,7 @@
     /** {@hide} */
     public String getSimSerialNumber(long subId) {
         try {
-            return getSubscriberInfo().getIccSerialNumberUsingSubId(subId);
+            return getSubscriberInfo().getIccSerialNumberForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1606,7 +1608,7 @@
     /** {@hide} */
     public int getLteOnCdmaMode(long subId) {
         try {
-            return getITelephony().getLteOnCdmaModeUsingSubId(subId);
+            return getITelephony().getLteOnCdmaModeForSubscriber(subId);
         } catch (RemoteException ex) {
             // Assume no ICC card if remote exception which shouldn't happen
             return PhoneConstants.LTE_ON_CDMA_UNKNOWN;
@@ -1646,7 +1648,7 @@
     /** {@hide} */
     public String getSubscriberId(long subId) {
         try {
-            return getSubscriberInfo().getSubscriberIdUsingSubId(subId);
+            return getSubscriberInfo().getSubscriberIdForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1685,7 +1687,7 @@
     /** {@hide} */
     public String getGroupIdLevel1(long subId) {
         try {
-            return getSubscriberInfo().getGroupIdLevel1UsingSubId(subId);
+            return getSubscriberInfo().getGroupIdLevel1ForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1702,7 +1704,7 @@
      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
      */
     public String getLine1Number() {
-        return getLine1Number(getDefaultSubscription());
+        return getLine1NumberForSubscriber(getDefaultSubscription());
     }
 
     /**
@@ -1715,7 +1717,7 @@
      * @param subId whose phone number for line 1 is returned
      */
     /** {@hide} */
-    public String getLine1Number(long subId) {
+    public String getLine1NumberForSubscriber(long subId) {
         String number = null;
         try {
             number = getITelephony().getLine1NumberForDisplay(subId);
@@ -1726,7 +1728,7 @@
             return number;
         }
         try {
-            return getSubscriberInfo().getLine1NumberUsingSubId(subId);
+            return getSubscriberInfo().getLine1NumberForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1749,7 +1751,7 @@
      * @param number The dialing number
      */
     public void setLine1NumberForDisplay(String alphaTag, String number) {
-        setLine1NumberForDisplay(getDefaultSubscription(), alphaTag, number);
+        setLine1NumberForDisplayForSubscriber(getDefaultSubscription(), alphaTag, number);
     }
 
     /**
@@ -1765,10 +1767,11 @@
      * @param subId the subscriber that the alphatag and dialing number belongs to.
      * @param alphaTag alpha-tagging of the dailing nubmer
      * @param number The dialing number
+     * @hide
      */
-    public void setLine1NumberForDisplay(long subId, String alphaTag, String number) {
+    public void setLine1NumberForDisplayForSubscriber(long subId, String alphaTag, String number) {
         try {
-            getITelephony().setLine1NumberForDisplay(subId, alphaTag, number);
+            getITelephony().setLine1NumberForDisplayForSubscriber(subId, alphaTag, number);
         } catch (RemoteException ex) {
         } catch (NullPointerException ex) {
         }
@@ -1784,7 +1787,7 @@
      * nobody seems to call this.
      */
     public String getLine1AlphaTag() {
-        return getLine1AlphaTag(getDefaultSubscription());
+        return getLine1AlphaTagForSubscriber(getDefaultSubscription());
     }
 
     /**
@@ -1798,7 +1801,7 @@
      * nobody seems to call this.
      */
     /** {@hide} */
-    public String getLine1AlphaTag(long subId) {
+    public String getLine1AlphaTagForSubscriber(long subId) {
         String alphaTag = null;
         try {
             alphaTag = getITelephony().getLine1AlphaTagForDisplay(subId);
@@ -1809,7 +1812,7 @@
             return alphaTag;
         }
         try {
-            return getSubscriberInfo().getLine1AlphaTagUsingSubId(subId);
+            return getSubscriberInfo().getLine1AlphaTagForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1843,7 +1846,7 @@
     /** {@hide} */
     public String getMsisdn(long subId) {
         try {
-            return getSubscriberInfo().getMsisdnUsingSubId(subId);
+            return getSubscriberInfo().getMsisdnForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1873,7 +1876,7 @@
     /** {@hide} */
     public String getVoiceMailNumber(long subId) {
         try {
-            return getSubscriberInfo().getVoiceMailNumberUsingSubId(subId);
+            return getSubscriberInfo().getVoiceMailNumberForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1905,7 +1908,7 @@
     /** {@hide} */
     public String getCompleteVoiceMailNumber(long subId) {
         try {
-            return getSubscriberInfo().getCompleteVoiceMailNumberUsingSubId(subId);
+            return getSubscriberInfo().getCompleteVoiceMailNumberForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -1935,7 +1938,7 @@
     /** {@hide} */
     public int getVoiceMessageCount(long subId) {
         try {
-            return getITelephony().getVoiceMessageCountUsingSubId(subId);
+            return getITelephony().getVoiceMessageCountForSubscriber(subId);
         } catch (RemoteException ex) {
             return 0;
         } catch (NullPointerException ex) {
@@ -1967,7 +1970,7 @@
     /** {@hide} */
     public String getVoiceMailAlphaTag(long subId) {
         try {
-            return getSubscriberInfo().getVoiceMailAlphaTagUsingSubId(subId);
+            return getSubscriberInfo().getVoiceMailAlphaTagForSubscriber(subId);
         } catch (RemoteException ex) {
             return null;
         } catch (NullPointerException ex) {
@@ -2057,7 +2060,7 @@
     /** {@hide} */
     public int getCallState(long subId) {
         try {
-            return getITelephony().getCallStateUsingSubId(subId);
+            return getITelephony().getCallStateForSubscriber(subId);
         } catch (RemoteException ex) {
             // the phone process is restarting.
             return CALL_STATE_IDLE;
@@ -2179,7 +2182,7 @@
         String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
         try {
             Boolean notifyNow = (getITelephony() != null);
-            sRegistry.listenUsingSubId(listener.mSubId, pkgForDebug, listener.callback, events, notifyNow);
+            sRegistry.listenForSubscriber(listener.mSubId, pkgForDebug, listener.callback, events, notifyNow);
         } catch (RemoteException ex) {
             // system process dead
         } catch (NullPointerException ex) {
@@ -2202,7 +2205,7 @@
     /** {@hide} */
     public int getCdmaEriIconIndex(long subId) {
         try {
-            return getITelephony().getCdmaEriIconIndexUsingSubId(subId);
+            return getITelephony().getCdmaEriIconIndexForSubscriber(subId);
         } catch (RemoteException ex) {
             // the phone process is restarting.
             return -1;
@@ -2230,7 +2233,7 @@
     /** {@hide} */
     public int getCdmaEriIconMode(long subId) {
         try {
-            return getITelephony().getCdmaEriIconModeUsingSubId(subId);
+            return getITelephony().getCdmaEriIconModeForSubscriber(subId);
         } catch (RemoteException ex) {
             // the phone process is restarting.
             return -1;
@@ -2255,7 +2258,7 @@
     /** {@hide} */
     public String getCdmaEriText(long subId) {
         try {
-            return getITelephony().getCdmaEriTextUsingSubId(subId);
+            return getITelephony().getCdmaEriTextForSubscriber(subId);
         } catch (RemoteException ex) {
             // the phone process is restarting.
             return null;
@@ -2511,9 +2514,9 @@
      * @param content String containing SAT/USAT response in hexadecimal
      *                format starting with command tag. See TS 102 223 for
      *                details.
-     * @return The APDU response from the ICC card, with the last 4 bytes
-     *         being the status word. If the command fails, returns an empty
-     *         string.
+     * @return The APDU response from the ICC card in hexadecimal format
+     *         with the last 4 bytes being the status word. If the command fails,
+     *         returns an empty string.
      */
     public String sendEnvelopeWithStatus(String content) {
         try {
@@ -2903,27 +2906,6 @@
     }
 
     /**
-     * Get the calculated preferred network type.
-     * Used for debugging incorrect network type.
-     * <p>
-     * Requires Permission:
-     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
-     *
-     * @return the preferred network type, defined in RILConstants.java or -1 if
-     *         none available.
-     */
-    public int getCalculatedPreferredNetworkType() {
-        try {
-            return getITelephony().getCalculatedPreferredNetworkType();
-        } catch (RemoteException ex) {
-            Rlog.e(TAG, "getCalculatedPreferredNetworkType RemoteException", ex);
-        } catch (NullPointerException ex) {
-            Rlog.e(TAG, "getCalculatedPreferredNetworkType NPE", ex);
-        }
-        return -1;
-    }
-
-    /**
      * Get the preferred network type.
      * Used for device configuration by some CDMA operators.
      * <p>
@@ -2932,6 +2914,7 @@
      * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
      *
      * @return the preferred network type, defined in RILConstants.java.
+     * @hide
      */
     public int getPreferredNetworkType() {
         try {
@@ -2954,6 +2937,7 @@
      *
      * @param networkType the preferred network type, defined in RILConstants.java.
      * @return true on success; false on any failure.
+     * @hide
      */
     public boolean setPreferredNetworkType(int networkType) {
         try {
@@ -2967,25 +2951,17 @@
     }
 
     /**
-     * Set the CDMA subscription source.
-     * Used for device supporting both NV and RUIM for CDMA.
+     * Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
+     *
      * <p>
      * Requires Permission:
      *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
      * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
      *
-     * @param subscriptionType the subscription type, 0 for RUIM, 1 for NV.
      * @return true on success; false on any failure.
      */
-    public boolean setCdmaSubscription(int subscriptionType) {
-        try {
-            return getITelephony().setCdmaSubscription(subscriptionType);
-        } catch (RemoteException ex) {
-            Rlog.e(TAG, "setCdmaSubscription RemoteException", ex);
-        } catch (NullPointerException ex) {
-            Rlog.e(TAG, "setCdmaSubscription NPE", ex);
-        }
-        return false;
+    public boolean setGlobalPreferredNetworkType() {
+        return setPreferredNetworkType(RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
     }
 
     /**
@@ -3023,9 +2999,9 @@
     }
 
     /**
-     * Override the branding for the input ICCID.
+     * Override the branding for the current ICCID.
      *
-     * Once set, whenever the ICCID is inserted into the device, the service
+     * Once set, whenever the SIM is present in the device, the service
      * provider name (SPN) and the operator name will both be replaced by the
      * brand value input. To unset the value, the same function should be
      * called with a null brand value.
@@ -3034,14 +3010,12 @@
      *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
      *  or has to be carrier app - see #hasCarrierPrivileges.
      *
-     * @param iccId The ICCID of that the branding applies to.
      * @param brand The brand name to display/set.
      * @return true if the operation was executed correctly.
      */
-    public boolean setOperatorBrandOverride(String iccId, String brand) {
-        // TODO: Validate ICCID format.
+    public boolean setOperatorBrandOverride(String brand) {
         try {
-            return getITelephony().setOperatorBrandOverride(iccId, brand);
+            return getITelephony().setOperatorBrandOverride(brand);
         } catch (RemoteException ex) {
             Rlog.e(TAG, "setOperatorBrandOverride RemoteException", ex);
         } catch (NullPointerException ex) {
@@ -3393,9 +3367,10 @@
      * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
      *
      * @param enable true means enabling the simplified UI.
+     * @hide
      */
     public void enableSimplifiedNetworkSettings(boolean enable) {
-        enableSimplifiedNetworkSettings(getDefaultSubscription(), enable);
+        enableSimplifiedNetworkSettingsForSubscriber(getDefaultSubscription(), enable);
     }
 
     /**
@@ -3408,10 +3383,11 @@
      *
      * @param subId for which the simplified UI should be enabled or disabled.
      * @param enable true means enabling the simplified UI.
+     * @hide
      */
-    public void enableSimplifiedNetworkSettings(long subId, boolean enable) {
+    public void enableSimplifiedNetworkSettingsForSubscriber(long subId, boolean enable) {
         try {
-            getITelephony().enableSimplifiedNetworkSettings(subId, enable);
+            getITelephony().enableSimplifiedNetworkSettingsForSubscriber(subId, enable);
         } catch (RemoteException ex) {
         } catch (NullPointerException ex) {
         }
@@ -3424,9 +3400,10 @@
      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
      *
      * @return true if the simplified UI is enabled.
+     * @hide
      */
     public boolean getSimplifiedNetworkSettingsEnabled() {
-        return getSimplifiedNetworkSettingsEnabled(getDefaultSubscription());
+        return getSimplifiedNetworkSettingsEnabledForSubscriber(getDefaultSubscription());
     }
 
     /**
@@ -3437,10 +3414,11 @@
      *
      * @param subId for which the simplified UI should be enabled or disabled.
      * @return true if the simplified UI is enabled.
+     * @hide
      */
-    public boolean getSimplifiedNetworkSettingsEnabled(long subId) {
+    public boolean getSimplifiedNetworkSettingsEnabledForSubscriber(long subId) {
         try {
-            return getITelephony().getSimplifiedNetworkSettingsEnabled(subId);
+            return getITelephony().getSimplifiedNetworkSettingsEnabledForSubscriber(subId);
         } catch (RemoteException ex) {
         } catch (NullPointerException ex) {
         }
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index d93c282..88e5bd6 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -100,6 +100,7 @@
     public long contactIdOrZero;
     public boolean needUpdate;
     public Uri contactRefUri;
+    public String lookupKey;
 
     /**
      * Contact display photo URI.  If a contact has no display photo but a thumbnail, it'll be
@@ -231,6 +232,12 @@
                     // the in-call UI, for example.)
                 }
 
+                // Contact lookupKey
+                columnIndex = cursor.getColumnIndex(PhoneLookup.LOOKUP_KEY);
+                if (columnIndex != -1) {
+                    info.lookupKey = cursor.getString(columnIndex);
+                }
+
                 // Display photo URI.
                 columnIndex = cursor.getColumnIndex(PhoneLookup.PHOTO_URI);
                 if ((columnIndex != -1) && (cursor.getString(columnIndex) != null)) {
diff --git a/telephony/java/com/android/internal/telephony/GsmAlphabet.java b/telephony/java/com/android/internal/telephony/GsmAlphabet.java
index 4cba70d..d1c8ef0 100644
--- a/telephony/java/com/android/internal/telephony/GsmAlphabet.java
+++ b/telephony/java/com/android/internal/telephony/GsmAlphabet.java
@@ -609,16 +609,25 @@
                 }
             } else {
                 if (prevWasEscape) {
-                    char shiftChar = shiftTableToChar.charAt(c);
+                    char shiftChar =
+                            c < shiftTableToChar.length() ? shiftTableToChar.charAt(c) : ' ';
                     if (shiftChar == ' ') {
                         // display character from main table if not present in shift table
-                        ret.append(languageTableToChar.charAt(c));
+                        if (c < languageTableToChar.length()) {
+                            ret.append(languageTableToChar.charAt(c));
+                        } else {
+                            ret.append(' ');
+                        }
                     } else {
                         ret.append(shiftChar);
                     }
                 } else {
                     if (!isMbcs || c < 0x80 || i + 1 >= offset + length) {
-                        ret.append(languageTableToChar.charAt(c));
+                        if (c < languageTableToChar.length()) {
+                            ret.append(languageTableToChar.charAt(c));
+                        } else {
+                            ret.append(' ');
+                        }
                     } else {
                         // isMbcs must be true. So both mbcsBuffer and charset are initialized.
                         mbcsBuffer.clear();
diff --git a/telephony/java/com/android/internal/telephony/IMms.aidl b/telephony/java/com/android/internal/telephony/IMms.aidl
index cbcef25..4337012 100644
--- a/telephony/java/com/android/internal/telephony/IMms.aidl
+++ b/telephony/java/com/android/internal/telephony/IMms.aidl
@@ -19,6 +19,7 @@
 import android.app.PendingIntent;
 import android.content.ContentValues;
 import android.net.Uri;
+import android.os.Bundle;
 
 /**
  * Service interface to handle MMS API requests
@@ -29,7 +30,8 @@
      *
      * @param subId the SIM id
      * @param callingPkg the package name of the calling app
-     * @param pdu the MMS message encoded in standard MMS PDU format
+     * @param contentUri the content uri from which to read MMS message encoded in standard MMS
+     *  PDU format
      * @param locationUrl the optional location url for where this message should be sent to
      * @param configOverrides the carrier-specific messaging configuration values to override for
      *  sending the message. See {@link android.telephony.MessagingConfigurationManager} for the
@@ -37,8 +39,8 @@
      * @param sentIntent if not NULL this <code>PendingIntent</code> is
      *  broadcast when the message is successfully sent, or failed
      */
-    void sendMessage(long subId, String callingPkg, in byte[] pdu, String locationUrl,
-            in ContentValues configOverrides, in PendingIntent sentIntent);
+    void sendMessage(long subId, String callingPkg, in Uri contentUri,
+            String locationUrl, in Bundle configOverrides, in PendingIntent sentIntent);
 
     /**
      * Download an MMS message using known location and transaction id
@@ -47,6 +49,7 @@
      * @param callingPkg the package name of the calling app
      * @param locationUrl the location URL of the MMS message to be downloaded, usually obtained
      *  from the MMS WAP push notification
+     * @param contentUri a contentUri to which the downloaded MMS message will be written
      * @param configOverrides the carrier-specific messaging configuration values to override for
      *  downloading the message. See {@link android.telephony.MessagingConfigurationManager} for the
      *  value names and types.
@@ -54,7 +57,8 @@
      *  broadcast when the message is downloaded, or the download is failed
      */
     void downloadMessage(long subId, String callingPkg, String locationUrl,
-            in ContentValues configOverrides, in PendingIntent downloadedIntent);
+            in Uri contentUri, in Bundle configOverrides,
+            in PendingIntent downloadedIntent);
 
     /**
      * Update the status of a pending (send-by-IP) MMS message handled by the carrier app.
@@ -78,33 +82,11 @@
     void updateMmsDownloadStatus(int messageRef, in byte[] pdu);
 
     /**
-     * Get carrier-dependent configuration value as boolean. For example, if multipart SMS
-     * is supported.
+     * Get carrier-dependent configuration values.
      *
      * @param subId the SIM id
-     * @param name the configuration name
-     * @param defaultValue the default value if fail to find the name
      */
-    boolean getCarrierConfigBoolean(long subId, String name, boolean defaultValue);
-
-    /**
-     * Get carrier-dependent configuration value as int. For example, the MMS message size limit.
-     *
-     * @param subId the SIM id
-     * @param name the configuration name
-     * @param defaultValue the default value if fail to find the name
-     */
-    int getCarrierConfigInt(long subId, String name, int defaultValue);
-
-    /**
-     * Get carrier-dependent configuration value as String. For example, extra HTTP headers for
-     * MMS request.
-     *
-     * @param subId the SIM id
-     * @param name the configuration name
-     * @param defaultValue the default value if fail to find the name
-     */
-    String getCarrierConfigString(long subId, String name, String defaultValue);
+    Bundle getCarrierConfigValues(long subId);
 
     /**
      * Import a text message into system's SMS store
@@ -125,14 +107,14 @@
       * Import a multimedia message into system's MMS store
       *
       * @param callingPkg the package name of the calling app
-      * @param pdu the PDU of the message to import
+      * @param contentUri the content uri from which to read PDU of the message to import
       * @param messageId the optional message id
       * @param timestampSecs the message timestamp in seconds
       * @param seen if the message is seen
       * @param read if the message is read
       * @return the message URI, null if failed
       */
-    Uri importMultimediaMessage(String callingPkg, in byte[] pdu, String messageId,
+    Uri importMultimediaMessage(String callingPkg, in Uri contentUri, String messageId,
             long timestampSecs, boolean seen, boolean read);
 
     /**
@@ -189,10 +171,10 @@
      * Add a multimedia message draft to system MMS store
      *
      * @param callingPkg the package name of the calling app
-     * @param pdu the PDU data of the draft MMS
+     * @param contentUri the content Uri from which to read PDU data of the draft MMS
      * @return the URI of the stored draft message
      */
-    Uri addMultimediaMessageDraft(String callingPkg, in byte[] pdu);
+    Uri addMultimediaMessageDraft(String callingPkg, in Uri contentUri);
 
     /**
      * Send a system stored MMS message
@@ -210,7 +192,7 @@
      *  broadcast when the message is successfully sent, or failed
      */
     void sendStoredMessage(long subId, String callingPkg, in Uri messageUri,
-            in ContentValues configOverrides, in PendingIntent sentIntent);
+            in Bundle configOverrides, in PendingIntent sentIntent);
 
     /**
      * Turns on/off the flag to automatically write sent/received SMS/MMS messages into system
diff --git a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
index 552abaf..c203442 100644
--- a/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
+++ b/telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl
@@ -31,12 +31,12 @@
      * Retrieves the unique device ID of a subId for the device, e.g., IMEI
      * for GSM phones.
      */
-    String getDeviceIdUsingSubId(long subId);
+    String getDeviceIdForSubscriber(long subId);
 
     /**
      * Retrieves the IMEI.
      */
-    String getImeiUsingSubId(long subId);
+    String getImeiForSubscriber(long subId);
 
     /**
      * Retrieves the software version number for the device, e.g., IMEI/SV
@@ -52,7 +52,7 @@
     /**
      * Retrieves the unique subscriber ID of a given subId, e.g., IMSI for GSM phones.
      */
-    String getSubscriberIdUsingSubId(long subId);
+    String getSubscriberIdForSubscriber(long subId);
 
     /**
      * Retrieves the Group Identifier Level1 for GSM phones.
@@ -62,7 +62,7 @@
     /**
      * Retrieves the Group Identifier Level1 for GSM phones of a subId.
      */
-    String getGroupIdLevel1UsingSubId(long subId);
+    String getGroupIdLevel1ForSubscriber(long subId);
 
     /**
      * Retrieves the serial number of the ICC, if applicable.
@@ -72,7 +72,7 @@
     /**
      * Retrieves the serial number of a given subId.
      */
-    String getIccSerialNumberUsingSubId(long subId);
+    String getIccSerialNumberForSubscriber(long subId);
 
     /**
      * Retrieves the phone number string for line 1.
@@ -82,7 +82,7 @@
     /**
      * Retrieves the phone number string for line 1 of a subcription.
      */
-    String getLine1NumberUsingSubId(long subId);
+    String getLine1NumberForSubscriber(long subId);
 
 
     /**
@@ -93,7 +93,7 @@
     /**
      * Retrieves the alpha identifier for line 1 of a subId.
      */
-    String getLine1AlphaTagUsingSubId(long subId);
+    String getLine1AlphaTagForSubscriber(long subId);
 
 
     /**
@@ -104,7 +104,7 @@
     /**
      * Retrieves the Msisdn of a subId.
      */
-    String getMsisdnUsingSubId(long subId);
+    String getMsisdnForSubscriber(long subId);
 
     /**
      * Retrieves the voice mail number.
@@ -114,7 +114,7 @@
     /**
      * Retrieves the voice mail number of a given subId.
      */
-    String getVoiceMailNumberUsingSubId(long subId);
+    String getVoiceMailNumberForSubscriber(long subId);
 
     /**
      * Retrieves the complete voice mail number.
@@ -124,7 +124,7 @@
     /**
      * Retrieves the complete voice mail number for particular subId
      */
-    String getCompleteVoiceMailNumberUsingSubId(long subId);
+    String getCompleteVoiceMailNumberForSubscriber(long subId);
 
     /**
      * Retrieves the alpha identifier associated with the voice mail number.
@@ -135,7 +135,7 @@
      * Retrieves the alpha identifier associated with the voice mail number
      * of a subId.
      */
-    String getVoiceMailAlphaTagUsingSubId(long subId);
+    String getVoiceMailAlphaTagForSubscriber(long subId);
 
     /**
      * Returns the IMS private user identity (IMPI) that was loaded from the ISIM.
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index abbdc4a..32bb8b4 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -47,7 +47,7 @@
      * @param subId the subId id.
      * @return list of SmsRawData of all sms on ICC
      */
-    List<SmsRawData> getAllMessagesFromIccEfUsingSubId(in long subId, String callingPkg);
+    List<SmsRawData> getAllMessagesFromIccEfForSubscriber(in long subId, String callingPkg);
 
     /**
      * Update the specified message on the ICC.
@@ -75,7 +75,7 @@
      * @return success or not
      *
      */
-     boolean updateMessageOnIccEfUsingSubId(in long subId, String callingPkg,
+     boolean updateMessageOnIccEfForSubscriber(in long subId, String callingPkg,
              int messageIndex, int newStatus, in byte[] pdu);
 
     /**
@@ -99,7 +99,7 @@
      * @return success or not
      *
      */
-    boolean copyMessageToIccEfUsingSubId(in long subId, String callingPkg, int status,
+    boolean copyMessageToIccEfForSubscriber(in long subId, String callingPkg, int status,
             in byte[] pdu, in byte[] smsc);
 
     /**
@@ -152,7 +152,7 @@
      *  raw pdu of the status report is in the extended data ("pdu").
      * @param subId the subId id.
      */
-    void sendDataUsingSubId(long subId, String callingPkg, in String destAddr,
+    void sendDataForSubscriber(long subId, String callingPkg, in String destAddr,
             in String scAddr, in int destPort, in byte[] data, in PendingIntent sentIntent,
             in PendingIntent deliveryIntent);
 
@@ -206,7 +206,7 @@
      *  raw pdu of the status report is in the extended data ("pdu").
      * @param subId the subId on which the SMS has to be sent.
      */
-    void sendTextUsingSubId(in long subId, String callingPkg, in String destAddr,
+    void sendTextForSubscriber(in long subId, String callingPkg, in String destAddr,
             in String scAddr, in String text, in PendingIntent sentIntent,
             in PendingIntent deliveryIntent);
 
@@ -283,7 +283,7 @@
      *   extended data ("pdu").
      * @param subId the subId on which the SMS has to be sent.
      */
-    void sendMultipartTextUsingSubId(in long subId, String callingPkg,
+    void sendMultipartTextForSubscriber(in long subId, String callingPkg,
             in String destinationAddress, in String scAddress,
             in List<String> parts, in List<PendingIntent> sentIntents,
             in List<PendingIntent> deliveryIntents);
@@ -315,7 +315,7 @@
      *
      * @see #disableCellBroadcast(int)
      */
-    boolean enableCellBroadcastUsingSubId(in long subId, int messageIdentifier);
+    boolean enableCellBroadcastForSubscriber(in long subId, int messageIdentifier);
 
     /**
      * Disable reception of cell broadcast (SMS-CB) messages with the given
@@ -344,7 +344,7 @@
      *
      * @see #enableCellBroadcast(int)
      */
-    boolean disableCellBroadcastUsingSubId(in long subId, int messageIdentifier);
+    boolean disableCellBroadcastForSubscriber(in long subId, int messageIdentifier);
 
     /*
      * Enable reception of cell broadcast (SMS-CB) messages with the given
@@ -377,7 +377,7 @@
      *
      * @see #disableCellBroadcastRange(int, int)
      */
-    boolean enableCellBroadcastRangeUsingSubId(long subId, int startMessageId, int endMessageId);
+    boolean enableCellBroadcastRangeForSubscriber(long subId, int startMessageId, int endMessageId);
 
     /**
      * Disable reception of cell broadcast (SMS-CB) messages with the given
@@ -410,7 +410,7 @@
      *
      * @see #enableCellBroadcastRange(int, int, int)
      */
-    boolean disableCellBroadcastRangeUsingSubId(long subId, int startMessageId,
+    boolean disableCellBroadcastRangeForSubscriber(long subId, int startMessageId,
             int endMessageId);
 
     /**
@@ -423,7 +423,7 @@
      * Returns the premium SMS send permission for the specified package.
      * Requires system permission.
      */
-    int getPremiumSmsPermissionUsingSubId(long subId, String packageName);
+    int getPremiumSmsPermissionForSubscriber(long subId, String packageName);
 
     /**
      * Set the SMS send permission for the specified package.
@@ -439,7 +439,7 @@
      * Set the SMS send permission for the specified package.
      * Requires system permission.
      */
-    void setPremiumSmsPermissionUsingSubId(long subId, String packageName, int permission);
+    void setPremiumSmsPermissionForSubscriber(long subId, String packageName, int permission);
 
     /**
      * SMS over IMS is supported if IMS is registered and SMS is supported
@@ -459,7 +459,7 @@
      *
      * @see #getImsSmsFormat()
      */
-    boolean isImsSmsSupportedUsingSubId(long subId);
+    boolean isImsSmsSupportedForSubscriber(long subId);
 
     /*
      * get user prefered SMS subId
@@ -489,7 +489,7 @@
      *
      * @see #isImsSmsSupported()
      */
-    String getImsSmsFormatUsingSubId(long subId);
+    String getImsSmsFormatForSubscriber(long subId);
 
     /*
      * Get SMS prompt property,  enabled or not
diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl
index 6021ccf..b87365e 100755
--- a/telephony/java/com/android/internal/telephony/ISub.aidl
+++ b/telephony/java/com/android/internal/telephony/ISub.aidl
@@ -1,18 +1,18 @@
 /*
-* Copyright (C) 2011-2014 MediaTek Inc.
-*
-* 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.
-*/
+ * 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.internal.telephony;
 
@@ -22,15 +22,13 @@
 interface ISub {
     /**
      * Get the SubInfoRecord according to an index
-     * @param context Context provided by caller
      * @param subId The unique SubInfoRecord index in database
      * @return SubInfoRecord, maybe null
      */
-    SubInfoRecord getSubInfoUsingSubId(long subId);
+    SubInfoRecord getSubInfoForSubscriber(long subId);
 
     /**
      * Get the SubInfoRecord according to an IccId
-     * @param context Context provided by caller
      * @param iccId the IccId of SIM card
      * @return SubInfoRecord, maybe null
      */
@@ -38,7 +36,6 @@
 
     /**
      * Get the SubInfoRecord according to slotId
-     * @param context Context provided by caller
      * @param slotId the slot which the SIM is inserted
      * @return SubInfoRecord, maybe null
      */
@@ -46,28 +43,30 @@
 
     /**
      * Get all the SubInfoRecord(s) in subinfo database
-     * @param context Context provided by caller
      * @return Array list of all SubInfoRecords in database, include thsoe that were inserted before
      */
     List<SubInfoRecord> getAllSubInfoList();
 
     /**
      * Get the SubInfoRecord(s) of the currently inserted SIM(s)
-     * @param context Context provided by caller
      * @return Array list of currently inserted SubInfoRecord(s)
      */
-    List<SubInfoRecord> getActivatedSubInfoList();
+    List<SubInfoRecord> getActiveSubInfoList();
 
     /**
      * Get the SUB count of all SUB(s) in subinfo database
-     * @param context Context provided by caller
      * @return all SIM count in database, include what was inserted before
      */
     int getAllSubInfoCount();
 
     /**
+     * Get the count of active SUB(s)
+     * @return active SIM count
+     */
+    int getActiveSubInfoCount();
+
+    /**
      * Add a new SubInfoRecord to subinfo database if needed
-     * @param context Context provided by caller
      * @param iccId the IccId of the SIM card
      * @param slotId the slot which the SIM is inserted
      * @return the URL of the newly created row or the updated row
@@ -76,7 +75,6 @@
 
     /**
      * Set SIM color by simInfo index
-     * @param context Context provided by caller
      * @param color the color of the SIM
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
@@ -85,7 +83,6 @@
 
     /**
      * Set display name by simInfo index
-     * @param context Context provided by caller
      * @param displayName the display name of SIM card
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
@@ -94,7 +91,6 @@
 
     /**
      * Set display name by simInfo index with name source
-     * @param context Context provided by caller
      * @param displayName the display name of SIM card
      * @param subId the unique SubInfoRecord index in database
      * @param nameSource, 0: DEFAULT_SOURCE, 1: SIM_SOURCE, 2: USER_INPUT
@@ -104,16 +100,14 @@
 
     /**
      * Set phone number by subId
-     * @param context Context provided by caller
      * @param number the phone number of the SIM
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
      */
-    int setDispalyNumber(String number, long subId);
+    int setDisplayNumber(String number, long subId);
 
     /**
      * Set number display format. 0: none, 1: the first four digits, 2: the last four digits
-     * @param context Context provided by caller
      * @param format the display format of phone number
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
@@ -122,7 +116,6 @@
 
     /**
      * Set data roaming by simInfo index
-     * @param context Context provided by caller
      * @param roaming 0:Don't allow data when roaming, 1:Allow data when roaming
      * @param subId the unique SubInfoRecord index in database
      * @return the number of records updated
@@ -150,4 +143,12 @@
     long getDefaultVoiceSubId();
 
     void setDefaultVoiceSubId(long subId);
+
+    long getDefaultSmsSubId();
+
+    void setDefaultSmsSubId(long subId);
+
+    void clearDefaultsForInactiveSubIds();
+
+    long[] getActiveSubIdList();
 }
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 5c3dcdb..fa9cad4 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -59,7 +59,7 @@
      * @param subId user preferred subId.
      * @return whether it hung up
      */
-    boolean endCallUsingSubId(long subId);
+    boolean endCallForSubscriber(long subId);
 
     /**
      * Answer the currently-ringing call.
@@ -103,7 +103,7 @@
      * @param subId user preferred subId.
      * @return true if the phone state is OFFHOOK.
      */
-    boolean isOffhookUsingSubId(long subId);
+    boolean isOffhookForSubscriber(long subId);
 
     /**
      * Check if an incoming phone call is ringing or call waiting
@@ -112,7 +112,7 @@
      * @param subId user preferred subId.
      * @return true if the phone state is RINGING.
      */
-    boolean isRingingUsingSubId(long subId);
+    boolean isRingingForSubscriber(long subId);
 
     /**
      * Check if an incoming phone call is ringing or call waiting.
@@ -132,7 +132,7 @@
      * @param subId user preferred subId.
      * @return true if the phone state is IDLE.
      */
-    boolean isIdleUsingSubId(long subId);
+    boolean isIdleForSubscriber(long subId);
 
     /**
      * Check to see if the radio is on or not.
@@ -145,7 +145,7 @@
      * @param subId user preferred subId.
      * @return returns true if the radio is on.
      */
-    boolean isRadioOnUsingSubId(long subId);
+    boolean isRadioOnForSubscriber(long subId);
 
     /**
      * Check if the SIM pin lock is enabled.
@@ -167,7 +167,7 @@
      * @param subId user preferred subId.
      * @return whether the operation was a success.
      */
-    boolean supplyPinUsingSubId(long subId, String pin);
+    boolean supplyPinForSubscriber(long subId, String pin);
 
     /**
      * Supply puk to unlock the SIM and set SIM pin to new pin.
@@ -186,7 +186,7 @@
      * @param subId user preferred subId.
      * @return whether the operation was a success.
      */
-    boolean supplyPukUsingSubId(long subId, String puk, String pin);
+    boolean supplyPukForSubscriber(long subId, String puk, String pin);
 
     /**
      * Supply a pin to unlock the SIM.  Blocks until a result is determined.
@@ -204,7 +204,7 @@
      * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
      *         retValue[1] = number of attempts remaining if known otherwise -1
      */
-    int[] supplyPinReportResultUsingSubId(long subId, String pin);
+    int[] supplyPinReportResultForSubscriber(long subId, String pin);
 
     /**
      * Supply puk to unlock the SIM and set SIM pin to new pin.
@@ -226,7 +226,7 @@
      * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
      *         retValue[1] = number of attempts remaining if known otherwise -1
      */
-    int[] supplyPukReportResultUsingSubId(long subId, String puk, String pin);
+    int[] supplyPukReportResultForSubscriber(long subId, String puk, String pin);
 
     /**
      * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
@@ -245,7 +245,7 @@
      * @param subId user preferred subId.
      * @return true if MMI command is executed.
      */
-    boolean handlePinMmiUsingSubId(long subId, String dialString);
+    boolean handlePinMmiForSubscriber(long subId, String dialString);
 
     /**
      * Toggles the radio on or off.
@@ -256,7 +256,7 @@
      * Toggles the radio on or off on particular subId.
      * @param subId user preferred subId.
      */
-    void toggleRadioOnOffUsingSubId(long subId);
+    void toggleRadioOnOffForSubscriber(long subId);
 
     /**
      * Set the radio to on or off
@@ -267,7 +267,7 @@
      * Set the radio to on or off on particular subId.
      * @param subId user preferred subId.
      */
-    boolean setRadioUsingSubId(long subId, boolean turnOn);
+    boolean setRadioForSubscriber(long subId, boolean turnOn);
 
     /**
      * Set the radio to on or off unconditionally
@@ -283,7 +283,7 @@
      * Request to update location information for a subscrition in service state
      * @param subId user preferred subId.
      */
-    void updateServiceLocationUsingSubId(long subId);
+    void updateServiceLocationForSubscriber(long subId);
 
     /**
      * Enable location update notifications.
@@ -294,7 +294,7 @@
      * Enable location update notifications.
      * @param subId user preferred subId.
      */
-    void enableLocationUpdatesUsingSubId(long subId);
+    void enableLocationUpdatesForSubscriber(long subId);
 
     /**
      * Disable location update notifications.
@@ -305,7 +305,7 @@
      * Disable location update notifications.
      * @param subId user preferred subId.
      */
-    void disableLocationUpdatesUsingSubId(long subId);
+    void disableLocationUpdatesForSubscriber(long subId);
 
     /**
      * Allow mobile data connections.
@@ -334,7 +334,7 @@
     /**
      * Returns the call state for a subId.
      */
-     int getCallStateUsingSubId(long subId);
+     int getCallStateForSubscriber(long subId);
 
      int getDataActivity();
      int getDataState();
@@ -352,7 +352,7 @@
      * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
      * @param subId user preferred subId.
      */
-    int getActivePhoneTypeUsingSubId(long subId);
+    int getActivePhoneTypeForSubscriber(long subId);
 
     /**
      * Returns the CDMA ERI icon index to display
@@ -363,7 +363,7 @@
      * Returns the CDMA ERI icon index to display on particular subId.
      * @param subId user preferred subId.
      */
-    int getCdmaEriIconIndexUsingSubId(long subId);
+    int getCdmaEriIconIndexForSubscriber(long subId);
 
     /**
      * Returns the CDMA ERI icon mode,
@@ -378,7 +378,7 @@
      * 1 - FLASHING
      * @param subId user preferred subId.
      */
-    int getCdmaEriIconModeUsingSubId(long subId);
+    int getCdmaEriIconModeForSubscriber(long subId);
 
     /**
      * Returns the CDMA ERI text,
@@ -389,7 +389,7 @@
      * Returns the CDMA ERI text for particular subId,
      * @param subId user preferred subId.
      */
-    String getCdmaEriTextUsingSubId(long subId);
+    String getCdmaEriTextForSubscriber(long subId);
 
     /**
      * Returns true if OTA service provisioning needs to run.
@@ -408,7 +408,7 @@
      * @param subId user preferred subId.
      * Returns the unread count of voicemails
      */
-    int getVoiceMessageCountUsingSubId(long subId);
+    int getVoiceMessageCountForSubscriber(long subId);
 
     /**
       * Returns the network type for data transmission
@@ -420,7 +420,7 @@
      * @param subId user preferred subId.
      * Returns the network type
      */
-    int getNetworkTypeUsingSubId(long subId);
+    int getNetworkTypeForSubscriber(long subId);
 
     /**
       * Returns the network type for data transmission
@@ -432,7 +432,7 @@
       * @param subId user preferred subId.
       * Returns the network type
       */
-    int getDataNetworkTypeUsingSubId(long subId);
+    int getDataNetworkTypeForSubscriber(long subId);
 
     /**
       * Returns the network type for voice
@@ -444,7 +444,7 @@
       * @param subId user preferred subId.
       * Returns the network type
       */
-    int getVoiceNetworkTypeUsingSubId(long subId);
+    int getVoiceNetworkTypeForSubscriber(long subId);
 
     /**
      * Return true if an ICC card is present
@@ -476,7 +476,7 @@
      * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
      * or {@link PHone#LTE_ON_CDMA_TRUE}
      */
-    int getLteOnCdmaModeUsingSubId(long subId);
+    int getLteOnCdmaModeForSubscriber(long subId);
 
     /**
      * Returns the all observed cell information of the device.
@@ -643,15 +643,6 @@
     boolean setPreferredNetworkType(int networkType);
 
     /**
-     * Set the CDMA subscription source.
-     * Used for device supporting both NV and RUIM for CDMA.
-     *
-     * @param subscriptionType the subscription type, 0 for RUIM, 1 for NV.
-     * @return true on success; false on any failure.
-     */
-    boolean setCdmaSubscription(int subscriptionType);
-
-    /**
      * User enable/disable Mobile Data.
      *
      * @param enable true to turn on, else false
@@ -724,7 +715,7 @@
      * @param subId for which the simplified UI should be enabled or disabled.
      * @param enable true means enabling the simplified UI.
      */
-    void enableSimplifiedNetworkSettings(long subId, boolean enable);
+    void enableSimplifiedNetworkSettingsForSubscriber(long subId, boolean enable);
 
     /**
      * Get whether a simplified Mobile Network Settings UI is enabled.
@@ -732,7 +723,7 @@
      * @param subId for which the simplified UI should be enabled or disabled.
      * @return true if the simplified UI is enabled.
      */
-    boolean getSimplifiedNetworkSettingsEnabled(long subId);
+    boolean getSimplifiedNetworkSettingsEnabledForSubscriber(long subId);
 
     /**
      * Set the phone number string and its alphatag for line 1 for display
@@ -744,7 +735,7 @@
      * @param alphaTag alpha-tagging of the dailing nubmer
      * @param number The dialing number
      */
-    void setLine1NumberForDisplay(long subId, String alphaTag, String number);
+    void setLine1NumberForDisplayForSubscriber(long subId, String alphaTag, String number);
 
     /**
      * Returns the displayed dialing number string if it was set previously via
@@ -766,9 +757,9 @@
     String getLine1AlphaTagForDisplay(long subId);
 
     /**
-     * Override the operator branding for the input ICCID.
+     * Override the operator branding for the current ICCID.
      *
-     * Once set, whenever the ICCID is inserted into the device, the service
+     * Once set, whenever the SIM is present in the device, the service
      * provider name (SPN) and the operator name will both be replaced by the
      * brand value input. To unset the value, the same function should be
      * called with a null brand value.
@@ -777,11 +768,10 @@
      *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
      *  or has to be carrier app - see #hasCarrierPrivileges.
      *
-     * @param iccid The ICCID of that the branding applies to.
      * @param brand The brand name to display/set.
      * @return true if the operation was executed correctly.
      */
-    boolean setOperatorBrandOverride(String iccId, String brand);
+    boolean setOperatorBrandOverride(String brand);
 
     /**
      * Returns the result and response from RIL for oem request
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
index fd2d1c7..d776833 100644
--- a/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl
@@ -30,30 +30,30 @@
 
 interface ITelephonyRegistry {
     void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow);
-    void listenUsingSubId(in long subId, String pkg, IPhoneStateListener callback, int events,
+    void listenForSubscriber(in long subId, String pkg, IPhoneStateListener callback, int events,
             boolean notifyNow);
     void notifyCallState(int state, String incomingNumber);
-    void notifyCallStateUsingSubId(in long subId, int state, String incomingNumber);
+    void notifyCallStateForSubscriber(in long subId, int state, String incomingNumber);
     void notifyServiceState(in ServiceState state);
-    void notifyServiceStateUsingSubId(in long subId, in ServiceState state);
+    void notifyServiceStateForSubscriber(in long subId, in ServiceState state);
     void notifySignalStrength(in SignalStrength signalStrength);
-    void notifySignalStrengthUsingSubId(in long subId, in SignalStrength signalStrength);
+    void notifySignalStrengthForSubscriber(in long subId, in SignalStrength signalStrength);
     void notifyMessageWaitingChanged(boolean mwi);
-    void notifyMessageWaitingChangedUsingSubId(in long subId, boolean mwi);
+    void notifyMessageWaitingChangedForSubscriber(in long subId, boolean mwi);
     void notifyCallForwardingChanged(boolean cfi);
-    void notifyCallForwardingChangedUsingSubId(in long subId, boolean cfi);
+    void notifyCallForwardingChangedForSubscriber(in long subId, boolean cfi);
     void notifyDataActivity(int state);
-    void notifyDataActivityUsingSubId(in long subId, int state);
+    void notifyDataActivityForSubscriber(in long subId, int state);
     void notifyDataConnection(int state, boolean isDataConnectivityPossible,
             String reason, String apn, String apnType, in LinkProperties linkProperties,
             in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
-    void notifyDataConnectionUsingSubId(long subId, int state, boolean isDataConnectivityPossible,
+    void notifyDataConnectionForSubscriber(long subId, int state, boolean isDataConnectivityPossible,
             String reason, String apn, String apnType, in LinkProperties linkProperties,
             in NetworkCapabilities networkCapabilities, int networkType, boolean roaming);
     void notifyDataConnectionFailed(String reason, String apnType);
-    void notifyDataConnectionFailedUsingSubId(long subId, String reason, String apnType);
+    void notifyDataConnectionFailedForSubscriber(long subId, String reason, String apnType);
     void notifyCellLocation(in Bundle cellLocation);
-    void notifyCellLocationUsingSubId(in long subId, in Bundle cellLocation);
+    void notifyCellLocationForSubscriber(in long subId, in Bundle cellLocation);
     void notifyOtaspChanged(in int otaspMode);
     void notifyCellInfo(in List<CellInfo> cellInfo);
     void notifyPreciseCallState(int ringingCallState, int foregroundCallState,
@@ -61,7 +61,7 @@
     void notifyDisconnectCause(int disconnectCause, int preciseDisconnectCause);
     void notifyPreciseDataConnectionFailed(String reason, String apnType, String apn,
             String failCause);
-    void notifyCellInfoUsingSubId(in long subId, in List<CellInfo> cellInfo);
+    void notifyCellInfoForSubscriber(in long subId, in List<CellInfo> cellInfo);
     void notifyDataConnectionRealTimeInfo(in DataConnectionRealTimeInfo dcRtInfo);
     void notifyVoLteServiceStateChanged(in VoLteServiceState lteState);
 }
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index b4b1ea5..62b5596 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -136,14 +136,6 @@
     /** APN type for IA Emergency PDN */
     public static final String APN_TYPE_EMERGENCY = "emergency";
 
-    // FIXME: This looks to be used as default phoneId, rename
-    // or use SubscriptionManager.DEFAULT_SUB_ID
-    public static final int DEFAULT_SUBSCRIPTION = 0;
-
-    // FIXME: This looks to be used as invalid phoneId, rename
-    // or use SubscriptionManager.INVALID_SUB_ID
-    public static final int INVALID_SUBSCRIPTION = -1;
-
     public static final int RIL_CARD_MAX_APPS    = 8;
 
     public static final int DEFAULT_CARD_INDEX   = 0;
@@ -154,10 +146,14 @@
 
     public static final int MAX_PHONE_COUNT_TRI_SIM = 3;
 
-    public static final String SUBSCRIPTION_KEY  = "subscription";
+    public static final String PHONE_KEY = "phone";
 
     public static final String SLOT_KEY  = "slot";
 
+    // FIXME: This is used to pass a subId via intents, we need to look at its usage, which is
+    // FIXME: extensive, and see if this should be an array of all active subId's or ...?
+    public static final String SUBSCRIPTION_KEY  = "subscription";
+
     public static final String SUB_SETTING  = "subSettings";
 
     public static final int SUB1 = 0;
diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
index 85ceefd..e7aca90 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java
@@ -391,4 +391,14 @@
      */
     public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED
             = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED";
+
+    /**
+     * Broadcast Action: The default sms subscription has changed.  This has the following
+     * extra values:</p>
+     * <ul>
+     *   <li><em>subscription</em> - A int, the current sms default subscription.</li>
+     * </ul>
+     */
+    public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
+            = "android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED";
 }
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 5ec4247..c89208d 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -123,8 +123,8 @@
     /** Indicate the timer value for exiting emergency callback mode */
     static final String PROPERTY_ECM_EXIT_TIMER = "ro.cdma.ecmexittimer";
 
-    /** The international dialing prefix conversion string */
-    static final String PROPERTY_IDP_STRING = "ro.cdma.idpstring";
+    /** the international dialing prefix of current operator network */
+    static final String PROPERTY_OPERATOR_IDP_STRING = "gsm.operator.idpstring";
 
     /**
      * Defines the schema for the carrier specified OTASP number
diff --git a/test-runner/src/android/test/ProviderTestCase.java b/test-runner/src/android/test/ProviderTestCase.java
index 1b323cf..4108f34 100644
--- a/test-runner/src/android/test/ProviderTestCase.java
+++ b/test-runner/src/android/test/ProviderTestCase.java
@@ -67,9 +67,8 @@
                 filenamePrefix);
         mProviderContext = new IsolatedContext(mResolver, targetContextWrapper);
 
-        mProvider = mProviderClass.newInstance();
-        mProvider.attachInfoForTesting(mProviderContext, null);
-        assertNotNull(mProvider);
+        mProvider = ProviderTestCase2.createProviderForTest(
+                mProviderContext, mProviderClass, mProviderAuthority);
         mResolver.addProvider(mProviderAuthority, getProvider());
     }
 
@@ -107,8 +106,7 @@
                 resolver, targetContextWrapper);
         DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
 
-        T provider = providerClass.newInstance();
-        provider.attachInfoForTesting(context, null);
+        T provider = ProviderTestCase2.createProviderForTest(context, providerClass, authority);
         resolver.addProvider(authority, provider);
 
         return resolver;
diff --git a/test-runner/src/android/test/ProviderTestCase2.java b/test-runner/src/android/test/ProviderTestCase2.java
index dcd089da..1fa633e 100644
--- a/test-runner/src/android/test/ProviderTestCase2.java
+++ b/test-runner/src/android/test/ProviderTestCase2.java
@@ -19,6 +19,7 @@
 import android.content.ContentProvider;
 import android.content.ContentResolver;
 import android.content.Context;
+import android.content.pm.ProviderInfo;
 import android.content.res.Resources;
 import android.test.mock.MockContext;
 import android.test.mock.MockContentResolver;
@@ -138,14 +139,24 @@
                 getContext(), // The context that file methods are delegated to
                 filenamePrefix);
         mProviderContext = new IsolatedContext(mResolver, targetContextWrapper);
-
-        mProvider = mProviderClass.newInstance();
-        mProvider.attachInfoForTesting(mProviderContext, null);
-        assertNotNull(mProvider);
+        mProvider = createProviderForTest(mProviderContext, mProviderClass, mProviderAuthority);
         mResolver.addProvider(mProviderAuthority, getProvider());
     }
 
     /**
+     * Creates and sets up a new instance of the provider.
+     */
+    static <T extends ContentProvider> T createProviderForTest(
+            Context context, Class<T> providerClass, String authority)
+            throws IllegalAccessException, InstantiationException {
+        T instance = providerClass.newInstance();
+        ProviderInfo providerInfo = new ProviderInfo();
+        providerInfo.authority = authority;
+        instance.attachInfoForTesting(context, providerInfo);
+        return instance;
+    }
+
+    /**
      * Tears down the environment for the test fixture.
      * <p>
      * Calls {@link android.content.ContentProvider#shutdown()} on the
@@ -218,8 +229,7 @@
         Context context = new IsolatedContext(resolver, targetContextWrapper);
         DatabaseUtils.createDbFromSqlStatements(context, databaseName, databaseVersion, sql);
 
-        T provider = providerClass.newInstance();
-        provider.attachInfoForTesting(context, null);
+        T provider = createProviderForTest(context, providerClass, authority);
         resolver.addProvider(authority, provider);
 
         return resolver;
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index cd7d178..5a4e0eb 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -46,7 +46,7 @@
 import android.content.pm.VerifierDeviceIdentity;
 import android.content.res.Resources;
 import android.content.res.XmlResourceParser;
-import android.graphics.Bitmap;
+import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.os.UserHandle;
@@ -403,6 +403,29 @@
     }
 
     @Override
+    public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user,
+            Rect badgeLocation,
+            int badgeDensity) {
+        throw new UnsupportedOperationException();
+    }
+
+    /** @hide */
+    @Override
+    public Drawable getUserBadgeForDensity(UserHandle user, int density) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
     public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
         throw new UnsupportedOperationException();
     }
diff --git a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
index e03b9c8..6837d22 100644
--- a/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
+++ b/tests/ActivityTests/src/com/google/android/test/activity/ActivityTestMain.java
@@ -30,7 +30,6 @@
 import android.content.Intent;
 import android.content.ServiceConnection;
 import android.graphics.BitmapFactory;
-import android.net.Uri;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
@@ -74,7 +73,7 @@
                     Intent intent = new Intent(ActivityTestMain.this, SpamActivity.class);
                     Bundle options = null;
                     if (fg) {
-                        ActivityOptions opts = ActivityOptions.makeLaunchTaskBehindAnimation();
+                        ActivityOptions opts = ActivityOptions.makeTaskLaunchBehind();
                         options = opts.toBundle();
                     }
                     startActivity(intent, options);
@@ -391,6 +390,17 @@
     }
 
     @Override
+    protected void onPause() {
+        super.onPause();
+        Log.i(TAG, "I'm such a slooow poor loser");
+        try {
+            Thread.sleep(500);
+        } catch (InterruptedException e) {
+        }
+        Log.i(TAG, "See?");
+    }
+
+    @Override
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         if (mOverrideConfig != null) {
diff --git a/tests/Camera2Tests/CameraToo/src/com/example/android/camera2/cameratoo/CameraTooActivity.java b/tests/Camera2Tests/CameraToo/src/com/example/android/camera2/cameratoo/CameraTooActivity.java
index c630bad..d513f44 100644
--- a/tests/Camera2Tests/CameraToo/src/com/example/android/camera2/cameratoo/CameraTooActivity.java
+++ b/tests/Camera2Tests/CameraToo/src/com/example/android/camera2/cameratoo/CameraTooActivity.java
@@ -290,14 +290,14 @@
 
                 // Open the camera device
                 try {
-                    mCameraManager.openCamera(mCameraId, mCameraStateListener,
+                    mCameraManager.openCamera(mCameraId, mCameraStateCallback,
                             mBackgroundHandler);
                 } catch (CameraAccessException ex) {
                     Log.e(TAG, "Failed to configure output surface", ex);
                 }
                 mGotSecondCallback = true;
 
-                // Control flow continues in mCameraStateListener.onOpened()
+                // Control flow continues in mCameraStateCallback.onOpened()
             }
         }};
 
@@ -305,8 +305,8 @@
      * Calledbacks invoked upon state changes in our {@code CameraDevice}. <p>These are run on
      * {@code mBackgroundThread}.</p>
      */
-    final CameraDevice.StateListener mCameraStateListener =
-            new CameraDevice.StateListener() {
+    final CameraDevice.StateCallback mCameraStateCallback =
+            new CameraDevice.StateCallback() {
         @Override
         public void onOpened(CameraDevice camera) {
             Log.i(TAG, "Successfully opened camera");
@@ -337,8 +337,8 @@
      * Callbacks invoked upon state changes in our {@code CameraCaptureSession}. <p>These are run on
      * {@code mBackgroundThread}.</p>
      */
-    final CameraCaptureSession.StateListener mCaptureSessionListener =
-            new CameraCaptureSession.StateListener() {
+    final CameraCaptureSession.StateCallback mCaptureSessionListener =
+            new CameraCaptureSession.StateCallback() {
         @Override
         public void onConfigured(CameraCaptureSession session) {
             Log.i(TAG, "Finished configuring camera outputs");
diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/Camera2Source.java b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/Camera2Source.java
index 05057f2..07dfb54 100644
--- a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/Camera2Source.java
+++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/Camera2Source.java
@@ -38,7 +38,7 @@
 import android.view.Surface;
 import com.android.ex.camera2.blocking.BlockingCameraManager;
 import com.android.ex.camera2.blocking.BlockingCameraManager.BlockingOpenException;
-import com.android.ex.camera2.blocking.BlockingSessionListener;
+import com.android.ex.camera2.blocking.BlockingSessionCallback;
 import androidx.media.filterfw.Filter;
 import androidx.media.filterfw.Frame;
 import androidx.media.filterfw.FrameImage2D;
@@ -72,7 +72,7 @@
 
     private static final long SESSION_TIMEOUT_MS = 2000;
 
-    class MyCameraListener extends CameraManager.AvailabilityListener {
+    class MyCameraListener extends CameraManager.AvailabilityCallback {
 
         @Override
         public void onCameraAvailable(String cameraId) {
@@ -88,7 +88,7 @@
 
     }
 
-    class MyCaptureListener extends CameraCaptureSession.CaptureListener {
+    class MyCaptureCallback extends CameraCaptureSession.CaptureCallback {
 
         @Override
         public void onCaptureCompleted(CameraCaptureSession camera, CaptureRequest request,
@@ -189,7 +189,7 @@
         surfaces.add(mSurface);
         CaptureRequest.Builder mCaptureRequest = null;
         try {
-            BlockingSessionListener blkSession = new BlockingSessionListener();
+            BlockingSessionCallback blkSession = new BlockingSessionCallback();
 
             mCamera.createCaptureSession(surfaces, blkSession, mHandler);
             mCaptureRequest = mCamera.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
@@ -203,7 +203,7 @@
         }
 
         try {
-            mCameraSession.setRepeatingRequest(mCaptureRequest.build(), new MyCaptureListener(),
+            mCameraSession.setRepeatingRequest(mCaptureRequest.build(), new MyCaptureCallback(),
                     mHandler);
         } catch (CameraAccessException e) {
             e.printStackTrace();
diff --git a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
index 5bf59c7..a2e9117 100644
--- a/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
+++ b/tests/Compatibility/src/com/android/compatibilitytest/AppCompatibility.java
@@ -208,6 +208,12 @@
                 Log.d(TAG, "Found process " + app.processName);
                 return true;
             }
+            for (String relatedPackage : app.pkgList) {
+                if (relatedPackage.equalsIgnoreCase(processName)) {
+                    Log.d(TAG, "Found process " + app.processName);
+                    return true;
+                }
+            }
         }
         Log.d(TAG, "Failed to find process " + processName + " with package name "
                 + packageName);
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
index 3360e30..256a1d4 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/RevealActivity.java
@@ -17,6 +17,7 @@
 package com.android.test.hwui;
 
 import android.animation.Animator;
+import android.animation.AnimatorSet;
 import android.app.Activity;
 import android.content.Context;
 import android.graphics.Canvas;
@@ -34,6 +35,7 @@
     private static final int DURATION = 800;
 
     private boolean mShouldBlock;
+    private int mIteration = 0;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -57,10 +59,17 @@
         Animator animator = ViewAnimationUtils.createCircularReveal(view,
                 view.getWidth() / 2, view.getHeight() / 2,
                 0, Math.max(view.getWidth(), view.getHeight()));
-        animator.setDuration(DURATION);
-        animator.setAllowRunningAsynchronously(true);
-        animator.start();
+        if (mIteration < 2) {
+            animator.setDuration(DURATION);
+            animator.start();
+        } else {
+            AnimatorSet set = new AnimatorSet();
+            set.playTogether(animator);
+            set.setDuration(DURATION);
+            set.start();
+        }
 
+        mIteration = (mIteration + 1) % 4;
         mShouldBlock = !mShouldBlock;
         if (mShouldBlock) {
             view.post(sBlockThread);
diff --git a/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/AppListFragment.java b/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/AppListFragment.java
index 50633db..4e18ce9 100644
--- a/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/AppListFragment.java
+++ b/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/AppListFragment.java
@@ -94,7 +94,7 @@
 
             // Load the data
             final PackageManager pm = context.getPackageManager();
-            final Intent intent = new Intent(MediaBrowserService.SERVICE_ACTION);
+            final Intent intent = new Intent(MediaBrowserService.SERVICE_INTERFACE);
             final List<ResolveInfo> list = pm.queryIntentServices(intent, 0);
             final int N = list.size();
             mItems = new ArrayList(N);
diff --git a/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/BrowserListFragment.java b/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/BrowserListFragment.java
index 64602d52..8cc9b97 100644
--- a/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/BrowserListFragment.java
+++ b/tests/MusicBrowserDemo/src/com/example/android/musicbrowserdemo/BrowserListFragment.java
@@ -47,12 +47,12 @@
 
     // For args
     public static final String ARG_COMPONENT = "component";
-    public static final String ARG_URI = "uri";
+    public static final String ARG_ID = "uri";
 
     private Adapter mAdapter;
     private List<Item> mItems = new ArrayList();
     private ComponentName mComponent;
-    private Uri mUri;
+    private String mNodeId;
     private MediaBrowser mBrowser;
 
     private static class Item {
@@ -76,7 +76,7 @@
         // Get our arguments
         final Bundle args = getArguments();
         mComponent = args.getParcelable(ARG_COMPONENT);
-        mUri = args.getParcelable(ARG_URI);
+        mNodeId = args.getString(ARG_ID);
 
         // A hint about who we are, so the service can customize the results if it wants to.
         final Bundle rootHints = new Bundle();
@@ -108,7 +108,7 @@
 
         final Bundle args = new Bundle();
         args.putParcelable(BrowserListFragment.ARG_COMPONENT, mComponent);
-        args.putParcelable(BrowserListFragment.ARG_URI, item.media.getDescription().getIconUri());
+        args.putParcelable(BrowserListFragment.ARG_ID, item.media.getDescription().getIconUri());
         fragment.setArguments(args);
 
         getFragmentManager().beginTransaction()
@@ -124,14 +124,14 @@
         @Override
         public void onConnected() {
             Log.d(TAG, "mConnectionCallbacks.onConnected");
-            if (mUri == null) {
-                mUri = mBrowser.getRoot();
+            if (mNodeId == null) {
+                mNodeId = mBrowser.getRoot();
             }
-            mBrowser.subscribe(mUri, new MediaBrowser.SubscriptionCallback() {
+            mBrowser.subscribe(mNodeId, new MediaBrowser.SubscriptionCallback() {
                     @Override
-                    public void onChildrenLoaded(Uri parentUri,
+                public void onChildrenLoaded(String parentId,
                             List<MediaBrowser.MediaItem> children) {
-                        Log.d(TAG, "onChildrenLoaded parentUri=" + parentUri
+                    Log.d(TAG, "onChildrenLoaded parentId=" + parentId
                                 + " children= " + children);
                         mItems.clear();
                         final int N = children.size();
@@ -142,8 +142,8 @@
                     }
 
                     @Override
-                    public void onError(Uri parentUri) {
-                        Log.d(TAG, "onError parentUri=" + parentUri);
+                public void onError(String parentId) {
+                    Log.d(TAG, "onError parentId=" + parentId);
                     }
                 });
         }
diff --git a/tests/MusicServiceDemo/src/com/example/android/musicservicedemo/BrowserService.java b/tests/MusicServiceDemo/src/com/example/android/musicservicedemo/BrowserService.java
index 845db6c..4e2e47e 100644
--- a/tests/MusicServiceDemo/src/com/example/android/musicservicedemo/BrowserService.java
+++ b/tests/MusicServiceDemo/src/com/example/android/musicservicedemo/BrowserService.java
@@ -118,11 +118,11 @@
 
     @Override
     public BrowserRoot onGetRoot(String clientPackageName, int clientUid, Bundle rootHints) {
-        return new BrowserRoot(BROWSE_URI, null);
+        return new BrowserRoot(BROWSE_URI.toString(), null);
     }
 
     @Override
-    public void onLoadChildren(final Uri parentUri,
+    public void onLoadChildren(final String parentId,
             final Result<List<MediaBrowser.MediaItem>> result) {
         new Handler().postDelayed(new Runnable() {
                 public void run() {
@@ -134,8 +134,8 @@
                         bob.setSubtitle("Summary " + i);
                         bob.setMediaId(Uri.withAppendedPath(BASE_URI,
                                 Integer.toString(i)).toString());
-                        list.add(new MediaBrowser.MediaItem(MediaBrowser.MediaItem.FLAG_BROWSABLE,
-                                bob.build()));
+                        list.add(new MediaBrowser.MediaItem(bob.build(),
+                                MediaBrowser.MediaItem.FLAG_BROWSABLE));
                     }
 
                     result.sendResult(list);
diff --git a/tests/OneMedia/src/com/android/onemedia/NotificationHelper.java b/tests/OneMedia/src/com/android/onemedia/NotificationHelper.java
index d1172ac..ceb0937 100644
--- a/tests/OneMedia/src/com/android/onemedia/NotificationHelper.java
+++ b/tests/OneMedia/src/com/android/onemedia/NotificationHelper.java
@@ -76,7 +76,7 @@
      * destroyed before {@link #onStop} is called.
      */
     public void onStart() {
-        mController.addCallback(mCb);
+        mController.registerCallback(mCb);
         IntentFilter filter = new IntentFilter();
         filter.addAction(RequestUtils.ACTION_FFWD);
         filter.addAction(RequestUtils.ACTION_NEXT);
@@ -100,7 +100,7 @@
      */
     public void onStop() {
         mStarted = false;
-        mController.removeCallback(mCb);
+        mController.unregisterCallback(mCb);
         mService.unregisterReceiver(this);
         updateNotification();
     }
diff --git a/tests/OneMedia/src/com/android/onemedia/PlayerController.java b/tests/OneMedia/src/com/android/onemedia/PlayerController.java
index c8d72ca..7861bcc 100644
--- a/tests/OneMedia/src/com/android/onemedia/PlayerController.java
+++ b/tests/OneMedia/src/com/android/onemedia/PlayerController.java
@@ -159,7 +159,7 @@
         @Override
         public void onServiceDisconnected(ComponentName name) {
             if (mController != null) {
-                mController.removeCallback(mControllerCb);
+                mController.unregisterCallback(mControllerCb);
             }
             mBinder = null;
             mController = null;
@@ -185,7 +185,7 @@
             }
             mController = new MediaController(mContext, token);
             mContext.setMediaController(mController);
-            mController.addCallback(mControllerCb, mHandler);
+            mController.registerCallback(mControllerCb, mHandler);
             mTransportControls = mController.getTransportControls();
             if (mArt != null) {
                 setArt(mArt);
diff --git a/tests/UsageStatsTest/Android.mk b/tests/UsageStatsTest/Android.mk
index 69fefeb..5f7467a 100644
--- a/tests/UsageStatsTest/Android.mk
+++ b/tests/UsageStatsTest/Android.mk
@@ -6,6 +6,8 @@
 # Only compile source java files in this apk.
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
+LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
+
 LOCAL_PACKAGE_NAME := UsageStatsTest
 
 include $(BUILD_PACKAGE)
diff --git a/tests/UsageStatsTest/res/layout/config_row_item.xml b/tests/UsageStatsTest/res/layout/config_row_item.xml
new file mode 100644
index 0000000..547de04
--- /dev/null
+++ b/tests/UsageStatsTest/res/layout/config_row_item.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/text1"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingLeft="16dp"
+    android:paddingRight="16dp"/>
diff --git a/tests/UsageStatsTest/res/layout/row_item.xml b/tests/UsageStatsTest/res/layout/row_item.xml
index da50163..4f2bfe4 100644
--- a/tests/UsageStatsTest/res/layout/row_item.xml
+++ b/tests/UsageStatsTest/res/layout/row_item.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:paddingLeft="16dp"
@@ -8,13 +9,10 @@
     <TextView android:id="@android:id/text1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentLeft="true"
-        android:layout_centerVertical="true"
+        android:layout_weight="1"
         android:textStyle="bold"/>
 
     <TextView android:id="@android:id/text2"
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_alignBaseline="@android:id/text1"/>
-</RelativeLayout>
+        android:layout_height="wrap_content"/>
+</LinearLayout>
diff --git a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
index 5f62ad8..31e7c38 100644
--- a/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
+++ b/tests/UsageStatsTest/src/com/android/tests/usagestats/UsageLogActivity.java
@@ -21,6 +21,7 @@
 import android.content.Context;
 import android.os.Bundle;
 import android.os.Handler;
+import android.support.v4.util.CircularArray;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -35,11 +36,14 @@
     private UsageStatsManager mUsageStatsManager;
     private Adapter mAdapter;
     private Handler mHandler = new Handler();
+    private long mLastTime;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         mUsageStatsManager = (UsageStatsManager) getSystemService(Context.USAGE_STATS_SERVICE);
+        mLastTime = System.currentTimeMillis() - USAGE_STATS_PERIOD;
+
         mAdapter = new Adapter();
         setListAdapter(mAdapter);
     }
@@ -59,24 +63,31 @@
     @Override
     public void run() {
         long now = System.currentTimeMillis();
-        long beginTime = now - USAGE_STATS_PERIOD;
-        UsageEvents events = mUsageStatsManager.queryEvents(beginTime, now);
-        mAdapter.update(events);
+        UsageEvents events = mUsageStatsManager.queryEvents(mLastTime, now);
+        long lastEventTime = mAdapter.update(events);
+        if (lastEventTime >= 0) {
+            mLastTime = lastEventTime + 1;
+        }
         mHandler.postDelayed(this, 1000 * 5);
     }
 
     private class Adapter extends BaseAdapter {
+        private static final int MAX_EVENTS = 50;
+        private final CircularArray<UsageEvents.Event> mEvents = new CircularArray<>(MAX_EVENTS);
 
-        private final ArrayList<UsageEvents.Event> mEvents = new ArrayList<>();
-
-        public void update(UsageEvents results) {
-            mEvents.clear();
+        public long update(UsageEvents results) {
+            long lastTimeStamp = -1;
             while (results.hasNextEvent()) {
                 UsageEvents.Event event = new UsageEvents.Event();
                 results.getNextEvent(event);
-                mEvents.add(event);
+                lastTimeStamp = event.getTimeStamp();
+                if (mEvents.size() == MAX_EVENTS) {
+                    mEvents.popLast();
+                }
+                mEvents.addFirst(event);
             }
             notifyDataSetChanged();
+            return lastTimeStamp;
         }
 
         @Override
@@ -85,7 +96,7 @@
         }
 
         @Override
-        public Object getItem(int position) {
+        public UsageEvents.Event getItem(int position) {
             return mEvents.get(position);
         }
 
@@ -95,41 +106,72 @@
         }
 
         @Override
+        public int getItemViewType(int position) {
+            final int eventType = getItem(position).getEventType();
+            if (eventType == UsageEvents.Event.CONFIGURATION_CHANGE) {
+                return 1;
+            }
+            return 0;
+        }
+
+        @Override
         public View getView(int position, View convertView, ViewGroup parent) {
+            final UsageEvents.Event event = getItem(position);
+
             final ViewHolder holder;
             if (convertView == null) {
-                convertView = LayoutInflater.from(UsageLogActivity.this)
-                        .inflate(R.layout.row_item, parent, false);
                 holder = new ViewHolder();
-                holder.packageName = (TextView) convertView.findViewById(android.R.id.text1);
-                holder.state = (TextView) convertView.findViewById(android.R.id.text2);
+
+                if (event.getEventType() == UsageEvents.Event.CONFIGURATION_CHANGE) {
+                    convertView = LayoutInflater.from(UsageLogActivity.this)
+                            .inflate(R.layout.config_row_item, parent, false);
+                    holder.config = (TextView) convertView.findViewById(android.R.id.text1);
+                } else {
+                    convertView = LayoutInflater.from(UsageLogActivity.this)
+                            .inflate(R.layout.row_item, parent, false);
+                    holder.packageName = (TextView) convertView.findViewById(android.R.id.text1);
+                    holder.state = (TextView) convertView.findViewById(android.R.id.text2);
+                }
                 convertView.setTag(holder);
             } else {
                 holder = (ViewHolder) convertView.getTag();
             }
 
-            holder.packageName.setText(mEvents.get(position).getPackageName());
-            String state;
-            switch (mEvents.get(position).getEventType()) {
+            if (holder.packageName != null) {
+                holder.packageName.setText(event.getPackageName());
+            }
+
+            if (holder.state != null) {
+                holder.state.setText(eventToString(event.getEventType()));
+            }
+
+            if (holder.config != null &&
+                    event.getEventType() == UsageEvents.Event.CONFIGURATION_CHANGE) {
+                holder.config.setText(event.getConfiguration().toString());
+            }
+            return convertView;
+        }
+
+        private String eventToString(int eventType) {
+            switch (eventType) {
                 case UsageEvents.Event.MOVE_TO_FOREGROUND:
-                    state = "Foreground";
-                    break;
+                    return "Foreground";
 
                 case UsageEvents.Event.MOVE_TO_BACKGROUND:
-                    state = "Background";
-                    break;
+                    return "Background";
+
+                case UsageEvents.Event.CONFIGURATION_CHANGE:
+                    return "Config change";
 
                 default:
-                    state = "Unknown: " + mEvents.get(position).getEventType();
-                    break;
+                    return "Unknown: " + eventType;
             }
-            holder.state.setText(state);
-            return convertView;
         }
     }
 
     static class ViewHolder {
         public TextView packageName;
         public TextView state;
+        public TextView config;
     }
 }
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
index 1f01461..4639114 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
@@ -92,7 +92,7 @@
                 break;
             case AlwaysOnHotwordDetector.STATE_KEYPHRASE_UNENROLLED:
                 Log.i(TAG, "STATE_KEYPHRASE_UNENROLLED");
-                Intent enroll = mHotwordDetector.createIntentToEnroll();
+                Intent enroll = mHotwordDetector.createEnrollIntent();
                 Log.i(TAG, "Need to enroll with " + enroll);
                 break;
             case AlwaysOnHotwordDetector.STATE_KEYPHRASE_ENROLLED:
diff --git a/tests/WallpaperTest/Android.mk b/tests/WallpaperTest/Android.mk
new file mode 100644
index 0000000..b4259cd
--- /dev/null
+++ b/tests/WallpaperTest/Android.mk
@@ -0,0 +1,15 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := WallpaperTest
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+include $(BUILD_PACKAGE)
+
diff --git a/tests/WallpaperTest/AndroidManifest.xml b/tests/WallpaperTest/AndroidManifest.xml
new file mode 100644
index 0000000..4c914dd
--- /dev/null
+++ b/tests/WallpaperTest/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.wallpapertest" >
+
+    <uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
+
+    <application
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <service
+            android:label="@string/test_wallpaper"
+            android:name=".TestWallpaper"
+            android:permission="android.permission.BIND_WALLPAPER"
+            android:enabled="true">
+            <intent-filter>
+                <action android:name="android.service.wallpaper.WallpaperService" />
+            </intent-filter>
+            <meta-data android:name="android.service.wallpaper"
+                       android:resource="@xml/test_wallpaper" />
+        </service>
+    </application>
+</manifest>
diff --git a/tests/WallpaperTest/res/drawable-hdpi/test_wallpaper_thumb.png b/tests/WallpaperTest/res/drawable-hdpi/test_wallpaper_thumb.png
new file mode 100644
index 0000000..df92eb5
--- /dev/null
+++ b/tests/WallpaperTest/res/drawable-hdpi/test_wallpaper_thumb.png
Binary files differ
diff --git a/tests/WallpaperTest/res/layout/activity_main.xml b/tests/WallpaperTest/res/layout/activity_main.xml
new file mode 100644
index 0000000..d968396
--- /dev/null
+++ b/tests/WallpaperTest/res/layout/activity_main.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/window_background">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/dimens"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/width"/>
+            <EditText
+                android:id="@+id/dimen_width"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberDecimal"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/height"/>
+            <EditText
+                android:id="@+id/dimen_height"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberDecimal"/>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/wallpaper_offset"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/x"/>
+            <EditText
+                android:id="@+id/walloff_x"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberDecimal"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/y"/>
+            <EditText
+                android:id="@+id/walloff_y"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberDecimal"/>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/padding"/>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:textSize="17sp"
+                        android:text="@string/left"/>
+                    <EditText
+                        android:id="@+id/padding_left"
+                        android:layout_width="60sp"
+                        android:layout_height="wrap_content"
+                        android:inputType="number"/>
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:textSize="17sp"
+                        android:text="@string/right"/>
+                    <EditText
+                        android:id="@+id/padding_right"
+                        android:layout_width="60sp"
+                        android:layout_height="wrap_content"
+                        android:inputType="number"/>
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:textSize="17sp"
+                        android:text="@string/top"/>
+                    <EditText
+                        android:id="@+id/padding_top"
+                        android:layout_width="60sp"
+                        android:layout_height="wrap_content"
+                        android:inputType="number"/>
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:textSize="17sp"
+                        android:text="@string/bottom"/>
+                    <EditText
+                        android:id="@+id/padding_bottom"
+                        android:layout_width="60sp"
+                        android:layout_height="wrap_content"
+                        android:inputType="number"/>
+                </LinearLayout>
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/display_offset"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/x"/>
+            <EditText
+                android:id="@+id/dispoff_x"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberSigned"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:textSize="17sp"
+                android:text="@string/y"/>
+            <EditText
+                android:id="@+id/dispoff_y"
+                android:layout_width="60sp"
+                android:layout_height="wrap_content"
+                android:inputType="numberSigned"/>
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
diff --git a/tests/WallpaperTest/res/values-v11/styles.xml b/tests/WallpaperTest/res/values-v11/styles.xml
new file mode 100644
index 0000000..95000b2
--- /dev/null
+++ b/tests/WallpaperTest/res/values-v11/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Wallpaper">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/tests/WallpaperTest/res/values-v21/styles.xml b/tests/WallpaperTest/res/values-v21/styles.xml
new file mode 100644
index 0000000..e42d526
--- /dev/null
+++ b/tests/WallpaperTest/res/values-v21/styles.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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>
+
+    <!--
+        Base application theme for API 21+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Material.Wallpaper">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/tests/WallpaperTest/res/values/colors.xml b/tests/WallpaperTest/res/values/colors.xml
new file mode 100644
index 0000000..8c08249
--- /dev/null
+++ b/tests/WallpaperTest/res/values/colors.xml
@@ -0,0 +1,19 @@
+<?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="window_background">#80000000</color>
+</resources>
\ No newline at end of file
diff --git a/tests/WallpaperTest/res/values/strings.xml b/tests/WallpaperTest/res/values/strings.xml
new file mode 100644
index 0000000..fd21259
--- /dev/null
+++ b/tests/WallpaperTest/res/values/strings.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 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>
+    <string name="app_name">Wallpaper Test</string>
+
+    <string name="test_wallpaper">Test Wallpaper</string>
+    <string name="test_wallpaper_author">Google</string>
+    <string name="test_wallpaper_desc">
+        Test wallpaper for use with the wallpaper test app.
+    </string>
+
+    <string name="dimens">Dimens: </string>
+    <string name="width">Width: </string>
+    <string name="height">Height: </string>
+
+    <string name="wallpaper_offset">Wall off: </string>
+    <string name="x">X: </string>
+    <string name="y">Y: </string>
+
+    <string name="padding">Padding: </string>
+    <string name="left">Left: </string>
+    <string name="right">Right: </string>
+    <string name="top">Top: </string>
+    <string name="bottom">Bottom: </string>
+
+    <string name="display_offset">Disp off: </string>
+</resources>
diff --git a/tests/WallpaperTest/res/values/styles.xml b/tests/WallpaperTest/res/values/styles.xml
new file mode 100644
index 0000000..d2b91d6
--- /dev/null
+++ b/tests/WallpaperTest/res/values/styles.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Wallpaper">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/tests/WallpaperTest/res/xml/test_wallpaper.xml b/tests/WallpaperTest/res/xml/test_wallpaper.xml
new file mode 100644
index 0000000..9f7d714
--- /dev/null
+++ b/tests/WallpaperTest/res/xml/test_wallpaper.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2008, 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.
+ */
+-->
+
+<!-- The attributes in this XML file provide configuration information -->
+<!-- about the polar clock. -->
+
+<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" />
diff --git a/tests/WallpaperTest/src/com/example/wallpapertest/MainActivity.java b/tests/WallpaperTest/src/com/example/wallpapertest/MainActivity.java
new file mode 100644
index 0000000..7880f67
--- /dev/null
+++ b/tests/WallpaperTest/src/com/example/wallpapertest/MainActivity.java
@@ -0,0 +1,176 @@
+/*
+ * Copyright 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.example.wallpapertest;
+
+import android.app.Activity;
+import android.app.WallpaperManager;
+import android.content.Context;
+import android.graphics.Point;
+import android.graphics.Rect;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.WindowManager;
+import android.widget.TextView;
+
+public class MainActivity extends Activity {
+    private static final String TAG = "MainActivity";
+
+    WallpaperManager mWallpaperManager;
+    WindowManager mWindowManager;
+
+    TextView mDimenWidthView;
+    TextView mDimenHeightView;
+
+    TextView mWallOffXView;
+    TextView mWallOffYView;
+
+    TextView mPaddingLeftView;
+    TextView mPaddingRightView;
+    TextView mPaddingTopView;
+    TextView mPaddingBottomView;
+
+    TextView mDispOffXView;
+    TextView mDispOffYView;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        mWallpaperManager = (WallpaperManager)getSystemService(Context.WALLPAPER_SERVICE);
+        mWindowManager = (WindowManager)getSystemService(Context.WINDOW_SERVICE);
+
+        mDimenWidthView = (TextView) findViewById(R.id.dimen_width);
+        mDimenWidthView.addTextChangedListener(mTextWatcher);
+        mDimenHeightView = (TextView) findViewById(R.id.dimen_height);
+        mDimenHeightView.addTextChangedListener(mTextWatcher);
+
+        mWallOffXView = (TextView) findViewById(R.id.walloff_x);
+        mWallOffXView.addTextChangedListener(mTextWatcher);
+        mWallOffYView = (TextView) findViewById(R.id.walloff_y);
+        mWallOffYView.addTextChangedListener(mTextWatcher);
+
+        mPaddingLeftView = (TextView) findViewById(R.id.padding_left);
+        mPaddingLeftView.addTextChangedListener(mTextWatcher);
+        mPaddingRightView = (TextView) findViewById(R.id.padding_right);
+        mPaddingRightView.addTextChangedListener(mTextWatcher);
+        mPaddingTopView = (TextView) findViewById(R.id.padding_top);
+        mPaddingTopView.addTextChangedListener(mTextWatcher);
+        mPaddingBottomView = (TextView) findViewById(R.id.padding_bottom);
+        mPaddingBottomView.addTextChangedListener(mTextWatcher);
+
+        mDispOffXView = (TextView) findViewById(R.id.dispoff_x);
+        mDispOffXView.addTextChangedListener(mTextWatcher);
+        mDispOffYView = (TextView) findViewById(R.id.dispoff_y);
+        mDispOffYView.addTextChangedListener(mTextWatcher);
+
+        updateDimens();
+        updateWallOff();
+        updatePadding();
+        updateDispOff();
+    }
+
+    private int loadPropIntText(TextView view, int baseVal) {
+        String str = view.getText().toString();
+        if (str != null && !TextUtils.isEmpty(str)) {
+            try {
+                float fval = Float.parseFloat(str);
+                return (int)(fval*baseVal);
+            } catch (NumberFormatException e) {
+                Log.i(TAG, "Bad number: " + str, e);
+            }
+        }
+        return baseVal;
+    }
+
+    private float loadFloatText(TextView view) {
+        String str = view.getText().toString();
+        if (str != null && !TextUtils.isEmpty(str)) {
+            try {
+                return Float.parseFloat(str);
+            } catch (NumberFormatException e) {
+                Log.i(TAG, "Bad number: " + str, e);
+            }
+        }
+        return 0;
+    }
+
+    private int loadIntText(TextView view) {
+        String str = view.getText().toString();
+        if (str != null && !TextUtils.isEmpty(str)) {
+            try {
+                return Integer.parseInt(str);
+            } catch (NumberFormatException e) {
+                Log.i(TAG, "Bad number: " + str, e);
+            }
+        }
+        return 0;
+    }
+
+    public void updateDimens() {
+        Point minDims = new Point();
+        Point maxDims = new Point();
+        mWindowManager.getDefaultDisplay().getCurrentSizeRange(minDims, maxDims);
+        mWallpaperManager.suggestDesiredDimensions(
+                loadPropIntText(mDimenWidthView, maxDims.x),
+                loadPropIntText(mDimenHeightView, maxDims.y));
+    }
+
+    public void updateWallOff() {
+        IBinder token = getWindow().getDecorView().getWindowToken();
+        if (token != null) {
+            mWallpaperManager.setWallpaperOffsets(token, loadFloatText(mWallOffXView),
+                    loadFloatText(mWallOffYView));
+        }
+    }
+
+    public void updatePadding() {
+        Rect padding = new Rect();
+        padding.left = loadIntText(mPaddingLeftView);
+        padding.top = loadIntText(mPaddingTopView);
+        padding.right = loadIntText(mPaddingRightView);
+        padding.bottom = loadIntText(mPaddingBottomView);
+        mWallpaperManager.setDisplayPadding(padding);
+    }
+
+    public void updateDispOff() {
+        IBinder token = getWindow().getDecorView().getWindowToken();
+        if (token != null) {
+            mWallpaperManager.setDisplayOffset(token, loadIntText(mDispOffXView),
+                    loadIntText(mDispOffYView));
+        }
+    }
+
+    final TextWatcher mTextWatcher = new TextWatcher() {
+        @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+        }
+
+        @Override public void onTextChanged(CharSequence s, int start, int before, int count) {
+            updateDimens();
+            updateWallOff();
+            updatePadding();
+            updateDispOff();
+        }
+
+        @Override public void afterTextChanged(Editable s) {
+        }
+    };
+}
diff --git a/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java b/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java
new file mode 100644
index 0000000..95db6d1
--- /dev/null
+++ b/tests/WallpaperTest/src/com/example/wallpapertest/TestWallpaper.java
@@ -0,0 +1,251 @@
+/*
+ * 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.example.wallpapertest;
+
+import android.service.wallpaper.WallpaperService;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.Paint;
+import android.graphics.Color;
+import android.graphics.RectF;
+import android.text.TextPaint;
+import android.view.SurfaceHolder;
+import android.content.res.XmlResourceParser;
+
+import android.os.Handler;
+import android.util.Log;
+
+import android.view.WindowInsets;
+
+public class TestWallpaper extends WallpaperService {
+    private static final String LOG_TAG = "PolarClock";
+    
+    private final Handler mHandler = new Handler();
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+
+    public Engine onCreateEngine() {
+        return new ClockEngine();
+    }
+
+    class ClockEngine extends Engine {
+        private static final int OUTER_COLOR = 0xffff0000;
+        private static final int INNER_COLOR = 0xff000080;
+        private static final int STABLE_COLOR = 0xa000ff00;
+        private static final int TEXT_COLOR = 0xa0ffffff;
+
+        private final Paint.FontMetrics mTextMetrics = new Paint.FontMetrics();
+
+        private int mPadding;
+
+        private final Rect mMainInsets = new Rect();
+        private final Rect mStableInsets = new Rect();
+        private boolean mRound = false;
+
+        private int mDesiredWidth;
+        private int mDesiredHeight;
+
+        private float mOffsetX;
+        private float mOffsetY;
+        private float mOffsetXStep;
+        private float mOffsetYStep;
+        private int mOffsetXPixels;
+        private int mOffsetYPixels;
+
+        private final Paint mFillPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        private final Paint mStrokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        private final TextPaint mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
+
+        private final Runnable mDrawClock = new Runnable() {
+            public void run() {
+                drawFrame();
+            }
+        };
+        private boolean mVisible;
+
+        ClockEngine() {
+        }
+
+        @Override
+        public void onCreate(SurfaceHolder surfaceHolder) {
+            super.onCreate(surfaceHolder);
+
+            mDesiredWidth = getDesiredMinimumWidth();
+            mDesiredHeight = getDesiredMinimumHeight();
+
+            Paint paint = mFillPaint;
+            paint.setStyle(Paint.Style.FILL);
+
+            paint = mStrokePaint;
+            paint.setStrokeWidth(3);
+            paint.setStrokeCap(Paint.Cap.ROUND);
+            paint.setStyle(Paint.Style.STROKE);
+
+            TextPaint tpaint = mTextPaint;
+            tpaint.density = getResources().getDisplayMetrics().density;
+            tpaint.setCompatibilityScaling(getResources().getCompatibilityInfo().applicationScale);
+            tpaint.setColor(TEXT_COLOR);
+            tpaint.setTextSize(18 * getResources().getDisplayMetrics().scaledDensity);
+            tpaint.setShadowLayer(4 * getResources().getDisplayMetrics().density, 0, 0, 0xff000000);
+
+            mTextPaint.getFontMetrics(mTextMetrics);
+
+            mPadding = (int)(16 * getResources().getDisplayMetrics().density);
+
+            if (isPreview()) {
+                mOffsetX = 0.5f;
+                mOffsetY = 0.5f;
+            }
+        }
+
+        @Override
+        public void onDestroy() {
+            super.onDestroy();
+            mHandler.removeCallbacks(mDrawClock);
+        }
+
+        @Override
+        public void onVisibilityChanged(boolean visible) {
+            mVisible = visible;
+            if (!visible) {
+                mHandler.removeCallbacks(mDrawClock);
+            }
+            drawFrame();
+        }
+
+        @Override
+        public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+            super.onSurfaceChanged(holder, format, width, height);
+            drawFrame();
+        }
+
+        @Override
+        public void onSurfaceCreated(SurfaceHolder holder) {
+            super.onSurfaceCreated(holder);
+        }
+
+        @Override
+        public void onSurfaceDestroyed(SurfaceHolder holder) {
+            super.onSurfaceDestroyed(holder);
+            mVisible = false;
+            mHandler.removeCallbacks(mDrawClock);
+        }
+
+        @Override
+        public void onApplyWindowInsets(WindowInsets insets) {
+            super.onApplyWindowInsets(insets);
+            mMainInsets.set(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(),
+                    insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom());
+            mStableInsets.set(insets.getStableInsetLeft(), insets.getStableInsetTop(),
+                    insets.getStableInsetRight(), insets.getStableInsetBottom());
+            mRound = insets.isRound();
+            drawFrame();
+        }
+
+        @Override
+        public void onDesiredSizeChanged(int desiredWidth, int desiredHeight) {
+            super.onDesiredSizeChanged(desiredWidth, desiredHeight);
+            mDesiredWidth = desiredWidth;
+            mDesiredHeight = desiredHeight;
+            drawFrame();
+        }
+
+        @Override
+        public void onOffsetsChanged(float xOffset, float yOffset,
+                float xStep, float yStep, int xPixels, int yPixels) {
+            super.onOffsetsChanged(xOffset, yOffset, xStep, yStep, xPixels, yPixels);
+
+            if (isPreview()) return;
+
+            mOffsetX = xOffset;
+            mOffsetY = yOffset;
+            mOffsetXStep = xStep;
+            mOffsetYStep = yStep;
+            mOffsetXPixels = xPixels;
+            mOffsetYPixels = yPixels;
+
+            drawFrame();
+        }
+
+        void drawFrame() {
+            final SurfaceHolder holder = getSurfaceHolder();
+            final Rect frame = holder.getSurfaceFrame();
+            final int width = frame.width();
+            final int height = frame.height();
+
+            Canvas c = null;
+            try {
+                c = holder.lockCanvas();
+                if (c != null) {
+                    final Paint paint = mFillPaint;
+
+                    paint.setColor(OUTER_COLOR);
+                    c.drawRect(0, 0, width, height, paint);
+
+                    paint.setColor(INNER_COLOR);
+                    c.drawRect(0+mMainInsets.left, 0+mMainInsets.top,
+                            width-mMainInsets.right, height-mMainInsets.bottom, paint);
+
+                    mStrokePaint.setColor(STABLE_COLOR);
+                    c.drawRect(0 + mStableInsets.left, 0 + mStableInsets.top,
+                            width - mStableInsets.right, height - mStableInsets.bottom,
+                            mStrokePaint);
+
+                    final int ascdesc = (int)(-mTextMetrics.ascent + mTextMetrics.descent);
+                    final int linegap = (int)(-mTextMetrics.ascent + mTextMetrics.descent
+                            + mTextMetrics.leading);
+
+                    int x = mStableInsets.left + mPadding;
+                    int y = height - mStableInsets.bottom - mPadding - ascdesc;
+                    c.drawText("Surface Size: " + width + " x " + height,
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("Desired Size: " + mDesiredWidth + " x " + mDesiredHeight,
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("Cur Offset Raw: " + mOffsetX + ", " + mOffsetY,
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("Cur Offset Step: " + mOffsetXStep + ", " + mOffsetYStep,
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("Cur Offset Pixels: " + mOffsetXPixels + ", " + mOffsetYPixels,
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("Stable Insets: (" + mStableInsets.left + ", " + mStableInsets.top
+                            + ") - (" + mStableInsets.right + ", " + mStableInsets.bottom + ")",
+                            x, y, mTextPaint);
+                    y -= linegap;
+                    c.drawText("System Insets: (" + mMainInsets.left + ", " + mMainInsets.top
+                            + ") - (" + mMainInsets.right + ", " + mMainInsets.bottom + ")",
+                            x, y, mTextPaint);
+
+                }
+            } finally {
+                if (c != null) holder.unlockCanvasAndPost(c);
+            }
+        }
+    }
+}
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index b3c364b..8341de6 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -2574,8 +2574,12 @@
                 continue;
             }
             const size_t N = t->getOrderedConfigs().size();
-            sp<AaptSymbols> typeSymbols;
-            typeSymbols = outSymbols->addNestedSymbol(String8(t->getName()), t->getPos());
+            sp<AaptSymbols> typeSymbols =
+                    outSymbols->addNestedSymbol(String8(t->getName()), t->getPos());
+            if (typeSymbols == NULL) {
+                return UNKNOWN_ERROR;
+            }
+
             for (size_t ci=0; ci<N; ci++) {
                 sp<ConfigList> c = t->getOrderedConfigs().itemAt(ci);
                 if (c == NULL) {
diff --git a/tools/apilint/apilint.py b/tools/apilint/apilint.py
index 6bb28e1..393d2ec 100644
--- a/tools/apilint/apilint.py
+++ b/tools/apilint/apilint.py
@@ -20,15 +20,20 @@
 
 Usage: apilint.py current.txt
 Usage: apilint.py current.txt previous.txt
+
+You can also splice in blame details like this:
+$ git blame api/current.txt -t -e > /tmp/currentblame.txt
+$ apilint.py /tmp/currentblame.txt previous.txt --no-color
 """
 
-import re, sys, collections
+import re, sys, collections, traceback
 
 
 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
 
 def format(fg=None, bg=None, bright=False, bold=False, dim=False, reset=False):
     # manually derived from http://en.wikipedia.org/wiki/ANSI_escape_code#Codes
+    if "--no-color" in sys.argv: return ""
     codes = []
     if reset: codes.append("0")
     else:
@@ -43,9 +48,10 @@
 
 
 class Field():
-    def __init__(self, clazz, raw):
+    def __init__(self, clazz, raw, blame):
         self.clazz = clazz
         self.raw = raw.strip(" {;")
+        self.blame = blame
 
         raw = raw.split()
         self.split = list(raw)
@@ -60,14 +66,20 @@
         else:
             self.value = None
 
+        self.ident = self.raw.replace(" deprecated ", " ")
+
     def __repr__(self):
         return self.raw
 
 
 class Method():
-    def __init__(self, clazz, raw):
+    def __init__(self, clazz, raw, blame):
         self.clazz = clazz
         self.raw = raw.strip(" {;")
+        self.blame = blame
+
+        # drop generics for now
+        raw = re.sub("<.+?>", "", raw)
 
         raw = re.split("[\s(),;]+", raw)
         for r in ["", ";"]:
@@ -84,14 +96,24 @@
             if r == "throws": break
             self.args.append(r)
 
+        # identity for compat purposes
+        ident = self.raw
+        ident = ident.replace(" deprecated ", " ")
+        ident = ident.replace(" synchronized ", " ")
+        ident = re.sub("<.+?>", "", ident)
+        if " throws " in ident:
+            ident = ident[:ident.index(" throws ")]
+        self.ident = ident
+
     def __repr__(self):
         return self.raw
 
 
 class Class():
-    def __init__(self, pkg, raw):
+    def __init__(self, pkg, raw, blame):
         self.pkg = pkg
         self.raw = raw.strip(" {;")
+        self.blame = blame
         self.ctors = []
         self.fields = []
         self.methods = []
@@ -102,19 +124,25 @@
             self.fullname = raw[raw.index("class")+1]
         elif "interface" in raw:
             self.fullname = raw[raw.index("interface")+1]
-
-        if "." in self.fullname:
-            self.name = self.fullname[self.fullname.rindex(".")+1:]
         else:
-            self.name = self.fullname
+            raise ValueError("Funky class type %s" % (self.raw))
+
+        if "extends" in raw:
+            self.extends = raw[raw.index("extends")+1]
+        else:
+            self.extends = None
+
+        self.fullname = self.pkg.name + "." + self.fullname
+        self.name = self.fullname[self.fullname.rindex(".")+1:]
 
     def __repr__(self):
         return self.raw
 
 
 class Package():
-    def __init__(self, raw):
+    def __init__(self, raw, blame):
         self.raw = raw.strip(" {;")
+        self.blame = blame
 
         raw = raw.split()
         self.name = raw[raw.index("package")+1]
@@ -124,55 +152,68 @@
 
 
 def parse_api(fn):
-    api = []
+    api = {}
     pkg = None
     clazz = None
+    blame = None
+
+    re_blame = re.compile("^([a-z0-9]{7,}) \(<([^>]+)>.+?\) (.+?)$")
 
     with open(fn) as f:
         for raw in f.readlines():
             raw = raw.rstrip()
+            match = re_blame.match(raw)
+            if match is not None:
+                blame = match.groups()[0:2]
+                raw = match.groups()[2]
+            else:
+                blame = None
 
             if raw.startswith("package"):
-                pkg = Package(raw)
+                pkg = Package(raw, blame)
             elif raw.startswith("  ") and raw.endswith("{"):
-                clazz = Class(pkg, raw)
-                api.append(clazz)
+                clazz = Class(pkg, raw, blame)
+                api[clazz.fullname] = clazz
             elif raw.startswith("    ctor"):
-                clazz.ctors.append(Method(clazz, raw))
+                clazz.ctors.append(Method(clazz, raw, blame))
             elif raw.startswith("    method"):
-                clazz.methods.append(Method(clazz, raw))
+                clazz.methods.append(Method(clazz, raw, blame))
             elif raw.startswith("    field"):
-                clazz.fields.append(Field(clazz, raw))
+                clazz.fields.append(Field(clazz, raw, blame))
 
     return api
 
 
-failures = []
-
-def filter_dupe(s):
-    return s.replace(" deprecated ", " ")
+failures = {}
 
 def _fail(clazz, detail, msg):
     """Records an API failure to be processed later."""
     global failures
 
+    sig = "%s-%s-%s" % (clazz.fullname, repr(detail), msg)
+    sig = sig.replace(" deprecated ", " ")
+
     res = msg
+    blame = clazz.blame
     if detail is not None:
         res += "\n    in " + repr(detail)
+        blame = detail.blame
     res += "\n    in " + repr(clazz)
     res += "\n    in " + repr(clazz.pkg)
-    failures.append(filter_dupe(res))
+    if blame is not None:
+        res += "\n    last modified by %s in %s" % (blame[1], blame[0])
+    failures[sig] = res
 
 def warn(clazz, detail, msg):
-    _fail(clazz, detail, "%sWarning:%s %s" % (format(fg=YELLOW, bg=BLACK), format(reset=True), msg))
+    _fail(clazz, detail, "%sWarning:%s %s" % (format(fg=YELLOW, bg=BLACK, bold=True), format(reset=True), msg))
 
 def error(clazz, detail, msg):
-    _fail(clazz, detail, "%sError:%s %s" % (format(fg=RED, bg=BLACK), format(reset=True), msg))
+    _fail(clazz, detail, "%sError:%s %s" % (format(fg=RED, bg=BLACK, bold=True), format(reset=True), msg))
 
 
 def verify_constants(clazz):
     """All static final constants must be FOO_NAME style."""
-    if re.match("R\.[a-z]+", clazz.fullname): return
+    if re.match("android\.R\.[a-z]+", clazz.fullname): return
 
     for f in clazz.fields:
         if "static" in f.split and "final" in f.split:
@@ -188,6 +229,10 @@
 
 def verify_class_names(clazz):
     """Try catching malformed class names like myMtp or MTPUser."""
+    if clazz.fullname.startswith("android.opengl"): return
+    if clazz.fullname.startswith("android.renderscript"): return
+    if re.match("android\.R\.[a-z]+", clazz.fullname): return
+
     if re.search("[A-Z]{2,}", clazz.name) is not None:
         warn(clazz, None, "Class name style should be Mtp not MTP")
     if re.match("[^A-Z]", clazz.name):
@@ -196,32 +241,35 @@
 
 def verify_method_names(clazz):
     """Try catching malformed method names, like Foo() or getMTU()."""
-    if clazz.pkg.name == "android.opengl": return
+    if clazz.fullname.startswith("android.opengl"): return
+    if clazz.fullname.startswith("android.renderscript"): return
+    if clazz.fullname == "android.system.OsConstants": return
 
     for m in clazz.methods:
         if re.search("[A-Z]{2,}", m.name) is not None:
             warn(clazz, m, "Method name style should be getMtu() instead of getMTU()")
         if re.match("[^a-z]", m.name):
-            error(clazz, None, "Method name must start with lowercase char")
+            error(clazz, m, "Method name must start with lowercase char")
 
 
 def verify_callbacks(clazz):
     """Verify Callback classes.
     All callback classes must be abstract.
     All methods must follow onFoo() naming style."""
+    if clazz.fullname == "android.speech.tts.SynthesisCallback": return
 
     if clazz.name.endswith("Callbacks"):
-        error(clazz, None, "Class must be named exactly Callback")
+        error(clazz, None, "Class name must not be plural")
     if clazz.name.endswith("Observer"):
-        warn(clazz, None, "Class should be named Callback")
+        warn(clazz, None, "Class should be named FooCallback")
 
     if clazz.name.endswith("Callback"):
         if "interface" in clazz.split:
-            error(clazz, None, "Callback must be abstract class")
+            error(clazz, None, "Callback must be abstract class to enable extension in future API levels")
 
         for m in clazz.methods:
             if not re.match("on[A-Z][a-z]*", m.name):
-                error(clazz, m, "Callback method names must be onFoo style")
+                error(clazz, m, "Callback method names must be onFoo() style")
 
 
 def verify_listeners(clazz):
@@ -233,16 +281,16 @@
 
     if clazz.name.endswith("Listener"):
         if " abstract class " in clazz.raw:
-            error(clazz, None, "Listener should be interface")
+            error(clazz, None, "Listener should be an interface, otherwise renamed Callback")
 
         for m in clazz.methods:
             if not re.match("on[A-Z][a-z]*", m.name):
-                error(clazz, m, "Listener method names must be onFoo style")
+                error(clazz, m, "Listener method names must be onFoo() style")
 
         if len(clazz.methods) == 1 and clazz.name.startswith("On"):
             m = clazz.methods[0]
             if (m.name + "Listener").lower() != clazz.name.lower():
-                error(clazz, m, "Single method name should match class name")
+                error(clazz, m, "Single listener method name should match class name")
 
 
 def verify_actions(clazz):
@@ -255,21 +303,24 @@
     for f in clazz.fields:
         if f.value is None: continue
         if f.name.startswith("EXTRA_"): continue
+        if f.name == "SERVICE_INTERFACE" or f.name == "PROVIDER_INTERFACE": continue
 
         if "static" in f.split and "final" in f.split and f.typ == "java.lang.String":
             if "_ACTION" in f.name or "ACTION_" in f.name or ".action." in f.value.lower():
                 if not f.name.startswith("ACTION_"):
-                    error(clazz, f, "Intent action must be ACTION_FOO")
+                    error(clazz, f, "Intent action constant name must be ACTION_FOO")
                 else:
-                    if clazz.name == "Intent":
+                    if clazz.fullname == "android.content.Intent":
                         prefix = "android.intent.action"
-                    elif clazz.name == "Settings":
+                    elif clazz.fullname == "android.provider.Settings":
                         prefix = "android.settings"
+                    elif clazz.fullname == "android.app.admin.DevicePolicyManager" or clazz.fullname == "android.app.admin.DeviceAdminReceiver":
+                        prefix = "android.app.action"
                     else:
                         prefix = clazz.pkg.name + ".action"
                     expected = prefix + "." + f.name[7:]
                     if f.value != expected:
-                        error(clazz, f, "Inconsistent action value")
+                        error(clazz, f, "Inconsistent action value; expected %s" % (expected))
 
 
 def verify_extras(clazz):
@@ -279,6 +330,9 @@
         package android.foo {
             String EXTRA_BAR = "android.foo.extra.BAR";
         }"""
+    if clazz.fullname == "android.app.Notification": return
+    if clazz.fullname == "android.appwidget.AppWidgetManager": return
+
     for f in clazz.fields:
         if f.value is None: continue
         if f.name.startswith("ACTION_"): continue
@@ -288,13 +342,15 @@
                 if not f.name.startswith("EXTRA_"):
                     error(clazz, f, "Intent extra must be EXTRA_FOO")
                 else:
-                    if clazz.name == "Intent":
+                    if clazz.pkg.name == "android.content" and clazz.name == "Intent":
                         prefix = "android.intent.extra"
+                    elif clazz.pkg.name == "android.app.admin":
+                        prefix = "android.app.extra"
                     else:
                         prefix = clazz.pkg.name + ".extra"
                     expected = prefix + "." + f.name[6:]
                     if f.value != expected:
-                        error(clazz, f, "Inconsistent extra value")
+                        error(clazz, f, "Inconsistent extra value; expected %s" % (expected))
 
 
 def verify_equals(clazz):
@@ -303,7 +359,7 @@
     eq = "equals" in methods
     hc = "hashCode" in methods
     if eq != hc:
-        error(clazz, None, "Must override both equals and hashCode")
+        error(clazz, None, "Must override both equals and hashCode; missing one")
 
 
 def verify_parcelable(clazz):
@@ -314,34 +370,59 @@
         describe = [ i for i in clazz.methods if i.name == "describeContents" ]
 
         if len(creator) == 0 or len(write) == 0 or len(describe) == 0:
-            error(clazz, None, "Parcelable requires CREATOR, writeToParcel, and describeContents")
+            error(clazz, None, "Parcelable requires CREATOR, writeToParcel, and describeContents; missing one")
 
 
 def verify_protected(clazz):
     """Verify that no protected methods are allowed."""
     for m in clazz.methods:
         if "protected" in m.split:
-            error(clazz, m, "Protected method")
+            error(clazz, m, "No protected methods; must be public")
     for f in clazz.fields:
         if "protected" in f.split:
-            error(clazz, f, "Protected field")
+            error(clazz, f, "No protected fields; must be public")
 
 
 def verify_fields(clazz):
     """Verify that all exposed fields are final.
     Exposed fields must follow myName style.
     Catch internal mFoo objects being exposed."""
+
+    IGNORE_BARE_FIELDS = [
+        "android.app.ActivityManager.RecentTaskInfo",
+        "android.app.Notification",
+        "android.content.pm.ActivityInfo",
+        "android.content.pm.ApplicationInfo",
+        "android.content.pm.FeatureGroupInfo",
+        "android.content.pm.InstrumentationInfo",
+        "android.content.pm.PackageInfo",
+        "android.content.pm.PackageItemInfo",
+        "android.os.Message",
+        "android.system.StructPollfd",
+    ]
+
     for f in clazz.fields:
         if not "final" in f.split:
-            error(clazz, f, "Bare fields must be final; consider adding accessors")
+            if clazz.fullname in IGNORE_BARE_FIELDS:
+                pass
+            elif clazz.fullname.endswith("LayoutParams"):
+                pass
+            elif clazz.fullname.startswith("android.util.Mutable"):
+                pass
+            else:
+                error(clazz, f, "Bare fields must be marked final; consider adding accessors")
 
         if not "static" in f.split:
             if not re.match("[a-z]([a-zA-Z]+)?", f.name):
-                error(clazz, f, "Non-static fields must be myName")
+                error(clazz, f, "Non-static fields must be named with myField style")
 
-        if re.match("[m][A-Z]", f.name):
+        if re.match("[ms][A-Z]", f.name):
             error(clazz, f, "Don't expose your internal objects")
 
+        if re.match("[A-Z_]+", f.name):
+            if "static" not in f.split or "final" not in f.split:
+                error(clazz, f, "Constants must be marked static final")
+
 
 def verify_register(clazz):
     """Verify parity of registration methods.
@@ -353,34 +434,34 @@
             if m.name.startswith("register"):
                 other = "unregister" + m.name[8:]
                 if other not in methods:
-                    error(clazz, m, "Missing unregister")
+                    error(clazz, m, "Missing unregister method")
             if m.name.startswith("unregister"):
                 other = "register" + m.name[10:]
                 if other not in methods:
-                    error(clazz, m, "Missing register")
+                    error(clazz, m, "Missing register method")
 
             if m.name.startswith("add") or m.name.startswith("remove"):
-                error(clazz, m, "Callback should be register/unregister")
+                error(clazz, m, "Callback methods should be named register/unregister")
 
         if "Listener" in m.raw:
             if m.name.startswith("add"):
                 other = "remove" + m.name[3:]
                 if other not in methods:
-                    error(clazz, m, "Missing remove")
+                    error(clazz, m, "Missing remove method")
             if m.name.startswith("remove") and not m.name.startswith("removeAll"):
                 other = "add" + m.name[6:]
                 if other not in methods:
-                    error(clazz, m, "Missing add")
+                    error(clazz, m, "Missing add method")
 
             if m.name.startswith("register") or m.name.startswith("unregister"):
-                error(clazz, m, "Listener should be add/remove")
+                error(clazz, m, "Listener methods should be named add/remove")
 
 
 def verify_sync(clazz):
     """Verify synchronized methods aren't exposed."""
     for m in clazz.methods:
         if "synchronized" in m.split:
-            error(clazz, m, "Lock exposed")
+            error(clazz, m, "Internal lock exposed")
 
 
 def verify_intent_builder(clazz):
@@ -392,7 +473,7 @@
             if m.name.startswith("create") and m.name.endswith("Intent"):
                 pass
             else:
-                warn(clazz, m, "Should be createFooIntent()")
+                error(clazz, m, "Methods creating an Intent should be named createFooIntent()")
 
 
 def verify_helper_classes(clazz):
@@ -402,25 +483,57 @@
     if "extends android.app.Service" in clazz.raw:
         test_methods = True
         if not clazz.name.endswith("Service"):
-            error(clazz, None, "Inconsistent class name")
+            error(clazz, None, "Inconsistent class name; should be FooService")
+
+        found = False
+        for f in clazz.fields:
+            if f.name == "SERVICE_INTERFACE":
+                found = True
+                if f.value != clazz.fullname:
+                    error(clazz, f, "Inconsistent interface constant; expected %s" % (clazz.fullname))
+
+        if not found:
+            warn(clazz, None, "Missing SERVICE_INTERFACE constant")
+
+        if "abstract" in clazz.split and not clazz.fullname.startswith("android.service."):
+            warn(clazz, None, "Services extended by developers should be under android.service")
+
     if "extends android.content.ContentProvider" in clazz.raw:
         test_methods = True
         if not clazz.name.endswith("Provider"):
-            error(clazz, None, "Inconsistent class name")
+            error(clazz, None, "Inconsistent class name; should be FooProvider")
+
+        found = False
+        for f in clazz.fields:
+            if f.name == "PROVIDER_INTERFACE":
+                found = True
+                if f.value != clazz.fullname:
+                    error(clazz, f, "Inconsistent interface name; expected %s" % (clazz.fullname))
+
+        if not found:
+            warn(clazz, None, "Missing PROVIDER_INTERFACE constant")
+
+        if "abstract" in clazz.split and not clazz.fullname.startswith("android.provider."):
+            warn(clazz, None, "Providers extended by developers should be under android.provider")
+
     if "extends android.content.BroadcastReceiver" in clazz.raw:
         test_methods = True
         if not clazz.name.endswith("Receiver"):
-            error(clazz, None, "Inconsistent class name")
+            error(clazz, None, "Inconsistent class name; should be FooReceiver")
+
     if "extends android.app.Activity" in clazz.raw:
         test_methods = True
         if not clazz.name.endswith("Activity"):
-            error(clazz, None, "Inconsistent class name")
+            error(clazz, None, "Inconsistent class name; should be FooActivity")
 
     if test_methods:
         for m in clazz.methods:
             if "final" in m.split: continue
             if not re.match("on[A-Z]", m.name):
-                error(clazz, m, "Extendable methods should be onFoo() style, otherwise final")
+                if "abstract" in m.split:
+                    error(clazz, m, "Methods implemented by developers must be named onFoo()")
+                else:
+                    warn(clazz, m, "If implemented by developer, should be named onFoo(); otherwise consider marking final")
 
 
 def verify_builder(clazz):
@@ -430,7 +543,7 @@
     if not clazz.name.endswith("Builder"): return
 
     if clazz.name != "Builder":
-        warn(clazz, None, "Should be standalone Builder class")
+        warn(clazz, None, "Builder should be defined as inner class")
 
     has_build = False
     for m in clazz.methods:
@@ -442,11 +555,11 @@
         if m.name.startswith("clear"): continue
 
         if m.name.startswith("with"):
-            error(clazz, m, "Builder methods must be setFoo()")
+            error(clazz, m, "Builder methods names must follow setFoo() style")
 
         if m.name.startswith("set"):
             if not m.typ.endswith(clazz.fullname):
-                warn(clazz, m, "Should return the builder")
+                warn(clazz, m, "Methods should return the builder")
 
     if not has_build:
         warn(clazz, None, "Missing build() method")
@@ -474,7 +587,7 @@
         "android.view",
         "android.animation",
         "android.provider",
-        "android.content",
+        ["android.content","android.graphics.drawable"],
         "android.database",
         "android.graphics",
         "android.text",
@@ -508,29 +621,40 @@
                 warn(clazz, m, "Method argument type violates package layering")
 
 
-def verify_boolean(clazz):
+def verify_boolean(clazz, api):
     """Catches people returning boolean from getFoo() style methods.
     Ignores when matching setFoo() is present."""
+
     methods = [ m.name for m in clazz.methods ]
+
+    builder = clazz.fullname + ".Builder"
+    builder_methods = []
+    if builder in api:
+        builder_methods = [ m.name for m in api[builder].methods ]
+
     for m in clazz.methods:
         if m.typ == "boolean" and m.name.startswith("get") and m.name != "get" and len(m.args) == 0:
             setter = "set" + m.name[3:]
-            if setter not in methods:
-                error(clazz, m, "Methods returning boolean should be isFoo or hasFoo")
+            if setter in methods:
+                pass
+            elif builder is not None and setter in builder_methods:
+                pass
+            else:
+                warn(clazz, m, "Methods returning boolean should be named isFoo, hasFoo, areFoo")
 
 
 def verify_collections(clazz):
     """Verifies that collection types are interfaces."""
+    if clazz.fullname == "android.os.Bundle": return
+
     bad = ["java.util.Vector", "java.util.LinkedList", "java.util.ArrayList", "java.util.Stack",
            "java.util.HashMap", "java.util.HashSet", "android.util.ArraySet", "android.util.ArrayMap"]
     for m in clazz.methods:
-        filt = re.sub("<.+>", "", m.typ)
-        if filt in bad:
-            error(clazz, m, "Return type is concrete collection")
+        if m.typ in bad:
+            error(clazz, m, "Return type is concrete collection; should be interface")
         for arg in m.args:
-            filt = re.sub("<.+>", "", arg)
-            if filt in bad:
-                error(clazz, m, "Argument is concrete collection")
+            if arg in bad:
+                error(clazz, m, "Argument is concrete collection; should be interface")
 
 
 def verify_flags(clazz):
@@ -545,15 +669,18 @@
 
             scope = f.name[0:f.name.index("FLAG_")]
             if val & known[scope]:
-                warn(clazz, f, "Found overlapping flag")
+                warn(clazz, f, "Found overlapping flag constant value")
             known[scope] |= val
 
 
-def verify_all(api):
+def verify_style(api):
+    """Find all style issues in the given API level."""
     global failures
 
-    failures = []
-    for clazz in api:
+    failures = {}
+    for key in sorted(api.keys()):
+        clazz = api[key]
+
         if clazz.pkg.name.startswith("java"): continue
         if clazz.pkg.name.startswith("junit"): continue
         if clazz.pkg.name.startswith("org.apache"): continue
@@ -581,26 +708,90 @@
         verify_aidl(clazz)
         verify_internal(clazz)
         verify_layering(clazz)
-        verify_boolean(clazz)
+        verify_boolean(clazz, api)
         verify_collections(clazz)
         verify_flags(clazz)
 
     return failures
 
 
+def verify_compat(cur, prev):
+    """Find any incompatible API changes between two levels."""
+    global failures
+
+    def class_exists(api, test):
+        return test.fullname in api
+
+    def ctor_exists(api, clazz, test):
+        for m in clazz.ctors:
+            if m.ident == test.ident: return True
+        return False
+
+    def all_methods(api, clazz):
+        methods = list(clazz.methods)
+        if clazz.extends is not None:
+            methods.extend(all_methods(api, api[clazz.extends]))
+        return methods
+
+    def method_exists(api, clazz, test):
+        methods = all_methods(api, clazz)
+        for m in methods:
+            if m.ident == test.ident: return True
+        return False
+
+    def field_exists(api, clazz, test):
+        for f in clazz.fields:
+            if f.ident == test.ident: return True
+        return False
+
+    failures = {}
+    for key in sorted(prev.keys()):
+        prev_clazz = prev[key]
+
+        if not class_exists(cur, prev_clazz):
+            error(prev_clazz, None, "Class removed or incompatible change")
+            continue
+
+        cur_clazz = cur[key]
+
+        for test in prev_clazz.ctors:
+            if not ctor_exists(cur, cur_clazz, test):
+                error(prev_clazz, prev_ctor, "Constructor removed or incompatible change")
+
+        methods = all_methods(prev, prev_clazz)
+        for test in methods:
+            if not method_exists(cur, cur_clazz, test):
+                error(prev_clazz, test, "Method removed or incompatible change")
+
+        for test in prev_clazz.fields:
+            if not field_exists(cur, cur_clazz, test):
+                error(prev_clazz, test, "Field removed or incompatible change")
+
+    return failures
+
+
 cur = parse_api(sys.argv[1])
-cur_fail = verify_all(cur)
+cur_fail = verify_style(cur)
 
 if len(sys.argv) > 2:
     prev = parse_api(sys.argv[2])
-    prev_fail = verify_all(prev)
+    prev_fail = verify_style(prev)
 
     # ignore errors from previous API level
     for p in prev_fail:
         if p in cur_fail:
-            cur_fail.remove(p)
+            del cur_fail[p]
+
+    # look for compatibility issues
+    compat_fail = verify_compat(cur, prev)
+
+    print "%s API compatibility issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True)))
+    for f in sorted(compat_fail):
+        print compat_fail[f]
+        print
 
 
-for f in cur_fail:
-    print f
+print "%s API style issues %s\n" % ((format(fg=WHITE, bg=BLUE, bold=True), format(reset=True)))
+for f in sorted(cur_fail):
+    print cur_fail[f]
     print
diff --git a/tools/layoutlib/.idea/codeStyleSettings.xml b/tools/layoutlib/.idea/codeStyleSettings.xml
index 33937b3..b324213 100644
--- a/tools/layoutlib/.idea/codeStyleSettings.xml
+++ b/tools/layoutlib/.idea/codeStyleSettings.xml
@@ -27,12 +27,12 @@
             <package name="" withSubpackages="true" static="true" />
           </value>
         </option>
+        <option name="RIGHT_MARGIN" value="100" />
         <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
         <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
         <option name="JD_ADD_BLANK_AFTER_PARM_COMMENTS" value="true" />
         <option name="JD_ADD_BLANK_AFTER_RETURN" value="true" />
         <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
-        <option name="RIGHT_MARGIN" value="100" />
         <option name="WRAP_COMMENTS" value="true" />
         <XML>
           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
diff --git a/tools/layoutlib/.idea/libraries/asm_4_0.xml b/tools/layoutlib/.idea/libraries/asm_4_0.xml
index 578a7bf..7df287f 100644
--- a/tools/layoutlib/.idea/libraries/asm_4_0.xml
+++ b/tools/layoutlib/.idea/libraries/asm_4_0.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="asm-4.0">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/asm/asm-4.0.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/asm/asm-4.0.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/asm/src.zip!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/asm/src.zip!/" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/tools/layoutlib/.idea/libraries/framework_jar.xml b/tools/layoutlib/.idea/libraries/framework_jar.xml
index 11f5b89..6695a36 100644
--- a/tools/layoutlib/.idea/libraries/framework_jar.xml
+++ b/tools/layoutlib/.idea/libraries/framework_jar.xml
@@ -1,13 +1,13 @@
 <component name="libraryTable">
   <library name="framework.jar">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="file://$ANDROID_BUILD_TOP$/frameworks/base/core/java" />
-      <root url="file://$ANDROID_BUILD_TOP$/frameworks/base/graphics/java" />
-      <root url="file://$ANDROID_BUILD_TOP$/libcore/luni/src/main/java" />
+      <root url="file://$PROJECT_DIR$/../../core/java" />
+      <root url="file://$PROJECT_DIR$/../../graphics/java" />
+      <root url="file://$PROJECT_DIR$/../../../../libcore/luni/src/main/java" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/tools/layoutlib/.idea/libraries/guava.xml b/tools/layoutlib/.idea/libraries/guava.xml
index de5607e..d47fc06 100644
--- a/tools/layoutlib/.idea/libraries/guava.xml
+++ b/tools/layoutlib/.idea/libraries/guava.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="guava">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="file://$ANDROID_BUILD_TOP$/external/guava/guava/src" />
+      <root url="file://$PROJECT_DIR$/../../../../external/guava/guava/src" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/tools/layoutlib/.idea/libraries/icu4j.xml b/tools/layoutlib/.idea/libraries/icu4j.xml
index 8d9a318..dbe0bd7 100644
--- a/tools/layoutlib/.idea/libraries/icu4j.xml
+++ b/tools/layoutlib/.idea/libraries/icu4j.xml
@@ -1,7 +1,7 @@
 <component name="libraryTable">
   <library name="icu4j">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/icu4j/icu4j.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/icu4j/icu4j.jar!/" />
     </CLASSES>
     <JAVADOC>
       <root url="http://icu-project.org/apiref/icu4j50rc/" />
diff --git a/tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml b/tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml
index 91feaea..2a65050 100644
--- a/tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml
+++ b/tools/layoutlib/.idea/libraries/kxml2_2_3_0.xml
@@ -1,11 +1,11 @@
 <component name="libraryTable">
   <library name="kxml2-2.3.0">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/kxml2/kxml2-2.3.0.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
-      <root url="file://$ANDROID_BUILD_TOP$/libcore/xml/src/main/java" />
+      <root url="file://$PROJECT_DIR$/../../../../libcore/xml/src/main/java" />
     </SOURCES>
   </library>
 </component>
\ No newline at end of file
diff --git a/tools/layoutlib/.idea/libraries/layoutlib_api_prebuilt.xml b/tools/layoutlib/.idea/libraries/layoutlib_api_prebuilt.xml
index be928da..5952002 100644
--- a/tools/layoutlib/.idea/libraries/layoutlib_api_prebuilt.xml
+++ b/tools/layoutlib/.idea/libraries/layoutlib_api_prebuilt.xml
@@ -1,7 +1,7 @@
 <component name="libraryTable">
   <library name="layoutlib_api-prebuilt">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/layoutlib_api/layoutlib_api-prebuilt.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/layoutlib_api/layoutlib_api-prebuilt.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
diff --git a/tools/layoutlib/.idea/libraries/ninepatch_prebuilt.xml b/tools/layoutlib/.idea/libraries/ninepatch_prebuilt.xml
index 338137b..f34f7dd 100644
--- a/tools/layoutlib/.idea/libraries/ninepatch_prebuilt.xml
+++ b/tools/layoutlib/.idea/libraries/ninepatch_prebuilt.xml
@@ -1,7 +1,7 @@
 <component name="libraryTable">
   <library name="ninepatch-prebuilt">
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/ninepatch/ninepatch-prebuilt.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/ninepatch/ninepatch-prebuilt.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
diff --git a/tools/layoutlib/.idea/libraries/tools_common_prebuilt.xml b/tools/layoutlib/.idea/libraries/tools_common_prebuilt.xml
index 6479886..b325ad4 100644
--- a/tools/layoutlib/.idea/libraries/tools_common_prebuilt.xml
+++ b/tools/layoutlib/.idea/libraries/tools_common_prebuilt.xml
@@ -4,7 +4,7 @@
       <root url="file://$PROJECT_DIR$" />
     </ANNOTATIONS>
     <CLASSES>
-      <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/tools-common/tools-common-prebuilt.jar!/" />
+      <root url="jar://$PROJECT_DIR$/../../../../prebuilts/misc/common/tools-common/tools-common-prebuilt.jar!/" />
     </CLASSES>
     <JAVADOC />
     <SOURCES>
diff --git a/tools/layoutlib/.idea/runConfigurations/All_in_bridge.xml b/tools/layoutlib/.idea/runConfigurations/All_in_bridge.xml
index badbbab..f965ba7 100644
--- a/tools/layoutlib/.idea/runConfigurations/All_in_bridge.xml
+++ b/tools/layoutlib/.idea/runConfigurations/All_in_bridge.xml
@@ -8,7 +8,7 @@
     <option name="MAIN_CLASS_NAME" value="" />
     <option name="METHOD_NAME" value="" />
     <option name="TEST_OBJECT" value="package" />
-    <option name="VM_PARAMETERS" value="-ea -Dplatform.dir=&quot;$ANDROID_BUILD_TOP$/out/host/linux-x86/sdk/sdk/android-sdk_eng.deepanshu_linux-x86/platforms/android-L&quot; -Dtest_res.dir=&quot;$PROJECT_DIR$/bridge/tests/res&quot;" />
+    <option name="VM_PARAMETERS" value="-ea -Dtest_res.dir=&quot;$PROJECT_DIR$/bridge/tests/res&quot;" />
     <option name="PARAMETERS" value="" />
     <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
     <option name="ENV_VARIABLES" />
diff --git a/tools/layoutlib/.idea/runConfigurations/Create.xml b/tools/layoutlib/.idea/runConfigurations/Create.xml
index e62925b..fb0b866 100644
--- a/tools/layoutlib/.idea/runConfigurations/Create.xml
+++ b/tools/layoutlib/.idea/runConfigurations/Create.xml
@@ -4,7 +4,7 @@
     <option name="MAIN_CLASS_NAME" value="com.android.tools.layoutlib.create.Main" />
     <option name="VM_PARAMETERS" value="" />
     <option name="PROGRAM_PARAMETERS" value="out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar" />
-    <option name="WORKING_DIRECTORY" value="file://$ANDROID_BUILD_TOP$/" />
+    <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/../../../../" />
     <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
     <option name="ALTERNATIVE_JRE_PATH" value="1.6" />
     <option name="ENABLE_SWING_INSPECTOR" value="false" />
diff --git a/tools/layoutlib/.idea/vcs.xml b/tools/layoutlib/.idea/vcs.xml
index 8114960..9ab281a 100644
--- a/tools/layoutlib/.idea/vcs.xml
+++ b/tools/layoutlib/.idea/vcs.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="$ANDROID_BUILD_TOP$/frameworks/base" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
   </component>
 </project>
 
diff --git a/tools/layoutlib/bridge/bridge.iml b/tools/layoutlib/bridge/bridge.iml
index 7553b59..0f96916 100644
--- a/tools/layoutlib/bridge/bridge.iml
+++ b/tools/layoutlib/bridge/bridge.iml
@@ -34,11 +34,11 @@
     <orderEntry type="module-library" scope="TEST">
       <library>
         <CLASSES>
-          <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/sdk-common/sdk-common.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/sdk-common/sdk-common.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES>
-          <root url="jar://$ANDROID_BUILD_TOP$/prebuilts/misc/common/sdk-common/sdk-common-sources.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../../prebuilts/misc/common/sdk-common/sdk-common-sources.jar!/" />
         </SOURCES>
       </library>
     </orderEntry>
diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
index 5b69681..aaba545 100644
--- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java
@@ -90,9 +90,16 @@
         // fills TypedArray.mIndices which is used to implement getIndexCount/getIndexAt
         // first count the array size
         int count = 0;
-        for (ResourceValue data : mResourceData) {
-            if (data != null && !RenderResources.REFERENCE_NULL.equals(data.getValue())) {
-                count++;
+        for (int i = 0; i < mResourceData.length; i++) {
+            ResourceValue data = mResourceData[i];
+            if (data != null) {
+                if (RenderResources.REFERENCE_NULL.equals(data.getValue())) {
+                    // No need to store this resource value. This saves needless checking for
+                    // "@null" every time  an attribute is requested.
+                    mResourceData[i] = null;
+                } else {
+                    count++;
+                }
             }
         }
 
@@ -103,8 +110,7 @@
         // fill the array with the indices.
         int index = 1;
         for (int i = 0 ; i < mResourceData.length ; i++) {
-            if (mResourceData[i] != null
-                    && !RenderResources.REFERENCE_NULL.equals(mResourceData[i].getValue())) {
+            if (mResourceData[i] != null) {
                 mIndices[index++] = i;
             }
         }
@@ -215,10 +221,6 @@
 
         String s = mResourceData[index].getValue();
 
-        if (RenderResources.REFERENCE_NULL.equals(s)) {
-            return defValue;
-        }
-
         if (s == null || s.length() == 0) {
             return defValue;
         }
@@ -231,6 +233,20 @@
 
         // Field is not null and is not an integer.
         // Check for possible constants and try to find them.
+        return (int) resolveEnumAttribute(index, defValue);
+    }
+
+    /**
+     * Searches for the string in the attributes (flag or enums) and returns the integer.
+     * If found, it will return an integer matching the value. However, if the value is not found,
+     * it returns {@code defValue} which may be a float.
+     *
+     * @param index Index of attribute to retrieve.
+     * @param defValue Value to return if the attribute is not found.
+     *
+     * @return Attribute int value, or defValue if not defined.
+     */
+    private float resolveEnumAttribute(int index, float defValue) {
         // Get the map of attribute-constant -> IntegerValue
         Map<String, Integer> map = null;
         if (mIsFramework[index]) {
@@ -249,7 +265,7 @@
             int result = 0;
 
             // split the value in case this is a mix of several flags.
-            String[] keywords = s.split("\\|");
+            String[] keywords = mResourceData[index].getValue().split("\\|");
             for (String keyword : keywords) {
                 Integer i = map.get(keyword.trim());
                 if (i != null) {
@@ -258,7 +274,7 @@
                     Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                             String.format(
                                 "\"%s\" in attribute \"%2$s\" is not a valid value",
-                                keyword, mNames[index]), null /*data*/);
+                                keyword, mNames[index]), null);
                 }
             }
             return result;
@@ -293,7 +309,7 @@
                 Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                         String.format(
                             "\"%s\" in attribute \"%2$s\" cannot be converted to float.",
-                            s, mNames[index]), null /*data*/);
+                            s, mNames[index]), null);
 
                 // we'll return the default value below.
             }
@@ -358,10 +374,6 @@
             return null;
         }
 
-        if (RenderResources.REFERENCE_NULL.equals(value)) {
-            return null;
-        }
-
         // let the framework inflate the ColorStateList from the XML file.
         File f = new File(value);
         if (f.isFile()) {
@@ -377,13 +389,13 @@
                 }
             } catch (XmlPullParserException e) {
                 Bridge.getLog().error(LayoutLog.TAG_BROKEN,
-                        "Failed to configure parser for " + value, e, null /*data*/);
+                        "Failed to configure parser for " + value, e, null);
                 return null;
             } catch (Exception e) {
                 // this is an error and not warning since the file existence is checked before
                 // attempting to parse it.
                 Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
-                        "Failed to parse file " + value, e, null /*data*/);
+                        "Failed to parse file " + value, e, null);
 
                 return null;
             }
@@ -393,7 +405,7 @@
             int color = ResourceHelper.getColor(value);
             return ColorStateList.valueOf(color);
         } catch (NumberFormatException e) {
-            Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e, null /*data*/);
+            Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e, null);
         }
 
         return null;
@@ -443,26 +455,15 @@
 
         if (s == null) {
             return defValue;
-        } else if (s.equals(BridgeConstants.MATCH_PARENT) ||
-                s.equals(BridgeConstants.FILL_PARENT)) {
-            return LayoutParams.MATCH_PARENT;
-        } else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
-            return LayoutParams.WRAP_CONTENT;
-        } else if (RenderResources.REFERENCE_NULL.equals(s)) {
-            return defValue;
         }
 
-        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
+        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true)) {
             return mValue.getDimension(mBridgeResources.getDisplayMetrics());
         }
 
-        // looks like we were unable to resolve the dimension value
-        Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
-                String.format(
-                    "\"%1$s\" in attribute \"%2$s\" is not a valid format.",
-                    s, mNames[index]), null /*data*/);
-
-        return defValue;
+        // looks like we were unable to resolve the dimension value. Check if it is an attribute
+        // constant.
+        return resolveEnumAttribute(index, defValue);
     }
 
     /**
@@ -518,7 +519,7 @@
                     Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                             String.format(
                                 "\"%1$s\" in attribute \"%2$s\" is not a valid format.",
-                                s, mNames[index]), null /*data*/);
+                                s, mNames[index]), null);
                 }
             }
 
@@ -575,11 +576,9 @@
             return LayoutParams.MATCH_PARENT;
         } else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
             return LayoutParams.WRAP_CONTENT;
-        } else if (RenderResources.REFERENCE_NULL.equals(s)) {
-            throw new RuntimeException();
         }
 
-        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
+        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true)) {
             float f = mValue.getDimension(mBridgeResources.getDisplayMetrics());
 
             final int res = (int)(f+0.5f);
@@ -621,16 +620,15 @@
             return defValue;
         }
 
-        if (ResourceHelper.parseFloatAttribute(mNames[index], value, mValue,
-                false /*requireUnit*/)) {
+        if (ResourceHelper.parseFloatAttribute(mNames[index], value, mValue, false)) {
             return mValue.getFraction(base, pbase);
         }
 
         // looks like we were unable to resolve the fraction value
         Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                 String.format(
-                    "\"%1$s\" in attribute \"%2$s\" cannot be converted to a fraction.",
-                    value, mNames[index]), null /*data*/);
+                        "\"%1$s\" in attribute \"%2$s\" cannot be converted to a fraction.",
+                        value, mNames[index]), null);
 
         return defValue;
     }
@@ -669,10 +667,6 @@
             return mContext.getDynamicIdByStyle((StyleResourceValue)resValue);
         }
 
-        if (RenderResources.REFERENCE_NULL.equals(resValue.getValue())) {
-            return defValue;
-        }
-
         // if the attribute was a reference to a resource, and not a declaration of an id (@+id),
         // then the xml attribute value was "resolved" which leads us to a ResourceValue with a
         // valid getType() and getName() returning a resource name.
@@ -782,7 +776,7 @@
 
         ResourceValue value = mResourceData[index];
         String stringValue = value.getValue();
-        if (stringValue == null || RenderResources.REFERENCE_NULL.equals(stringValue)) {
+        if (stringValue == null) {
             return null;
         }
 
@@ -812,18 +806,9 @@
 
         String value = mResourceData[index].getValue();
         if (value != null) {
-            if (RenderResources.REFERENCE_NULL.equals(value)) {
-                return null;
-            }
-
             return new CharSequence[] { value };
         }
 
-        Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
-                String.format(
-                    String.format("Unknown value for getTextArray(%d) => %s", //DEBUG
-                    index, mResourceData[index].getName())), null /*data*/);
-
         return null;
     }
 
@@ -862,8 +847,7 @@
 
         String s = mResourceData[index].getValue();
 
-        return ResourceHelper.parseFloatAttribute(mNames[index], s, outValue,
-                false /*requireUnit*/);
+        return ResourceHelper.parseFloatAttribute(mNames[index], s, outValue, false);
     }
 
     /**
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index 2604e97..c403ce6 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -222,7 +222,8 @@
 
     @Override
     public void overridePendingAppTransitionAspectScaledThumb(Bitmap srcThumb, int startX,
-            int startY, IRemoteCallback startedCallback, boolean scaleUp) {
+            int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback,
+            boolean scaleUp) {
         // TODO Auto-generated method stub
     }
 
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
index 130500a..0ed6ab1 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowSession.java
@@ -174,6 +174,11 @@
     }
 
     @Override
+    public void setWallpaperDisplayOffset(IBinder windowToken, int x, int y) {
+        // pass for now.
+    }
+
+    @Override
     public Bundle sendWallpaperCommand(IBinder window, String action, int x, int y,
             int z, Bundle extras, boolean sync) {
         // pass for now.
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
index adb0937..99ae7c9 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
@@ -63,11 +63,11 @@
      * Returns the color value represented by the given string value
      * @param value the color value
      * @return the color as an int
-     * @throw NumberFormatException if the conversion failed.
+     * @throws NumberFormatException if the conversion failed.
      */
     public static int getColor(String value) {
         if (value != null) {
-            if (value.startsWith("#") == false) {
+            if (!value.startsWith("#")) {
                 throw new NumberFormatException(
                         String.format("Color value '%s' must start with #", value));
             }
@@ -113,7 +113,7 @@
 
     public static ColorStateList getColorStateList(ResourceValue resValue, BridgeContext context) {
         String value = resValue.getValue();
-        if (value != null && RenderResources.REFERENCE_NULL.equals(value) == false) {
+        if (value != null && !RenderResources.REFERENCE_NULL.equals(value)) {
             // first check if the value is a file (xml most likely)
             File f = new File(value);
             if (f.isFile()) {
@@ -360,7 +360,7 @@
      */
     public static boolean parseFloatAttribute(String attribute, String value,
             TypedValue outValue, boolean requireUnit) {
-        assert requireUnit == false || attribute != null;
+        assert !requireUnit || attribute != null;
 
         // remove the space before and after
         value = value.trim();
@@ -379,7 +379,7 @@
         }
 
         // check the first character
-        if (buf[0] < '0' && buf[0] > '9' && buf[0] != '.' && buf[0] != '-') {
+        if ((buf[0] < '0' || buf[0] > '9') && buf[0] != '.' && buf[0] != '-' && buf[0] != '+') {
             return false;
         }
 
@@ -411,7 +411,7 @@
 
             if (end.length() == 0) {
                 if (outValue != null) {
-                    if (requireUnit == false) {
+                    if (!requireUnit) {
                         outValue.type = TypedValue.TYPE_FLOAT;
                         outValue.data = Float.floatToIntBits(f);
                     } else {
@@ -489,6 +489,8 @@
 
     private static void applyUnit(UnitEntry unit, TypedValue outValue, float[] outScale) {
         outValue.type = unit.type;
+        // COMPLEX_UNIT_SHIFT is 0 and hence intelliJ complains about it. Suppress the warning.
+        //noinspection PointlessBitwiseExpression
         outValue.data = unit.unit << TypedValue.COMPLEX_UNIT_SHIFT;
         outScale[0] = unit.scale;
     }
diff --git a/tools/layoutlib/bridge/tests/Android.mk b/tools/layoutlib/bridge/tests/Android.mk
index 7a9e067..5e47c8c 100644
--- a/tools/layoutlib/bridge/tests/Android.mk
+++ b/tools/layoutlib/bridge/tests/Android.mk
@@ -34,5 +34,8 @@
 
 include $(BUILD_HOST_JAVA_LIBRARY)
 
+# Copy the jar to DIST_DIR for sdk builds
+$(call dist-for-goals, sdk win_sdk, $(LOCAL_INSTALLED_MODULE))
+
 # Build all sub-directories
 include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
index 31b3e25..a2588a6 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
@@ -104,9 +104,61 @@
             return platformDir;
         }
         // System Property not set. Try to find the directory in the build directory.
-        String out = System.getenv("ANDROID_HOST_OUT");
-        if (out == null || out.isEmpty() || !new File(out).isDirectory()) {
-            // Can't find the out directory.
+        String androidHostOut = System.getenv("ANDROID_HOST_OUT");
+        if (androidHostOut != null) {
+            platformDir = getPlatformDirFromHostOut(new File(androidHostOut));
+            if (platformDir != null) {
+                return platformDir;
+            }
+        }
+        String workingDirString = System.getProperty("user.dir");
+        File workingDir = new File(workingDirString);
+        // Test if workingDir is android checkout root.
+        platformDir = getPlatformDirFromRoot(workingDir);
+        if (platformDir != null) {
+            return platformDir;
+        }
+        // Test if workingDir is  platform/frameworks/base/tools/layoutlib. That is, root should be
+        // workingDir/../../../../  (4 levels up)
+        File currentDir = workingDir;
+        for (int i = 0; i < 4; i++) {
+            if (currentDir != null) {
+                currentDir = currentDir.getParentFile();
+            }
+        }
+        return currentDir == null ? null : getPlatformDirFromRoot(currentDir);
+    }
+
+    private static String getPlatformDirFromRoot(File root) {
+        if (!root.isDirectory()) {
+            return null;
+        }
+        File out = new File(root, "out");
+        if (!out.isDirectory()) {
+            return null;
+        }
+        File host = new File(out, "host");
+        if (!host.isDirectory()) {
+            return null;
+        }
+        File[] hosts = host.listFiles(new FileFilter() {
+            @Override
+            public boolean accept(File path) {
+                return path.isDirectory() && (path.getName().startsWith("linux-") || path.getName()
+                        .startsWith("darwin-"));
+            }
+        });
+        for (File hostOut : hosts) {
+            String platformDir = getPlatformDirFromHostOut(hostOut);
+            if (platformDir != null) {
+                return platformDir;
+            }
+        }
+        return null;
+    }
+
+    private static String getPlatformDirFromHostOut(File out) {
+        if (!out.isDirectory()) {
             return null;
         }
         File sdkDir = new File(out, "sdk" + File.separator + "sdk");
@@ -117,7 +169,7 @@
         File[] possibleSdks = sdkDir.listFiles(new FileFilter() {
             @Override
             public boolean accept(File path) {
-                return path.isDirectory() && path.getAbsolutePath().contains("android-sdk");
+                return path.isDirectory() && path.getName().contains("android-sdk");
             }
         });
         for (File possibleSdk : possibleSdks) {
diff --git a/tools/layoutlib/create/Android.mk b/tools/layoutlib/create/Android.mk
index 9bd48ab..e6f0bc3 100644
--- a/tools/layoutlib/create/Android.mk
+++ b/tools/layoutlib/create/Android.mk
@@ -26,3 +26,6 @@
 
 include $(BUILD_HOST_JAVA_LIBRARY)
 
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/tools/layoutlib/create/tests/Android.mk b/tools/layoutlib/create/tests/Android.mk
new file mode 100644
index 0000000..c197d57
--- /dev/null
+++ b/tools/layoutlib/create/tests/Android.mk
@@ -0,0 +1,35 @@
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# Only compile source java files in this lib.
+LOCAL_SRC_FILES := $(call all-java-files-under, com)
+
+LOCAL_JAVA_RESOURCE_DIRS := data mock_data
+
+LOCAL_MODULE := layoutlib-create-tests
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_JAVA_LIBRARIES := layoutlib_create junit
+LOCAL_STATIC_JAVA_LIBRARIES := asm-4.0
+
+include $(BUILD_HOST_JAVA_LIBRARY)
+
+# Copy the jar to DIST_DIR for sdk builds
+$(call dist-for-goals, sdk win_sdk, $(LOCAL_INSTALLED_MODULE))
+
+# Build all sub-directories
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 397d700..a752686 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -18,7 +18,6 @@
 
 import android.net.wifi.BatchedScanResult;
 import android.net.wifi.BatchedScanSettings;
-import android.net.wifi.WifiAdapter;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.ScanSettings;
@@ -40,9 +39,9 @@
  */
 interface IWifiManager
 {
-    List<WifiAdapter> getAdaptors();
+    int getSupportedFeatures();
 
-    WifiActivityEnergyInfo reportActivityInfo(in WifiAdapter adapter);
+    WifiActivityEnergyInfo reportActivityInfo();
 
     List<WifiConfiguration> getConfiguredNetworks();
 
diff --git a/wifi/java/android/net/wifi/IWifiScanner.aidl b/wifi/java/android/net/wifi/IWifiScanner.aidl
index fef2d11..3984934 100644
--- a/wifi/java/android/net/wifi/IWifiScanner.aidl
+++ b/wifi/java/android/net/wifi/IWifiScanner.aidl
@@ -17,6 +17,7 @@
 package android.net.wifi;
 
 import android.os.Messenger;
+import android.os.Bundle;
 
 /**
  * {@hide}
@@ -24,4 +25,6 @@
 interface IWifiScanner
 {
     Messenger getMessenger();
+
+    Bundle getAvailableChannels(int band);
 }
diff --git a/wifi/java/android/net/wifi/WifiAdapter.java b/wifi/java/android/net/wifi/WifiAdapter.java
deleted file mode 100644
index 0b12dea..0000000
--- a/wifi/java/android/net/wifi/WifiAdapter.java
+++ /dev/null
@@ -1,257 +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 android.net.wifi;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.util.Log;
-
-/**
- * Represents local wifi adapter. Different devices have different kinds of
- * wifi adapters; each with different capabilities. Use this class to find out
- * which capabilites are supported by the wifi adapter on the device.
- */
-public class WifiAdapter implements Parcelable {
-    private static final String TAG = "WifiAdapter";
-
-    /* Keep this list in sync with wifi_hal.h */
-    /** @hide */
-    public static final int WIFI_FEATURE_INFRA            = 0x0001;  // Basic infrastructure mode
-    /** @hide */
-    public static final int WIFI_FEATURE_INFRA_5G         = 0x0002;  // Support for 5 GHz Band
-    /** @hide */
-    public static final int WIFI_FEATURE_PASSPOINT        = 0x0004;  // Support for GAS/ANQP
-    /** @hide */
-    public static final int WIFI_FEATURE_P2P              = 0x0008;  // Wifi-Direct
-    /** @hide */
-    public static final int WIFI_FEATURE_MOBILE_HOTSPOT   = 0x0010;  // Soft AP
-    /** @hide */
-    public static final int WIFI_FEATURE_SCANNER          = 0x0020;  // WifiScanner APIs
-    /** @hide */
-    public static final int WIFI_FEATURE_NAN              = 0x0040;  // Neighbor Awareness Networking
-    /** @hide */
-    public static final int WIFI_FEATURE_D2D_RTT          = 0x0080;  // Device-to-device RTT
-    /** @hide */
-    public static final int WIFI_FEATURE_D2AP_RTT         = 0x0100;  // Device-to-AP RTT
-    /** @hide */
-    public static final int WIFI_FEATURE_BATCH_SCAN       = 0x0200;  // Batched Scan (deprecated)
-    /** @hide */
-    public static final int WIFI_FEATURE_PNO              = 0x0400;  // Preferred network offload
-    /** @hide */
-    public static final int WIFI_FEATURE_ADDITIONAL_STA   = 0x0800;  // Support for two STAs
-    /** @hide */
-    public static final int WIFI_FEATURE_TDLS             = 0x1000;  // Tunnel directed link setup
-    /** @hide */
-    public static final int WIFI_FEATURE_TDLS_OFFCHANNEL  = 0x2000;  // Support for TDLS off channel
-    /** @hide */
-    public static final int WIFI_FEATURE_EPR              = 0x4000;  // Enhanced power reporting
-
-    private static final int CONTROLLER_ENERGY_UPDATE_TIMEOUT_MILLIS = 30;
-    /** @hide */
-    public static final int ACTIVITY_ENERGY_INFO_CACHED = 0;
-    /** @hide */
-    public static final int ACTIVITY_ENERGY_INFO_REFRESHED = 1;
-
-    private String name;
-    private int    supportedFeatures;
-
-    // Make the API consistent with BlueTooth Adaptor, allowing WifiService to be accessed
-    // Directly from the adapter
-    /** @hide */
-    public IWifiManager mService = null;
-
-    /** @hide */
-    public WifiAdapter(String name, int supportedFeatures) {
-        this.name = name;
-        this.supportedFeatures = supportedFeatures;
-    }
-
-    /**
-     * @return name of the adapter
-     */
-    public String getName() {
-        return name;
-    }
-
-    private int getSupportedFeatures() {
-        return supportedFeatures;
-    }
-
-    private boolean isFeatureSupported(int feature) {
-        return (supportedFeatures & feature) == feature;
-    }
-
-    /**
-     * @return true if this adapter supports 5 GHz band
-     */
-    public boolean is5GHzBandSupported() {
-        return isFeatureSupported(WIFI_FEATURE_INFRA_5G);
-    }
-
-    /**
-     * @return true if this adapter supports passpoint
-     */
-    public boolean isPasspointSupported() {
-        return isFeatureSupported(WIFI_FEATURE_PASSPOINT);
-    }
-
-    /**
-     * @return true if this adapter supports WifiP2pManager (Wi-Fi Direct)
-     */
-    public boolean isP2pSupported() {
-        return isFeatureSupported(WIFI_FEATURE_P2P);
-    }
-
-    /**
-     * @return true if this adapter supports portable Wi-Fi hotspot
-     */
-    public boolean isPortableHotspotSupported() {
-        return isFeatureSupported(WIFI_FEATURE_MOBILE_HOTSPOT);
-    }
-
-    /**
-     * @return true if this adapter supports WifiScanner APIs
-     */
-    public boolean isWifiScannerSupported() {
-        return isFeatureSupported(WIFI_FEATURE_SCANNER);
-    }
-
-    /**
-     * @return true if this adapter supports Neighbour Awareness Network APIs
-     * @hide
-     */
-    public boolean isNanSupported() {
-        return isFeatureSupported(WIFI_FEATURE_NAN);
-    }
-
-    /**
-     * @return true if this adapter supports Device-to-device RTT
-     */
-    public boolean isDeviceToDeviceRttSupported() {
-        return isFeatureSupported(WIFI_FEATURE_D2D_RTT);
-    }
-
-    /**
-     * @return true if this adapter supports Device-to-AP RTT
-     */
-    public boolean isDeviceToApRttSupported() {
-        return isFeatureSupported(WIFI_FEATURE_D2AP_RTT);
-    }
-
-    /**
-     * @return true if this adapter supports offloaded connectivity scan
-     */
-    public boolean isPreferredNetworkOffloadSupported() {
-        return isFeatureSupported(WIFI_FEATURE_PNO);
-    }
-
-    /**
-     * @return true if this adapter supports multiple simultaneous connections
-     * @hide
-     */
-    public boolean isAdditionalStaSupported() {
-        return isFeatureSupported(WIFI_FEATURE_ADDITIONAL_STA);
-    }
-
-    /**
-     * @return true if this adapter supports Tunnel Directed Link Setup
-     */
-    public boolean isTdlsSupported() {
-        return isFeatureSupported(WIFI_FEATURE_TDLS);
-    }
-
-    /**
-     * @return true if this adapter supports Off Channel Tunnel Directed Link Setup
-     */
-    public boolean isOffChannelTdlsSupported() {
-        return isFeatureSupported(WIFI_FEATURE_TDLS_OFFCHANNEL);
-    }
-
-    /**
-     * @return true if this adapter supports advanced power/performance counters
-     */
-    public boolean isEnhancedPowerReportingSupported() {
-        return isFeatureSupported(WIFI_FEATURE_EPR);
-    }
-
-
-    /**
-     * Return the record of {@link WifiActivityEnergyInfo} object that
-     * has the activity and energy info. This can be used to ascertain what
-     * the controller has been up to, since the last sample.
-     * @param updateType Type of info, cached vs refreshed.
-     *
-     * @return a record with {@link WifiActivityEnergyInfo} or null if
-     * report is unavailable or unsupported
-     * @hide
-     */
-    public WifiActivityEnergyInfo getControllerActivityEnergyInfo(int updateType) {
-        if (mService == null) return null;
-        try {
-            WifiActivityEnergyInfo record;
-            if (!isEnhancedPowerReportingSupported()) {
-                return null;
-            }
-            synchronized(this) {
-                record = mService.reportActivityInfo(this);
-                if (record.isValid()) {
-                    return record;
-                } else {
-                    return null;
-                }
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "getControllerActivityEnergyInfo: " + e);
-        }
-        return null;
-    }
-
-    /* Parcelable implementation */
-    /**
-     * Implement the Parcelable interface
-     * {@hide}
-     */
-    public int describeContents() {
-        return 0;
-    }
-
-    /**
-     * Implement the Parcelable interface
-     * {@hide}
-     */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(name);
-        dest.writeInt(supportedFeatures);
-    }
-
-    /**
-     * Implement the Parcelable interface
-     * {@hide}
-     */
-    public static final Creator<WifiAdapter> CREATOR =
-            new Creator<WifiAdapter>() {
-                public WifiAdapter createFromParcel(Parcel in) {
-                    WifiAdapter adaptor = new WifiAdapter(in.readString(), in.readInt());
-                    return adaptor;
-                }
-
-                public WifiAdapter[] newArray(int size) {
-                    return new WifiAdapter[size];
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index ac2a176..aeaff71 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -341,6 +341,12 @@
 
     /**
      * @hide
+     * last time we connected, this configuration had no internet access
+     */
+    public boolean noInternetAccess;
+
+    /**
+     * @hide
      * Uid of app creating the configuration
      */
     @SystemApi
@@ -361,9 +367,9 @@
 
     /**
      * @hide
-     * Uid of app owning the BSSID
+     * Uid used by autoJoin
      */
-    public int bssidOwnerUid;
+    public String autoJoinBSSID;
 
     /**
      * @hide
@@ -461,8 +467,10 @@
         public int rssi24;  // strongest 2.4GHz RSSI
         public int num5;    // number of BSSIDs on 5GHz
         public int num24;   // number of BSSIDs on 2.4GHz
-        public long age5;  // timestamp of the strongest 5GHz BSSID (last time it was seen)
-        public long age24;   // timestamp of the strongest 2.4GHz BSSID (last time it was seen)
+        public long age5;   // timestamp of the strongest 5GHz BSSID (last time it was seen)
+        public long age24;  // timestamp of the strongest 2.4GHz BSSID (last time it was seen)
+        public String BSSID24;
+        public String BSSID5;
 
         public Visibility() {
             rssi5 = INVALID_RSSI;
@@ -476,6 +484,8 @@
             age5 = source.age5;
             num24 = source.num24;
             num5 = source.num5;
+            BSSID5 = source.BSSID5;
+            BSSID24 = source.BSSID24;
         }
 
         @Override
@@ -486,6 +496,7 @@
                 sbuf.append(Integer.toString(rssi24));
                 sbuf.append(",");
                 sbuf.append(Integer.toString(num24));
+                if (BSSID24 != null) sbuf.append(",").append(BSSID24);
             } else {
                 sbuf.append("*");
             }
@@ -494,6 +505,7 @@
                 sbuf.append(Integer.toString(rssi5));
                 sbuf.append(",");
                 sbuf.append(Integer.toString(num5));
+                if (BSSID5 != null) sbuf.append(",").append(BSSID5);
             }
             sbuf.append("]");
             return sbuf.toString();
@@ -543,11 +555,13 @@
                 if (result.level > status.rssi5) {
                     status.rssi5 = result.level;
                     status.age5 = result.seen;
+                    status.BSSID5 = result.BSSID;
                 }
             } else if (result.is24GHz()) {
                 if (result.level > status.rssi24) {
                     status.rssi24 = result.level;
                     status.age24 = result.seen;
+                    status.BSSID24 = result.BSSID;
                 }
             }
         }
@@ -673,6 +687,49 @@
     @SystemApi
     public int numAssociation;
 
+    /**
+     * @hide
+     * Number of time user disabled WiFi while associated to this configuration with Low RSSI.
+     */
+    public int numUserTriggeredWifiDisableLowRSSI;
+
+    /**
+     * @hide
+     * Number of time user disabled WiFi while associated to this configuration with Bad RSSI.
+     */
+    public int numUserTriggeredWifiDisableBadRSSI;
+
+    /**
+     * @hide
+     * Number of time user disabled WiFi while associated to this configuration
+     * and RSSI was not HIGH.
+     */
+    public int numUserTriggeredWifiDisableNotHighRSSI;
+
+    /**
+     * @hide
+     * Number of ticks associated to this configuration with Low RSSI.
+     */
+    public int numTicksAtLowRSSI;
+
+    /**
+     * @hide
+     * Number of ticks associated to this configuration with Bad RSSI.
+     */
+    public int numTicksAtBadRSSI;
+
+    /**
+     * @hide
+     * Number of ticks associated to this configuration
+     * and RSSI was not HIGH.
+     */
+    public int numTicksAtNotHighRSSI;
+    /**
+     * @hide
+     * Number of time user (WifiManager) triggered association to this configuration.
+     * TODO: count this only for Wifi Settings uuid, so as to not count 3rd party apps
+     */
+    public int numUserTriggeredJoinAttempts;
 
     /**
      * @hide
@@ -725,6 +782,7 @@
         selfAdded = false;
         didSelfAdd = false;
         ephemeral = false;
+        noInternetAccess = false;
         mIpConfiguration = new IpConfiguration();
     }
 
@@ -824,8 +882,10 @@
             sbuf.append(" autoJoinStatus ").append(this.numConnectionFailures).append("\n");
         }
         if (this.didSelfAdd || this.selfAdded) {
-            if (this.didSelfAdd) sbuf.append(" didSelfAdd ");
-            if (this.selfAdded) sbuf.append(" selfAdded ");
+            if (this.didSelfAdd) sbuf.append(" didSelfAdd");
+            if (this.selfAdded) sbuf.append(" selfAdded");
+            if (this.noInternetAccess) sbuf.append(" noInternetAccess");
+
             sbuf.append("\n");
         }
         sbuf.append(" KeyMgmt:");
@@ -896,18 +956,44 @@
 
         sbuf.append(mIpConfiguration.toString());
 
-        if (selfAdded)  sbuf.append("selfAdded");
-        if (creatorUid != 0)  sbuf.append("uid=" + Integer.toString(creatorUid));
-
-        if (blackListTimestamp != 0) {
+        if (this.creatorUid != 0)  sbuf.append("uid=" + Integer.toString(creatorUid));
+        if (this.autoJoinBSSID != null) sbuf.append("autoJoinBSSID=" + autoJoinBSSID);
+        if (this.blackListTimestamp != 0) {
             long now_ms = System.currentTimeMillis();
-            long diff = now_ms - blackListTimestamp;
+            long diff = now_ms - this.blackListTimestamp;
             if (diff <= 0) {
                 sbuf.append("blackListed since <incorrect>");
             } else {
                 sbuf.append("blackListed since ").append(Long.toString(diff/1000)).append( "sec");
             }
         }
+        sbuf.append('\n');
+        if (this.linkedConfigurations != null) {
+            for(String key : this.linkedConfigurations.keySet()) {
+                sbuf.append(" linked: ").append(key);
+                sbuf.append('\n');
+            }
+        }
+        if (this.connectChoices != null) {
+            for(String key : this.connectChoices.keySet()) {
+                Integer choice = this.connectChoices.get(key);
+                if (choice != null) {
+                    sbuf.append(" choice: ").append(key);
+                    sbuf.append(" = ").append(choice);
+                    sbuf.append('\n');
+                }
+            }
+        }
+        sbuf.append(" triggeredLow: ").append(numUserTriggeredWifiDisableLowRSSI);
+        sbuf.append(" triggeredBad: ").append(numUserTriggeredWifiDisableBadRSSI);
+        sbuf.append(" triggeredNotHigh: ").append(numUserTriggeredWifiDisableNotHighRSSI);
+        sbuf.append('\n');
+        sbuf.append(" ticksLow: ").append(numTicksAtLowRSSI);
+        sbuf.append(" ticksBad: ").append(numTicksAtBadRSSI);
+        sbuf.append(" ticksNotHigh: ").append(numTicksAtNotHighRSSI);
+        sbuf.append('\n');
+        sbuf.append(" triggeredJoin: ").append(numUserTriggeredJoinAttempts);
+        sbuf.append('\n');
 
         return sbuf.toString();
     }
@@ -1197,7 +1283,7 @@
             mCachedConfigKey = null; //force null configKey
             autoJoinStatus = source.autoJoinStatus;
             selfAdded = source.selfAdded;
-
+            noInternetAccess = source.noInternetAccess;
             if (source.visibility != null) {
                 visibility = new Visibility(source.visibility);
             }
@@ -1206,7 +1292,6 @@
             didSelfAdd = source.didSelfAdd;
             lastConnectUid = source.lastConnectUid;
             lastUpdateUid = source.lastUpdateUid;
-            bssidOwnerUid = source.bssidOwnerUid;
             creatorUid = source.creatorUid;
             peerWifiConfiguration = source.peerWifiConfiguration;
             blackListTimestamp = source.blackListTimestamp;
@@ -1217,6 +1302,14 @@
             numScorerOverride = source.numScorerOverride;
             numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork;
             numAssociation = source.numAssociation;
+            numUserTriggeredWifiDisableLowRSSI = source.numUserTriggeredWifiDisableLowRSSI;
+            numUserTriggeredWifiDisableBadRSSI = source.numUserTriggeredWifiDisableBadRSSI;
+            numUserTriggeredWifiDisableNotHighRSSI = source.numUserTriggeredWifiDisableNotHighRSSI;
+            numTicksAtLowRSSI = source.numTicksAtLowRSSI;
+            numTicksAtBadRSSI = source.numTicksAtBadRSSI;
+            numTicksAtNotHighRSSI = source.numTicksAtNotHighRSSI;
+            numUserTriggeredJoinAttempts = source.numUserTriggeredJoinAttempts;
+            autoJoinBSSID = source.autoJoinBSSID;
         }
     }
 
@@ -1233,6 +1326,7 @@
         dest.writeInt(disableReason);
         dest.writeString(SSID);
         dest.writeString(BSSID);
+        dest.writeString(autoJoinBSSID);
         dest.writeString(FQDN);
         dest.writeString(naiRealm);
         dest.writeString(preSharedKey);
@@ -1259,16 +1353,24 @@
         dest.writeInt(autoJoinStatus);
         dest.writeInt(selfAdded ? 1 : 0);
         dest.writeInt(didSelfAdd ? 1 : 0);
+        dest.writeInt(noInternetAccess ? 1 : 0);
         dest.writeInt(creatorUid);
         dest.writeInt(lastConnectUid);
         dest.writeInt(lastUpdateUid);
-        dest.writeInt(bssidOwnerUid);
         dest.writeLong(blackListTimestamp);
         dest.writeLong(lastConnectionFailure);
         dest.writeInt(numConnectionFailures);
         dest.writeInt(numScorerOverride);
         dest.writeInt(numScorerOverrideAndSwitchedNetwork);
         dest.writeInt(numAssociation);
+        dest.writeInt(numUserTriggeredWifiDisableLowRSSI);
+        dest.writeInt(numUserTriggeredWifiDisableBadRSSI);
+        dest.writeInt(numUserTriggeredWifiDisableNotHighRSSI);
+        dest.writeInt(numTicksAtLowRSSI);
+        dest.writeInt(numTicksAtBadRSSI);
+        dest.writeInt(numTicksAtNotHighRSSI);
+        dest.writeInt(numUserTriggeredJoinAttempts);
+
     }
 
     /** Implement the Parcelable interface {@hide} */
@@ -1281,6 +1383,7 @@
                 config.disableReason = in.readInt();
                 config.SSID = in.readString();
                 config.BSSID = in.readString();
+                config.autoJoinBSSID = in.readString();
                 config.FQDN = in.readString();
                 config.naiRealm = in.readString();
                 config.preSharedKey = in.readString();
@@ -1307,16 +1410,23 @@
                 config.autoJoinStatus = in.readInt();
                 config.selfAdded = in.readInt() != 0;
                 config.didSelfAdd = in.readInt() != 0;
+                config.noInternetAccess = in.readInt() != 0;
                 config.creatorUid = in.readInt();
                 config.lastConnectUid = in.readInt();
                 config.lastUpdateUid = in.readInt();
-                config.bssidOwnerUid = in.readInt();
                 config.blackListTimestamp = in.readLong();
                 config.lastConnectionFailure = in.readLong();
                 config.numConnectionFailures = in.readInt();
                 config.numScorerOverride = in.readInt();
                 config.numScorerOverrideAndSwitchedNetwork = in.readInt();
                 config.numAssociation = in.readInt();
+                config.numUserTriggeredWifiDisableLowRSSI = in.readInt();
+                config.numUserTriggeredWifiDisableBadRSSI = in.readInt();
+                config.numUserTriggeredWifiDisableNotHighRSSI = in.readInt();
+                config.numTicksAtLowRSSI = in.readInt();
+                config.numTicksAtBadRSSI = in.readInt();
+                config.numTicksAtNotHighRSSI = in.readInt();
+                config.numUserTriggeredJoinAttempts = in.readInt();
                 return config;
             }
 
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 4a4da22..1393bce 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -576,22 +576,6 @@
     }
 
     /**
-     * Retrieve all wifi adapters available on this device
-     * @return list of adapters
-     */
-    public List<WifiAdapter> getAdapters() {
-        try {
-            List<WifiAdapter> adapterList = mService.getAdaptors();
-            for (WifiAdapter a : adapterList) {
-                a.mService = mService;
-            }
-            return adapterList;
-        } catch (RemoteException e) {
-            return null;
-        }
-    }
-
-    /**
      * Return a list of all the networks configured in the supplicant.
      * Not all fields of WifiConfiguration are returned. Only the following
      * fields are filled in:
@@ -824,6 +808,182 @@
         }
     }
 
+    /* Keep this list in sync with wifi_hal.h */
+    /** @hide */
+    public static final int WIFI_FEATURE_INFRA            = 0x0001;  // Basic infrastructure mode
+    /** @hide */
+    public static final int WIFI_FEATURE_INFRA_5G         = 0x0002;  // Support for 5 GHz Band
+    /** @hide */
+    public static final int WIFI_FEATURE_PASSPOINT        = 0x0004;  // Support for GAS/ANQP
+    /** @hide */
+    public static final int WIFI_FEATURE_P2P              = 0x0008;  // Wifi-Direct
+    /** @hide */
+    public static final int WIFI_FEATURE_MOBILE_HOTSPOT   = 0x0010;  // Soft AP
+    /** @hide */
+    public static final int WIFI_FEATURE_SCANNER          = 0x0020;  // WifiScanner APIs
+    /** @hide */
+    public static final int WIFI_FEATURE_NAN              = 0x0040;  // Neighbor Awareness Networking
+    /** @hide */
+    public static final int WIFI_FEATURE_D2D_RTT          = 0x0080;  // Device-to-device RTT
+    /** @hide */
+    public static final int WIFI_FEATURE_D2AP_RTT         = 0x0100;  // Device-to-AP RTT
+    /** @hide */
+    public static final int WIFI_FEATURE_BATCH_SCAN       = 0x0200;  // Batched Scan (deprecated)
+    /** @hide */
+    public static final int WIFI_FEATURE_PNO              = 0x0400;  // Preferred network offload
+    /** @hide */
+    public static final int WIFI_FEATURE_ADDITIONAL_STA   = 0x0800;  // Support for two STAs
+    /** @hide */
+    public static final int WIFI_FEATURE_TDLS             = 0x1000;  // Tunnel directed link setup
+    /** @hide */
+    public static final int WIFI_FEATURE_TDLS_OFFCHANNEL  = 0x2000;  // Support for TDLS off channel
+    /** @hide */
+    public static final int WIFI_FEATURE_EPR              = 0x4000;  // Enhanced power reporting
+
+    private int getSupportedFeatures() {
+        try {
+            return mService.getSupportedFeatures();
+        } catch (RemoteException e) {
+            return 0;
+        }
+    }
+
+    private boolean isFeatureSupported(int feature) {
+        return (getSupportedFeatures() & feature) == feature;
+    }
+    /**
+     * @return true if this adapter supports 5 GHz band
+     */
+    public boolean is5GHzBandSupported() {
+        return isFeatureSupported(WIFI_FEATURE_INFRA_5G);
+    }
+
+    /**
+     * @return true if this adapter supports passpoint
+     * @hide
+     */
+    public boolean isPasspointSupported() {
+        return isFeatureSupported(WIFI_FEATURE_PASSPOINT);
+    }
+
+    /**
+     * @return true if this adapter supports WifiP2pManager (Wi-Fi Direct)
+     */
+    public boolean isP2pSupported() {
+        return isFeatureSupported(WIFI_FEATURE_P2P);
+    }
+
+    /**
+     * @return true if this adapter supports portable Wi-Fi hotspot
+     * @hide
+     */
+    @SystemApi
+    public boolean isPortableHotspotSupported() {
+        return isFeatureSupported(WIFI_FEATURE_MOBILE_HOTSPOT);
+    }
+
+    /**
+     * @return true if this adapter supports WifiScanner APIs
+     * @hide
+     */
+    @SystemApi
+    public boolean isWifiScannerSupported() {
+        return isFeatureSupported(WIFI_FEATURE_SCANNER);
+    }
+
+    /**
+     * @return true if this adapter supports Neighbour Awareness Network APIs
+     * @hide
+     */
+    public boolean isNanSupported() {
+        return isFeatureSupported(WIFI_FEATURE_NAN);
+    }
+
+    /**
+     * @return true if this adapter supports Device-to-device RTT
+     * @hide
+     */
+    @SystemApi
+    public boolean isDeviceToDeviceRttSupported() {
+        return isFeatureSupported(WIFI_FEATURE_D2D_RTT);
+    }
+
+    /**
+     * @return true if this adapter supports Device-to-AP RTT
+     */
+    @SystemApi
+    public boolean isDeviceToApRttSupported() {
+        return isFeatureSupported(WIFI_FEATURE_D2AP_RTT);
+    }
+
+    /**
+     * @return true if this adapter supports offloaded connectivity scan
+     */
+    public boolean isPreferredNetworkOffloadSupported() {
+        return isFeatureSupported(WIFI_FEATURE_PNO);
+    }
+
+    /**
+     * @return true if this adapter supports multiple simultaneous connections
+     * @hide
+     */
+    public boolean isAdditionalStaSupported() {
+        return isFeatureSupported(WIFI_FEATURE_ADDITIONAL_STA);
+    }
+
+    /**
+     * @return true if this adapter supports Tunnel Directed Link Setup
+     */
+    public boolean isTdlsSupported() {
+        return isFeatureSupported(WIFI_FEATURE_TDLS);
+    }
+
+    /**
+     * @return true if this adapter supports Off Channel Tunnel Directed Link Setup
+     * @hide
+     */
+    public boolean isOffChannelTdlsSupported() {
+        return isFeatureSupported(WIFI_FEATURE_TDLS_OFFCHANNEL);
+    }
+
+    /**
+     * @return true if this adapter supports advanced power/performance counters
+     */
+    public boolean isEnhancedPowerReportingSupported() {
+        return isFeatureSupported(WIFI_FEATURE_EPR);
+    }
+
+    /**
+     * Return the record of {@link WifiActivityEnergyInfo} object that
+     * has the activity and energy info. This can be used to ascertain what
+     * the controller has been up to, since the last sample.
+     * @param updateType Type of info, cached vs refreshed.
+     *
+     * @return a record with {@link WifiActivityEnergyInfo} or null if
+     * report is unavailable or unsupported
+     * @hide
+     */
+    public WifiActivityEnergyInfo getControllerActivityEnergyInfo(int updateType) {
+        if (mService == null) return null;
+        try {
+            WifiActivityEnergyInfo record;
+            if (!isEnhancedPowerReportingSupported()) {
+                return null;
+            }
+            synchronized(this) {
+                record = mService.reportActivityInfo();
+                if (record.isValid()) {
+                    return record;
+                } else {
+                    return null;
+                }
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "getControllerActivityEnergyInfo: " + e);
+        }
+        return null;
+    }
+
     /**
      * Request a scan for access points. Returns immediately. The availability
      * of the results is made known later by means of an asynchronous event sent
@@ -840,6 +1000,7 @@
     }
 
     /** @hide */
+    @SystemApi
     public boolean startScan(WorkSource workSource) {
         try {
             mService.startScan(null, workSource);
@@ -913,6 +1074,7 @@
      * @return false if not supported.
      * @hide
      */
+    @SystemApi
     public boolean isBatchedScanSupported() {
         try {
             return mService.isBatchedScanSupported();
@@ -939,6 +1101,7 @@
      * {@link BATCHED_SCAN_RESULTS_AVAILABLE_ACTION} is received.
      * @hide
      */
+    @SystemApi
     public List<BatchedScanResult> getBatchedScanResults() {
         try {
             return mService.getBatchedScanResults(mContext.getOpPackageName());
@@ -1457,12 +1620,14 @@
     /**
      * Passed with {@link ActionListener#onFailure}.
      * Indicates that the operation failed due to an internal error.
+     * @hide
      */
     public static final int ERROR                       = 0;
 
     /**
      * Passed with {@link ActionListener#onFailure}.
      * Indicates that the operation is already in progress
+     * @hide
      */
     public static final int IN_PROGRESS                 = 1;
 
@@ -1470,6 +1635,7 @@
      * Passed with {@link ActionListener#onFailure}.
      * Indicates that the operation failed because the framework is busy and
      * unable to service the request
+     * @hide
      */
     public static final int BUSY                        = 2;
 
@@ -1488,18 +1654,21 @@
     /**
      * Passed with {@link ActionListener#onFailure}.
      * Indicates that the operation failed due to invalid inputs
+     * @hide
      */
     public static final int INVALID_ARGS                = 8;
 
     /**
      * Passed with {@link ActionListener#onFailure}.
      * Indicates that the operation failed due to user permissions.
-     *
      * @hide
      */
     public static final int NOT_AUTHORIZED              = 9;
 
-    /** Interface for callback invocation on an application action */
+    /**
+     * Interface for callback invocation on an application action
+     * @hide
+     */
     public interface ActionListener {
         /** The operation succeeded */
         public void onSuccess();
@@ -1512,19 +1681,21 @@
     }
 
     /** Interface for callback invocation on a start WPS action */
-    public interface WpsListener {
+    public static abstract class WpsCallback {
         /** WPS start succeeded */
-        public void onStartSuccess(String pin);
+        public abstract void onStarted(String pin);
 
         /** WPS operation completed succesfully */
-        public void onCompletion();
+        public abstract void onSucceeded();
 
         /**
          * WPS operation failed
          * @param reason The reason for failure could be one of
-         * {@link #IN_PROGRESS}, {@link #WPS_OVERLAP_ERROR},{@link #ERROR} or {@link #BUSY}
+         * {@link #WPS_TKIP_ONLY_PROHIBITED}, {@link #WPS_OVERLAP_ERROR},
+         * {@link #WPS_WEP_PROHIBITED}, {@link #WPS_TIMED_OUT} or {@link #WPS_AUTH_FAILURE}
+         * and some generic errors.
          */
-        public void onFailure(int reason);
+        public abstract void onFailed(int reason);
     }
 
     /** Interface for callback invocation on a TX packet count poll action {@hide} */
@@ -1576,7 +1747,6 @@
                 case WifiManager.CONNECT_NETWORK_FAILED:
                 case WifiManager.FORGET_NETWORK_FAILED:
                 case WifiManager.SAVE_NETWORK_FAILED:
-                case WifiManager.CANCEL_WPS_FAILED:
                 case WifiManager.DISABLE_NETWORK_FAILED:
                     if (listener != null) {
                         ((ActionListener) listener).onFailure(message.arg1);
@@ -1586,7 +1756,6 @@
                 case WifiManager.CONNECT_NETWORK_SUCCEEDED:
                 case WifiManager.FORGET_NETWORK_SUCCEEDED:
                 case WifiManager.SAVE_NETWORK_SUCCEEDED:
-                case WifiManager.CANCEL_WPS_SUCCEDED:
                 case WifiManager.DISABLE_NETWORK_SUCCEEDED:
                     if (listener != null) {
                         ((ActionListener) listener).onSuccess();
@@ -1595,7 +1764,7 @@
                 case WifiManager.START_WPS_SUCCEEDED:
                     if (listener != null) {
                         WpsResult result = (WpsResult) message.obj;
-                        ((WpsListener) listener).onStartSuccess(result.pin);
+                        ((WpsCallback) listener).onStarted(result.pin);
                         //Listener needs to stay until completion or failure
                         synchronized(sListenerMapLock) {
                             sListenerMap.put(message.arg2, listener);
@@ -1604,12 +1773,22 @@
                     break;
                 case WifiManager.WPS_COMPLETED:
                     if (listener != null) {
-                        ((WpsListener) listener).onCompletion();
+                        ((WpsCallback) listener).onSucceeded();
                     }
                     break;
                 case WifiManager.WPS_FAILED:
                     if (listener != null) {
-                        ((WpsListener) listener).onFailure(message.arg1);
+                        ((WpsCallback) listener).onFailed(message.arg1);
+                    }
+                    break;
+                case WifiManager.CANCEL_WPS_SUCCEDED:
+                    if (listener != null) {
+                        ((WpsCallback) listener).onSucceeded();
+                    }
+                    break;
+                case WifiManager.CANCEL_WPS_FAILED:
+                    if (listener != null) {
+                        ((WpsCallback) listener).onFailed(message.arg1);
                     }
                     break;
                 case WifiManager.RSSI_PKTCNT_FETCH_SUCCEEDED:
@@ -1794,7 +1973,7 @@
      * @throws IllegalStateException if the WifiManager instance needs to be
      * initialized again
      */
-    public void startWps(WpsInfo config, WpsListener listener) {
+    public void startWps(WpsInfo config, WpsCallback listener) {
         if (config == null) throw new IllegalArgumentException("config cannot be null");
         validateChannel();
         sAsyncChannel.sendMessage(START_WPS, 0, putListener(listener), config);
@@ -1807,7 +1986,7 @@
      * @throws IllegalStateException if the WifiManager instance needs to be
      * initialized again
      */
-    public void cancelWps(ActionListener listener) {
+    public void cancelWps(WpsCallback listener) {
         validateChannel();
         sAsyncChannel.sendMessage(CANCEL_WPS, 0, putListener(listener));
     }
@@ -2352,4 +2531,7 @@
             return 0;
         }
     }
+
+
+
 }
diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java
index e7bcb23..aaa2f98 100644
--- a/wifi/java/android/net/wifi/WifiScanner.java
+++ b/wifi/java/android/net/wifi/WifiScanner.java
@@ -18,6 +18,7 @@
 
 import android.annotation.SystemApi;
 import android.content.Context;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Looper;
@@ -75,6 +76,11 @@
     public static final int REASON_INVALID_LISTENER = -2;
     /** Invalid request */
     public static final int REASON_INVALID_REQUEST = -3;
+    /** Invalid request */
+    public static final int REASON_NOT_AUTHORIZED = -4;
+
+    /** @hide */
+    public static final String GET_AVAILABLE_CHANNELS_EXTRA = "Channels";
 
     /**
      * Generic action callback invocation interface
@@ -92,7 +98,12 @@
      * @hide
      */
     public List<Integer> getAvailableChannels(int band) {
-        return null;
+        try {
+            Bundle bundle =  mService.getAvailableChannels(band);
+            return bundle.getIntegerArrayList(GET_AVAILABLE_CHANNELS_EXTRA);
+        } catch (RemoteException e) {
+            return null;
+        }
     }
 
     /**