Merge "Add activity token to display system."
diff --git a/Android.mk b/Android.mk
index f0828b7..618f404 100644
--- a/Android.mk
+++ b/Android.mk
@@ -157,6 +157,15 @@
 	core/java/android/os/IUserManager.aidl \
 	core/java/android/os/IVibratorService.aidl \
 	core/java/android/service/notification/INotificationListener.aidl \
+	core/java/android/print/IPrinterDiscoveryObserver.aidl \
+	core/java/android/print/IPrintAdapter.aidl \
+	core/java/android/print/IPrintClient.aidl \
+	core/java/android/print/IPrintProgressListener.aidl \
+	core/java/android/print/IPrintManager.aidl \
+	core/java/android/print/IPrintSpoolerService.aidl \
+	core/java/android/print/IPrintSpoolerServiceCallbacks.aidl \
+	core/java/android/printservice/IPrintService.aidl \
+	core/java/android/printservice/IPrintServiceClient.aidl \
 	core/java/android/service/dreams/IDreamManager.aidl \
 	core/java/android/service/dreams/IDreamService.aidl \
 	core/java/android/service/wallpaper/IWallpaperConnection.aidl \
diff --git a/api/current.txt b/api/current.txt
index e3d0674..4debd4d 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -23,6 +23,7 @@
     field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
     field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD";
     field public static final java.lang.String BIND_NOTIFICATION_LISTENER_SERVICE = "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE";
+    field public static final java.lang.String BIND_PRINT_SERVICE = "android.permission.BIND_PRINT_SERVICE";
     field public static final java.lang.String BIND_REMOTEVIEWS = "android.permission.BIND_REMOTEVIEWS";
     field public static final java.lang.String BIND_TEXT_SERVICE = "android.permission.BIND_TEXT_SERVICE";
     field public static final java.lang.String BIND_VPN_SERVICE = "android.permission.BIND_VPN_SERVICE";
@@ -254,6 +255,7 @@
     field public static final int activityCloseExitAnimation = 16842939; // 0x10100bb
     field public static final int activityOpenEnterAnimation = 16842936; // 0x10100b8
     field public static final int activityOpenExitAnimation = 16842937; // 0x10100b9
+    field public static final int addPrintersActivity = 16843747; // 0x10103e3
     field public static final int addStatesFromChildren = 16842992; // 0x10100f0
     field public static final int adjustViewBounds = 16843038; // 0x101011e
     field public static final int alertDialogIcon = 16843605; // 0x1010355
@@ -1142,6 +1144,7 @@
     field public static final int valueTo = 16843487; // 0x10102df
     field public static final int valueType = 16843488; // 0x10102e0
     field public static final int variablePadding = 16843157; // 0x1010195
+    field public static final int vendor = 16843748; // 0x10103e4
     field public static final int versionCode = 16843291; // 0x101021b
     field public static final int versionName = 16843292; // 0x101021c
     field public static final int verticalCorrection = 16843322; // 0x101023a
@@ -5766,6 +5769,7 @@
     field public static final java.lang.String NOTIFICATION_SERVICE = "notification";
     field public static final java.lang.String NSD_SERVICE = "servicediscovery";
     field public static final java.lang.String POWER_SERVICE = "power";
+    field public static final java.lang.String PRINT_SERVICE = "print";
     field public static final java.lang.String SEARCH_SERVICE = "search";
     field public static final java.lang.String SENSOR_SERVICE = "sensor";
     field public static final java.lang.String STORAGE_SERVICE = "storage";
@@ -16895,7 +16899,7 @@
   }
 
   public class Matrix {
-    ctor public Matrix();
+    ctor public deprecated Matrix();
     method public static void frustumM(float[], int, float, float, float, float, float, float);
     method public static boolean invertM(float[], int, float[], int);
     method public static float length(float, float, float);
@@ -18385,6 +18389,300 @@
 
 }
 
+package android.print {
+
+  public final class PageRange implements android.os.Parcelable {
+    method public int describeContents();
+    method public int getEnd();
+    method public int getStart();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.print.PageRange ALL_PAGES;
+    field public static final android.os.Parcelable.Creator CREATOR;
+  }
+
+  public abstract class PrintAdapter {
+    ctor public PrintAdapter();
+    method public abstract android.print.PrintAdapterInfo getInfo();
+    method public void onFinish();
+    method public abstract void onPrint(java.util.List<android.print.PageRange>, java.io.FileDescriptor, android.os.CancellationSignal, android.print.PrintAdapter.PrintProgressCallback);
+    method public boolean onPrintAttributesChanged(android.print.PrintAttributes);
+    method public void onStart();
+  }
+
+  public static abstract class PrintAdapter.PrintProgressCallback {
+    method public void onPrintFailed(java.lang.CharSequence);
+    method public void onPrintFinished(java.util.List<android.print.PageRange>);
+  }
+
+  public final class PrintAdapterInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public int getFlags();
+    method public int getPageCount();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int PAGE_COUNT_UNKNOWN = -1; // 0xffffffff
+  }
+
+  public static final class PrintAdapterInfo.Builder {
+    ctor public PrintAdapterInfo.Builder();
+    method public android.print.PrintAdapterInfo create();
+    method public android.print.PrintAdapterInfo.Builder setFlags(int);
+    method public android.print.PrintAdapterInfo.Builder setPageCount(int);
+  }
+
+  public final class PrintAttributes implements android.os.Parcelable {
+    method public void clear();
+    method public int describeContents();
+    method public int getColorMode();
+    method public int getCopies();
+    method public int getDuplexMode();
+    method public int getFittingMode();
+    method public android.print.PrintAttributes.Tray getInputTray();
+    method public android.print.PrintAttributes.Margins getMargins();
+    method public android.print.PrintAttributes.MediaSize getMediaSize();
+    method public int getOrientation();
+    method public android.print.PrintAttributes.Tray getOutputTray();
+    method public android.print.PrintAttributes.Resolution getResolution();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final int COLOR_MODE_COLOR = 2; // 0x2
+    field public static final int COLOR_MODE_MONOCHROME = 1; // 0x1
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int DUPLEX_MODE_LONG_EDGE = 2; // 0x2
+    field public static final int DUPLEX_MODE_NONE = 1; // 0x1
+    field public static final int DUPLEX_MODE_SHORT_EDGE = 4; // 0x4
+    field public static final int FITTING_MODE_FIT_TO_PAGE = 2; // 0x2
+    field public static final int FITTING_MODE_NONE = 1; // 0x1
+    field public static final int ORIENTATION_LANDSCAPE = 2; // 0x2
+    field public static final int ORIENTATION_PORTRAIT = 1; // 0x1
+  }
+
+  public static final class PrintAttributes.Builder {
+    ctor public PrintAttributes.Builder();
+    method public android.print.PrintAttributes create();
+    method public android.print.PrintAttributes.Builder setColorMode(int);
+    method public android.print.PrintAttributes.Builder setCopyCount(int);
+    method public android.print.PrintAttributes.Builder setDuplexMode(int);
+    method public android.print.PrintAttributes.Builder setFittingMode(int);
+    method public android.print.PrintAttributes.Builder setInputTray(android.print.PrintAttributes.Tray);
+    method public android.print.PrintAttributes.Builder setMargins(android.print.PrintAttributes.Margins);
+    method public android.print.PrintAttributes.Builder setMediaSize(android.print.PrintAttributes.MediaSize);
+    method public android.print.PrintAttributes.Builder setOrientation(int);
+    method public android.print.PrintAttributes.Builder setOutputTray(android.print.PrintAttributes.Tray);
+    method public android.print.PrintAttributes.Builder setResolution(android.print.PrintAttributes.Resolution);
+  }
+
+  public static final class PrintAttributes.Margins {
+    ctor public PrintAttributes.Margins(int, int, int, int);
+    method public int getBottomMils();
+    method public int getLeftMils();
+    method public int getRightMils();
+    method public int getTopMils();
+  }
+
+  public static final class PrintAttributes.MediaSize {
+    ctor public PrintAttributes.MediaSize(java.lang.String, java.lang.String, int, int, int);
+    method public int getHeightMils();
+    method public java.lang.String getId();
+    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
+    method public int getWidthMils();
+    field public static final android.print.PrintAttributes.MediaSize ISO_A0;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A1;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A10;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A2;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A3;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A4;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A5;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A6;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A7;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A8;
+    field public static final android.print.PrintAttributes.MediaSize ISO_A9;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B0;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B1;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B10;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B2;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B3;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B4;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B5;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B6;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B7;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B8;
+    field public static final android.print.PrintAttributes.MediaSize ISO_B9;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C0;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C1;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C10;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C2;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C3;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C4;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C5;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C6;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C7;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C8;
+    field public static final android.print.PrintAttributes.MediaSize ISO_C9;
+    field public static final android.print.PrintAttributes.MediaSize NA_GOVT_LETTER;
+    field public static final android.print.PrintAttributes.MediaSize NA_JUNIOR_LEGAL;
+    field public static final android.print.PrintAttributes.MediaSize NA_LEDGER;
+    field public static final android.print.PrintAttributes.MediaSize NA_LEGAL;
+    field public static final android.print.PrintAttributes.MediaSize NA_LETTER;
+    field public static final android.print.PrintAttributes.MediaSize NA_TBLOID;
+  }
+
+  public static final class PrintAttributes.Resolution {
+    ctor public PrintAttributes.Resolution(java.lang.String, java.lang.String, int, int, int);
+    method public int getHorizontalDpi();
+    method public java.lang.String getId();
+    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
+    method public int getVerticalDpi();
+  }
+
+  public static final class PrintAttributes.Tray {
+    ctor public PrintAttributes.Tray(java.lang.String, java.lang.String, int);
+    method public java.lang.String getId();
+    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
+  }
+
+  public final class PrintJob {
+    method public void cancel();
+    method public int getId();
+    method public android.print.PrintJobInfo getInfo();
+  }
+
+  public final class PrintJobInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public android.print.PrintAttributes getAttributes();
+    method public int getId();
+    method public java.lang.CharSequence getLabel();
+    method public android.print.PageRange[] getPages();
+    method public android.print.PrinterId getPrinterId();
+    method public int getState();
+    method public java.lang.String getTag();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int PRINT_JOB_ID_UNDEFINED = -1; // 0xffffffff
+    field public static final int STATE_CANCELED = 6; // 0x6
+    field public static final int STATE_COMPLETED = 4; // 0x4
+    field public static final int STATE_CREATED = 1; // 0x1
+    field public static final int STATE_FAILED = 5; // 0x5
+    field public static final int STATE_QUEUED = 2; // 0x2
+    field public static final int STATE_STARTED = 3; // 0x3
+  }
+
+  public final class PrintManager {
+    method public java.util.List<android.print.PrintJob> getPrintJobs();
+    method public android.print.PrintJob print(java.lang.String, java.io.File, android.print.PrintAttributes);
+    method public android.print.PrintJob print(java.lang.String, android.print.PrintAdapter, android.print.PrintAttributes);
+  }
+
+  public final class PrinterId implements android.os.Parcelable {
+    method public int describeContents();
+    method public java.lang.String getLocalId();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+  }
+
+  public final class PrinterInfo implements android.os.Parcelable {
+    method public int describeContents();
+    method public int getColorModes();
+    method public void getDefaults(android.print.PrintAttributes);
+    method public int getDuplexModes();
+    method public int getFittingModes();
+    method public android.print.PrinterId getId();
+    method public java.util.List<android.print.PrintAttributes.Tray> getInputTrays();
+    method public java.lang.CharSequence getLabel();
+    method public java.util.List<android.print.PrintAttributes.MediaSize> getMediaSizes();
+    method public android.print.PrintAttributes.Margins getMinMargins();
+    method public int getOrientations();
+    method public java.util.List<android.print.PrintAttributes.Tray> getOutputTrays();
+    method public java.util.List<android.print.PrintAttributes.Resolution> getResolutions();
+    method public int getStatus();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator CREATOR;
+    field public static final int STATUS_READY = 1; // 0x1
+  }
+
+  public static final class PrinterInfo.Builder {
+    ctor public PrinterInfo.Builder(android.print.PrinterId, java.lang.CharSequence);
+    method public android.print.PrinterInfo.Builder addInputTray(android.print.PrintAttributes.Tray, boolean);
+    method public android.print.PrinterInfo.Builder addMediaSize(android.print.PrintAttributes.MediaSize, boolean);
+    method public android.print.PrinterInfo.Builder addOutputTray(android.print.PrintAttributes.Tray, boolean);
+    method public android.print.PrinterInfo.Builder addResolution(android.print.PrintAttributes.Resolution, boolean);
+    method public android.print.PrinterInfo create();
+    method public android.print.PrinterInfo.Builder setColorModes(int, int);
+    method public android.print.PrinterInfo.Builder setDuplexModes(int, int);
+    method public android.print.PrinterInfo.Builder setFittingModes(int, int);
+    method public android.print.PrinterInfo.Builder setMinMargins(android.print.PrintAttributes.Margins, android.print.PrintAttributes.Margins);
+    method public android.print.PrinterInfo.Builder setOrientations(int, int);
+    method public android.print.PrinterInfo.Builder setStatus(int);
+  }
+
+}
+
+package android.print.pdf {
+
+  public final class PdfDocument {
+    method public void close();
+    method public void finishPage(android.print.pdf.PdfDocument.Page);
+    method public java.util.List<android.print.pdf.PdfDocument.PageInfo> getPages();
+    method public static android.print.pdf.PdfDocument open();
+    method public android.print.pdf.PdfDocument.Page startPage(android.print.pdf.PdfDocument.PageInfo);
+    method public void writeTo(java.io.OutputStream);
+  }
+
+  public static final class PdfDocument.Page {
+    method public android.graphics.Canvas getCanvas();
+    method public android.print.pdf.PdfDocument.PageInfo getInfo();
+  }
+
+  public static final class PdfDocument.PageInfo {
+    method public android.graphics.Rect getContentSize();
+    method public int getDesity();
+    method public android.graphics.Matrix getInitialTransform();
+    method public int getPageNumber();
+    method public android.graphics.Rect getPageSize();
+  }
+
+  public static final class PdfDocument.PageInfo.Builder {
+    ctor public PdfDocument.PageInfo.Builder(android.graphics.Rect, int, int);
+    method public android.print.pdf.PdfDocument.PageInfo create();
+    method public android.print.pdf.PdfDocument.PageInfo.Builder setContentSize(android.graphics.Rect);
+    method public android.print.pdf.PdfDocument.PageInfo.Builder setInitialTransform(android.graphics.Matrix);
+  }
+
+}
+
+package android.printservice {
+
+  public final class PrintJob {
+    method public boolean cancel();
+    method public boolean complete();
+    method public boolean fail(java.lang.CharSequence);
+    method public final java.io.FileDescriptor getData();
+    method public int getId();
+    method public android.print.PrintJobInfo getInfo();
+    method public boolean isQueued();
+    method public boolean isStarted();
+    method public boolean setTag(java.lang.String);
+    method public boolean start();
+  }
+
+  public abstract class PrintService extends android.app.Service {
+    ctor public PrintService();
+    method public final void addDiscoveredPrinters(java.util.List<android.print.PrinterInfo>);
+    method public final android.print.PrinterId generatePrinterId(java.lang.String);
+    method public final java.util.List<android.printservice.PrintJob> getPrintJobs();
+    method public final android.os.IBinder onBind(android.content.Intent);
+    method protected void onConnected();
+    method protected void onDisconnected();
+    method protected abstract void onPrintJobQueued(android.printservice.PrintJob);
+    method protected void onRequestCancelPrintJob(android.printservice.PrintJob);
+    method protected abstract void onStartPrinterDiscovery();
+    method protected abstract void onStopPrinterDiscovery();
+    method public final void removeDiscoveredPrinters(java.util.List<android.print.PrinterId>);
+    field public static final java.lang.String SERVICE_INTERFACE = "android.printservice.PrintService";
+    field public static final java.lang.String SERVICE_META_DATA = "android.printservice";
+  }
+
+}
+
 package android.provider {
 
   public final class AlarmClock {
@@ -18763,8 +19061,13 @@
     field public static final int MISSED_TYPE = 3; // 0x3
     field public static final java.lang.String NEW = "new";
     field public static final java.lang.String NUMBER = "number";
+    field public static final java.lang.String NUMBER_PRESENTATION = "presentation";
     field public static final java.lang.String OFFSET_PARAM_KEY = "offset";
     field public static final int OUTGOING_TYPE = 2; // 0x2
+    field public static final int PRESENTATION_ALLOWED = 1; // 0x1
+    field public static final int PRESENTATION_PAYPHONE = 4; // 0x4
+    field public static final int PRESENTATION_RESTRICTED = 2; // 0x2
+    field public static final int PRESENTATION_UNKNOWN = 3; // 0x3
     field public static final java.lang.String TYPE = "type";
   }
 
@@ -28485,7 +28788,6 @@
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
     method public int getFadeBehavior();
     method public int getResizeBehavior();
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
     method public void setFadeBehavior(int);
     method public void setResizeBehavior(int);
     field public static final int FADE_BEHAVIOR_CROSSFADE = 0; // 0x0
@@ -28504,7 +28806,6 @@
   public class Move extends android.view.transition.Transition {
     ctor public Move();
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
     method public void setReparent(boolean);
     method public void setResizeClip(boolean);
   }
@@ -28512,13 +28813,11 @@
   public class Recolor extends android.view.transition.Transition {
     ctor public Recolor();
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
   }
 
   public class Rotate extends android.view.transition.Transition {
     ctor public Rotate();
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
   }
 
   public final class Scene {
@@ -28539,25 +28838,25 @@
   public class TextChange extends android.view.transition.Transition {
     ctor public TextChange();
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
   }
 
-  public abstract class Transition {
+  public abstract class Transition implements java.lang.Cloneable {
     ctor public Transition();
     method public void addListener(android.view.transition.Transition.TransitionListener);
     method protected void cancelTransition();
     method protected abstract void captureValues(android.view.transition.TransitionValues, boolean);
+    method public android.view.transition.Transition clone();
     method public long getDuration();
     method public android.animation.TimeInterpolator getInterpolator();
     method public java.util.ArrayList<android.view.transition.Transition.TransitionListener> getListeners();
     method public long getStartDelay();
     method public int[] getTargetIds();
     method public android.view.View[] getTargets();
+    method protected android.view.transition.TransitionValues getTransitionValues(android.view.View, boolean);
     method protected void onTransitionCancel();
     method protected void onTransitionEnd();
     method protected void onTransitionStart();
-    method protected abstract android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
-    method protected boolean prePlay(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
+    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
     method public void removeListener(android.view.transition.Transition.TransitionListener);
     method public android.view.transition.Transition setDuration(long);
     method public void setInterpolator(android.animation.TimeInterpolator);
@@ -28577,7 +28876,6 @@
     ctor public TransitionGroup(int);
     method public void addTransitions(android.view.transition.Transition...);
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
     method public void removeTransition(android.view.transition.Transition);
     method public void setOrdering(int);
     field public static final int SEQUENTIALLY = 1; // 0x1
@@ -28613,12 +28911,9 @@
 
   public abstract class Visibility extends android.view.transition.Transition {
     ctor public Visibility();
-    method protected android.animation.Animator appear(android.view.ViewGroup, android.view.View, int, android.view.View, int);
+    method protected android.animation.Animator appear(android.view.ViewGroup, android.view.transition.TransitionValues, int, android.view.transition.TransitionValues, int);
     method protected void captureValues(android.view.transition.TransitionValues, boolean);
-    method protected android.animation.Animator disappear(android.view.ViewGroup, android.view.View, int, android.view.View, int);
-    method protected android.animation.Animator play(android.view.ViewGroup, android.view.transition.TransitionValues, android.view.transition.TransitionValues);
-    method protected boolean preAppear(android.view.ViewGroup, android.view.View, int, android.view.View, int);
-    method protected boolean preDisappear(android.view.ViewGroup, android.view.View, int, android.view.View, int);
+    method protected android.animation.Animator disappear(android.view.ViewGroup, android.view.transition.TransitionValues, int, android.view.transition.TransitionValues, int);
   }
 
 }
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 142642d..155aac1 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -91,6 +91,8 @@
 import android.os.SystemVibrator;
 import android.os.UserManager;
 import android.os.storage.StorageManager;
+import android.print.IPrintManager;
+import android.print.PrintManager;
 import android.telephony.TelephonyManager;
 import android.content.ClipboardManager;
 import android.util.AndroidRuntimeException;
@@ -550,6 +552,15 @@
         registerService(CAMERA_SERVICE, new StaticServiceFetcher() {
             public Object createStaticService() {
                 return new CameraManager();
+            }
+        });
+
+        registerService(PRINT_SERVICE, new ServiceFetcher() {
+            public Object createService(ContextImpl ctx) {
+                IBinder iBinder = ServiceManager.getService(Context.PRINT_SERVICE);
+                IPrintManager service = IPrintManager.Stub.asInterface(iBinder);
+                return new PrintManager(ctx.getOuterContext(), service, UserHandle.myUserId(),
+                        UserHandle.getAppId(Process.myUid()));
             }});
     }
 
diff --git a/core/java/android/bluetooth/package.html b/core/java/android/bluetooth/package.html
index ba75034..200a21b 100644
--- a/core/java/android/bluetooth/package.html
+++ b/core/java/android/bluetooth/package.html
@@ -1,15 +1,20 @@
 <HTML>
 <BODY>
 <p>Provides classes that manage Bluetooth functionality, such as scanning for
-devices, connecting with devices, and managing data transfer between devices.</p>
+devices, connecting with devices, and managing data transfer between devices.
+The Bluetooth API supports both "Classic Bluetooth" and Bluetooth Low Energy.</p>
 
-<p>For more information, see the
-<a href="{@docRoot}guide/topics/connectivity/bluetooth.html">Bluetooth</a> guide.</p>
+<p>For more information about Classic Bluetooth, see the
+<a href="{@docRoot}guide/topics/connectivity/bluetooth.html">Bluetooth</a> guide.
+For more information about Bluetooth Low Energy, see the
+<a href="{@docRoot}guide/topics/connectivity/bluetooth-le.html">
+Bluetooth Low Energy</a> guide.</p>
 {@more}
 
 <p>The Bluetooth APIs let applications:</p>
 <ul>
-  <li>Scan for other Bluetooth devices</li>
+  <li>Scan for other Bluetooth devices (including Bluetooth Low Energy
+    devices)</li>
   <li>Query the local Bluetooth adapter for paired Bluetooth devices</li>
   <li>Establish RFCOMM channels/sockets</li>
   <li>Connect to specified sockets on other devices</li>
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index b3f0d96..f090e07 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -72,7 +72,13 @@
      */
     @Deprecated
     public static final String SYNC_EXTRAS_ACCOUNT = "account";
+
+    /**
+     * If this extra is set to true, the sync request will be scheduled
+     * at the front of the sync request queue and without any delay
+     */
     public static final String SYNC_EXTRAS_EXPEDITED = "expedited";
+
     /**
      * @deprecated instead use
      * {@link #SYNC_EXTRAS_MANUAL}
@@ -104,8 +110,25 @@
      */
     public static final String SYNC_EXTRAS_MANUAL = "force";
 
+    /**
+     * Indicates that this sync is intended to only upload local changes to the server.
+     * For example, this will be set to true if the sync is initiated by a call to
+     * {@link ContentResolver#notifyChange(android.net.Uri, android.database.ContentObserver, boolean)}
+     */
     public static final String SYNC_EXTRAS_UPLOAD = "upload";
+
+    /**
+     * Indicates that the sync adapter should proceed with the delete operations,
+     * even if it determines that there are too many.
+     * See {@link SyncResult#tooManyDeletions}
+     */
     public static final String SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS = "deletions_override";
+
+    /**
+     * Indicates that the sync adapter should not proceed with the delete operations,
+     * if it determines that there are too many.
+     * See {@link SyncResult#tooManyDeletions}
+     */
     public static final String SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS = "discard_deletions";
 
     /**
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 43ebf8f..d8bf6ba 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -45,7 +45,6 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.List;
 
 /**
  * Interface to global information about an application environment.  This is
@@ -2294,6 +2293,15 @@
     public static final String CAMERA_SERVICE = "camera";
 
     /**
+     * {@link android.print.PrintManager} for printing and managing
+     * printers and print taks.
+     *
+     * @see #getSystemService
+     * @see android.print.PrintManager
+     */
+    public static final String PRINT_SERVICE = "print";
+
+    /**
      * Determine whether the given permission is allowed for a particular
      * process and user ID running in the system.
      *
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index 4b022d9..c5d2c77 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -19,7 +19,6 @@
 import android.os.Environment;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.os.Environment.UserEnvironment;
 import android.os.StrictMode;
 import android.util.Log;
 import java.io.File;
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index 7ffd30b..7b91418 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -17,6 +17,7 @@
 package android.os;
 
 import android.util.Log;
+import com.android.internal.util.FastPrintWriter;
 
 import java.io.FileDescriptor;
 import java.io.FileOutputStream;
@@ -288,7 +289,7 @@
      */
     public void dump(FileDescriptor fd, String[] args) {
         FileOutputStream fout = new FileOutputStream(fd);
-        PrintWriter pw = new PrintWriter(fout);
+        PrintWriter pw = new FastPrintWriter(fout);
         try {
             final String disabled;
             synchronized (Binder.class) {
@@ -310,7 +311,7 @@
      */
     public void dumpAsync(final FileDescriptor fd, final String[] args) {
         final FileOutputStream fout = new FileOutputStream(fd);
-        final PrintWriter pw = new PrintWriter(fout);
+        final PrintWriter pw = new FastPrintWriter(fout);
         Thread thr = new Thread("Binder.dumpAsync") {
             public void run() {
                 try {
diff --git a/core/java/android/os/CancellationSignal.java b/core/java/android/os/CancellationSignal.java
index dcba9b7..e8053d5 100644
--- a/core/java/android/os/CancellationSignal.java
+++ b/core/java/android/os/CancellationSignal.java
@@ -17,7 +17,6 @@
 package android.os;
 
 import android.os.ICancellationSignal;
-import android.os.ICancellationSignal.Stub;
 
 /**
  * Provides the ability to cancel an operation in progress.
diff --git a/core/java/android/print/IPrintAdapter.aidl b/core/java/android/print/IPrintAdapter.aidl
new file mode 100644
index 0000000..a9b4fb7
--- /dev/null
+++ b/core/java/android/print/IPrintAdapter.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.ParcelFileDescriptor;
+import android.print.IPrintProgressListener;
+import android.print.PageRange;
+import android.print.PrintAttributes;
+
+/**
+ * Interface for communication with the print adapter object.
+ *
+ * @hide
+ */
+oneway interface IPrintAdapter {
+    void start();
+    void printAttributesChanged(in PrintAttributes attributes);
+    void print(in List<PageRange> pages, in ParcelFileDescriptor fd,
+            IPrintProgressListener progressListener);
+    void finish();
+}
diff --git a/core/java/android/print/IPrintClient.aidl b/core/java/android/print/IPrintClient.aidl
new file mode 100644
index 0000000..3f39d08
--- /dev/null
+++ b/core/java/android/print/IPrintClient.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.content.IntentSender;
+
+/**
+ * Interface for communication with a printing app.
+ *
+ * @see android.print.IPrintClientCallback
+ *
+ * @hide
+ */
+oneway interface IPrintClient {
+    void startPrintJobConfigActivity(in IntentSender intent);
+}
diff --git a/core/java/android/print/IPrintManager.aidl b/core/java/android/print/IPrintManager.aidl
new file mode 100644
index 0000000..ff9877e
--- /dev/null
+++ b/core/java/android/print/IPrintManager.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.ICancellationSignal;
+import android.print.IPrintAdapter;
+import android.print.IPrintClient;
+import android.print.IPrinterDiscoveryObserver;
+import android.print.PrinterId;
+import android.print.PrintJobInfo;
+import android.print.PrintAttributes;
+
+/**
+ * Interface for communication with the core print manager service.
+ *
+ * @hide
+ */
+interface IPrintManager {
+    List<PrintJobInfo> getPrintJobs(int appId, int userId);
+    PrintJobInfo getPrintJob(int printJobId, int appId, int userId);
+    PrintJobInfo print(String printJobName, in IPrintClient client, in IPrintAdapter printAdapter,
+            in PrintAttributes attributes, int appId, int userId);
+    void cancelPrintJob(int printJobId, int appId, int userId);
+    void onPrintJobQueued(in PrinterId printerId, in PrintJobInfo printJob);
+    void startDiscoverPrinters(IPrinterDiscoveryObserver observer);
+    void stopDiscoverPrinters();
+}
diff --git a/core/java/android/print/IPrintProgressListener.aidl b/core/java/android/print/IPrintProgressListener.aidl
new file mode 100644
index 0000000..2c0d607
--- /dev/null
+++ b/core/java/android/print/IPrintProgressListener.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.ICancellationSignal;
+import android.print.PageRange;
+import android.print.PrintAdapterInfo;
+
+/**
+ * Callbacks for observing the print progress (writing of printed content)
+ * of a PrintAdapter.
+ *
+ * @hide
+ */
+oneway interface IPrintProgressListener {
+    void onWriteStarted(in PrintAdapterInfo info, ICancellationSignal cancellationSignal);
+    void onWriteFinished(in List<PageRange> pages);
+    void onWriteFailed(CharSequence error);
+}
diff --git a/core/java/android/print/IPrintSpoolerService.aidl b/core/java/android/print/IPrintSpoolerService.aidl
new file mode 100644
index 0000000..e84d592
--- /dev/null
+++ b/core/java/android/print/IPrintSpoolerService.aidl
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.content.ComponentName;
+import android.os.ParcelFileDescriptor;
+import android.print.IPrintAdapter;
+import android.print.IPrintClient;
+import android.print.IPrintSpoolerServiceCallbacks;
+import android.print.PrinterInfo;
+import android.print.PrintAttributes;
+
+/**
+ * Interface for communication with the print spooler service.
+ *
+ * @see android.print.IPrintSpoolerServiceCallbacks
+ *
+ * @hide
+ */
+oneway interface IPrintSpoolerService {
+    void getPrintJobs(IPrintSpoolerServiceCallbacks callback, in ComponentName componentName,
+            int state, int appId, int sequence);
+    void getPrintJob(int printJobId, IPrintSpoolerServiceCallbacks callback,
+            int appId, int sequence);
+    void createPrintJob(String printJobName, in IPrintClient client, in IPrintAdapter printAdapter,
+            in PrintAttributes attributes, IPrintSpoolerServiceCallbacks callback, int appId,
+            int sequence);
+    void cancelPrintJob(int printJobId, IPrintSpoolerServiceCallbacks callback,
+            int appId, int sequence);
+    void setPrintJobState(int printJobId, int status, IPrintSpoolerServiceCallbacks callback,
+            int sequence);
+    void setPrintJobTag(int printJobId, String tag, IPrintSpoolerServiceCallbacks callback,
+            int sequence);
+    void writePrintJobData(in ParcelFileDescriptor fd, int printJobId);
+}
\ No newline at end of file
diff --git a/core/java/android/print/IPrintSpoolerServiceCallbacks.aidl b/core/java/android/print/IPrintSpoolerServiceCallbacks.aidl
new file mode 100644
index 0000000..0c51913
--- /dev/null
+++ b/core/java/android/print/IPrintSpoolerServiceCallbacks.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.print.PrintJobInfo;
+import java.util.List;
+
+/**
+ * Callbacks for communication with the print spooler service.
+ *
+ * @see android.print.IPrintSpoolerService
+ *
+ * @hide
+ */
+oneway interface IPrintSpoolerServiceCallbacks {
+    void onGetPrintJobsResult(in List<PrintJobInfo> printJob, int sequence);
+    void onGetPrintJobInfoResult(in PrintJobInfo printJob, int sequence);
+    void onCreatePrintJobResult(in PrintJobInfo printJob, int sequence);
+    void onCancelPrintJobResult(boolean canceled, int sequence);
+    void onSetPrintJobStateResult(boolean success, int sequence);
+    void onSetPrintJobTagResult(boolean success, int sequence);
+}
diff --git a/core/java/android/print/IPrinterDiscoveryObserver.aidl b/core/java/android/print/IPrinterDiscoveryObserver.aidl
new file mode 100644
index 0000000..39aeb8c
--- /dev/null
+++ b/core/java/android/print/IPrinterDiscoveryObserver.aidl
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+
+/**
+ * Interface for observing printer discovery.
+ *
+ * @hide
+ */
+oneway interface IPrinterDiscoveryObserver {
+    void addDiscoveredPrinters(in List<PrinterInfo> printers);
+    void removeDiscoveredPrinters(in List<PrinterId> printers);
+}
diff --git a/core/java/android/print/PageRange.aidl b/core/java/android/print/PageRange.aidl
new file mode 100644
index 0000000..b1ae14f
--- /dev/null
+++ b/core/java/android/print/PageRange.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PageRange;
diff --git a/core/java/android/print/PageRange.java b/core/java/android/print/PageRange.java
new file mode 100644
index 0000000..044a715
--- /dev/null
+++ b/core/java/android/print/PageRange.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Represents a range of pages. The start and end page indices of
+ * the range are zero based and are inclusive.
+ */
+public final class PageRange implements Parcelable {
+
+    /**
+     * Constant for specifying all pages.
+     */
+    public static final PageRange ALL_PAGES = new PageRange(0, Integer.MAX_VALUE);
+
+    private final int mStart;
+    private final int mEnd;
+
+    /**
+     * Creates a new instance.
+     *
+     * @param start The start page index (zero based and inclusive).
+     * @param end The end page index (zero based and inclusive).
+     *
+     * @throws IllegalArgumentException If start is less than zero.
+     * @throws IllegalArgumentException If end is less than zero.
+     * @throws IllegalArgumentException If start greater than end.
+     */
+    PageRange(int start, int end) {
+        if (start < 0) {
+            throw new IllegalArgumentException("start cannot be less than zero.");
+        }
+        if (end < 0) {
+            throw new IllegalArgumentException("end cannot be less than zero.");
+        }
+        if (start > end) {
+            throw new IllegalArgumentException("start must be lesser than end.");
+        }
+        mStart = start;
+        mEnd = end;
+    }
+
+    private PageRange (Parcel parcel) {
+        this(parcel.readInt(), parcel.readInt());
+    }
+
+    /**
+     * Gets the start page index (zero based and inclusive).
+     *
+     * @return The start page index.
+     */
+    public int getStart() {
+        return mStart;
+    }
+
+    /**
+     * Gets the end page index (zero based and inclusive).
+     *
+     * @return The end page index.
+     */
+    public int getEnd() {
+        return mEnd;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeInt(mStart);
+        parcel.writeInt(mEnd);
+    }
+
+    @Override
+    public String toString() {
+        if (this == ALL_PAGES) {
+            return "PageRange[<all pages>]";
+        }
+        StringBuilder builder = new StringBuilder();
+        builder.append("PageRange[")
+            .append(mStart)
+            .append(" - ")
+            .append(mEnd)
+            .append("]");
+        return builder.toString();
+    }
+
+    public static final Parcelable.Creator<PageRange> CREATOR =
+            new Creator<PageRange>() {
+        @Override
+        public PageRange createFromParcel(Parcel parcel) {
+            return new PageRange(parcel);
+        }
+
+        @Override
+        public PageRange[] newArray(int size) {
+            return new PageRange[size];
+        }
+    };
+}
diff --git a/core/java/android/print/PrintAdapter.java b/core/java/android/print/PrintAdapter.java
new file mode 100644
index 0000000..a7f809b
--- /dev/null
+++ b/core/java/android/print/PrintAdapter.java
@@ -0,0 +1,162 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+import java.util.List;
+
+import android.os.CancellationSignal;
+
+/**
+ * Base class that provides data to be printed.
+ *
+ * <h3>Lifecycle</h3>
+ * <p>
+ * <ul>
+ * <li>
+ * You will receive a call on {@link #onStart()} when printing starts.
+ * This callback can be used to allocate resources.
+ * </li>
+ * <li>
+ * Next you will get one or more calls to the pair
+ *  {@link #onPrintAttributesChanged(PrintAttributes)} and {@link #onPrint(List,
+ * FileDescriptor, CancellationSignal, PrintProgressCallback)}. The first callback
+ * informs you that the print attributes (page size, density, etc) changed giving
+ * you an opportunity to re-layout the content. The second method asks you to write
+ * a PDF file with the content for specific pages.
+ * </li>
+ * <li>
+ * Finally, you will receive a call on {@link #onFinish()} right after printing.
+ * You can use this callback to release resources.
+ * </li>
+ * <li>
+ * You can receive calls to {@link #getInfo()} at any point which should return
+ * a {@link PrintAdapterInfo} describing your {@link PrintAdapter}.
+ * </li>
+ * </ul>
+ * </p>
+ * <p>
+ */
+public abstract class PrintAdapter {
+
+    /**
+     * Called when printing started. You can use this callback to
+     * allocate resources.
+     * <p>
+     * <strong>Note:</strong> Invoked on the main thread.
+     * </p>
+     */
+    public void onStart() {
+        /* do nothing - stub */
+    }
+
+    /**
+     * Called when the print job attributes (page size, density, etc)
+     * changed giving you a chance to re-layout the content such that
+     * it matches the new constraints.
+     * <p>
+     * <strong>Note:</strong> Invoked on the main thread.
+     * </p>
+     *
+     * @param attributes The print job attributes.
+     * @return Whether the content changed based on the provided attributes.
+     */
+    public boolean onPrintAttributesChanged(PrintAttributes attributes) {
+        return false;
+    }
+
+    /**
+     * Called when specific pages of the content have to be printed in the from of
+     * a PDF file to the given file descriptor. You should <strong>not</strong>
+     * close the file descriptor instead you have to invoke {@link PrintProgressCallback
+     * #onWriteFinished()} or {@link PrintProgressCallback#onPrintFailed(CharSequence)}.
+     * <p>
+     * <strong>Note:</strong> If the printed content is large, it is a  good
+     * practice to schedule writing it on a dedicated thread and register a
+     * callback in the provided {@link CancellationSignal} upon which to stop
+     * writing data. The cancellation callback will not be made on the main
+     * thread.
+     * </p>
+     * <p>
+     * <strong>Note:</strong> Invoked on the main thread.
+     * </p>
+     * <p>
+     *
+     * @param pages The pages whose content to write.
+     * @param destination The destination file descriptor to which to start writing.
+     * @param cancellationSignal Signal for observing cancel write requests.
+     * @param progressListener Callback to inform the system with the write progress.
+     *
+     * @see CancellationSignal
+     */
+    public abstract void onPrint(List<PageRange> pages, FileDescriptor destination,
+            CancellationSignal cancellationSignal, PrintProgressCallback progressListener);
+
+    /**
+     * Called when printing finished. You can use this callback to release
+     * resources.
+     * <p>
+     * <strong>Note:</strong> Invoked on the main thread.
+     * </p>
+     */
+    public void onFinish() {
+        /* do nothing - stub */
+    }
+
+    /**
+     * Gets a {@link PrinterInfo} object that contains metadata about the
+     * printed content.
+     * <p>
+     * <strong>Note:</strong> Invoked on the main thread.
+     * </p>
+     *
+     * @return The info object for this {@link PrintAdapter}.
+     *
+     * @see PrintAdapterInfo
+     */
+    public abstract PrintAdapterInfo getInfo();
+
+    /**
+     * Base class for implementing a listener for the printing progress
+     * of a {@link PrintAdapter}.
+     */
+    public static abstract class PrintProgressCallback {
+
+        PrintProgressCallback() {
+            /* do nothing - hide constructor */
+        }
+
+        /**
+         * Notifies that all the data was printed.
+         *
+         * @param pages The pages that were printed.
+         */
+        public void onPrintFinished(List<PageRange> pages) {
+            /* do nothing - stub */
+        }
+
+        /**
+         * Notifies that an error occurred while printing the data.
+         *
+         * @param error Error message. May be null if error is unknown.
+         */
+        public void onPrintFailed(CharSequence error) {
+            /* do nothing - stub */
+        }
+    }
+}
diff --git a/core/java/android/print/PrintAdapterInfo.aidl b/core/java/android/print/PrintAdapterInfo.aidl
new file mode 100644
index 0000000..27bf717
--- /dev/null
+++ b/core/java/android/print/PrintAdapterInfo.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PrintAdapterInfo;
diff --git a/core/java/android/print/PrintAdapterInfo.java b/core/java/android/print/PrintAdapterInfo.java
new file mode 100644
index 0000000..06e6b10
--- /dev/null
+++ b/core/java/android/print/PrintAdapterInfo.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class encapsulates information about a {@link PrintAdapter} object.
+ */
+public final class PrintAdapterInfo implements Parcelable {
+
+    /**
+     * Constant for unknown page count.
+     */
+    public static final int PAGE_COUNT_UNKNOWN = -1;
+
+    private int mPageCount;
+    private int mFlags;
+
+    /**
+     * Creates a new instance.
+     */
+    private PrintAdapterInfo() {
+        /* do nothing */
+    }
+
+    /**
+     * Creates a new instance.
+     *
+     * @param parcel Data from which to initialize.
+     */
+    private PrintAdapterInfo(Parcel parcel) {
+        mPageCount = parcel.readInt();
+        mFlags = parcel.readInt();
+    }
+
+    /**
+     * Gets the total number of pages.
+     *
+     * @return The number of pages.
+     */
+    public int getPageCount() {
+        return mPageCount;
+    }
+
+    /**
+     * @return The flags of this printable info.
+     *
+     * @see #FLAG_NOTIFY_FOR_ATTRIBUTES_CHANGE
+     */
+    public int getFlags() {
+        return mFlags;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeInt(mPageCount);
+        parcel.writeInt(mFlags);
+    }
+
+    /**
+     * Builder for creating an {@link PrintAdapterInfo}.
+     */
+    public static final class Builder {
+        private final PrintAdapterInfo mPrintableInfo = new PrintAdapterInfo();
+
+        /**
+         * Sets the total number of pages.
+         *
+         * @param pageCount The number of pages. Must be
+         * greater than zero.
+         */
+        public Builder setPageCount(int pageCount) {
+            if (pageCount < 0) {
+                throw new IllegalArgumentException("pageCount"
+                        + " must be greater than or euqal to zero!");
+            }
+            mPrintableInfo.mPageCount = pageCount;
+            return this;
+        }
+
+        /**
+         * Sets the flags of this printable info.
+         *
+         * @param flags The flags.
+         *
+         * @see #FLAG_NOTIFY_FOR_ATTRIBUTES_CHANGE
+         */
+        public Builder setFlags(int flags) {
+            mPrintableInfo.mFlags = flags;
+            return this;
+        }
+
+        /**
+         * Creates a new {@link PrintAdapterInfo} instance.
+         *
+         * @return The new instance.
+         */
+        public PrintAdapterInfo create() {
+            return mPrintableInfo;
+        }
+    }
+
+    public static final Parcelable.Creator<PrintAdapterInfo> CREATOR =
+            new Creator<PrintAdapterInfo>() {
+        @Override
+        public PrintAdapterInfo createFromParcel(Parcel parcel) {
+            return new PrintAdapterInfo(parcel);
+        }
+
+        @Override
+        public PrintAdapterInfo[] newArray(int size) {
+            return new PrintAdapterInfo[size];
+        }
+    };
+}
diff --git a/core/java/android/print/PrintAttributes.aidl b/core/java/android/print/PrintAttributes.aidl
new file mode 100644
index 0000000..0b765a2
--- /dev/null
+++ b/core/java/android/print/PrintAttributes.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PrintAttributes;
diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java
new file mode 100644
index 0000000..8511d0b
--- /dev/null
+++ b/core/java/android/print/PrintAttributes.java
@@ -0,0 +1,1226 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources.NotFoundException;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.internal.R;
+
+/**
+ * This class represents the attributes of a print job.
+ */
+public final class PrintAttributes implements Parcelable {
+    /** Duplex mode: No duplexing */
+    public static final int DUPLEX_MODE_NONE = 1 << 0;
+    /** Duplex mode: Turn a page along its long edge, e.g. like a book */
+    public static final int DUPLEX_MODE_LONG_EDGE = 1 << 1;
+    /** Duplex mode: Turn a page along its short edge, e.g. like a notepad */
+    public static final int DUPLEX_MODE_SHORT_EDGE = 1 << 2;
+
+
+    /** Orientation: Portrait page orientation. */
+    public static final int ORIENTATION_PORTRAIT = 1 << 0;
+    /** Orientation: Landscape page orientation. */
+    public static final int ORIENTATION_LANDSCAPE = 1 << 1;
+
+
+    /** Color mode: Monochrome color scheme, e.g. one color is used. */
+    public static final int COLOR_MODE_MONOCHROME = 1 << 0;
+    /** Color mode: Color color scheme, e.g. many colors are used. */
+    public static final int COLOR_MODE_COLOR = 1 << 1;
+
+
+    /** Fitting mode: No fitting. */
+    public static final int FITTING_MODE_NONE = 0x00000001;
+    /** Fitting mode: Fit the content to the page. */
+    public static final int FITTING_MODE_FIT_TO_PAGE = 0x00000002;
+
+
+    private static final int VALID_DUPLEX_MODES =
+            DUPLEX_MODE_NONE | DUPLEX_MODE_LONG_EDGE | DUPLEX_MODE_SHORT_EDGE;
+
+    private static final int VALID_COLOR_MODES =
+            COLOR_MODE_MONOCHROME | COLOR_MODE_COLOR;
+
+    private static final int VALID_FITTING_MODES =
+            FITTING_MODE_NONE | FITTING_MODE_FIT_TO_PAGE;
+
+    private static final int VALID_ORIENTATIONS =
+            ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE;
+
+    private MediaSize mMediaSize;
+    private Resolution mResolution;
+    private Margins mMargins;
+    private Tray mInputTray;
+    private Tray mOutputTray;
+
+    private int mDuplexMode;
+    private int mColorMode;
+    private int mFittingMode;
+    private int mOrientation;
+    private int mCopies;
+
+    PrintAttributes() {
+        /* hide constructor */
+    }
+
+    private PrintAttributes(Parcel parcel) {
+        mMediaSize = (parcel.readInt() ==  1) ? MediaSize.createFromParcel(parcel) : null;
+        mResolution = (parcel.readInt() ==  1) ? Resolution.createFromParcel(parcel) : null;
+        mMargins = (parcel.readInt() ==  1) ? Margins.createFromParcel(parcel) : null;
+        mInputTray = (parcel.readInt() ==  1) ? Tray.createFromParcel(parcel) : null;
+        mOutputTray = (parcel.readInt() ==  1) ? Tray.createFromParcel(parcel) : null;
+        mDuplexMode = parcel.readInt();
+        mColorMode = parcel.readInt();
+        mFittingMode = parcel.readInt();
+        mOrientation = parcel.readInt();
+        mCopies = parcel.readInt();
+    }
+
+    /**
+     * Gets the media size.
+     *
+     * @return The media size or <code>null</code> if not set.
+     */
+    public MediaSize getMediaSize() {
+        return mMediaSize;
+    }
+
+    /**
+     * Sets the media size.
+     *
+     * @param The media size.
+     *
+     * @hide
+     */
+    public void setMediaSize(MediaSize mediaSize) {
+        mMediaSize = mediaSize;
+    }
+
+    /**
+     * Gets the resolution.
+     *
+     * @return The resolution or <code>null</code> if not set.
+     */
+    public Resolution getResolution() {
+        return mResolution;
+    }
+
+    /**
+     * Sets the resolution.
+     *
+     * @param The resolution.
+     *
+     * @hide
+     */
+    public void setResolution(Resolution resolution) {
+        mResolution = resolution;
+    }
+
+    /**
+     * Gets the margins.
+     *
+     * @return The margins or <code>null</code> if not set.
+     */
+    public Margins getMargins() {
+        return mMargins;
+    }
+
+    /**
+     * Sets the margins.
+     *
+     * @param The margins.
+     *
+     * @hide
+     */
+    public void setMargins(Margins margins) {
+        mMargins = margins;
+    }
+
+    /**
+     * Sets the input tray.
+     *
+     * @return The input tray or <code>null</code> if not set.
+     */
+    public Tray getInputTray() {
+        return mInputTray;
+    }
+
+    /**
+     * Gets the input tray.
+     *
+     * @param The input tray.
+     *
+     * @hide
+     */
+    public void setInputTray(Tray inputTray) {
+        mInputTray = inputTray;
+    }
+
+    /**
+     * Gets the output tray.
+     *
+     * @return The output tray or <code>null</code> if not set.
+     */
+    public Tray getOutputTray() {
+        return mOutputTray;
+    }
+
+    /**
+     * Sets the output tray.
+     *
+     * @param The output tray.
+     *
+     * @hide
+     */
+    public void setOutputTray(Tray outputTray) {
+        mOutputTray = outputTray;
+    }
+
+    /**
+     * Gets the duplex mode.
+     *
+     * @return The duplex mode or zero if not set.
+     *
+     * @see #DUPLEX_MODE_NONE
+     * @see #DUPLEX_MODE_SHORT_EDGE
+     * @see #DUPLEX_MODE_LONG_EDGE
+     */
+    public int getDuplexMode() {
+        return mDuplexMode;
+    }
+
+    /**
+     * Sets the duplex mode.
+     *
+     * @param The duplex mode.
+     *
+     * @hide
+     */
+    public void setDuplexMode(int duplexMode) {
+        enforceValidDuplexMode(duplexMode);
+        mDuplexMode = duplexMode;
+    }
+
+    /**
+     * Gets the color mode.
+     *
+     * @return The color mode or zero if not set.
+     *
+     * @see #COLOR_MODE_COLOR
+     * @see #COLOR_MODE_MONOCHROME
+     */
+    public int getColorMode() {
+        return mColorMode;
+    }
+
+    /**
+     * Sets the color mode.
+     *
+     * @param The color mode.
+     *
+     * @see #COLOR_MODE_MONOCHROME
+     * @see #COLOR_MODE_COLOR
+     *
+     * @hide
+     */
+    public void setColorMode(int colorMode) {
+        enforceValidColorMode(colorMode);
+        mColorMode = colorMode;
+    }
+
+    /**
+     * Gets the fitting mode.
+     *
+     * @return The fitting mode or zero if not set.
+     *
+     * @see #FITTING_MODE_NONE
+     * @see #FITTING_MODE_FIT_TO_PAGE
+     */
+    public int getFittingMode() {
+        return mFittingMode;
+    }
+
+    /**
+     * Sets the fitting mode.
+     *
+     * @param The fitting mode.
+     *
+     * @see #FITTING_MODE_NONE
+     * @see #FITTING_MODE_FIT_TO_PAGE
+     *
+     * @hide
+     */
+    public void setFittingMode(int fittingMode) {
+        enfoceValidFittingMode(fittingMode);
+        mFittingMode = fittingMode;
+    }
+
+    /**
+     * Gets the orientation.
+     *
+     * @return The orientation or zero if not set.
+     *
+     * @see #ORIENTATION_PORTRAIT
+     * @see #ORIENTATION_LANDSCAPE
+     */
+    public int getOrientation() {
+        return mOrientation;
+    }
+
+    /**
+     * Sets the orientation.
+     *
+     * @param The orientation.
+     *
+     * @see #ORIENTATION_PORTRAIT
+     * @see #ORIENTATION_LANDSCAPE
+     *
+     * @hide
+     */
+    public void setOrientation(int orientation) {
+        enforceValidOrientation(orientation);
+        mOrientation = orientation;
+    }
+
+    /**
+     * Gets the number of copies.
+     *
+     * @return The number of copies or zero if not set.
+     */
+    public int getCopies() {
+        return mCopies;
+    }
+
+    /**
+     * Sets the number of copies.
+     *
+     * @param copyCount The number of copies.
+     *
+     * @hide
+     */
+    public void setCopies(int copyCount) {
+        if (copyCount < 1) {
+            throw new IllegalArgumentException("Copies must be more than one.");
+        }
+        mCopies = copyCount;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        if (mMediaSize != null) {
+            parcel.writeInt(1);
+            mMediaSize.writeToParcel(parcel);
+        } else {
+            parcel.writeInt(0);
+        }
+        if (mResolution != null) {
+            parcel.writeInt(1);
+            mResolution.writeToParcel(parcel);
+        } else {
+            parcel.writeInt(0);
+        }
+        if (mMargins != null) {
+            parcel.writeInt(1);
+            mMargins.writeToParcel(parcel);
+        } else {
+            parcel.writeInt(0);
+        }
+        if (mInputTray != null) {
+            parcel.writeInt(1);
+            mInputTray.writeToParcel(parcel);
+        } else {
+            parcel.writeInt(0);
+        }
+        if (mOutputTray != null) {
+            parcel.writeInt(1);
+            mOutputTray.writeToParcel(parcel);
+        } else {
+            parcel.writeInt(0);
+        }
+        parcel.writeInt(mDuplexMode);
+        parcel.writeInt(mColorMode);
+        parcel.writeInt(mFittingMode);
+        parcel.writeInt(mOrientation);
+        parcel.writeInt(mCopies);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    /** hide */
+    public void clear() {
+        mMediaSize = null;
+        mResolution = null;
+        mMargins = null;
+        mInputTray = null;
+        mOutputTray = null;
+        mDuplexMode = 0;
+        mColorMode = 0;
+        mFittingMode = 0;
+        mOrientation = 0;
+        mCopies = 0;
+    }
+
+    /**
+     * This class specifies a supported media size.
+     */
+    public static final class MediaSize {
+        private static final String LOG_TAG = "MediaSize";
+
+        // TODO: Verify media sizes and add more standard ones.
+
+        // ISO sizes
+
+        /** ISO A0 media size: 841mm x 1189mm (33.11" x 46.81") */
+        public static final MediaSize ISO_A0 =
+                new MediaSize("ISO_A0", "android", R.string.mediaSize_iso_a0, 33110, 46810);
+        /** ISO A1 media size: 594mm x 841mm (23.39" x 33.11") */
+        public static final MediaSize ISO_A1 =
+                new MediaSize("ISO_A1", "android", R.string.mediaSize_iso_a1, 23390, 33110);
+        /** ISO A2 media size: 420mm x 594mm (16.54" x 23.39") */
+        public static final MediaSize ISO_A2 =
+                new MediaSize("ISO_A2", "android", R.string.mediaSize_iso_a2, 16540, 23390);
+        /** ISO A3 media size: 297mm x 420mm (11.69" x 16.54") */
+        public static final MediaSize ISO_A3 =
+                new MediaSize("ISO_A3", "android", R.string.mediaSize_iso_a3, 11690, 16540);
+        /** ISO A4 media size: 210mm x 297mm (8.27" x 11.69") */
+        public static final MediaSize ISO_A4 =
+                new MediaSize("ISO_A4", "android", R.string.mediaSize_iso_a4, 8270, 11690);
+        /** ISO A5 media size: 148mm x 210mm (5.83" x 8.27") */
+        public static final MediaSize ISO_A5 =
+                new MediaSize("ISO_A5", "android", R.string.mediaSize_iso_a5, 5830, 8270);
+        /** ISO A6 media size: 105mm x 148mm (4.13" x 5.83") */
+        public static final MediaSize ISO_A6 =
+                new MediaSize("ISO_A6", "android", R.string.mediaSize_iso_a6, 4130, 5830);
+        /** ISO A7 media size: 74mm x 105mm (2.91" x 4.13") */
+        public static final MediaSize ISO_A7 =
+                new MediaSize("ISO_A7", "android", R.string.mediaSize_iso_a7, 2910, 4130);
+        /** ISO A8 media size: 52mm x 74mm (2.05" x 2.91") */
+        public static final MediaSize ISO_A8 =
+                new MediaSize("ISO_A8", "android", R.string.mediaSize_iso_a8, 2050, 2910);
+        /** ISO A9 media size: 37mm x 52mm (1.46" x 2.05") */
+        public static final MediaSize ISO_A9 =
+                new MediaSize("ISO_A9", "android", R.string.mediaSize_iso_a9, 1460, 2050);
+        /** ISO A10 media size: 26mm x 37mm (1.02" x 1.46") */
+        public static final MediaSize ISO_A10 =
+                new MediaSize("ISO_A10", "android", R.string.mediaSize_iso_a10, 1020, 1460);
+
+        /** ISO B0 media size: 1000mm x 1414mm (39.37" x 55.67") */
+        public static final MediaSize ISO_B0 =
+                new MediaSize("ISO_B0", "android", R.string.mediaSize_iso_b0, 39370, 55670);
+        /** ISO B1 media size: 707mm x 1000mm (27.83" x 39.37") */
+        public static final MediaSize ISO_B1 =
+                new MediaSize("ISO_B1", "android", R.string.mediaSize_iso_b1, 27830, 39370);
+        /** ISO B2 media size: 500mm x 707mm (19.69" x 27.83") */
+        public static final MediaSize ISO_B2 =
+                new MediaSize("ISO_B2", "android", R.string.mediaSize_iso_b2, 19690, 27830);
+        /** ISO B3 media size: 353mm x 500mm (13.90" x 19.69") */
+        public static final MediaSize ISO_B3 =
+                new MediaSize("ISO_B3", "android", R.string.mediaSize_iso_b3, 13900, 19690);
+        /** ISO B4 media size: 250mm x 353mm (9.84" x 13.90") */
+        public static final MediaSize ISO_B4 =
+                new MediaSize("ISO_B4", "android", R.string.mediaSize_iso_b4, 9840, 13900);
+        /** ISO B5 media size: 176mm x 250mm (6.93" x 9.84") */
+        public static final MediaSize ISO_B5 =
+                new MediaSize("ISO_B5", "android", R.string.mediaSize_iso_b5, 6930, 9840);
+        /** ISO B6 media size: 125mm x 176mm (4.92" x 6.93") */
+        public static final MediaSize ISO_B6 =
+                new MediaSize("ISO_B6", "android", R.string.mediaSize_iso_b6, 4920, 6930);
+        /** ISO B7 media size: 88mm x 125mm (3.46" x 4.92") */
+        public static final MediaSize ISO_B7 =
+                new MediaSize("ISO_B7", "android", R.string.mediaSize_iso_b7, 3460, 4920);
+        /** ISO B8 media size: 62mm x 88mm (2.44" x 3.46") */
+        public static final MediaSize ISO_B8 =
+                new MediaSize("ISO_B8", "android", R.string.mediaSize_iso_b8, 2440, 3460);
+        /** ISO B9 media size: 44mm x 62mm (1.73" x 2.44") */
+        public static final MediaSize ISO_B9 =
+                new MediaSize("ISO_B9", "android", R.string.mediaSize_iso_b9, 1730, 2440);
+        /** ISO B10 media size: 31mm x 44mm (1.22" x 1.73") */
+        public static final MediaSize ISO_B10 =
+                new MediaSize("ISO_B10", "android", R.string.mediaSize_iso_b10, 1220, 1730);
+
+        /** ISO C0 media size: 917mm x 1297mm (36.10" x 51.06") */
+        public static final MediaSize ISO_C0 =
+                new MediaSize("ISO_C0", "android", R.string.mediaSize_iso_c0, 36100, 51060);
+        /** ISO C1 media size: 648mm x 917mm (25.51" x 36.10") */
+        public static final MediaSize ISO_C1 =
+                new MediaSize("ISO_C1", "android", R.string.mediaSize_iso_c1, 25510, 36100);
+        /** ISO C2 media size: 458mm x 648mm (18.03" x 25.51") */
+        public static final MediaSize ISO_C2 =
+                new MediaSize("ISO_C2", "android", R.string.mediaSize_iso_c2, 18030, 25510);
+        /** ISO C3 media size: 324mm x 458mm (12.76" x 18.03") */
+        public static final MediaSize ISO_C3 =
+                new MediaSize("ISO_C3", "android", R.string.mediaSize_iso_c3, 12760, 18030);
+        /** ISO C4 media size: 229mm x 324mm (9.02" x 12.76") */
+        public static final MediaSize ISO_C4 =
+                new MediaSize("ISO_C4", "android", R.string.mediaSize_iso_c4, 9020, 12760);
+        /** ISO C5 media size: 162mm x 229mm (6.38" x 9.02") */
+        public static final MediaSize ISO_C5 =
+                new MediaSize("ISO_C5", "android", R.string.mediaSize_iso_c5, 6380, 9020);
+        /** ISO C6 media size: 114mm x 162mm (4.49" x 6.38") */
+        public static final MediaSize ISO_C6 =
+                new MediaSize("ISO_C6", "android", R.string.mediaSize_iso_c6, 4490, 6380);
+        /** ISO C7 media size: 81mm x 114mm (3.19" x 4.49") */
+        public static final MediaSize ISO_C7 =
+                new MediaSize("ISO_C7", "android", R.string.mediaSize_iso_c7, 3190, 4490);
+        /** ISO C8 media size: 57mm x 81mm (2.24" x 3.19") */
+        public static final MediaSize ISO_C8 =
+                new MediaSize("ISO_C8", "android", R.string.mediaSize_iso_c8, 2240, 3190);
+        /** ISO C9 media size: 40mm x 57mm (1.57" x 2.24") */
+        public static final MediaSize ISO_C9 =
+                new MediaSize("ISO_C9", "android", R.string.mediaSize_iso_c9, 1570, 2240);
+        /** ISO C10 media size: 28mm x 40mm (1.10" x 1.57") */
+        public static final MediaSize ISO_C10 =
+                new MediaSize("ISO_C10", "android", R.string.mediaSize_iso_c10, 1100, 1570);
+
+        // North America
+
+        /** North America Letter media size: 8.5" x 11" */
+        public static final MediaSize NA_LETTER =
+                new MediaSize("NA_LETTER", "android", R.string.mediaSize_na_letter, 8500, 11000);
+        /** North America Government-Letter media size: 8.0" x 10.5" */
+        public static final MediaSize NA_GOVT_LETTER =
+                new MediaSize("NA_GOVT_LETTER", "android",
+                        R.string.mediaSize_na_gvrnmt_letter, 8000, 10500);
+        /** North America Legal media size: 8.5" x 14" */
+        public static final MediaSize NA_LEGAL =
+                new MediaSize("NA_LEGAL", "android", R.string.mediaSize_na_legal, 8500, 14000);
+        /** North America Junior Legal media size: 8.0" x 5.0" */
+        public static final MediaSize NA_JUNIOR_LEGAL =
+                new MediaSize("NA_JUNIOR_LEGAL", "android",
+                        R.string.mediaSize_na_junior_legal, 8000, 5000);
+        /** North America Ledger media size: 17" x 11" */
+        public static final MediaSize NA_LEDGER =
+                new MediaSize("NA_LEDGER", "android", R.string.mediaSize_na_ledger, 17000, 11000);
+        /** North America Tabloid media size: 11" x 17" */
+        public static final MediaSize NA_TBLOID =
+                new MediaSize("NA_TABLOID", "android",
+                        R.string.mediaSize_na_tabloid, 11000, 17000);
+
+        private final String mId;
+        private final String mPackageName;
+        private final int mLabelResId;
+        private final int mWidthMils;
+        private final int mHeightMils;
+
+        /**
+         * Gets the unique media size id.
+         *
+         * @return The unique media size id.
+         */
+        public String getId() {
+            return mId;
+        }
+
+        /**
+         * Gets the human readable media size label.
+         *
+         * @return The human readable label.
+         */
+        public CharSequence getLabel(PackageManager packageManager) {
+            try {
+                return packageManager.getResourcesForApplication(
+                        mPackageName).getString(mLabelResId);
+            } catch (NotFoundException nfe) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            } catch (NameNotFoundException nnfee) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            }
+            return null;
+        }
+
+        /**
+         * Gets the media width in mils (thousands of an inch).
+         *
+         * @return The media width.
+         */
+        public int getWidthMils() {
+            return mWidthMils;
+        }
+
+        /**
+         * Gets the media height in mils (thousands of an inch).
+         *
+         * @return The media height.
+         */
+        public int getHeightMils() {
+            return mHeightMils;
+        }
+
+        /**
+         * Creates a new instance.
+         *
+         * @param id The unique media size id.
+         * @param packageName The name of the creating package.
+         * @param labelResId The resource if of a human readable label.
+         * @param widthMils The width in mils (thousands of an inch).
+         * @param heightMils The height in mils (thousands of an inch).
+         *
+         * @throws IllegalArgumentException If the id is empty.
+         * @throws IllegalArgumentException If the label is empty.
+         * @throws IllegalArgumentException If the widthMils is less than or equal to zero.
+         * @throws IllegalArgumentException If the heightMils is less than or equal to zero.
+         */
+        public MediaSize(String id, String packageName, int labelResId,
+                int widthMils, int heightMils) {
+            if (TextUtils.isEmpty(id)) {
+                throw new IllegalArgumentException("id cannot be empty.");
+            }
+            if (TextUtils.isEmpty(packageName)) {
+                throw new IllegalArgumentException("packageName cannot be empty.");
+            }
+            if (labelResId <= 0) {
+                throw new IllegalArgumentException("labelResId must be greater than zero.");
+            }
+            if (widthMils <= 0) {
+                throw new IllegalArgumentException("widthMils "
+                        + "cannot be less than or equal to zero.");
+            }
+            if (heightMils <= 0) {
+                throw new IllegalArgumentException("heightMils "
+                       + "cannot be less than or euqual to zero.");
+            }
+            mPackageName = packageName;
+            mId = id;
+            mLabelResId = labelResId;
+            mWidthMils = widthMils;
+            mHeightMils = heightMils;
+        }
+
+        void writeToParcel(Parcel parcel) {
+            parcel.writeString(mId);
+            parcel.writeString(mPackageName);
+            parcel.writeInt(mLabelResId);
+            parcel.writeInt(mWidthMils);
+            parcel.writeInt(mHeightMils);
+        }
+
+        static MediaSize createFromParcel(Parcel parcel) {
+            return new MediaSize(
+                    parcel.readString(),
+                    parcel.readString(),
+                    parcel.readInt(),
+                    parcel.readInt(),
+                    parcel.readInt());
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder builder = new StringBuilder();
+            builder.append("MediaSize{");
+            builder.append("id: ").append(mId);
+            builder.append(", packageName: ").append(mPackageName);
+            builder.append(", labelResId: ").append(mLabelResId);
+            builder.append(", heightMils: ").append(mHeightMils);
+            builder.append(", widthMils: ").append(mWidthMils);
+            builder.append("}");
+            return builder.toString();
+        }
+    }
+
+    /**
+     * This class specifies a supported resolution in dpi (dots per inch).
+     */
+    public static final class Resolution {
+        private static final String LOG_TAG = "Resolution";
+
+        private final String mId;
+        private final String mPackageName;
+        private final int mLabelResId;
+        private final int mHorizontalDpi;
+        private final int mVerticalDpi;
+
+        /**
+         * Gets the unique resolution id.
+         *
+         * @return The unique resolution id.
+         */
+        public String getId() {
+            return mId;
+        }
+
+        /**
+         * Gets the resolution human readable label.
+         *
+         * @return The human readable label.
+         */
+        public CharSequence getLabel(PackageManager packageManager) {
+            try {
+                return packageManager.getResourcesForApplication(
+                        mPackageName).getString(mLabelResId);
+            } catch (NotFoundException nfe) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            } catch (NameNotFoundException nnfee) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            }
+            return null;
+        }
+
+        /**
+         * Gets the horizontal resolution in dpi.
+         *
+         * @return The horizontal resolution.
+         */
+        public int getHorizontalDpi() {
+            return mHorizontalDpi;
+        }
+
+        /**
+         * Gets the vertical resolution in dpi.
+         *
+         * @return The vertical resolution.
+         */
+        public int getVerticalDpi() {
+            return mVerticalDpi;
+        }
+
+        /**
+         * Creates a new instance.
+         *
+         * @param id The unique resolution id.
+         * @param packageName The name of the creating package.
+         * @param labelResId The resource id of a human readable label.
+         * @param horizontalDpi The horizontal resolution in dpi.
+         * @param verticalDpi The vertical resolution in dpi.
+         *
+         * @throws IllegalArgumentException If the id is empty.
+         * @throws IllegalArgumentException If the label is empty.
+         * @throws IllegalArgumentException If the horizontalDpi is less than or equal to zero.
+         * @throws IllegalArgumentException If the verticalDpi is less than or equal to zero.
+         */
+        public Resolution(String id, String packageName, int labelResId,
+                int horizontalDpi, int verticalDpi) {
+            if (TextUtils.isEmpty(id)) {
+                throw new IllegalArgumentException("id cannot be empty.");
+            }
+            if (TextUtils.isEmpty(packageName)) {
+                throw new IllegalArgumentException("packageName cannot be empty.");
+            }
+            if (labelResId <= 0) {
+                throw new IllegalArgumentException("labelResId must be greater than zero.");
+            }
+            if (horizontalDpi <= 0) {
+                throw new IllegalArgumentException("horizontalDpi "
+                        + "cannot be less than or equal to zero.");
+            }
+            if (verticalDpi <= 0) {
+                throw new IllegalArgumentException("verticalDpi"
+                       + " cannot be less than or equal to zero.");
+            }
+            mId = id;
+            mPackageName = packageName;
+            mLabelResId = labelResId;
+            mHorizontalDpi = horizontalDpi;
+            mVerticalDpi = verticalDpi;
+        }
+
+        void writeToParcel(Parcel parcel) {
+            parcel.writeString(mId);
+            parcel.writeString(mPackageName);
+            parcel.writeInt(mLabelResId);
+            parcel.writeInt(mHorizontalDpi);
+            parcel.writeInt(mVerticalDpi);
+        }
+
+        static Resolution createFromParcel(Parcel parcel) {
+            return new Resolution(
+                    parcel.readString(),
+                    parcel.readString(),
+                    parcel.readInt(),
+                    parcel.readInt(),
+                    parcel.readInt());
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder builder = new StringBuilder();
+            builder.append("Resolution{");
+            builder.append("id: ").append(mId);
+            builder.append(", packageName: ").append(mPackageName);
+            builder.append(", labelResId: ").append(mLabelResId);
+            builder.append(", horizontalDpi: ").append(mHorizontalDpi);
+            builder.append(", verticalDpi: ").append(mVerticalDpi);
+            builder.append("}");
+            return builder.toString();
+        }
+    }
+
+    /**
+     * This class specifies content margins.
+     */
+    public static final class Margins {
+        private final int mLeftMils;
+        private final int mTopMils;
+        private final int mRightMils;
+        private final int mBottomMils;
+
+        /**
+         * Gets the left margin in mils (thousands of an inch).
+         *
+         * @return The left margin.
+         */
+        public int getLeftMils() {
+            return mLeftMils;
+        }
+
+        /**
+         * Gets the top margin in mils (thousands of an inch).
+         *
+         * @return The top margin.
+         */
+        public int getTopMils() {
+            return mTopMils;
+        }
+
+        /**
+         * Gets the right margin in mils (thousands of an inch).
+         *
+         * @return The right margin.
+         */
+        public int getRightMils() {
+            return mRightMils;
+        }
+
+        /**
+         * Gets the bottom margin in mils (thousands of an inch).
+         *
+         * @return The bottom margin.
+         */
+        public int getBottomMils() {
+            return mBottomMils;
+        }
+
+        /**
+         * Creates a new instance.
+         *
+         * @param leftMils The left margin in mils (thousands of an inch).
+         * @param topMils The top margin in mils (thousands of an inch).
+         * @param rightMils The right margin in mils (thousands of an inch).
+         * @param bottomMils The bottom margin in mils (thousands of an inch).
+         *
+         * @throws IllegalArgumentException If the leftMils is less than zero.
+         * @throws IllegalArgumentException If the topMils is less than zero.
+         * @throws IllegalArgumentException If the rightMils is less than zero.
+         * @throws IllegalArgumentException If the bottomMils is less than zero.
+         */
+        public Margins(int leftMils, int topMils, int rightMils, int bottomMils) {
+            if (leftMils < 0) {
+                throw new IllegalArgumentException("leftMils cannot be less than zero.");
+            }
+            if (topMils < 0) {
+                throw new IllegalArgumentException("topMils cannot be less than zero.");
+            }
+            if (rightMils < 0) {
+                throw new IllegalArgumentException("rightMils cannot be less than zero.");
+            }
+            if (bottomMils < 0) {
+                throw new IllegalArgumentException("bottomMils cannot be less than zero.");
+            }
+            mTopMils = topMils;
+            mLeftMils = leftMils;
+            mRightMils = rightMils;
+            mBottomMils = bottomMils;
+        }
+
+        void writeToParcel(Parcel parcel) {
+            parcel.writeInt(mLeftMils);
+            parcel.writeInt(mTopMils);
+            parcel.writeInt(mRightMils);
+            parcel.writeInt(mBottomMils);
+        }
+
+        static Margins createFromParcel(Parcel parcel) {
+            return new Margins(
+                    parcel.readInt(),
+                    parcel.readInt(),
+                    parcel.readInt(),
+                    parcel.readInt());
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder builder = new StringBuilder();
+            builder.append("Margins{");
+            builder.append("leftMils: ").append(mLeftMils);
+            builder.append(", topMils: ").append(mTopMils);
+            builder.append(", rightMils: ").append(mRightMils);
+            builder.append(", bottomMils: ").append(mBottomMils);
+            builder.append("}");
+            return builder.toString();
+        }
+    }
+
+    /**
+     * Represents a printer tray.
+     */
+    public static final class Tray {
+        private static final String LOG_TAG = "Tray";
+
+        private final String mId;
+        private final String mPackageName;
+        private final int mLabelResId;
+
+        /**
+         * Gets the unique tray id.
+         *
+         * @return The unique tray id.
+         */
+        public String getId() {
+            return mId;
+        }
+
+        /**
+         * Gets the tray human readable label.
+         *
+         * @return The human readable label.
+         */
+        public CharSequence getLabel(PackageManager packageManager) {
+            try {
+                return packageManager.getResourcesForApplication(
+                        mPackageName).getString(mLabelResId);
+            } catch (NotFoundException nfe) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            } catch (NameNotFoundException nnfee) {
+                Log.w(LOG_TAG, "Could not load resouce" + mLabelResId
+                        + " from package " + mPackageName);
+            }
+            return null;
+        }
+
+        /**
+         * Creates a new instance.
+         *
+         * @param id The unique tray id.
+         * @param packageName The name of the creating package.
+         * @param labelResId The resource id of a human readable label.
+         *
+         * @throws IllegalArgumentException If the id is empty.
+         * @throws IllegalArgumentException If the label is empty.
+         */
+        public Tray(String id, String packageName, int labelResId) {
+            if (TextUtils.isEmpty(id)) {
+                throw new IllegalArgumentException("id cannot be empty.");
+            }
+            if (TextUtils.isEmpty(packageName)) {
+                throw new IllegalArgumentException("packageName cannot be empty.");
+            }
+            if (labelResId <= 0) {
+                throw new IllegalArgumentException("label must be greater than zero.");
+            }
+            mId = id;
+            mPackageName = packageName;
+            mLabelResId = labelResId;
+        }
+
+        void writeToParcel(Parcel parcel) {
+            parcel.writeString(mId);
+            parcel.writeString(mPackageName);
+            parcel.writeInt(mLabelResId);
+        }
+
+        static Tray createFromParcel(Parcel parcel) {
+            return new Tray(
+                    parcel.readString(),
+                    parcel.readString(),
+                    parcel.readInt());
+        }
+
+        @Override
+        public String toString() {
+            StringBuilder builder = new StringBuilder();
+            builder.append("Tray{");
+            builder.append("id: ").append(mId);
+            builder.append("id: ").append(mId);
+            builder.append(", packageName: ").append(mPackageName);
+            builder.append(", labelResId: ").append(mLabelResId);
+            builder.append("}");
+            return builder.toString();
+        }
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrintAttributes{");
+        builder.append("mediaSize: ").append(mMediaSize);
+        builder.append(", resolution: ").append(mResolution);
+        builder.append(", margins: ").append(mMargins);
+        builder.append(", duplexMode: ").append(duplexModeToString(mDuplexMode));
+        builder.append(", colorMode: ").append(colorModeToString(mColorMode));
+        builder.append(", fittingMode: ").append(fittingModeToString(mFittingMode));
+        builder.append(", orientation: ").append(orientationToString(mOrientation));
+        builder.append(", copies: ").append(mCopies);
+        return builder.toString();
+    }
+
+    private static String duplexModeToString(int duplexMode) {
+        switch (duplexMode) {
+            case DUPLEX_MODE_NONE: {
+                return "DUPLEX_MODE_NONE";
+            }
+            case DUPLEX_MODE_LONG_EDGE: {
+                return "DUPLEX_MODE_LONG_EDGE";
+            }
+            case DUPLEX_MODE_SHORT_EDGE: {
+                return "DUPLEX_MODE_SHORT_EDGE";
+            }
+            default:
+                return "DUPLEX_MODE_UNKNOWN";
+        }
+    }
+
+    private static String colorModeToString(int colorMode) {
+        switch (colorMode) {
+            case COLOR_MODE_MONOCHROME: {
+                return "COLOR_MODE_MONOCHROME";
+            }
+            case COLOR_MODE_COLOR: {
+                return "COLOR_MODE_COLOR";
+            }
+            default:
+                return "COLOR_MODE_UNKNOWN";
+        }
+    }
+
+    private static String orientationToString(int orientation) {
+        switch (orientation) {
+            case ORIENTATION_PORTRAIT: {
+                return "ORIENTATION_PORTRAIT";
+            }
+            case ORIENTATION_LANDSCAPE: {
+                return "ORIENTATION_LANDSCAPE";
+            }
+            default:
+                return "ORIENTATION_UNKNOWN";
+        }
+    }
+
+    private static String fittingModeToString(int fittingMode) {
+        switch (fittingMode) {
+            case FITTING_MODE_NONE: {
+                return "FITTING_MODE_NONE";
+            }
+            case FITTING_MODE_FIT_TO_PAGE: {
+                return "FITTING_MODE_FIT_TO_PAGE";
+            }
+            default:
+                return "FITTING_MODE_UNKNOWN";
+        }
+    }
+
+    static void enforceValidDuplexMode(int duplexMode) {
+        if ((duplexMode & VALID_DUPLEX_MODES) == 0) {
+            throw new IllegalArgumentException("invalid duplex mode: " + duplexMode);
+        }
+    }
+
+    static void enforceValidColorMode(int colorMode) {
+        if ((colorMode & VALID_COLOR_MODES) == 0) {
+            throw new IllegalArgumentException("invalid color mode: " + colorMode);
+        }
+    }
+
+    static void enfoceValidFittingMode(int fittingMode) {
+        if ((fittingMode & VALID_FITTING_MODES) == 0) {
+            throw new IllegalArgumentException("invalid fitting mode: " + fittingMode);
+        }
+    }
+
+    static void enforceValidOrientation(int orientation) {
+        if ((orientation & VALID_ORIENTATIONS) == 0) {
+            throw new IllegalArgumentException("invalid orientation: " + orientation);
+        }
+    }
+
+    /**
+     * Builder for creating {@link PrintAttributes}.
+     */
+    public static final class Builder {
+        private final PrintAttributes mAttributes = new PrintAttributes();
+
+        /**
+         * Sets the media size.
+         *
+         * @param mediaSize The media size.
+         * @return This builder.
+         */
+        public Builder setMediaSize(MediaSize mediaSize) {
+            mAttributes.setMediaSize(mediaSize);
+            return this;
+        }
+
+        /**
+         * Sets the resolution.
+         *
+         * @param resolution The resolution.
+         * @return This builder.
+         */
+        public Builder setResolution(Resolution resolution) {
+            mAttributes.setResolution(resolution);
+            return this;
+        }
+
+        /**
+         * Sets the margins.
+         *
+         * @param margins The margins.
+         * @return This builder.
+         */
+        public Builder setMargins(Margins margins) {
+            mAttributes.setMargins(margins);
+            return this;
+        }
+
+        /**
+         * Sets the input tray.
+         *
+         * @param inputTray The tray.
+         * @return This builder.
+         */
+        public Builder setInputTray(Tray inputTray) {
+            mAttributes.setInputTray(inputTray);
+            return this;
+        }
+
+        /**
+         * Sets the output tray.
+         *
+         * @param outputTray The tray.
+         * @return This builder.
+         */
+        public Builder setOutputTray(Tray outputTray) {
+            mAttributes.setOutputTray(outputTray);
+            return this;
+        }
+
+        /**
+         * Sets the duplex mode.
+         *
+         * @param duplexMode A valid duplex mode or zero.
+         * @return This builder.
+         *
+         * @see PrintAttributes#DUPLEX_MODE_NONE
+         * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
+         * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
+         */
+        public Builder setDuplexMode(int duplexMode) {
+            if (Integer.bitCount(duplexMode) != 1) {
+                throw new IllegalArgumentException("can specify at most one duplexMode bit.");
+            }
+            mAttributes.setDuplexMode(duplexMode);
+            return this;
+        }
+
+        /**
+         * Sets the color mode.
+         *
+         * @param colorMode A valid color mode or zero.
+         * @return This builder.
+         *
+         * @see PrintAttributes#COLOR_MODE_MONOCHROME
+         * @see PrintAttributes#COLOR_MODE_COLOR
+         */
+        public Builder setColorMode(int colorMode) {
+            if (Integer.bitCount(colorMode) > 1) {
+                throw new IllegalArgumentException("can specify at most one colorMode bit.");
+            }
+            mAttributes.setColorMode(colorMode);
+            return this;
+        }
+
+        /**
+         * Sets the fitting mode.
+         *
+         * @param fittingMode A valid fitting mode or zero.
+         * @return This builder.
+         *
+         * @see PrintAttributes#FITTING_MODE_NONE
+         * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
+         */
+        public Builder setFittingMode(int fittingMode) {
+            if (Integer.bitCount(fittingMode) > 1) {
+                throw new IllegalArgumentException("can specify at most one fittingMode bit.");
+            }
+            mAttributes.setFittingMode(fittingMode);
+            return this;
+        }
+
+        /**
+         * Sets the orientation.
+         *
+         * @param orientation A valid orientation or zero.
+         * @return This builder.
+         *
+         * @see PrintAttributes#ORIENTATION_PORTRAIT
+         * @see PrintAttributes#ORIENTATION_LANDSCAPE
+         */
+        public Builder setOrientation(int orientation) {
+            if (Integer.bitCount(orientation) > 1) {
+                throw new IllegalArgumentException("can specify at most one orientation bit.");
+            }
+            mAttributes.setOrientation(orientation);
+            return this;
+        }
+
+        /**
+         * Sets the number of copies.
+         *
+         * @param copyCount A greater or equal to zero copy count.
+         * @return This builder.
+         */
+        public Builder setCopyCount(int copyCount) {
+            mAttributes.setCopies(copyCount);
+            return this;
+        }
+
+        /**
+         * Creates a new {@link PrintAttributes} instance.
+         *
+         * @return The new instance.
+         */
+        public PrintAttributes create() {
+            return mAttributes;
+        }
+    }
+
+    public static final Parcelable.Creator<PrintAttributes> CREATOR =
+            new Creator<PrintAttributes>() {
+        @Override
+        public PrintAttributes createFromParcel(Parcel parcel) {
+            return new PrintAttributes(parcel);
+        }
+
+        @Override
+        public PrintAttributes[] newArray(int size) {
+            return new PrintAttributes[size];
+        }
+    };
+}
diff --git a/core/java/android/print/PrintFileAdapter.java b/core/java/android/print/PrintFileAdapter.java
new file mode 100644
index 0000000..bbfc394
--- /dev/null
+++ b/core/java/android/print/PrintFileAdapter.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.AsyncTask;
+import android.os.CancellationSignal;
+import android.os.CancellationSignal.OnCancelListener;
+import android.util.Log;
+
+import libcore.io.IoUtils;
+
+import java.io.File;
+import java.io.FileDescriptor;
+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.List;
+
+/**
+ * Adapter for printing files.
+ */
+class PrintFileAdapter extends PrintAdapter {
+
+    private static final String LOG_TAG = "PrintFileAdapter";
+
+    private final File mFile;
+
+    private WriteFileAsyncTask mWriteFileAsyncTask;
+
+    public PrintFileAdapter(File file) {
+        if (file == null) {
+            throw new IllegalArgumentException("File cannot be null!");
+        }
+        mFile = file;
+    }
+
+    @Override
+    public void onPrint(List<PageRange> pages, FileDescriptor destination,
+            CancellationSignal cancellationSignal, PrintProgressCallback progressListener) {
+        mWriteFileAsyncTask = new WriteFileAsyncTask(mFile, destination, cancellationSignal,
+                progressListener);
+        mWriteFileAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,
+                (Void[]) null);
+        
+    }
+
+    @Override
+    public PrintAdapterInfo getInfo() {
+        // TODO: When we have PDF render library we should query the page count.
+        return new PrintAdapterInfo.Builder().create();
+    }
+
+    private static final class WriteFileAsyncTask extends AsyncTask<Void, Void, Void> {
+
+        private final File mSource;
+
+        private final FileDescriptor mDestination;
+
+        private final PrintProgressCallback mProgressListener;
+
+        private final CancellationSignal mCancellationSignal;
+
+        public WriteFileAsyncTask(File source, FileDescriptor destination,
+                CancellationSignal cancellationSignal, PrintProgressCallback progressListener) {
+            mSource = source;
+            mDestination = destination;
+            mProgressListener = progressListener;
+            mCancellationSignal = cancellationSignal; 
+            mCancellationSignal.setOnCancelListener(new OnCancelListener() {
+                @Override
+                public void onCancel() {
+                    cancel(true);
+                }
+            });
+        }
+
+        @Override
+        protected Void doInBackground(Void... params) {
+            InputStream in = null;
+            OutputStream out = new FileOutputStream(mDestination);
+            final byte[] buffer = new byte[8192];
+            try {
+                in = new FileInputStream(mSource);
+                while (true) {
+                    final int readByteCount = in.read(buffer);
+                    if (readByteCount < 0) {
+                        break;
+                    }
+                    out.write(buffer, 0, readByteCount);
+                }
+             } catch (IOException ioe) {
+                Log.e(LOG_TAG, "Error writing data!", ioe);
+             } finally {
+                IoUtils.closeQuietly(in);
+                IoUtils.closeQuietly(out);
+                if (!isCancelled()) {
+                    List<PageRange> pages = new ArrayList<PageRange>();
+                    pages.add(PageRange.ALL_PAGES);
+                    mProgressListener.onPrintFinished(pages);
+                } else {
+                    mProgressListener.onPrintFailed("Cancelled");
+                }
+            }
+            return null;
+        }
+    }
+}
+
diff --git a/core/java/android/print/PrintJob.java b/core/java/android/print/PrintJob.java
new file mode 100644
index 0000000..f7cca87
--- /dev/null
+++ b/core/java/android/print/PrintJob.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+
+/**
+ * This class represents a print job from the perspective of
+ * an application.
+ */
+public final class PrintJob {
+
+    private final int mId;
+
+    private final PrintManager mPrintManager;
+
+    private PrintJobInfo mCachedInfo;
+
+    PrintJob(PrintJobInfo info, PrintManager printManager) {
+        mCachedInfo = info;
+        mPrintManager = printManager;
+        mId = info.getId();
+    }
+
+    /**
+     * Gets the unique print job id.
+     *
+     * @return The id.
+     */
+    public int getId() {
+        return mId;
+    }
+
+    /**
+     * Gets the {@link PrintJobInfo} that describes this job.
+     * <p>
+     * <strong>Node:</strong>The returned info object is a snapshot of the
+     * current print job state. Every call to this method returns a fresh
+     * info object that reflects the current print job state.
+     * </p>
+     *
+     * @return The print job info.
+     */
+    public PrintJobInfo getInfo() {
+        PrintJobInfo info = mPrintManager.getPrintJob(mId);
+        if (info != null) {
+            mCachedInfo = info;
+        }
+        return mCachedInfo;
+    }
+
+    /**
+     * Cancels this print job.
+     */
+    public void cancel() {
+        mPrintManager.cancelPrintJob(mId);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PrintJob other = (PrintJob) obj;
+        return mId == other.mId;
+    }
+
+    @Override
+    public int hashCode() {
+        return mId;
+    }
+}
diff --git a/core/java/android/print/PrintJobInfo.aidl b/core/java/android/print/PrintJobInfo.aidl
new file mode 100644
index 0000000..fbca99c
--- /dev/null
+++ b/core/java/android/print/PrintJobInfo.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PrintJobInfo;
diff --git a/core/java/android/print/PrintJobInfo.java b/core/java/android/print/PrintJobInfo.java
new file mode 100644
index 0000000..72d6057
--- /dev/null
+++ b/core/java/android/print/PrintJobInfo.java
@@ -0,0 +1,414 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class represents the description of a print job.
+ */
+public final class PrintJobInfo implements Parcelable {
+
+    /** Undefined print job id. */
+    public static final int PRINT_JOB_ID_UNDEFINED = -1;
+
+    /**
+     * Constant for matching any print job state.
+     *
+     * @hide
+     */
+    public static final int STATE_ANY = -1;
+
+    /**
+     * Print job state: The print job is being created but not yet
+     * ready to be printed.
+     * <p>
+     * Next valid states: {@link #STATE_QUEUED}
+     * </p>
+     */
+    public static final int STATE_CREATED = 1;
+
+    /**
+     * Print job status: The print jobs is created, it is ready
+     * to be printed and should be processed.
+     * <p>
+     * Next valid states: {@link #STATE_STARTED}, {@link #STATE_FAILED},
+     * {@link #STATE_CANCELED}
+     * </p>
+     */
+    public static final int STATE_QUEUED = 2;
+
+    /**
+     * Print job status: The print job is being printed.
+     * <p>
+     * Next valid states: {@link #STATE_COMPLETED}, {@link #STATE_FAILED},
+     * {@link #STATE_CANCELED}
+     * </p>
+     */
+    public static final int STATE_STARTED = 3;
+
+    /**
+     * Print job status: The print job was successfully printed.
+     * This is a terminal state.
+     * <p>
+     * Next valid states: None
+     * </p>
+     */
+    public static final int STATE_COMPLETED = 4;
+
+    /**
+     * Print job status: The print job was printing but printing failed.
+     * This is a terminal state.
+     * <p>
+     * Next valid states: None
+     * </p>
+     */
+    public static final int STATE_FAILED = 5;
+
+    /**
+     * Print job status: The print job was canceled.
+     * This is a terminal state.
+     * <p>
+     * Next valid states: None
+     * </p>
+     */
+    public static final int STATE_CANCELED = 6;
+
+    /** The unique print job id. */
+    private int mId;
+
+    /** The human readable print job label. */
+    private CharSequence mLabel;
+
+    /** The unique id of the printer. */
+    private PrinterId mPrinterId;
+
+    /** The status of the print job. */
+    private int mState;
+
+    /** The id of the app that created the job. */
+    private int mAppId;
+
+    /** The id of the user that created the job. */
+    private int mUserId;
+
+    /** Optional tag assigned by a print service.*/
+    private String mTag;
+
+    /** The pages to print */
+    private PageRange[] mPageRanges;
+
+    /** The print job attributes size. */
+    private PrintAttributes mAttributes;
+
+    /**
+     * Gets the unique print job id.
+     *
+     * @return The id.
+     */
+    public int getId() {
+        return mId;
+    }
+
+    /**
+     * Sets the unique print job id.
+     *
+     * @param The job id.
+     *
+     * @hide
+     */
+    public void setId(int id) {
+        this.mId = id;
+    }
+
+    /**
+     * Gets the human readable job label.
+     *
+     * @return The label.
+     */
+    public CharSequence getLabel() {
+        return mLabel;
+    }
+
+    /**
+     * Sets the human readable job label.
+     *
+     * @param label The label.
+     *
+     * @hide
+     */
+    public void setLabel(CharSequence label) {
+        mLabel = label;
+    }
+
+    /**
+     * Gets the unique target printer id.
+     *
+     * @return The target printer id.
+     */
+    public PrinterId getPrinterId() {
+        return mPrinterId;
+    }
+
+    /**
+     * Sets the unique target pritner id.
+     *
+     * @param printerId The target printer id.
+     *
+     * @hide
+     */
+    public void setPrinterId(PrinterId printerId) {
+        mPrinterId = printerId;
+    }
+
+    /**
+     * Gets the current job state.
+     *
+     * @return The job state.
+     */
+    public int getState() {
+        return mState;
+    }
+
+    /**
+     * Sets the current job state.
+     *
+     * @param state The job state.
+     *
+     * @hide
+     */
+    public void setState(int state) {
+        mState = state;
+    }
+
+    /**
+     * Sets the owning application id.
+     *
+     * @return The owning app id.
+     *
+     * @hide
+     */
+    public int getAppId() {
+        return mAppId;
+    }
+
+    /**
+     * Sets the owning application id.
+     *
+     * @param appId The owning app id.
+     *
+     * @hide
+     */
+    public void setAppId(int appId) {
+        mAppId = appId;
+    }
+
+    /**
+     * Gets the owning user id.
+     *
+     * @return The user id.
+     *
+     * @hide
+     */
+    public int getUserId() {
+        return mUserId;
+    }
+
+    /**
+     * Sets the owning user id.
+     *
+     * @param userId The user id.
+     *
+     * @hide
+     */
+    public void setUserId(int userId) {
+        mUserId = userId;
+    }
+
+    /**
+     * Gets the optional tag assigned by a print service.
+     *
+     * @return The tag.
+     */
+    public String getTag() {
+        return mTag;
+    }
+
+    /**
+     * Sets the optional tag assigned by a print service.
+     *
+     * @param tag The tag.
+     *
+     * @hide
+     */
+    public void setTag(String tag) {
+        mTag = tag;
+    }
+
+    /**
+     * Gets the included pages.
+     *
+     * @return The included pages or <code>null</code> if not set.
+     */
+    public PageRange[] getPages() {
+        return mPageRanges;
+    }
+
+    /**
+     * Sets the included pages.
+     *
+     * @return The included pages.
+     *
+     * @hide
+     */
+    public void setPages(PageRange[] pageRanges) {
+        mPageRanges = pageRanges;
+    }
+
+    /**
+     * Gets the print job attributes.
+     *
+     * @return The attributes.
+     */
+    public PrintAttributes getAttributes() {
+        return mAttributes;
+    }
+
+    /**
+     * Sets the print job attributes.
+     *
+     * @param attributes The attributes.
+     *
+     * @hide
+     */
+    public void setAttributes(PrintAttributes attributes) {
+        mAttributes = attributes;
+    }
+
+    /** @hide*/
+    public PrintJobInfo() {
+        /* do nothing */
+    }
+
+    /** @hide */
+    public PrintJobInfo(PrintJobInfo other) {
+        mId = other.mId;
+        mLabel = other.mLabel;
+        mPrinterId = other.mPrinterId;
+        mState = other.mState;
+        mAppId = other.mAppId;
+        mUserId = other.mUserId;
+        mAttributes = other.mAttributes;
+    }
+
+    private PrintJobInfo(Parcel parcel) {
+        mId = parcel.readInt();
+        mLabel = parcel.readCharSequence();
+        mPrinterId = parcel.readParcelable(null);
+        mState = parcel.readInt();
+        mAppId = parcel.readInt();
+        mUserId = parcel.readInt();
+        if (parcel.readInt() == 1) {
+            mPageRanges = (PageRange[]) parcel.readParcelableArray(null);
+        }
+        if (parcel.readInt() == 1) {
+            mAttributes = PrintAttributes.CREATOR.createFromParcel(parcel);
+        }
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeInt(mId);
+        parcel.writeCharSequence(mLabel);
+        parcel.writeParcelable(mPrinterId, flags);
+        parcel.writeInt(mState);
+        parcel.writeInt(mAppId);
+        parcel.writeInt(mUserId);
+        if (mPageRanges != null) {
+            parcel.writeInt(1);
+            parcel.writeParcelableArray(mPageRanges, flags);
+        } else {
+            parcel.writeInt(0);
+        }
+        if (mAttributes != null) {
+            parcel.writeInt(1);
+            mAttributes.writeToParcel(parcel, flags);
+        } else {
+            parcel.writeInt(0);
+        }
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrintJobInfo{");
+        builder.append("label: ").append(mLabel);
+        builder.append(", id: ").append(mId);
+        builder.append(", status: ").append(stateToString(mState));
+        builder.append(", printer: " + mPrinterId);
+        builder.append(", attributes: " + (mAttributes != null ? mAttributes.toString() : null));
+        builder.append("}");
+        return builder.toString();
+    }
+
+    /** @hide */
+    public static String stateToString(int state) {
+        switch (state) {
+            case STATE_CREATED: {
+                return "STATUS_CREATED";
+            }
+            case STATE_QUEUED: {
+                return "STATE_QUEUED";
+            }
+            case STATE_STARTED: {
+                return "STATE_STARTED";
+            }
+            case STATE_FAILED: {
+                return "STATUS_FAILED";
+            }
+            case STATE_COMPLETED: {
+                return "STATUS_COMPLETED";
+            }
+            case STATE_CANCELED: {
+                return "STATUS_CANCELED";
+            }
+            default: {
+                return "STATUS_UNKNOWN";
+            }
+        }
+    }
+
+
+    public static final Parcelable.Creator<PrintJobInfo> CREATOR =
+            new Creator<PrintJobInfo>() {
+        @Override
+        public PrintJobInfo createFromParcel(Parcel parcel) {
+            return new PrintJobInfo(parcel);
+        }
+
+        @Override
+        public PrintJobInfo[] newArray(int size) {
+            return new PrintJobInfo[size];
+        }
+    };
+}
diff --git a/core/java/android/print/PrintManager.java b/core/java/android/print/PrintManager.java
new file mode 100644
index 0000000..32a0f5a
--- /dev/null
+++ b/core/java/android/print/PrintManager.java
@@ -0,0 +1,392 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.content.Context;
+import android.content.IntentSender;
+import android.content.IntentSender.SendIntentException;
+import android.os.CancellationSignal;
+import android.os.Handler;
+import android.os.ICancellationSignal;
+import android.os.Looper;
+import android.os.Message;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.PrintAdapter.PrintProgressCallback;
+import android.util.Log;
+
+import com.android.internal.os.SomeArgs;
+
+import libcore.io.IoUtils;
+
+import java.io.File;
+import java.io.FileDescriptor;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * System level service for accessing the printing capabilities of the platform.
+ * <p>
+ * To obtain a handle to the print manager do the following:
+ * </p>
+ * <pre>
+ * PrintManager printManager =
+ *         (PrintManager) context.getSystemService(Context.PRINT_SERVICE);
+ * </pre>
+ */
+public final class PrintManager {
+
+    private static final String LOG_TAG = "PrintManager";
+
+    /** @hide */
+    public static final int APP_ID_ANY = -2;
+
+    private final Context mContext;
+
+    private final IPrintManager mService;
+
+    private final int mUserId;
+
+    private final int mAppId;
+
+    private final PrintClient mPrintClient;
+
+    private final Handler mHandler;
+
+    /**
+     * Creates a new instance.
+     *
+     * @param context The current context in which to operate.
+     * @param service The backing system service.
+     *
+     * @hide
+     */
+    public PrintManager(Context context, IPrintManager service, int userId, int appId) {
+        mContext = context;
+        mService = service;
+        mUserId = userId;
+        mAppId = appId;
+        mPrintClient = new PrintClient(this);
+        mHandler = new Handler(context.getMainLooper(), null, false) {
+            @Override
+            public void handleMessage(Message message) {
+                SomeArgs args = (SomeArgs) message.obj;
+                Context context = (Context) args.arg1;
+                IntentSender intent = (IntentSender) args.arg2;
+                args.recycle();
+                try {
+                    context.startIntentSender(intent, null, 0, 0, 0);
+                } catch (SendIntentException sie) {
+                    Log.e(LOG_TAG, "Couldn't start print job config activity.", sie);
+                }
+            }
+        };
+    }
+
+    /**
+     * Creates an instance that can access all print jobs.
+     *
+     * @param userId The user id for which to get all print jobs.
+     * @return An instance of the caller has the permission to access
+     * all print jobs, null otherwise.
+     *
+     * @hide
+     */
+    public PrintManager getGlobalPrintManagerForUser(int userId) {
+        return new PrintManager(mContext, mService, userId, APP_ID_ANY);
+    }
+
+    PrintJobInfo getPrintJob(int printJobId) {
+        try {
+            return mService.getPrintJob(printJobId, mAppId, mUserId);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error getting print job:" + printJobId, re);
+        }
+        return null;
+    }
+
+    /**
+     * Gets the print jobs for this application.
+     *
+     * @return The print job list.
+     *
+     * @see PrintJob
+     */
+    public List<PrintJob> getPrintJobs() {
+        try {
+            List<PrintJobInfo> printJobInfos = mService.getPrintJobs(mAppId, mUserId);
+            if (printJobInfos == null) {
+                return Collections.emptyList();
+            }
+            final int printJobCount = printJobInfos.size();
+            List<PrintJob> printJobs = new ArrayList<PrintJob>(printJobCount);
+            for (int i = 0; i < printJobCount; i++) {
+                printJobs.add(new PrintJob(printJobInfos.get(i), this));
+            }
+            return printJobs;
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error getting print jobs!", re);
+        }
+        return Collections.emptyList();
+    }
+
+    ICancellationSignal cancelPrintJob(int printJobId) {
+        try {
+            mService.cancelPrintJob(printJobId, mAppId, mUserId);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error cancleing a print job:" + printJobId, re);
+        }
+        return null;
+    }
+
+    /**
+     * Creates a print job for printing a file with default print attributes.
+     *
+     * @param printJobName A name for the new print job.
+     * @param pdfFile The PDF file to print.
+     * @param attributes The default print job attributes.
+     * @return The created print job.
+     */
+    public PrintJob print(String printJobName, File pdfFile, PrintAttributes attributes) {
+        PrintFileAdapter printable = new PrintFileAdapter(pdfFile);
+        return print(printJobName, printable, attributes);
+    }
+
+    /**
+     * Creates a print job for printing a {@link PrintAdapter} with default print
+     * attributes.
+     *
+     * @param printJobName A name for the new print job.
+     * @param printAdapter The printable adapter to print.
+     * @param attributes The default print job attributes.
+     * @return The created print job.
+     */
+    public PrintJob print(String printJobName, PrintAdapter printAdapter,
+            PrintAttributes attributes) {
+        PrintAdapterDelegate delegate = new PrintAdapterDelegate(printAdapter,
+                mContext.getMainLooper());
+        try {
+            PrintJobInfo printJob = mService.print(printJobName, mPrintClient, delegate,
+                    attributes, mAppId, mUserId);
+            if (printJob != null) {
+                return new PrintJob(printJob, this);
+            }
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error creating a print job", re);
+        }
+        return null;
+    }
+
+    private static final class PrintClient extends IPrintClient.Stub {
+
+        private final WeakReference<PrintManager> mWeakPrintManager;
+
+        public PrintClient(PrintManager manager) {
+            mWeakPrintManager = new WeakReference<PrintManager>(manager);
+        }
+
+        @Override
+        public void startPrintJobConfigActivity(IntentSender intent)  {
+            PrintManager manager = mWeakPrintManager.get();
+            if (manager != null) {
+                SomeArgs args = SomeArgs.obtain();
+                args.arg1 =  manager.mContext;
+                args.arg2 = intent;
+                manager.mHandler.obtainMessage(0, args).sendToTarget();
+            }
+        }
+    }
+
+    private static final class PrintAdapterDelegate extends IPrintAdapter.Stub {
+        private final Object mLock = new Object();
+
+        private PrintAdapter mPrintAdapter;
+
+        private Handler mHandler;
+
+        public PrintAdapterDelegate(PrintAdapter printAdapter, Looper looper) {
+            mPrintAdapter = printAdapter;
+            mHandler = new MyHandler(looper);
+        }
+
+        @Override
+        public void start() {
+            synchronized (mLock) {
+                if (isFinishedLocked()) {
+                    return;
+                }
+                mHandler.obtainMessage(MyHandler.MESSAGE_START,
+                        mPrintAdapter).sendToTarget();
+            }
+        }
+
+        @Override
+        public void printAttributesChanged(PrintAttributes attributes) {
+            synchronized (mLock) {
+                if (isFinishedLocked()) {
+                    return;
+                }
+                SomeArgs args = SomeArgs.obtain();
+                args.arg1 = mPrintAdapter;
+                args.arg2 = attributes;
+                mHandler.obtainMessage(MyHandler.MESSAGE_PRINT_ATTRIBUTES_CHANGED,
+                        args).sendToTarget();
+            }
+        }
+
+        @Override
+        public void print(List<PageRange> pages, ParcelFileDescriptor fd,
+                IPrintProgressListener progressListener) {
+            synchronized (mLock) {
+                if (isFinishedLocked()) {
+                    return;
+                }
+                SomeArgs args = SomeArgs.obtain();
+                args.arg1 = mPrintAdapter;
+                args.arg2 = pages;
+                args.arg3 = fd.getFileDescriptor();
+                args.arg4 = progressListener;
+                mHandler.obtainMessage(MyHandler.MESSAGE_PRINT, args).sendToTarget();
+            }
+        }
+
+        @Override
+        public void finish() {
+            synchronized (mLock) {
+                if (isFinishedLocked()) {
+                    return;
+                }
+                mHandler.obtainMessage(MyHandler.MESSAGE_FINIS,
+                        mPrintAdapter).sendToTarget();
+            }
+        }
+
+        private boolean isFinishedLocked() {
+            return mPrintAdapter == null;
+        }
+
+        private void finishLocked() {
+            mPrintAdapter = null;
+            mHandler = null;
+        }
+
+        private final class MyHandler extends Handler {
+            public static final int MESSAGE_START = 1;
+            public static final int MESSAGE_PRINT_ATTRIBUTES_CHANGED = 2;
+            public static final int MESSAGE_PRINT = 3;
+            public static final int MESSAGE_FINIS = 4;
+
+            public MyHandler(Looper looper) {
+                super(looper, null, true);
+            }
+
+            @Override
+            public void handleMessage(Message message) {
+                switch (message.what) {
+                    case MESSAGE_START: {
+                        PrintAdapter adapter = (PrintAdapter) message.obj;
+                        adapter.onStart();
+                    } break;
+
+                    case MESSAGE_PRINT_ATTRIBUTES_CHANGED: {
+                        SomeArgs args = (SomeArgs) message.obj;
+                        PrintAdapter adapter = (PrintAdapter) args.arg1;
+                        PrintAttributes attributes = (PrintAttributes) args.arg2;
+                        args.recycle();
+                        adapter.onPrintAttributesChanged(attributes);
+                    } break;
+
+                    case MESSAGE_PRINT: {
+                        SomeArgs args = (SomeArgs) message.obj;
+                        PrintAdapter adapter = (PrintAdapter) args.arg1;
+                        @SuppressWarnings("unchecked")
+                        List<PageRange> pages = (List<PageRange>) args.arg2;
+                        final FileDescriptor fd = (FileDescriptor) args.arg3;
+                        IPrintProgressListener listener = (IPrintProgressListener) args.arg4;
+                        args.recycle();
+                        try {
+                            ICancellationSignal remoteSignal = CancellationSignal.createTransport();
+                            listener.onWriteStarted(adapter.getInfo(), remoteSignal);
+
+                            CancellationSignal localSignal = CancellationSignal.fromTransport(
+                                    remoteSignal);
+                            adapter.onPrint(pages, fd, localSignal,
+                                    new PrintProgressListenerWrapper(listener) {
+                                        @Override
+                                        public void onPrintFinished(List<PageRange> pages) {
+                                            IoUtils.closeQuietly(fd);
+                                            super.onPrintFinished(pages);
+                                        }
+
+                                        @Override
+                                        public void onPrintFailed(CharSequence error) {
+                                            IoUtils.closeQuietly(fd);
+                                            super.onPrintFailed(error);
+                                        }
+                                    });
+                        } catch (RemoteException re) {
+                            Log.e(LOG_TAG, "Error printing", re);
+                            IoUtils.closeQuietly(fd);
+                        }
+                    } break;
+
+                    case MESSAGE_FINIS: {
+                        PrintAdapter adapter = (PrintAdapter) message.obj;
+                        adapter.onFinish();
+                        synchronized (mLock) {
+                            finishLocked();
+                        }
+                    } break;
+
+                    default: {
+                        throw new IllegalArgumentException("Unknown message: "
+                                + message.what);
+                    }
+                }
+            }
+        }
+    }
+
+    private static abstract class PrintProgressListenerWrapper extends PrintProgressCallback {
+
+        private final IPrintProgressListener mWrappedListener;
+
+        public PrintProgressListenerWrapper(IPrintProgressListener listener) {
+            mWrappedListener = listener;
+        }
+
+        @Override
+        public void onPrintFinished(List<PageRange> pages) {
+            try {
+                mWrappedListener.onWriteFinished(pages);
+            } catch (RemoteException re) {
+                Log.e(LOG_TAG, "Error calling onWriteFinished", re);
+            }
+        }
+
+        @Override
+        public void onPrintFailed(CharSequence error) {
+            try {
+                mWrappedListener.onWriteFailed(error);
+            } catch (RemoteException re) {
+                Log.e(LOG_TAG, "Error calling onWriteFailed", re);
+            }
+        }
+    }
+}
diff --git a/core/java/android/print/PrinterId.aidl b/core/java/android/print/PrinterId.aidl
new file mode 100644
index 0000000..84f422f
--- /dev/null
+++ b/core/java/android/print/PrinterId.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PrinterId;
diff --git a/core/java/android/print/PrinterId.java b/core/java/android/print/PrinterId.java
new file mode 100644
index 0000000..b853eb0
--- /dev/null
+++ b/core/java/android/print/PrinterId.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.content.ComponentName;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * This class represents the unique id of a printer.
+ */
+public final class PrinterId implements Parcelable {
+
+    private final ComponentName mServiceComponentName;
+
+    private final String mLocalId;
+
+    /**
+     * Creates a new instance.
+     *
+     * @param serviceComponentName The managing print service.
+     * @param localId The unique id within the managing service.
+     *
+     * @hide
+     */
+    public PrinterId(ComponentName serviceComponentName, String localId) {
+        mServiceComponentName = serviceComponentName;
+        mLocalId = localId;
+    }
+
+    private PrinterId(Parcel parcel) {
+        mServiceComponentName = parcel.readParcelable(null);
+        mLocalId = parcel.readString();
+    }
+
+    /**
+     * The id of the print service this printer is managed by.
+     *
+     * @return The print service component name.
+     *
+     * @hide
+     */
+    public ComponentName getServiceComponentName() {
+        return mServiceComponentName;
+    }
+
+    /**
+     * Gets the local id of this printer in the context
+     * of the print service that manages it.
+     *
+     * @return The local id.
+     */
+    public String getLocalId() {
+        return mLocalId;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeParcelable(mServiceComponentName, flags);
+        parcel.writeString(mLocalId);
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (getClass() != object.getClass()) {
+            return false;
+        }
+        PrinterId other = (PrinterId) object;
+        if (mServiceComponentName == null) {
+            if (other.mServiceComponentName != null) {
+                return false;
+            }
+        } else if (!mServiceComponentName.equals(other.mServiceComponentName)) {
+            return false;
+        }
+        if (mLocalId != other.mLocalId) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int hashCode = 1;
+        hashCode = prime * hashCode + ((mServiceComponentName != null)
+                ? mServiceComponentName.hashCode() : 1);
+        hashCode = prime * hashCode + mLocalId.hashCode();
+        return hashCode;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrinterId{");
+        builder.append(mServiceComponentName.flattenToString());
+        builder.append(":");
+        builder.append(mLocalId);
+        builder.append('}');
+        return builder.toString();
+    }
+
+    /**
+     * @hide
+     */
+    public String flattenToString() {
+        return mServiceComponentName.flattenToString() + ":" + mLocalId;
+    }
+
+    /**
+     * @hide
+     */
+    public static PrinterId unflattenFromString(String string) {
+        String[] split = string.split(":");
+        if (split.length != 2) {
+            throw new IllegalArgumentException("Not well-formed printer id:" + string);
+        }
+        ComponentName component = ComponentName.unflattenFromString(split[0]);
+        String localId = String.valueOf(split[1]);
+        return new PrinterId(component, localId);
+    }
+
+    public static final Parcelable.Creator<PrinterId> CREATOR =
+            new Creator<PrinterId>() {
+        @Override
+        public PrinterId createFromParcel(Parcel parcel) {
+            return new PrinterId(parcel);
+        }
+
+        @Override
+        public PrinterId[] newArray(int size) {
+            return new PrinterId[size];
+        }
+    };
+}
diff --git a/core/java/android/print/PrinterInfo.aidl b/core/java/android/print/PrinterInfo.aidl
new file mode 100644
index 0000000..6ec5a58
--- /dev/null
+++ b/core/java/android/print/PrinterInfo.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.print;
+
+parcelable PrinterInfo;
diff --git a/core/java/android/print/PrinterInfo.java b/core/java/android/print/PrinterInfo.java
new file mode 100644
index 0000000..9283472
--- /dev/null
+++ b/core/java/android/print/PrinterInfo.java
@@ -0,0 +1,798 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.print.PrintAttributes.Margins;
+import android.print.PrintAttributes.MediaSize;
+import android.print.PrintAttributes.Resolution;
+import android.print.PrintAttributes.Tray;
+import android.text.TextUtils;
+import android.util.SparseIntArray;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class represents the description of a printer. A description
+ * contains the printer id, human readable name, status, and available
+ * options for various printer capabilities, such as media size, etc.
+ */
+public final class PrinterInfo implements Parcelable {
+    /**
+     * Undefined default value.
+     *
+     * @hide
+     */
+    public static final int DEFAULT_UNDEFINED = -1;
+
+    private static final int MIN_COPIES = 1;
+
+    private static final int PROPERTY_MEDIA_SIZE = 0;
+    private static final int PROPERTY_RESOLUTION = 1;
+    private static final int PROPERTY_INPUT_TRAY = 2;
+    private static final int PROPERTY_OUTPUT_TRAY = 3;
+    private static final int PROPERTY_DUPLEX_MODE = 4;
+    private static final int PROPERTY_COLOR_MODE = 5;
+    private static final int PROPERTY_FITTING_MODE = 6;
+    private static final int PROPERTY_ORIENTATION = 7;
+
+    /** Printer status: the printer is ready to print. */
+    public static final int STATUS_READY = 1;
+
+    // TODO: Add printer status constants.
+
+    private PrinterId mId;
+    private CharSequence mLabel;
+    private int mStatus;
+
+    private Margins mMinMargins;
+    private final List<MediaSize> mMediaSizes = new ArrayList<MediaSize>(); // required
+    private final List<Resolution> mResolutions = new ArrayList<Resolution>(); // required
+    private List<Tray> mInputTrays;
+    private List<Tray> mOutputTrays;
+
+    private int mDuplexModes;
+    private int mColorModes;
+    private int mFittingModes;
+    private int mOrientations;
+
+    private final SparseIntArray mDefaults = new SparseIntArray();
+    private Margins mDefaultMargins;
+
+    private PrinterInfo() {
+        mDefaults.put(PROPERTY_MEDIA_SIZE, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_RESOLUTION, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_INPUT_TRAY, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_OUTPUT_TRAY, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_DUPLEX_MODE, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_COLOR_MODE, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_FITTING_MODE, DEFAULT_UNDEFINED);
+        mDefaults.put(PROPERTY_ORIENTATION, DEFAULT_UNDEFINED);
+    }
+
+    /**
+     * Get the globally unique printer id.
+     *
+     * @return The printer id.
+     */
+    public PrinterId getId() {
+        return mId;
+    }
+
+    /**
+     * Gets the human readable printer label.
+     *
+     * @return The human readable label.
+     */
+    public CharSequence getLabel() {
+        return mLabel;
+    }
+
+    /**
+     * Gets the status of the printer.
+     *
+     * @return The status.
+     */
+    public int getStatus() {
+        return mStatus;
+    }
+
+    /**
+     * Gets the supported media sizes.
+     *
+     * @return The supported media sizes.
+     */
+    public List<MediaSize> getMediaSizes() {
+        return mMediaSizes;
+    }
+
+    /**
+     * Gets the supported resolutions.
+     *
+     * @return The supported resolutions.
+     */
+    public List<Resolution> getResolutions() {
+        return mResolutions;
+    }
+
+    /**
+     * Gets the minimal supported margins.
+     *
+     * @return The minimal margins.
+     */
+    public Margins getMinMargins() {
+        return mMinMargins;
+    }
+
+    /**
+     * Gets the available input trays.
+     *
+     * @return The input trays.
+     */
+    public List<Tray> getInputTrays() {
+        return mInputTrays;
+    }
+
+    /**
+     * Gets the available output trays.
+     *
+     * @return The output trays.
+     */
+    public List<Tray> getOutputTrays() {
+        return mOutputTrays;
+    }
+
+    /**
+     * Gets the supported duplex modes.
+     *
+     * @return The duplex modes.
+     *
+     * @see PrintAttributes#DUPLEX_MODE_NONE
+     * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
+     * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
+     */
+    public int getDuplexModes() {
+        return mDuplexModes;
+    }
+
+    /**
+     * Gets the supported color modes.
+     *
+     * @return The color modes.
+     *
+     * @see PrintAttributes#COLOR_MODE_COLOR
+     * @see PrintAttributes#COLOR_MODE_MONOCHROME
+     */
+    public int getColorModes() {
+        return mColorModes;
+    }
+
+    /**
+     * Gets the supported fitting modes.
+     *
+     * @return The fitting modes.
+     *
+     * @see PrintAttributes#FITTING_MODE_NONE
+     * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
+     */
+    public int getFittingModes() {
+        return mFittingModes;
+    }
+
+    /**
+     * Gets the supported orientations.
+     *
+     * @return The orientations.
+     *
+     * @see PrintAttributes#ORIENTATION_PORTRAIT
+     * @see PrintAttributes#ORIENTATION_LANDSCAPE
+     */
+    public int getOrientations() {
+        return mOrientations;
+    }
+
+    /**
+     * Gets the default print attributes.
+     *
+     * @param outAttributes The attributes to populated.
+     */
+    public void getDefaults(PrintAttributes outAttributes) {
+        outAttributes.clear();
+
+        // TODO: Do we want a printer to specify default copies?
+        outAttributes.setCopies(MIN_COPIES);
+
+        outAttributes.setMargins(mDefaultMargins);
+
+        final int mediaSizeIndex = mDefaults.get(PROPERTY_MEDIA_SIZE);
+        if (mediaSizeIndex >= 0) {
+            outAttributes.setMediaSize(mMediaSizes.get(mediaSizeIndex));
+        }
+
+        final int resolutionIndex = mDefaults.get(PROPERTY_RESOLUTION);
+        if (resolutionIndex >= 0) {
+            outAttributes.setResolution(mResolutions.get(resolutionIndex));
+        }
+
+        final int inputTrayIndex = mDefaults.get(PROPERTY_INPUT_TRAY);
+        if (inputTrayIndex >= 0) {
+            outAttributes.setInputTray(mInputTrays.get(inputTrayIndex));
+        }
+
+        final int outputTrayIndex = mDefaults.get(PROPERTY_OUTPUT_TRAY);
+        if (outputTrayIndex >= 0) {
+            outAttributes.setOutputTray(mOutputTrays.get(outputTrayIndex));
+        }
+
+        final int duplexMode = mDefaults.get(PROPERTY_DUPLEX_MODE);
+        if (duplexMode > 0) {
+            outAttributes.setDuplexMode(duplexMode);
+        }
+
+        final int colorMode = mDefaults.get(PROPERTY_COLOR_MODE);
+        if (colorMode > 0) {
+            outAttributes.setColorMode(mColorModes & colorMode);
+        }
+
+        final int fittingMode = mDefaults.get(PROPERTY_FITTING_MODE);
+        if (fittingMode > 0) {
+            outAttributes.setFittingMode(fittingMode);
+        }
+
+        final int orientation = mDefaults.get(PROPERTY_ORIENTATION);
+        if (orientation > 0) {
+            outAttributes.setOrientation(orientation);
+        }
+    }
+
+    private PrinterInfo(Parcel parcel) {
+        mId = parcel.readParcelable(null);
+        mLabel = parcel.readCharSequence();
+        mStatus = parcel.readInt();
+
+        mMinMargins = readMargins(parcel);
+        readMediaSizes(parcel);
+        readResolutions(parcel);
+        mInputTrays = readInputTrays(parcel);
+        mOutputTrays = readOutputTrays(parcel);
+
+        mColorModes = parcel.readInt();
+        mDuplexModes = parcel.readInt();
+        mFittingModes = parcel.readInt();
+        mOrientations = parcel.readInt();
+
+        readDefaults(parcel);
+        mDefaultMargins = readMargins(parcel);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int flags) {
+        parcel.writeParcelable(mId, flags);
+        parcel.writeCharSequence(mLabel);
+        parcel.writeInt(mStatus);
+
+        writeMargins(mMinMargins, parcel);
+        writeMediaSizes(parcel);
+        writeResolutions(parcel);
+        writeInputTrays(parcel);
+        writeOutputTrays(parcel);
+
+        parcel.writeInt(mColorModes);
+        parcel.writeInt(mDuplexModes);
+        parcel.writeInt(mFittingModes);
+        parcel.writeInt(mOrientations);
+
+        writeDefaults(parcel);
+        writeMargins(mDefaultMargins, parcel);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrinterInfo{");
+        builder.append(mId).append(", \"");
+        builder.append(mLabel);
+        builder.append("\"}");
+        return builder.toString();
+    }
+
+    private void writeMediaSizes(Parcel parcel) {
+        if (mMediaSizes == null) {
+            parcel.writeInt(0);
+            return;
+        }
+        final int mediaSizeCount = mMediaSizes.size();
+        parcel.writeInt(mediaSizeCount);
+        for (int i = 0; i < mediaSizeCount; i++) {
+            mMediaSizes.get(i).writeToParcel(parcel);
+        }
+    }
+
+    private void readMediaSizes(Parcel parcel) {
+        final int mediaSizeCount = parcel.readInt();
+        for (int i = 0; i < mediaSizeCount; i++) {
+            mMediaSizes.add(MediaSize.createFromParcel(parcel));
+        }
+    }
+
+    private void writeResolutions(Parcel parcel) {
+        final int resolutionCount = mResolutions.size();
+        parcel.writeInt(resolutionCount);
+        for (int i = 0; i < resolutionCount; i++) {
+            mResolutions.get(i).writeToParcel(parcel);
+        }
+    }
+
+    private void readResolutions(Parcel parcel) {
+        final int resolutionCount = parcel.readInt();
+        for (int i = 0; i < resolutionCount; i++) {
+            mResolutions.add(Resolution.createFromParcel(parcel));
+        }
+    }
+
+    private void writeMargins(Margins margins, Parcel parcel) {
+        if (margins == null) {
+            parcel.writeInt(0);
+        } else {
+            parcel.writeInt(1);
+            margins.writeToParcel(parcel);
+        }
+    }
+
+    private Margins readMargins(Parcel parcel) {
+        return (parcel.readInt() == 1) ? Margins.createFromParcel(parcel) : null;
+    }
+
+    private void writeInputTrays(Parcel parcel) {
+        if (mInputTrays == null) {
+            parcel.writeInt(0);
+            return;
+        }
+        final int inputTrayCount = mInputTrays.size();
+        parcel.writeInt(inputTrayCount);
+        for (int i = 0; i < inputTrayCount; i++) {
+            mInputTrays.get(i).writeToParcel(parcel);
+        }
+    }
+
+    private List<Tray> readInputTrays(Parcel parcel) {
+        final int inputTrayCount = parcel.readInt();
+        if (inputTrayCount <= 0) {
+            return null;
+        }
+        List<Tray> inputTrays = new ArrayList<Tray>(inputTrayCount);
+        for (int i = 0; i < inputTrayCount; i++) {
+            inputTrays.add(Tray.createFromParcel(parcel));
+        }
+        return inputTrays;
+    }
+
+    private void writeOutputTrays(Parcel parcel) {
+        if (mOutputTrays == null) {
+            parcel.writeInt(0);
+            return;
+        }
+        final int outputTrayCount = mOutputTrays.size();
+        parcel.writeInt(outputTrayCount);
+        for (int i = 0; i < outputTrayCount; i++) {
+            mOutputTrays.get(i).writeToParcel(parcel);
+        }
+    }
+
+    private List<Tray> readOutputTrays(Parcel parcel) {
+        final int outputTrayCount = parcel.readInt();
+        if (outputTrayCount <= 0) {
+            return null;
+        }
+        List<Tray> outputTrays = new ArrayList<Tray>(outputTrayCount);
+        for (int i = 0; i < outputTrayCount; i++) {
+            outputTrays.add(Tray.createFromParcel(parcel));
+        }
+        return outputTrays;
+    }
+
+    private void readDefaults(Parcel parcel) {
+        final int defaultCount = parcel.readInt();
+        for (int i = 0; i < defaultCount; i++) {
+            mDefaults.append(mDefaults.size(), parcel.readInt());
+        }
+    }
+
+    private void writeDefaults(Parcel parcel) {
+        final int defaultCount = mDefaults.size();
+        parcel.writeInt(defaultCount);
+        for (int i = 0; i < defaultCount; i++) {
+            parcel.writeInt(mDefaults.valueAt(i));
+        }
+    }
+
+    /**
+     * Builder for creating of a {@link PrinterInfo}. This class is responsible
+     * to enforce that all required attributes have at least one default value.
+     * In other words, this class creates only well-formed {@link PrinterInfo}s.
+     * <p>
+     * Look at the individual methods for a reference whether a property is
+     * required or if it is optional.
+     * </p>
+     */
+    public static final class Builder {
+        private final PrinterInfo mPrinterInfo;
+
+        /**
+         * Creates a new instance.
+         *
+         * @param printerId The printer id.
+         * @param label The human readable printer label.
+         *
+         * @throws IllegalArgumentException IF the printer id is null.
+         * @throws IllegalArgumentException IF the label is empty.
+         */
+        public Builder(PrinterId printerId, CharSequence label) {
+            if (printerId == null) {
+                throw new IllegalArgumentException("printerId cannot be null.");
+            }
+            if (TextUtils.isEmpty(label)) {
+                throw new IllegalArgumentException("label cannot be empty.");
+            }
+            mPrinterInfo = new PrinterInfo();
+            mPrinterInfo.mLabel = label;
+            mPrinterInfo.mId = printerId;
+        }
+
+        /**
+         * Sets the printer status.
+         * <p>
+         * <strong>Required:</strong> Yes
+         * </p>
+         *
+         * @param status The status.
+         * @return This builder.
+         */
+        public Builder setStatus(int status) {
+            mPrinterInfo.mStatus = status;
+            return this;
+        }
+
+        /**
+         * Adds a supported media size.
+         * <p>
+         * <strong>Required:</strong> Yes
+         * </p>
+         *
+         * @param mediaSize A media size.
+         * @param isDefault Whether this is the default.
+         * @return This builder.
+         * @throws IllegalArgumentException If set as default and there
+         *     is already a default.
+         *
+         * @see PrintAttributes.MediaSize
+         */
+        public Builder addMediaSize(MediaSize mediaSize, boolean isDefault) {
+            final int insertionIndex = mPrinterInfo.mMediaSizes.size();
+            mPrinterInfo.mMediaSizes.add(mediaSize);
+            if (isDefault) {
+                throwIfDefaultAlreadySpecified(PROPERTY_MEDIA_SIZE);
+                mPrinterInfo.mDefaults.put(PROPERTY_MEDIA_SIZE, insertionIndex);
+            }
+            return this;
+        }
+
+        /**
+         * Adds a supported resolution.
+         * <p>
+         * <strong>Required:</strong> Yes
+         * </p>
+         *
+         * @param resolution A resolution.
+         * @param isDefault Whether this is the default.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If set as default and there
+         *     is already a default.
+         *
+         * @see PrintAttributes.Resolution
+         */
+        public Builder addResolution(Resolution resolution, boolean isDefault) {
+            final int insertionIndex = mPrinterInfo.mResolutions.size();
+            mPrinterInfo.mResolutions.add(resolution);
+            if (isDefault) {
+                throwIfDefaultAlreadySpecified(PROPERTY_RESOLUTION);
+                mPrinterInfo.mDefaults.put(PROPERTY_RESOLUTION, insertionIndex);
+            }
+            return this;
+        }
+
+        /**
+         * Sets the minimal margins.
+         * <p>
+         * <strong>Required:</strong> No
+         * </p>
+         *
+         * @param margins The margins.
+         * @param defaultMargins The default margins.
+         * @return This builder.
+         *
+         * @see PrintAttributes.Margins
+         */
+        public Builder setMinMargins(Margins margins, Margins defaultMargins) {
+            if (margins.getLeftMils() > defaultMargins.getLeftMils()
+                    || margins.getTopMils() > defaultMargins.getTopMils()
+                    || margins.getRightMils() < defaultMargins.getRightMils()
+                    || margins.getBottomMils() < defaultMargins.getBottomMils()) {
+                throw new IllegalArgumentException("Default margins"
+                    + " cannot be outside of the min margins.");
+            }
+            mPrinterInfo.mMinMargins = margins;
+            mPrinterInfo.mDefaultMargins = defaultMargins;
+            return this;
+        }
+
+        /**
+         * Adds an input tray.
+         * <p>
+         * <strong>Required:</strong> No
+         * </p>
+         *
+         * @param inputTray A tray.
+         * @param isDefault Whether this is the default.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If set as default and there
+         *     is already a default.
+         *
+         * @see PrintAttributes.Tray
+         */
+        public Builder addInputTray(Tray inputTray, boolean isDefault) {
+            if (mPrinterInfo.mInputTrays == null) {
+                mPrinterInfo.mInputTrays = new ArrayList<Tray>();
+            }
+            final int insertionIndex = mPrinterInfo.mInputTrays.size();
+            mPrinterInfo.mInputTrays.add(inputTray);
+            if (isDefault) {
+                throwIfDefaultAlreadySpecified(PROPERTY_INPUT_TRAY);
+                mPrinterInfo.mDefaults.put(PROPERTY_INPUT_TRAY, insertionIndex);
+            }
+            return this;
+        }
+
+        /**
+         * Adds an output tray.
+         * <p>
+         * <strong>Required:</strong> No
+         * </p>
+         *
+         * @param outputTray A tray.
+         * @param isDefault Whether this is the default.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If set as default and there
+         *     is already a default.
+         *
+         * @see PrintAttributes.Tray
+         */
+        public Builder addOutputTray(Tray outputTray, boolean isDefault) {
+            if (mPrinterInfo.mOutputTrays == null) {
+                mPrinterInfo.mOutputTrays = new ArrayList<Tray>();
+            }
+            final int insertionIndex = mPrinterInfo.mOutputTrays.size();
+            mPrinterInfo.mOutputTrays.add(outputTray);
+            if (isDefault) {
+                throwIfDefaultAlreadySpecified(PROPERTY_OUTPUT_TRAY);
+                mPrinterInfo.mDefaults.put(PROPERTY_OUTPUT_TRAY, insertionIndex);
+            }
+            return this;
+        }
+
+        /**
+         * Sets the color modes.
+         * <p>
+         * <strong>Required:</strong> Yes
+         * </p>
+         *
+         * @param colorModes The color mode bit mask.
+         * @param defaultColorMode The default color mode.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If color modes contains an invalid
+         *         mode bit or if the default color mode is invalid.
+         *
+         * @see PrintAttributes#COLOR_MODE_COLOR
+         * @see PrintAttributes#COLOR_MODE_MONOCHROME
+         */
+        public Builder setColorModes(int colorModes, int defaultColorMode) {
+            int currentModes = colorModes;
+            while (currentModes > 0) {
+                final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+                currentModes &= ~currentMode;
+                PrintAttributes.enforceValidColorMode(currentMode);
+            }
+            if ((colorModes & defaultColorMode) == 0) {
+                throw new IllegalArgumentException("Default color mode not in color modes.");
+            }
+            PrintAttributes.enforceValidColorMode(colorModes);
+            mPrinterInfo.mColorModes = colorModes;
+            mPrinterInfo.mDefaults.put(PROPERTY_COLOR_MODE, defaultColorMode);
+            return this;
+        }
+
+        /**
+         * Set the duplex modes.
+         * <p>
+         * <strong>Required:</strong> No
+         * </p>
+         *
+         * @param duplexModes The duplex mode bit mask.
+         * @param defaultDuplexMode The default duplex mode.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If duplex modes contains an invalid
+         *         mode bit or if the default duplex mode is invalid.
+         *
+         * @see PrintAttributes#DUPLEX_MODE_NONE
+         * @see PrintAttributes#DUPLEX_MODE_LONG_EDGE
+         * @see PrintAttributes#DUPLEX_MODE_SHORT_EDGE
+         */
+        public Builder setDuplexModes(int duplexModes, int defaultDuplexMode) {
+            int currentModes = duplexModes;
+            while (currentModes > 0) {
+                final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+                currentModes &= ~currentMode;
+                PrintAttributes.enforceValidDuplexMode(currentMode);
+            }
+            if ((duplexModes & defaultDuplexMode) == 0) {
+                throw new IllegalArgumentException("Default duplex mode not in duplex modes.");
+            }
+            PrintAttributes.enforceValidDuplexMode(defaultDuplexMode);
+            mPrinterInfo.mDuplexModes = duplexModes;
+            mPrinterInfo.mDefaults.put(PROPERTY_DUPLEX_MODE, defaultDuplexMode);
+            return this;
+        }
+
+        /**
+         * Sets the fitting modes.
+         * <p>
+         * <strong>Required:</strong> No
+         * </p>
+         *
+         * @param fittingModes The fitting mode bit mask.
+         * @param defaultFittingMode The default fitting mode.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If fitting modes contains an invalid
+         *         mode bit or if the default fitting mode is invalid.
+         *
+         * @see PrintAttributes#FITTING_MODE_NONE
+         * @see PrintAttributes#FITTING_MODE_FIT_TO_PAGE
+         */
+        public Builder setFittingModes(int fittingModes, int defaultFittingMode) {
+            int currentModes = fittingModes;
+            while (currentModes > 0) {
+                final int currentMode = (1 << Integer.numberOfTrailingZeros(currentModes));
+                currentModes &= ~currentMode;
+                PrintAttributes.enfoceValidFittingMode(currentMode);
+            }
+            if ((fittingModes & defaultFittingMode) == 0) {
+                throw new IllegalArgumentException("Default fitting mode not in fiting modes.");
+            }
+            PrintAttributes.enfoceValidFittingMode(defaultFittingMode);
+            mPrinterInfo.mFittingModes = fittingModes;
+            mPrinterInfo.mDefaults.put(PROPERTY_FITTING_MODE, defaultFittingMode);
+            return this;
+        }
+
+        /**
+         * Sets the orientations.
+         * <p>
+         * <strong>Required:</strong> Yes
+         * </p>
+         *
+         * @param orientations The orientation bit mask.
+         * @param defaultOrientation The default orientation.
+         * @return This builder.
+         *
+         * @throws IllegalArgumentException If orientations contains an invalid
+         *         mode bit or if the default orientation is invalid.
+         *
+         * @see PrintAttributes#ORIENTATION_PORTRAIT
+         * @see PrintAttributes#ORIENTATION_LANDSCAPE
+         */
+        public Builder setOrientations(int orientations, int defaultOrientation) {
+            int currentOrientaions = orientations;
+            while (currentOrientaions > 0) {
+                final int currentOrnt = (1 << Integer.numberOfTrailingZeros(currentOrientaions));
+                currentOrientaions &= ~currentOrnt;
+                PrintAttributes.enforceValidOrientation(currentOrnt);
+            }
+            if ((orientations & defaultOrientation) == 0) {
+                throw new IllegalArgumentException("Default orientation not in orientations.");
+            }
+            PrintAttributes.enforceValidOrientation(defaultOrientation);
+            mPrinterInfo.mOrientations = orientations;
+            mPrinterInfo.mDefaults.put(PROPERTY_ORIENTATION, defaultOrientation);
+            return this;
+        }
+
+        /**
+         * Crates a new {@link PrinterInfo} enforcing that all required properties
+         * have need specified. See individual methods in this class for reference
+         * about required attributes.
+         *
+         * @return A new {@link PrinterInfo}.
+         *
+         * @throws IllegalStateException If a required attribute was not specified.
+         */
+        public PrinterInfo create() {
+            if (mPrinterInfo.mMediaSizes == null || mPrinterInfo.mMediaSizes.isEmpty()) {
+                throw new IllegalStateException("No media size specified.");
+            }
+            if (mPrinterInfo.mDefaults.valueAt(PROPERTY_MEDIA_SIZE) == DEFAULT_UNDEFINED) {
+                throw new IllegalStateException("No default media size specified.");
+            }
+            if (mPrinterInfo.mResolutions == null || mPrinterInfo.mResolutions.isEmpty()) {
+                throw new IllegalStateException("No resolution specified.");
+            }
+            if (mPrinterInfo.mDefaults.valueAt(PROPERTY_RESOLUTION) == DEFAULT_UNDEFINED) {
+                throw new IllegalStateException("No default resolution specified.");
+            }
+            if (mPrinterInfo.mColorModes == 0) {
+                throw new IllegalStateException("No color mode specified.");
+            }
+            if (mPrinterInfo.mDefaults.valueAt(PROPERTY_COLOR_MODE) == DEFAULT_UNDEFINED) {
+                throw new IllegalStateException("No default color mode specified.");
+            }
+            if (mPrinterInfo.mOrientations == 0) {
+                throw new IllegalStateException("No oprientation specified.");
+            }
+            if (mPrinterInfo.mDefaults.valueAt(PROPERTY_ORIENTATION) == DEFAULT_UNDEFINED) {
+                throw new IllegalStateException("No default orientation specified.");
+            }
+            if (mPrinterInfo.mMinMargins == null) {
+                mPrinterInfo.mMinMargins  = new Margins(0, 0, 0, 0);
+            }
+            if (mPrinterInfo.mDefaultMargins == null) {
+                mPrinterInfo.mDefaultMargins = mPrinterInfo.mMinMargins;
+            }
+            return mPrinterInfo;
+        }
+
+        private void throwIfDefaultAlreadySpecified(int propertyIndex) {
+            if (mPrinterInfo.mDefaults.get(propertyIndex) != DEFAULT_UNDEFINED) {
+                throw new IllegalArgumentException("Default already specified.");
+            }
+        }
+    }
+
+    public static final Parcelable.Creator<PrinterInfo> CREATOR =
+            new Parcelable.Creator<PrinterInfo>() {
+        @Override
+        public PrinterInfo createFromParcel(Parcel parcel) {
+            return new PrinterInfo(parcel);
+        }
+
+        @Override
+        public PrinterInfo[] newArray(int size) {
+            return new PrinterInfo[size];
+        }
+    };
+}
diff --git a/core/java/android/print/pdf/PdfDocument.java b/core/java/android/print/pdf/PdfDocument.java
new file mode 100644
index 0000000..7fb170e
--- /dev/null
+++ b/core/java/android/print/pdf/PdfDocument.java
@@ -0,0 +1,443 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.print.pdf;
+
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Rect;
+
+import dalvik.system.CloseGuard;
+
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <p>
+ * This class enables generating a PDF document from native Android content. You
+ * open a new document and then for every page you want to add you start a page,
+ * write content to the page, and finish the page. After you are done with all
+ * pages, you write the document to an output stream and close the document.
+ * After a document is closed you should not use it anymore.
+ * </p>
+ * <p>
+ * A typical use of the APIs looks like this:
+ * </p>
+ * <pre>
+ * // open a new document
+ * PdfDocument document = PdfDocument.open();
+ *
+ * // crate a page description
+ * PageInfo pageInfo = new PageInfo.Builder(new Rect(0, 0, 100, 100), 1, 300).create();
+ *
+ * // start a page
+ * Page page = document.startPage(pageInfo);
+ *
+ * // draw something on the page
+ * View content = getContentView();
+ * content.draw(page.getCanvas());
+ *
+ * // finish the page
+ * document.finishPage(page);
+ * . . .
+ * add more pages
+ * . . .
+ * // write the document content
+ * document.writeTo(getOutputStream());
+ *
+ * //close the document
+ * document.close();
+ * </pre>
+ */
+public final class PdfDocument {
+
+    private final byte[] mChunk = new byte[4096];
+
+    private final CloseGuard mCloseGuard = CloseGuard.get();
+
+    private final List<PageInfo> mPages = new ArrayList<PageInfo>();
+
+    private int mNativeDocument;
+
+    private Page mCurrentPage;
+
+    /**
+     * Opens a new document.
+     * <p>
+     * <strong>Note:</strong> You must close the document after you are
+     * done by calling {@link #close()}
+     * </p>
+     *
+     * @return The document.
+     *
+     * @see #close()
+     */
+    public static PdfDocument open() {
+        return new PdfDocument();
+    }
+
+    /**
+     * Creates a new instance.
+     */
+    private PdfDocument() {
+        mNativeDocument = nativeCreateDocument();
+        mCloseGuard.open("close");
+    }
+
+    /**
+     * Starts a page using the provided {@link PageInfo}. After the page
+     * is created you can draw arbitrary content on the page's canvas which
+     * you can get by calling {@link Page#getCanvas()}. After you are done
+     * drawing the content you should finish the page by calling
+     * {@link #finishPage(Page). After the page is finished you should
+     * no longer access the page or its canvas.
+     * <p>
+     * <strong>Note:</strong> Do not call this method after {@link #close()}.
+     * </p>
+     *
+     * @param pageInfo The page info.
+     * @return A blank page.
+     *
+     * @see #finishPage(Page)
+     */
+    public Page startPage(PageInfo pageInfo) {
+        throwIfClosed();
+        if (pageInfo == null) {
+            throw new IllegalArgumentException("page cannot be null!");
+        }
+        if (mCurrentPage != null) {
+            throw new IllegalStateException("Previous page not finished!");
+        }
+        Canvas canvas = new PdfCanvas(nativeCreatePage(pageInfo.mPageSize,
+                pageInfo.mContentSize, pageInfo.mInitialTransform.native_instance),
+                pageInfo.mDensity);
+        mCurrentPage = new Page(canvas, pageInfo);
+        return mCurrentPage;
+    }
+
+    /**
+     * Finishes a started page. You should always finish the last started page.
+     * <p>
+     * <strong>Note:</strong> Do not call this method after {@link #close()}.
+     * </p>
+     *
+     * @param page The page.
+     *
+     * @see #startPage(PageInfo)
+     */
+    public void finishPage(Page page) {
+        throwIfClosed();
+        if (page == null) {
+            throw new IllegalArgumentException("page cannot be null");
+        }
+        if (page != mCurrentPage) {
+            throw new IllegalStateException("invalid page");
+        }
+        mPages.add(page.getInfo());
+        mCurrentPage = null;
+        nativeAppendPage(mNativeDocument, page.mCanvas.mNativeCanvas);
+        page.finish();
+    }
+
+    /**
+     * Writes the document to an output stream.
+     * <p>
+     * <strong>Note:</strong> Do not call this method after {@link #close()}.
+     * </p>
+     *
+     * @param out The output stream.
+     */
+    public void writeTo(OutputStream out) {
+        throwIfClosed();
+        if (out == null) {
+            throw new IllegalArgumentException("out cannot be null!");
+        }
+        nativeWriteTo(mNativeDocument, out, mChunk);
+    }
+
+    /**
+     * Gets the pages of the document.
+     *
+     * @return The pages.
+     */
+    public List<PageInfo> getPages() {
+        return Collections.unmodifiableList(mPages);
+    }
+
+    /**
+     * Closes this document. This method should be called after you
+     * are done working with the document. After this call the document
+     * is considered closed and none of its methods should be called.
+     */
+    public void close() {
+        dispose();
+    }
+
+    @Override
+    protected void finalize() throws Throwable {
+        try {
+            mCloseGuard.warnIfOpen();
+            dispose();
+        } finally {
+            super.finalize();
+        }
+    }
+
+    private void dispose() {
+        if (mNativeDocument != 0) {
+            nativeFinalize(mNativeDocument);
+            mCloseGuard.close();
+            mNativeDocument = 0;
+        }
+    }
+
+    /**
+     * Throws an exception if the document is already closed.
+     */
+    private void throwIfClosed() {
+        if (mNativeDocument == 0) {
+            throw new IllegalStateException("document is closed!");
+        }
+    }
+
+    private native int nativeCreateDocument();
+
+    private native void nativeFinalize(int document);
+
+    private native void nativeAppendPage(int document, int page);
+
+    private native void nativeWriteTo(int document, OutputStream out, byte[] chunk);
+
+    private static native int nativeCreatePage(Rect pageSize,
+            Rect contentSize, int nativeMatrix);
+
+
+    private final class PdfCanvas extends Canvas {
+
+        public PdfCanvas(int nativeCanvas, int density) {
+            super(nativeCanvas);
+            super.setDensity(density);
+        }
+
+        @Override
+        public void setBitmap(Bitmap bitmap) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void setDensity(int density) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void setScreenDensity(int density) {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+    /**
+     * This class represents meta-data that describes a PDF {@link Page}.
+     */
+    public static final class PageInfo {
+        private Rect mPageSize;
+        private Rect mContentSize;
+        private Matrix mInitialTransform;
+        private int mPageNumber;
+        private int mDensity;
+
+        /**
+         * Creates a new instance.
+         */
+        private PageInfo() {
+            /* do nothing */
+        }
+
+        /**
+         * Gets the page size in pixels.
+         *
+         * @return The page size.
+         */
+        public Rect getPageSize() {
+            return mPageSize;
+        }
+
+        /**
+         * Get the content size in pixels.
+         *
+         * @return The content size.
+         */
+        public Rect getContentSize() {
+            return mContentSize;
+        }
+
+        /**
+         * Gets the initial transform which is applied to the page. This may be
+         * useful to move the origin to account for a margin, apply scale, or
+         * apply a rotation.
+         *
+         * @return The initial transform.
+         */
+        public Matrix getInitialTransform() {
+            return mInitialTransform;
+        }
+
+        /**
+         * Gets the page number.
+         *
+         * @return The page number.
+         */
+        public int getPageNumber() {
+            return mPageNumber;
+        }
+
+        /**
+         * Gets the density of the page in DPI.
+         *
+         * @return The density.
+         */
+        public int getDesity() {
+            return mDensity;
+        }
+
+        /**
+         * Builder for creating a {@link PageInfo}.
+         */
+        public static final class Builder {
+            private final PageInfo mPageInfo = new PageInfo();
+
+            /**
+             * Creates a new builder with the mandatory page info attributes.
+             *
+             * @param pageSize The page size in pixels.
+             * @param pageNumber The page number.
+             * @param density The page density in DPI.
+             */
+            public Builder(Rect pageSize, int pageNumber, int density) {
+                if (pageSize.width() == 0 || pageSize.height() == 0) {
+                    throw new IllegalArgumentException("page width and height" +
+                            " must be greater than zero!");
+                }
+                if (pageNumber < 0) {
+                    throw new IllegalArgumentException("pageNumber cannot be less than zero!");
+                }
+                if (density <= 0) {
+                    throw new IllegalArgumentException("density must be greater than zero!");
+                }
+                mPageInfo.mPageSize = pageSize;
+                mPageInfo.mPageNumber = pageNumber;
+                mPageInfo.mDensity = density;
+            }
+
+            /**
+             * Sets the content size in pixels.
+             *
+             * @param contentSize The content size.
+             */
+            public Builder setContentSize(Rect contentSize) {
+                Rect pageSize = mPageInfo.mPageSize;
+                if (contentSize != null && (pageSize.left > contentSize.left
+                        || pageSize.top > contentSize.top
+                        || pageSize.right < contentSize.right
+                        || pageSize.bottom < contentSize.bottom)) {
+                    throw new IllegalArgumentException("contentSize does not fit the pageSize!");
+                }
+                mPageInfo.mContentSize = contentSize;
+                return this;
+            }
+
+            /**
+             * Sets the initial transform which is applied to the page. This may be
+             * useful to move the origin to account for a margin, apply scale, or
+             * apply a rotation.
+             *
+             * @param transform The initial transform.
+             */
+            public Builder setInitialTransform(Matrix transform) {
+                mPageInfo.mInitialTransform = transform;
+                return this;
+            }
+
+            /**
+             * Creates a new {@link PageInfo}.
+             *
+             * @return The new instance.
+             */
+            public PageInfo create() {
+                if (mPageInfo.mContentSize == null) {
+                    mPageInfo.mContentSize = mPageInfo.mPageSize;
+                }
+                if (mPageInfo.mInitialTransform == null) {
+                    mPageInfo.mInitialTransform = new Matrix();
+                }
+                return mPageInfo;
+            }
+        }
+    }
+
+    /**
+     * This class represents a PDF document page. It has associated
+     * a canvas on which you can draw content and is acquired by a
+     * call to {@link #getCanvas()}. It also has associated a
+     * {@link PageInfo} instance that describes its attributes.
+     */
+    public static final class Page {
+        private final PageInfo mPageInfo;
+        private Canvas mCanvas;
+
+        /**
+         * Creates a new instance.
+         *
+         * @param canvas The canvas of the page.
+         * @param pageInfo The info with meta-data.
+         */
+        private Page(Canvas canvas, PageInfo pageInfo) {
+            mCanvas = canvas;
+            mPageInfo = pageInfo;
+        }
+
+        /**
+         * Gets the {@link Canvas} of the page.
+         *
+         * @return The canvas if the page is not finished, null otherwise.
+         *
+         * @see PdfDocument#finishPage(Page)
+         */
+        public Canvas getCanvas() {
+            return mCanvas;
+        }
+
+        /**
+         * Gets the {@link PageInfo} with meta-data for the page.
+         *
+         * @return The page info.
+         *
+         * @see PdfDocument#finishPage(Page)
+         */
+        public PageInfo getInfo() {
+            return mPageInfo;
+        }
+
+        private void finish() {
+            if (mCanvas != null) {
+                mCanvas.release();
+                mCanvas = null;
+            }
+        }
+    }
+}
diff --git a/core/java/android/printservice/IPrintService.aidl b/core/java/android/printservice/IPrintService.aidl
new file mode 100644
index 0000000..eabd96d
--- /dev/null
+++ b/core/java/android/printservice/IPrintService.aidl
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.printservice;
+
+import android.os.ICancellationSignal;
+import android.print.PrintJobInfo;
+import android.print.PrinterId;
+import android.printservice.IPrintServiceClient;
+
+/**
+ * Top-level interface to a print service component.
+ *
+ * @hide
+ */
+oneway interface IPrintService {
+    void setClient(IPrintServiceClient client);
+    void requestCancelPrintJob(in PrintJobInfo printJob);
+    void onPrintJobQueued(in PrintJobInfo printJob);
+    void startPrinterDiscovery();
+    void stopPrinterDiscovery();
+}
diff --git a/core/java/android/printservice/IPrintServiceClient.aidl b/core/java/android/printservice/IPrintServiceClient.aidl
new file mode 100644
index 0000000..cff8c02
--- /dev/null
+++ b/core/java/android/printservice/IPrintServiceClient.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.printservice;
+
+import android.os.ParcelFileDescriptor;
+import android.print.PrintJobInfo;
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+
+/**
+ * The top-level interface from a print service to the system.
+ *
+ * @hide
+ */
+interface IPrintServiceClient {
+    List<PrintJobInfo> getPrintJobs();
+    PrintJobInfo getPrintJob(int printJobId);
+    boolean setPrintJobState(int printJobId, int status);
+    boolean setPrintJobTag(int printJobId, String tag);
+    oneway void writePrintJobData(in ParcelFileDescriptor fd, int printJobId);
+    oneway void addDiscoveredPrinters(in List<PrinterInfo> printers);
+    oneway void removeDiscoveredPrinters(in List<PrinterId> printers);
+}
diff --git a/core/java/android/printservice/PrintJob.java b/core/java/android/printservice/PrintJob.java
new file mode 100644
index 0000000..9688761
--- /dev/null
+++ b/core/java/android/printservice/PrintJob.java
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.printservice;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.PrintJobInfo;
+import android.util.Log;
+
+/**
+ * This class represents a print job from the perspective of a
+ * print service. It provides APIs for observing the print job
+ * state and performing operations on the print job.
+ */
+public final class PrintJob {
+
+    private static final String LOG_TAG = "PrintJob";
+
+    private final int mId;
+
+    private final IPrintServiceClient mPrintServiceClient;
+
+    private PrintJobInfo mCachedInfo;
+
+    PrintJob(PrintJobInfo info, IPrintServiceClient client) {
+        if (client == null) {
+            throw new IllegalStateException("Print serivice not connected!");
+        }
+        mCachedInfo = info;
+        mId = info.getId();
+        mPrintServiceClient = client;
+    }
+
+    /**
+     * Gets the unique print job id.
+     *
+     * @return The id.
+     */
+    public int getId() {
+        return mId;
+    }
+
+    /**
+     * Gets the {@link PrintJobInfo} that describes this job.
+     * <p>
+     * <strong>Node:</strong>The returned info object is a snapshot of the
+     * current print job state. Every call to this method returns a fresh
+     * info object that reflects the current print jobs state.
+     * </p>
+     *
+     * @return The print job info.
+     */
+    public PrintJobInfo getInfo() {
+        PrintJobInfo info = null;
+        try {
+            info = mPrintServiceClient.getPrintJob(mId);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Couldn't get info for job: " + mId, re);
+        }
+        if (info != null) {
+            mCachedInfo = info;
+        }
+        return mCachedInfo;
+    }
+
+    /**
+     * Gets whether this print job is queued. Such a print job is
+     * ready to be printed and can be started.
+     *
+     * @return Whether the print job is queued.
+     *
+     * @see #start()
+     */
+    public boolean isQueued() {
+        return getInfo().getState() == PrintJobInfo.STATE_QUEUED;
+    }
+
+    /**
+     * Gets whether this print job is started. Such a print job is
+     * being printed and can be completed or canceled or failed.
+     *
+     * @return Whether the print job is started.
+     *
+     * @see #complete()
+     * @see #cancel()
+     * @see #fail()
+     */
+    public boolean isStarted() {
+        return  getInfo().getState() == PrintJobInfo.STATE_STARTED;
+    }
+
+    /**
+     * Starts the print job. You should call this method if {@link
+     * #isQueued()} returns true and you started printing.
+     *
+     * @return Whether the job as started.
+     *
+     * @see #isQueued()
+     */
+    public boolean start() {
+        if (isQueued()) {
+            return setState(PrintJobInfo.STATE_STARTED);
+        }
+        return false;
+    }
+
+    /**
+     * Completes the print job. You should call this method if {@link
+     * #isStarted()} returns true and you are done printing.
+     *
+     * @return Whether the job as completed.
+     *
+     * @see #isStarted()
+     */
+    public boolean complete() {
+        if (isStarted()) {
+            return setState(PrintJobInfo.STATE_COMPLETED);
+        }
+        return false;
+    }
+
+    /**
+     * Fails the print job. You should call this method if {@link
+     * #isStarted()} returns true you filed while printing.
+     *
+     * @return Whether the job as failed.
+     *
+     * @see #isStarted()
+     */
+    public boolean fail(CharSequence error) {
+        // TODO: Propagate the error message to the UI.
+        if (isStarted()) {
+            return setState(PrintJobInfo.STATE_FAILED);
+        }
+        return false;
+    }
+
+    /**
+     * Cancels the print job. You should call this method if {@link
+     * #isStarted()} returns true and you canceled the print job as a
+     * response to a call to {@link PrintService#onRequestCancelPrintJob(
+     * PrintJob)}.
+     *
+     * @return Whether the job as canceled.
+     *
+     * @see #isStarted()
+     */
+    public boolean cancel() {
+        if (isStarted()) {
+            return setState(PrintJobInfo.STATE_CANCELED);
+        }
+        return false;
+    }
+
+    /**
+     * Sets a tag that is valid in the context of a {@link PrintService}
+     * and is not interpreted by the system. For example, a print service
+     * may set as a tag the key of the print job returned by a remote
+     * print server, if the printing is off handed to a cloud based service.
+     *
+     * @param tag The tag.
+     * @return True if the tag was set, false otherwise.
+     */
+    public boolean setTag(String tag) {
+        try {
+            return mPrintServiceClient.setPrintJobTag(mId, tag);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error setting tag for job:" + mId, re);
+        }
+        return false;
+    }
+
+    /**
+     * Gets the data associated with this print job. It is a responsibility of
+     * the print service to open a stream to the returned file descriptor
+     * and fully read the content.
+     *
+     * @return A file descriptor for reading the data or <code>null</code>.
+     */
+    public final FileDescriptor getData() {
+        ParcelFileDescriptor source = null;
+        ParcelFileDescriptor sink = null;
+        try {
+            ParcelFileDescriptor[] fds = ParcelFileDescriptor.createPipe();
+            source = fds[0];
+            sink = fds[1];
+            mPrintServiceClient.writePrintJobData(sink, mId);
+            return source.getFileDescriptor();
+        } catch (IOException ioe) {
+            Log.e(LOG_TAG, "Error calling getting print job data!", ioe);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error calling getting print job data!", re);
+        } finally {
+            if (sink != null) {
+                try {
+                    sink.close();
+                } catch (IOException ioe) {
+                    /* ignore */
+                }
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PrintJob other = (PrintJob) obj;
+        return (mId == other.mId);
+    }
+
+    @Override
+    public int hashCode() {
+        return mId;
+    }
+
+    private boolean setState(int state) {
+        // Best effort - update the state of the cached info since
+        // we may not be able to re-fetch it later if the job gets
+        // removed from the spooler.
+        mCachedInfo.setState(state);
+        try {
+            return mPrintServiceClient.setPrintJobState(mId, state);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error setting the state of job:" + mId, re);
+        }
+        return false;
+    }
+}
diff --git a/core/java/android/printservice/PrintService.java b/core/java/android/printservice/PrintService.java
new file mode 100644
index 0000000..d5cadc0
--- /dev/null
+++ b/core/java/android/printservice/PrintService.java
@@ -0,0 +1,462 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.printservice;
+
+import android.app.Service;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.print.PrintJobInfo;
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <p>
+ * This is the base class for implementing print services. A print service
+ * knows how to discover and interact one or more printers via one or more
+ * protocols.
+ * </p>
+ * <h3>Printer discovery</h3>
+ * <p>
+ * A print service is responsible for discovering and reporting printers.
+ * A printer discovery period starts with a call to
+ * {@link #onStartPrinterDiscovery()} and ends with a call to
+ * {@link #onStopPrinterDiscovery()}. During a printer discovery
+ * period the print service reports newly discovered printers by
+ * calling {@link #addDiscoveredPrinters(List)} and added printers
+ * that disappeared by calling {@link #removeDiscoveredPrinters(List)}.
+ * Calls to {@link #addDiscoveredPrinters(List)} and
+ * {@link #removeDiscoveredPrinters(List)} before a call to
+ * {@link #onStartPrinterDiscovery()} and after a call to
+ * {@link #onStopPrinterDiscovery()} is a no-op.
+ * </p>
+ * <p>
+ * For every printer discovery period all printers have to be added. Each
+ * printer known to this print service should be added only once during a
+ * discovery period, unless it was added and then removed before that.
+ * Only an already added printer can be removed.
+ * </p>
+ * <h3>Print jobs</h3>
+ * <p>
+ * When a new print job targeted to the printers managed by this print
+ * service is queued, i.e. ready for processing by the print service,
+ * a call to {@link #onPrintJobQueued(PrintJob)} is made and the print
+ * service may handle it immediately or schedule that for an appropriate
+ * time in the future. The list of all print jobs for this service
+ * are be available by calling {@link #getPrintJobs()}. A queued print
+ * job is in a {@link PrintJobInfo#STATE_QUEUED} state.
+ * </p>
+ * <p>
+ * A print service is responsible for setting the print job state as
+ * appropriate while processing it. Initially, a print job is in a
+ * {@link PrintJobInfo#STATE_QUEUED} state which means that the data to
+ * be printed is spooled by the system and the print service can obtain
+ * that data by calling {@link PrintJob#getData()}. After the print
+ * service starts printing the data it should set the print job state
+ * to {@link PrintJobInfo#STATE_STARTED}. Upon successful completion, the
+ * print job state has to be set to {@link PrintJobInfo#STATE_COMPLETED}.
+ * In a case of a failure, the print job state should be set to
+ * {@link PrintJobInfo#STATE_FAILED}. If a print job is in a
+ * {@link PrintJobInfo#STATE_STARTED} state and the user requests to
+ * cancel it, the print service will receive a call to
+ * {@link #onRequestCancelPrintJob(PrintJob)} which requests from the
+ * service to do a best effort in canceling the job. In case the job
+ * is successfully canceled, its state has to be set to
+ * {@link PrintJobInfo#STATE_CANCELED}.
+ * </p>
+ * <h3>Lifecycle</h3>
+ * <p>
+ * The lifecycle of a print service is managed exclusively by the system
+ * and follows the established service lifecycle. Additionally, starting
+ * or stopping a print service is triggered exclusively by an explicit
+ * user action through enabling or disabling it in the device settings.
+ * After the system binds to a print service, it calls {@link #onConnected()}.
+ * This method can be overriden by clients to perform post binding setup.
+ * Also after the system unbinds from a print service, it calls
+ * {@link #onDisconnected()}. This method can be overriden by clients to
+ * perform post unbinding cleanup.
+ * </p>
+ * <h3>Declaration</h3>
+ * <p>
+ * A print service is declared as any other service in an AndroidManifest.xml
+ * but it must also specify that it handles the {@link android.content.Intent}
+ * with action {@link #SERVICE_INTERFACE}. Failure to declare this intent
+ * will cause the system to ignore the print service. Additionally, a print
+ * service must request the {@link android.Manifest.permission#BIND_PRINT_SERVICE}
+ * permission to ensure that only the system can bind to it. Failure to
+ * declare this intent will cause the system to ignore the print service.
+ * Following is an example declaration:
+ * </p>
+ * <pre>
+ * &lt;service android:name=".MyPrintService"
+ *         android:permission="android.permission.BIND_PRINT_SERVICE"&gt;
+ *     &lt;intent-filter&gt;
+ *         &lt;action android:name="android.printservice.PrintService" /&gt;
+ *     &lt;/intent-filter&gt;
+ *     . . .
+ * &lt;/service&gt;
+ * </pre>
+ * <h3>Configuration</h3>
+ * <p>
+ * A print service can be configured by specifying an optional settings
+ * activity which exposes service specific options, an optional add
+ * prints activity which is used for manual addition of printers, etc.
+ * It is a responsibility of the system to launch the settings and add
+ * printers activities when appropriate.
+ * </p>
+ * <p>
+ * A print service is configured by providing a
+ * {@link #SERVICE_META_DATA meta-data} entry in the manifest when declaring
+ * the service. A service declaration with a meta-data tag is presented
+ * below:
+ * <pre> &lt;service android:name=".MyPrintService"
+ *         android:permission="android.permission.BIND_PRINT_SERVICE"&gt;
+ *     &lt;intent-filter&gt;
+ *         &lt;action android:name="android.printservice.PrintService" /&gt;
+ *     &lt;/intent-filter&gt;
+ *     &lt;meta-data android:name="android.printservice" android:resource="@xml/printservice" /&gt;
+ * &lt;/service&gt;</pre>
+ * </p>
+ * <p>
+ * For more details refer to {@link #SERVICE_META_DATA} and
+ * <code>&lt;{@link android.R.styleable#PrintService print-service}&gt;</code>.
+ * </p>
+ */
+public abstract class PrintService extends Service {
+
+    private static final String LOG_TAG = PrintService.class.getSimpleName();
+
+    /**
+     * The {@link Intent} action that must be declared as handled by a service
+     * in its manifest to allow the system to recognize it as a print service.
+     */
+    public static final String SERVICE_INTERFACE = "android.printservice.PrintService";
+
+    /**
+     * Name under which a PrintService component publishes additional information
+     * about itself. This meta-data must reference an XML resource containing a
+     * <code>&lt;{@link android.R.styleable#PrintService print-service}&gt;</code>
+     * tag. This is a a sample XML file configuring a print service:
+     * <pre> &lt;print-service
+     *     android:settingsActivity="foo.bar.MySettingsActivity"
+     *     andorid:addPrintersActivity="foo.bar.MyAddPrintersActivity."
+     *     . . .
+     * /&gt;</pre>
+     */
+    public static final String SERVICE_META_DATA = "android.printservice";
+
+    private final Object mLock = new Object();
+
+    private Handler mHandler;
+
+    private IPrintServiceClient mClient;
+
+    private boolean mDiscoveringPrinters;
+
+    @Override
+    protected void attachBaseContext(Context base) {
+        super.attachBaseContext(base);
+        mHandler = new MyHandler(base.getMainLooper());
+    }
+
+    /**
+     * The system has connected to this service.
+     */
+    protected void onConnected() {
+        /* do nothing */
+    }
+
+    /**
+     * The system has disconnected from this service.
+     */
+    protected void onDisconnected() {
+        /* do nothing */
+    }
+
+    /**
+     * Callback requesting from this service to start printer discovery.
+     * At the end of the printer discovery period the system will call
+     * {@link #onStopPrinterDiscovery(). Discovered printers should be
+     * reported by calling #addDiscoveredPrinters(List) and reported ones
+     * that disappear should be reported by calling
+     * {@link #removeDiscoveredPrinters(List)}.
+     *
+     * @see #onStopPrinterDiscovery()
+     * @see #addDiscoveredPrinters(List)
+     * @see #removeDiscoveredPrinters(List)
+     */
+    protected abstract void onStartPrinterDiscovery();
+
+    /**
+     * Callback requesting from this service to stop printer discovery.
+     *
+     * @see #onStartPrinterDiscovery()
+     * @see #addDiscoveredPrinters(List)
+     * @see #removeDiscoveredPrinters(List)
+     */
+    protected abstract void onStopPrinterDiscovery();
+
+    /**
+     * Adds discovered printers. This method should be called during a
+     * printer discovery period, i.e. after a call to
+     * {@link #onStartPrinterDiscovery()} and before the corresponding
+     * call to {@link #onStopPrinterDiscovery()}, otherwise it does nothing.
+     * <p>
+     * <strong>Note:</strong> For every printer discovery period all
+     * printers have to be added. You can call this method as many times as
+     * necessary during the discovery period but should not pass in already
+     * added printers. If a printer is already added in the same printer
+     * discovery period, it will be ignored.
+     * </p>
+     *
+     * @param printers A list with discovered printers.
+     *
+     * @throws IllegalStateException If this service is not connected.
+     *
+     * @see #removeDiscoveredPrinters(List)
+     * @see #onStartPrinterDiscovery()
+     * @see #onStopPrinterDiscovery()
+     */
+    public final void addDiscoveredPrinters(List<PrinterInfo> printers) {
+        synchronized (mLock) {
+            if (mClient == null) {
+                throw new IllegalStateException("Print serivice not connected!");
+            }
+            if (mDiscoveringPrinters) {
+                try {
+                    // Calling with a lock into the system is fine.
+                    mClient.addDiscoveredPrinters(printers);
+                } catch (RemoteException re) {
+                    Log.e(LOG_TAG, "Error adding discovered printers!", re);
+                }
+            }
+        }
+    }
+
+    /**
+     * Removes discovered printers given their ids. This method should be called
+     * during a printer discovery period, i.e. after a call to
+     * {@link #onStartPrinterDiscovery()} and before the corresponding
+     * call to {@link #onStopPrinterDiscovery()}, otherwise it does nothing.
+     * <p>
+     * For every printer discovery period all printers have to be added. You
+     * should remove only printers that were added in this printer discovery
+     * period by a call to {@link #addDiscoveredPrinters(List)}. You can call
+     * this method as many times as necessary during the discovery period
+     * but should not pass in already removed printer ids. If a printer with
+     * a given id is already removed in the same discovery period, it will
+     * be ignored.
+     * </p>
+     *
+     * @param printerIds A list with disappeared printer ids.
+     *
+     * @throws IllegalStateException If this service is not connected.
+     *
+     * @see #addDiscoveredPrinters(List)
+     * @see #onStartPrinterDiscovery()
+     * @see #onStopPrinterDiscovery()
+     */
+    public final void removeDiscoveredPrinters(List<PrinterId> printerIds) {
+        synchronized (mLock) {
+            if (mClient == null) {
+                throw new IllegalStateException("Print serivice not connected!");
+            }
+            if (mDiscoveringPrinters) {
+                try {
+                    // Calling with a lock into the system is fine.
+                    mClient.removeDiscoveredPrinters(printerIds);
+                } catch (RemoteException re) {
+                    Log.e(LOG_TAG, "Error removing discovered printers!", re);
+                }
+            }
+        }
+    }
+
+    /**
+     * Called when canceling of a print job is requested. The service
+     * should do best effort to fulfill the request. After the print
+     * job is canceled it state has to be set to
+     * {@link PrintJobInfo#STATE_CANCELED}.
+     *
+     * @param printJob The print job to be canceled.
+     */
+    protected void onRequestCancelPrintJob(PrintJob printJob) {
+    }
+
+    /**
+     * Called when there is a queued print job for one of the printers
+     * managed by this print service. A queued print job is ready for
+     * processing by a print service which can get the data to be printed
+     * by calling {@link PrintJob#getData()}. This service may start
+     * processing the passed in print job or schedule handling of queued
+     * print jobs at a convenient time. The service can get the print
+     * jobs by a call to {@link #getPrintJobs()} and examine their state
+     * to find the ones with state {@link PrintJobInfo#STATE_QUEUED}.
+     *
+     * @param printJob The new queued print job.
+     *
+     * @see #getPrintJobs()
+     */
+    protected abstract void onPrintJobQueued(PrintJob printJob);
+
+    /**
+     * Gets the print jobs for the printers managed by this service.
+     *
+     * @return The print jobs.
+     *
+     * @throws IllegalStateException If this service is not connected.
+     */
+    public final List<PrintJob> getPrintJobs() {
+        synchronized (mLock) {
+            if (mClient == null) {
+                throw new IllegalStateException("Print serivice not connected!");
+            }
+            try {
+                List<PrintJob> printJobs = null;
+                List<PrintJobInfo> printJobInfos = mClient.getPrintJobs();
+                if (printJobInfos != null) {
+                    final int printJobInfoCount = printJobInfos.size();
+                    printJobs = new ArrayList<PrintJob>(printJobInfoCount);
+                    for (int i = 0; i < printJobInfoCount; i++) {
+                        printJobs.add(new PrintJob(printJobInfos.get(i), mClient));
+                    }
+                }
+                if (printJobs != null) {
+                    return printJobs;
+                }
+            } catch (RemoteException re) {
+                Log.e(LOG_TAG, "Error calling getPrintJobs()", re);
+            }
+            return Collections.emptyList();
+        }
+    }
+
+    /**
+     * Generates a global printer id from a local id. The local id is unique
+     * only within this print service.
+     *
+     * @param localId The local id.
+     * @return Global printer id.
+     */
+    public final PrinterId generatePrinterId(String localId) {
+        return new PrinterId(new ComponentName(getPackageName(),
+                getClass().getName()), localId);
+    }
+
+    @Override
+    public final IBinder onBind(Intent intent) {
+        return new IPrintService.Stub() {
+            @Override
+            public void setClient(IPrintServiceClient client) {
+                mHandler.obtainMessage(MyHandler.MESSAGE_SET_CLEINT, client).sendToTarget();
+            }
+
+            @Override
+            public void startPrinterDiscovery() {
+                mHandler.sendEmptyMessage(MyHandler.MESSAGE_START_PRINTER_DISCOVERY);
+            }
+
+            @Override
+            public void stopPrinterDiscovery() {
+                mHandler.sendEmptyMessage(MyHandler.MESSAGE_STOP_PRINTER_DISCOVERY);
+            }
+
+            @Override
+            public void requestCancelPrintJob(PrintJobInfo printJob) {
+                mHandler.obtainMessage(MyHandler.MESSAGE_CANCEL_PRINTJOB, printJob).sendToTarget();
+            }
+
+            @Override
+            public void onPrintJobQueued(PrintJobInfo printJob) {
+                mHandler.obtainMessage(MyHandler.MESSAGE_ON_PRINTJOB_QUEUED,
+                        printJob).sendToTarget();
+            }
+        };
+    }
+
+    private final class MyHandler extends Handler {
+        public static final int MESSAGE_START_PRINTER_DISCOVERY = 1;
+        public static final int MESSAGE_STOP_PRINTER_DISCOVERY = 2;
+        public static final int MESSAGE_CANCEL_PRINTJOB = 3;
+        public static final int MESSAGE_ON_PRINTJOB_QUEUED = 4;
+        public static final int MESSAGE_SET_CLEINT = 5;
+
+        public MyHandler(Looper looper) {
+            super(looper, null, true);
+        }
+
+        @Override
+        public void handleMessage(Message message) {
+            final int action = message.what;
+            switch (action) {
+                case MESSAGE_START_PRINTER_DISCOVERY: {
+                    synchronized (mLock) {
+                        mDiscoveringPrinters = true;
+                    }
+                    onStartPrinterDiscovery();
+                } break;
+
+                case MESSAGE_STOP_PRINTER_DISCOVERY: {
+                    synchronized (mLock) {
+                        mDiscoveringPrinters = false;
+                    }
+                    onStopPrinterDiscovery();
+                } break;
+
+                case MESSAGE_CANCEL_PRINTJOB: {
+                    PrintJobInfo printJob = (PrintJobInfo) message.obj;
+                    onRequestCancelPrintJob(new PrintJob(printJob, mClient));
+                } break;
+
+                case MESSAGE_ON_PRINTJOB_QUEUED: {
+                    PrintJobInfo printJob = (PrintJobInfo) message.obj;
+                    onPrintJobQueued(new PrintJob(printJob, mClient));
+                } break;
+
+                case MESSAGE_SET_CLEINT: {
+                    IPrintServiceClient client = (IPrintServiceClient) message.obj;
+                    synchronized (mLock) {
+                        mClient = client;
+                        if (client == null) {
+                            mDiscoveringPrinters = false;
+                        }
+                    }
+                    if (client != null) {
+                        onConnected();
+                     } else {
+                        onStopPrinterDiscovery();
+                        onDisconnected();
+                    }
+                } break;
+
+                default: {
+                    throw new IllegalArgumentException("Unknown message: " + action);
+                }
+            }
+        }
+    }
+}
diff --git a/core/java/android/printservice/PrintServiceInfo.aidl b/core/java/android/printservice/PrintServiceInfo.aidl
new file mode 100644
index 0000000..95b67f2
--- /dev/null
+++ b/core/java/android/printservice/PrintServiceInfo.aidl
@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 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.
+ */
+
+package android.printservice;
+
+parcelable PrintServiceInfo;
diff --git a/core/java/android/printservice/PrintServiceInfo.java b/core/java/android/printservice/PrintServiceInfo.java
new file mode 100644
index 0000000..0370a25
--- /dev/null
+++ b/core/java/android/printservice/PrintServiceInfo.java
@@ -0,0 +1,267 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.printservice;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.Xml;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+
+/**
+ * This class describes a {@link PrintService}. A print service knows
+ * how to communicate with one or more printers over one or more protocols
+ * and exposes printers for use by the applications via the platform print
+ * APIs.
+ *
+ * @see PrintService
+ * @see android.print.PrintManager
+ *
+ * @hide
+ */
+public final class PrintServiceInfo implements Parcelable {
+
+    private static final boolean DEBUG = false;
+
+    private static final String LOG_TAG = PrintServiceInfo.class.getSimpleName();
+
+    private static final String TAG_PRINT_SERVICE = "print-service";
+
+    private final String mId;
+
+    private final ResolveInfo mResolveInfo;
+
+    private final String mSettingsActivityName;
+
+    private final String mAddPrintersActivityName;
+
+    /**
+     * Creates a new instance.
+     *
+     * @hide
+     */
+    public PrintServiceInfo(Parcel parcel) {
+        mId = parcel.readString();
+        mResolveInfo = parcel.readParcelable(null);
+        mSettingsActivityName = parcel.readString();
+        mAddPrintersActivityName = parcel.readString();
+    }
+
+    /**
+     * Creates a new instance.
+     *
+     * @param resolveInfo The service resolve info.
+     * @param settingsActivityName Optional settings activity name.
+     * @param addPrintersActivityName Optional add printers activity name.
+     */
+    public PrintServiceInfo(ResolveInfo resolveInfo, String settingsActivityName,
+            String addPrintersActivityName) {
+        mId = new ComponentName(resolveInfo.serviceInfo.packageName,
+                resolveInfo.serviceInfo.name).flattenToString();
+        mResolveInfo = resolveInfo;
+        mSettingsActivityName = settingsActivityName;
+        mAddPrintersActivityName = addPrintersActivityName;
+    }
+
+    /**
+     * Creates a new instance.
+     *
+     * @param resolveInfo The service resolve info.
+     * @param context Context for accessing resources.
+     * @throws XmlPullParserException If a XML parsing error occurs.
+     * @throws IOException If a I/O error occurs.
+     * @hide
+     */
+    public static PrintServiceInfo create(ResolveInfo resolveInfo, Context context) {
+        String settingsActivityName = null;
+        String addPrintersActivityName = null;
+
+        XmlResourceParser parser = null;
+        PackageManager packageManager = context.getPackageManager();
+        parser = resolveInfo.serviceInfo.loadXmlMetaData(packageManager,
+                PrintService.SERVICE_META_DATA);
+        if (parser != null) {
+            try {
+                int type = 0;
+                while (type != XmlPullParser.END_DOCUMENT && type != XmlPullParser.START_TAG) {
+                    type = parser.next();
+                }
+
+                String nodeName = parser.getName();
+                if (!TAG_PRINT_SERVICE.equals(nodeName)) {
+                    throw new XmlPullParserException(
+                            "Meta-data does not start with" + TAG_PRINT_SERVICE + " tag");
+                }
+
+                Resources resources = packageManager.getResourcesForApplication(
+                        resolveInfo.serviceInfo.applicationInfo);
+                AttributeSet allAttributes = Xml.asAttributeSet(parser);
+                TypedArray attributes = resources.obtainAttributes(allAttributes,
+                        com.android.internal.R.styleable.PrintService);
+
+                settingsActivityName = attributes.getString(
+                        com.android.internal.R.styleable.PrintService_settingsActivity);
+
+                addPrintersActivityName = attributes.getString(
+                        com.android.internal.R.styleable.PrintService_addPrintersActivity);
+
+                attributes.recycle();
+            } catch (IOException ioe) {
+                Log.w(LOG_TAG, "Error reading meta-data:" + ioe);
+            } catch (XmlPullParserException xppe) {
+                Log.w(LOG_TAG, "Error reading meta-data:" + xppe);
+            } catch (NameNotFoundException e) {
+                Log.e(LOG_TAG, "Unable to load resources for: "
+                        + resolveInfo.serviceInfo.packageName);
+            } finally {
+                if (parser != null) {
+                    parser.close();
+                }
+            }
+        }
+
+        return new PrintServiceInfo(resolveInfo, settingsActivityName, addPrintersActivityName);
+    }
+
+    /**
+     * The accessibility service id.
+     * <p>
+     * <strong>Generated by the system.</strong>
+     * </p>
+     *
+     * @return The id.
+     */
+    public String getId() {
+        return mId;
+    }
+
+    /**
+     * The service {@link ResolveInfo}.
+     *
+     * @return The info.
+     */
+    public ResolveInfo getResolveInfo() {
+        return mResolveInfo;
+    }
+
+    /**
+     * The settings activity name.
+     * <p>
+     * <strong>Statically set from
+     * {@link PrintService#SERVICE_META_DATA meta-data}.</strong>
+     * </p>
+     *
+     * @return The settings activity name.
+     */
+    public String getSettingsActivityName() {
+        return mSettingsActivityName;
+    }
+
+    /**
+     * The add printers activity name.
+     * <p>
+     * <strong>Statically set from
+     * {@link PrintService#SERVICE_META_DATA meta-data}.</strong>
+     * </p>
+     *
+     * @return The add printers activity name.
+     */
+    public String getAddPrintersActivityName() {
+        return mAddPrintersActivityName;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public int describeContents() {
+        return 0;
+    }
+
+    public void writeToParcel(Parcel parcel, int flagz) {
+        parcel.writeString(mId);
+        parcel.writeParcelable(mResolveInfo, 0);
+        parcel.writeString(mSettingsActivityName);
+        parcel.writeString(mAddPrintersActivityName);
+    }
+
+    @Override
+    public int hashCode() {
+        return 31 * 1 + ((mId == null) ? 0 : mId.hashCode());
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PrintServiceInfo other = (PrintServiceInfo) obj;
+        if (mId == null) {
+            if (other.mId != null) {
+                return false;
+            }
+        } else if (!mId.equals(other.mId)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder builder = new StringBuilder();
+        builder.append("PrintServiceInfo{");
+        builder.append("id:").append(mId).append(", ");
+        builder.append("resolveInfo:").append(mResolveInfo).append(", ");
+        if (DEBUG) {
+            builder.append("settingsActivityName:").append(mSettingsActivityName);
+            builder.append("addPrintersActivityName:").append(mAddPrintersActivityName);
+        } else if (mSettingsActivityName != null || mAddPrintersActivityName != null) {
+            builder.append("<has meta-data>");
+        }
+        builder.append("}");
+        return builder.toString();
+    }
+
+    public static final Parcelable.Creator<PrintServiceInfo> CREATOR =
+            new Parcelable.Creator<PrintServiceInfo>() {
+        public PrintServiceInfo createFromParcel(Parcel parcel) {
+            return new PrintServiceInfo(parcel);
+        }
+
+        public PrintServiceInfo[] newArray(int size) {
+            return new PrintServiceInfo[size];
+        }
+    };
+}
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 5dca67f..9d52c83 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -137,6 +137,22 @@
         public static final String NUMBER = "number";
 
         /**
+         * The number presenting rules set by the network for "allowed",
+         * "payphone", "restricted" or "unknown".
+         * <P>Type: INTEGER</P>
+         */
+        public static final String NUMBER_PRESENTATION = "presentation";
+
+        /** Number is allowed to display for caller id. */
+        public static final int PRESENTATION_ALLOWED = 1;
+        /** Number is blocked by user. */
+        public static final int PRESENTATION_RESTRICTED = 2;
+        /** Number is not specified or unknown by network. */
+        public static final int PRESENTATION_UNKNOWN = 3;
+        /** Number is a pay phone. */
+        public static final int PRESENTATION_PAYPHONE = 4;
+
+        /**
          * The ISO 3166-1 two letters country code of the country where the
          * user received or made the call.
          * <P>
@@ -267,7 +283,8 @@
          * if the contact is unknown.
          * @param context the context used to get the ContentResolver
          * @param number the phone number to be added to the calls db
-         * @param presentation the number presenting rules set by the network for
+         * @param presentation enum value from PhoneConstants.PRESENTATION_xxx, which
+         *        is set by the network and denotes the number presenting rules for
          *        "allowed", "payphone", "restricted" or "unknown"
          * @param callType enumerated values for "incoming", "outgoing", or "missed"
          * @param start time stamp for the call in milliseconds
@@ -278,24 +295,32 @@
         public static Uri addCall(CallerInfo ci, Context context, String number,
                 int presentation, int callType, long start, int duration) {
             final ContentResolver resolver = context.getContentResolver();
+            int numberPresentation = PRESENTATION_ALLOWED;
 
-            // If this is a private number then set the number to Private, otherwise check
-            // if the number field is empty and set the number to Unavailable
+            // Remap network specified number presentation types
+            // PhoneConstants.PRESENTATION_xxx to calllog number presentation types
+            // Calls.PRESENTATION_xxx, in order to insulate the persistent calllog
+            // from any future radio changes.
+            // If the number field is empty set the presentation type to Unknown.
             if (presentation == PhoneConstants.PRESENTATION_RESTRICTED) {
-                number = CallerInfo.PRIVATE_NUMBER;
-                if (ci != null) ci.name = "";
+                numberPresentation = PRESENTATION_RESTRICTED;
             } else if (presentation == PhoneConstants.PRESENTATION_PAYPHONE) {
-                number = CallerInfo.PAYPHONE_NUMBER;
-                if (ci != null) ci.name = "";
+                numberPresentation = PRESENTATION_PAYPHONE;
             } else if (TextUtils.isEmpty(number)
                     || presentation == PhoneConstants.PRESENTATION_UNKNOWN) {
-                number = CallerInfo.UNKNOWN_NUMBER;
-                if (ci != null) ci.name = "";
+                numberPresentation = PRESENTATION_UNKNOWN;
+            }
+            if (numberPresentation != PRESENTATION_ALLOWED) {
+                number = "";
+                if (ci != null) {
+                    ci.name = "";
+                }
             }
 
-            ContentValues values = new ContentValues(5);
+            ContentValues values = new ContentValues(6);
 
             values.put(NUMBER, number);
+            values.put(NUMBER_PRESENTATION, Integer.valueOf(numberPresentation));
             values.put(TYPE, Integer.valueOf(callType));
             values.put(DATE, Long.valueOf(start));
             values.put(DURATION, Long.valueOf(duration));
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index c1a296d..5dae599 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3508,6 +3508,13 @@
         public static final String LONG_PRESS_TIMEOUT = "long_press_timeout";
 
         /**
+         * List of the enabled print providers.
+         * @hide
+         */
+        public static final String ENABLED_PRINT_SERVICES =
+            "enabled_print_services";
+
+        /**
          * Setting to always use the default text-to-speech settings regardless
          * of the application settings.
          * 1 = override application settings,
@@ -4089,6 +4096,9 @@
          */
         public static final String DIALPAD_AUTOCOMPLETE = "dialpad_autocomplete";
 
+        /** @hide */
+        public static final String BAR_SERVICE_COMPONENT = "bar_service_component";
+
         /**
          * This are the settings to be backed up.
          *
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 578a86e..b808363 100644
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -561,7 +561,8 @@
      *            The context this instance is running in.
      * @param listener
      *            The {@link TextToSpeech.OnInitListener} that will be called when the
-     *            TextToSpeech engine has initialized.
+     *            TextToSpeech engine has initialized. In a case of a failure the listener
+     *            may be called immediately, before TextToSpeech instance is fully constructed.
      */
     public TextToSpeech(Context context, OnInitListener listener) {
         this(context, listener, null);
@@ -575,7 +576,8 @@
      *            The context this instance is running in.
      * @param listener
      *            The {@link TextToSpeech.OnInitListener} that will be called when the
-     *            TextToSpeech engine has initialized.
+     *            TextToSpeech engine has initialized. In a case of a failure the listener
+     *            may be called immediately, before TextToSpeech instance is fully constructed.
      * @param engine Package name of the TTS engine to use.
      */
     public TextToSpeech(Context context, OnInitListener listener, String engine) {
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 1291279..e7d6fda 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -474,6 +474,8 @@
                 mLineCount < mMaximumVisibleLineCount) {
             // Log.e("text", "output last " + bufEnd);
 
+            measured.setPara(source, bufStart, bufEnd, textDir);
+
             paint.getFontMetricsInt(fm);
 
             v = out(source,
@@ -482,7 +484,7 @@
                     v,
                     spacingmult, spacingadd, null,
                     null, fm, false,
-                    needMultiply, null, DEFAULT_DIR, true, bufEnd,
+                    needMultiply, measured.mLevels, measured.mDir, measured.mEasy, bufEnd,
                     includepad, trackpad, null,
                     null, bufStart, ellipsize,
                     ellipsizedWidth, 0, paint, false);
diff --git a/core/java/android/util/ArrayMap.java b/core/java/android/util/ArrayMap.java
index 4bd9b37..26bcce4 100644
--- a/core/java/android/util/ArrayMap.java
+++ b/core/java/android/util/ArrayMap.java
@@ -550,6 +550,43 @@
         return result;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This implementation composes a string by iterating over its mappings. If
+     * this map contains itself as a key or a value, the string "(this Map)"
+     * will appear in its place.
+     */
+    @Override
+    public String toString() {
+        if (isEmpty()) {
+            return "{}";
+        }
+
+        StringBuilder buffer = new StringBuilder(mSize * 28);
+        buffer.append('{');
+        for (int i=0; i<mSize; i++) {
+            if (i > 0) {
+                buffer.append(", ");
+            }
+            Object key = keyAt(i);
+            if (key != this) {
+                buffer.append(key);
+            } else {
+                buffer.append("(this Map)");
+            }
+            buffer.append('=');
+            Object value = valueAt(i);
+            if (value != this) {
+                buffer.append(value);
+            } else {
+                buffer.append("(this Map)");
+            }
+        }
+        buffer.append('}');
+        return buffer.toString();
+    }
+
     // ------------------------------------------------------------------------
     // Interop with traditional Java containers.  Not as efficient as using
     // specialized collection APIs.
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index a84c47c..2d3380e 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -493,6 +493,36 @@
         return result;
     }
 
+    /**
+     * {@inheritDoc}
+     *
+     * <p>This implementation composes a string by iterating over its values. If
+     * this set contains itself as a value, the string "(this Set)"
+     * will appear in its place.
+     */
+    @Override
+    public String toString() {
+        if (isEmpty()) {
+            return "{}";
+        }
+
+        StringBuilder buffer = new StringBuilder(mSize * 14);
+        buffer.append('{');
+        for (int i=0; i<mSize; i++) {
+            if (i > 0) {
+                buffer.append(", ");
+            }
+            Object value = valueAt(i);
+            if (value != this) {
+                buffer.append(value);
+            } else {
+                buffer.append("(this Set)");
+            }
+        }
+        buffer.append('}');
+        return buffer.toString();
+    }
+
     // ------------------------------------------------------------------------
     // Interop with traditional Java containers.  Not as efficient as using
     // specialized collection APIs.
diff --git a/core/java/android/util/TimedRemoteCaller.java b/core/java/android/util/TimedRemoteCaller.java
new file mode 100644
index 0000000..abb2b64
--- /dev/null
+++ b/core/java/android/util/TimedRemoteCaller.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.util;
+
+import android.os.SystemClock;
+
+import java.util.concurrent.TimeoutException;
+
+/**
+ * This is a helper class for making an async one way call and
+ * its async one way response response in a sync fashion within
+ * a timeout. The key idea is to call the remote method with a
+ * sequence number and a callback and then starting to wait for
+ * the response. The remote method calls back with the result and
+ * the sequence number. If the response comes within the timeout
+ * and its sequence number is the one sent in the method invocation,
+ * then the call succeeded. If the response does not come within
+ * the timeout then the call failed. Older result received when
+ * waiting for the result are ignored.
+ * <p>
+ * Typical usage is:
+ * </p>
+ * <p><pre><code>
+ * public class MyMethodCaller extends TimeoutRemoteCallHelper<Object> {
+ *     // The one way remote method to call.
+ *     private final IRemoteInterface mTarget;
+ *
+ *     // One way callback invoked when the remote method is done.
+ *     private final IRemoteCallback mCallback = new IRemoteCallback.Stub() {
+ *         public void onCompleted(Object result, int sequence) {
+ *             onRemoteMethodResult(result, sequence);
+ *         }
+ *     };
+ *
+ *     public MyMethodCaller(IRemoteInterface target) {
+ *         mTarget = target;
+ *     }
+ *
+ *     public Object onCallMyMethod(Object arg) throws RemoteException {
+ *         final int sequence = onBeforeRemoteCall();
+ *         mTarget.myMethod(arg, sequence);
+ *         return getResultTimed(sequence);
+ *     }
+ * }
+ * </code></pre></p>
+ *
+ * @param <T> The type of the expected result.
+ *
+ * @hide
+ */
+public abstract class TimedRemoteCaller<T> {
+
+    public static final long DEFAULT_CALL_TIMEOUT_MILLIS = 5000;
+
+    private static final int UNDEFINED_SEQUENCE = -1;
+
+    private final Object mLock = new Object();
+
+    private final long mCallTimeoutMillis;
+
+    private int mSequenceCounter;
+
+    private int mReceivedSequence = UNDEFINED_SEQUENCE;
+
+    private int mAwaitedSequence = UNDEFINED_SEQUENCE;
+
+    private T mResult;
+
+    public TimedRemoteCaller(long callTimeoutMillis) {
+        mCallTimeoutMillis = callTimeoutMillis;
+    }
+
+    public final int onBeforeRemoteCall() {
+        synchronized (mLock) {
+            mAwaitedSequence = mSequenceCounter++;
+            return mAwaitedSequence;
+        }
+    }
+
+    public final T getResultTimed(int sequence) throws TimeoutException {
+        synchronized (mLock) {
+            final boolean success = waitForResultTimedLocked(sequence);
+            if (!success) {
+                throw new TimeoutException("No reponse for sequence: " + sequence);
+            }
+            T result = mResult;
+            mResult = null;
+            return result;
+        }
+    }
+
+    public final void onRemoteMethodResult(T result, int sequence) {
+        synchronized (mLock) {
+            if (sequence == mAwaitedSequence) {
+                mReceivedSequence = sequence;
+                mResult = result;
+                mLock.notifyAll();
+            }
+        }
+    }
+
+    private boolean waitForResultTimedLocked(int sequence) {
+        final long startMillis = SystemClock.uptimeMillis();
+        while (true) {
+            try {
+                if (mReceivedSequence == sequence) {
+                    return true;
+                }
+                final long elapsedMillis = SystemClock.uptimeMillis() - startMillis;
+                final long waitMillis = mCallTimeoutMillis - elapsedMillis;
+                if (waitMillis <= 0) {
+                    return false;
+                }
+                mLock.wait(waitMillis);
+            } catch (InterruptedException ie) {
+                /* ignore */
+            }
+        }
+    }
+}
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index 03428c7..bcefdba 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -1301,7 +1301,10 @@
 
         void destroySurface() {
             if (mEglSurface != null && mEglSurface != EGL_NO_SURFACE) {
-                sEgl.eglMakeCurrent(sEglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+                if (mEglSurface.equals(sEgl.eglGetCurrentSurface(EGL_DRAW))) {
+                    sEgl.eglMakeCurrent(sEglDisplay,
+                            EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+                }
                 sEgl.eglDestroySurface(sEglDisplay, mEglSurface);
                 mEglSurface = null;
             }
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index d3f9174..a40582b 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -4426,8 +4426,10 @@
     /**
      * Quick invalidation method that simply transforms the dirty rect into the parent's
      * coordinate system, pruning the invalidation if the parent has already been invalidated.
+     *
+     * @hide
      */
-    private ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
+    protected ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
         if ((mPrivateFlags & PFLAG_DRAWN) == PFLAG_DRAWN ||
                 (mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == PFLAG_DRAWING_CACHE_VALID) {
             dirty.offset(left - mScrollX, top - mScrollY);
diff --git a/core/java/android/view/ViewOverlay.java b/core/java/android/view/ViewOverlay.java
index 2d86bfe..975931a 100644
--- a/core/java/android/view/ViewOverlay.java
+++ b/core/java/android/view/ViewOverlay.java
@@ -300,6 +300,17 @@
             }
         }
 
+        /**
+         * @hide
+         */
+        @Override
+        protected ViewParent invalidateChildInParentFast(int left, int top, Rect dirty) {
+            if (mHostView instanceof ViewGroup) {
+                return ((ViewGroup) mHostView).invalidateChildInParentFast(left, top, dirty);
+            }
+            return null;
+        }
+
         @Override
         public ViewParent invalidateChildInParent(int[] location, Rect dirty) {
             if (mHostView != null) {
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index e4471d8..93c6d6e 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -923,9 +923,14 @@
     }
 
     void disposeResizeBuffer() {
-        if (mResizeBuffer != null) {
-            mResizeBuffer.destroy();
-            mResizeBuffer = null;
+        if (mResizeBuffer != null && mAttachInfo.mHardwareRenderer != null) {
+            mAttachInfo.mHardwareRenderer.safelyRun(new Runnable() {
+                @Override
+                public void run() {
+                    mResizeBuffer.destroy();
+                    mResizeBuffer = null;
+                }
+            });
         }
     }
 
@@ -1466,8 +1471,7 @@
                             if (mResizeBuffer != null) {
                                 mResizeBuffer.end(hwRendererCanvas);
                                 if (!completed) {
-                                    mResizeBuffer.destroy();
-                                    mResizeBuffer = null;
+                                    disposeResizeBuffer();
                                 }
                             }
                         }
diff --git a/core/java/android/view/transition/AutoTransition.java b/core/java/android/view/transition/AutoTransition.java
index d94cf2c..7ddac7e 100644
--- a/core/java/android/view/transition/AutoTransition.java
+++ b/core/java/android/view/transition/AutoTransition.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 /**
diff --git a/core/java/android/view/transition/Crossfade.java b/core/java/android/view/transition/Crossfade.java
index a40d0bf..7cfba70 100644
--- a/core/java/android/view/transition/Crossfade.java
+++ b/core/java/android/view/transition/Crossfade.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -139,18 +140,20 @@
     }
 
     @Override
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
+    protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
         if (startValues == null || endValues == null) {
-            return false;
+            return null;
         }
         final View view = endValues.view;
         Map<String, Object> startVals = startValues.values;
         Map<String, Object> endVals = endValues.values;
+        Rect startBounds = (Rect) startVals.get(PROPNAME_BOUNDS);
+        Rect endBounds = (Rect) endVals.get(PROPNAME_BOUNDS);
         Bitmap startBitmap = (Bitmap) startVals.get(PROPNAME_BITMAP);
         Bitmap endBitmap = (Bitmap) endVals.get(PROPNAME_BITMAP);
-        Drawable startDrawable = (Drawable) startVals.get(PROPNAME_DRAWABLE);
-        Drawable endDrawable = (Drawable) endVals.get(PROPNAME_DRAWABLE);
+        final BitmapDrawable startDrawable = (BitmapDrawable) startVals.get(PROPNAME_DRAWABLE);
+        final BitmapDrawable endDrawable = (BitmapDrawable) endVals.get(PROPNAME_DRAWABLE);
         if (Transition.DBG) {
             Log.d(LOG_TAG, "StartBitmap.sameAs(endBitmap) = " + startBitmap.sameAs(endBitmap) +
                     " for start, end: " + startBitmap + ", " + endBitmap);
@@ -162,80 +165,62 @@
                 overlay.add(endDrawable);
             }
             overlay.add(startDrawable);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    @Override
-    protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues) {
-        if (startValues == null || endValues == null) {
-            return null;
-        }
-        Map<String, Object> startVals = startValues.values;
-        Map<String, Object> endVals = endValues.values;
-
-        final View view = endValues.view;
-        Rect startBounds = (Rect) startVals.get(PROPNAME_BOUNDS);
-        Rect endBounds = (Rect) endVals.get(PROPNAME_BOUNDS);
-        final BitmapDrawable startDrawable = (BitmapDrawable) startVals.get(PROPNAME_DRAWABLE);
-        final BitmapDrawable endDrawable = (BitmapDrawable) endVals.get(PROPNAME_DRAWABLE);
-
-        // The transition works by placing the end drawable under the start drawable and
-        // gradually fading out the start drawable. So it's not really a cross-fade, but rather
-        // a reveal of the end scene over time. Also, animate the bounds of both drawables
-        // to mimic the change in the size of the view itself between scenes.
-        ObjectAnimator anim = ObjectAnimator.ofInt(startDrawable, "alpha", 0);
-        anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
-            @Override
-            public void onAnimationUpdate(ValueAnimator animation) {
-                // TODO: some way to auto-invalidate views based on drawable changes? callbacks?
-                view.invalidate(startDrawable.getBounds());
+            // The transition works by placing the end drawable under the start drawable and
+            // gradually fading out the start drawable. So it's not really a cross-fade, but rather
+            // a reveal of the end scene over time. Also, animate the bounds of both drawables
+            // to mimic the change in the size of the view itself between scenes.
+            ObjectAnimator anim = ObjectAnimator.ofInt(startDrawable, "alpha", 0);
+            anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+                @Override
+                public void onAnimationUpdate(ValueAnimator animation) {
+                    // TODO: some way to auto-invalidate views based on drawable changes? callbacks?
+                    view.invalidate(startDrawable.getBounds());
+                }
+            });
+            ObjectAnimator anim1 = null;
+            if (mFadeBehavior == FADE_BEHAVIOR_CROSSFADE) {
+                anim1 = ObjectAnimator.ofFloat(view, View.ALPHA, 0, 1);
             }
-        });
-        ObjectAnimator anim1 = null;
-        if (mFadeBehavior == FADE_BEHAVIOR_CROSSFADE) {
-            anim1 = ObjectAnimator.ofFloat(view, View.ALPHA, 0, 1);
-        }
-        if (Transition.DBG) {
-            Log.d(LOG_TAG, "Crossfade: created anim " + anim + " for start, end values " +
-                    startValues + ", " + endValues);
-        }
-        anim.addListener(new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                ViewOverlay overlay = (mFadeBehavior == FADE_BEHAVIOR_REVEAL) ?
-                        view.getOverlay() : ((ViewGroup) view.getParent()).getOverlay();
-                overlay.remove(startDrawable);
-                if (mFadeBehavior == FADE_BEHAVIOR_REVEAL) {
-                    overlay.remove(endDrawable);
+            if (Transition.DBG) {
+                Log.d(LOG_TAG, "Crossfade: created anim " + anim + " for start, end values " +
+                        startValues + ", " + endValues);
+            }
+            anim.addListener(new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    ViewOverlay overlay = (mFadeBehavior == FADE_BEHAVIOR_REVEAL) ?
+                            view.getOverlay() : ((ViewGroup) view.getParent()).getOverlay();
+                    overlay.remove(startDrawable);
+                    if (mFadeBehavior == FADE_BEHAVIOR_REVEAL) {
+                        overlay.remove(endDrawable);
+                    }
+                }
+            });
+            AnimatorSet set = new AnimatorSet();
+            set.playTogether(anim);
+            if (anim1 != null) {
+                set.playTogether(anim1);
+            }
+            if (mResizeBehavior == RESIZE_BEHAVIOR_SCALE && !startBounds.equals(endBounds)) {
+                if (Transition.DBG) {
+                    Log.d(LOG_TAG, "animating from startBounds to endBounds: " +
+                            startBounds + ", " + endBounds);
+                }
+                Animator anim2 = ObjectAnimator.ofObject(startDrawable, "bounds",
+                        sRectEvaluator, startBounds, endBounds);
+                set.playTogether(anim2);
+                if (mResizeBehavior == RESIZE_BEHAVIOR_SCALE) {
+                    // TODO: How to handle resizing with a CROSSFADE (vs. REVEAL) effect
+                    // when we are animating the view directly?
+                    Animator anim3 = ObjectAnimator.ofObject(endDrawable, "bounds",
+                            sRectEvaluator, startBounds, endBounds);
+                    set.playTogether(anim3);
                 }
             }
-        });
-        AnimatorSet set = new AnimatorSet();
-        set.playTogether(anim);
-        if (anim1 != null) {
-            set.playTogether(anim1);
+            return set;
+        } else {
+            return null;
         }
-        if (mResizeBehavior == RESIZE_BEHAVIOR_SCALE && !startBounds.equals(endBounds)) {
-            if (Transition.DBG) {
-                Log.d(LOG_TAG, "animating from startBounds to endBounds: " +
-                        startBounds + ", " + endBounds);
-            }
-            Animator anim2 = ObjectAnimator.ofObject(startDrawable, "bounds",
-                    sRectEvaluator, startBounds, endBounds);
-            set.playTogether(anim2);
-            if (mResizeBehavior == RESIZE_BEHAVIOR_SCALE) {
-                // TODO: How to handle resizing with a CROSSFADE (vs. REVEAL) effect
-                // when we are animating the view directly?
-                Animator anim3 = ObjectAnimator.ofObject(endDrawable, "bounds",
-                        sRectEvaluator, startBounds, endBounds);
-                set.playTogether(anim3);
-            }
-        }
-        return set;
     }
 
     @Override
diff --git a/core/java/android/view/transition/Fade.java b/core/java/android/view/transition/Fade.java
index 8e4909d..3c5b6fa 100644
--- a/core/java/android/view/transition/Fade.java
+++ b/core/java/android/view/transition/Fade.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -32,6 +33,8 @@
 public class Fade extends Visibility {
 
     private static final String LOG_TAG = "Fade";
+    private static final String PROPNAME_SCREEN_X = "android:fade:screenX";
+    private static final String PROPNAME_SCREEN_Y = "android:fade:screenY";
 
     /**
      * Fading mode used in {@link #Fade(int)} to make the transition
@@ -81,37 +84,40 @@
     }
 
     @Override
-    protected boolean preAppear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
-        if ((mFadingMode & IN) != IN) {
-            return false;
-        }
-        endView.setAlpha(0);
-        return true;
+    protected void captureValues(TransitionValues values, boolean start) {
+        super.captureValues(values, start);
+        int[] loc = new int[2];
+        values.view.getLocationOnScreen(loc);
+        values.values.put(PROPNAME_SCREEN_X, loc[0]);
+        values.values.put(PROPNAME_SCREEN_Y, loc[1]);
     }
 
     @Override
-    protected Animator appear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
+    protected Animator appear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
+        View endView = (endValues != null) ? endValues.view : null;
         if ((mFadingMode & IN) != IN) {
             return null;
         }
-        // TODO: hack - retain original value from before preAppear
+        endView.setAlpha(0);
         return runAnimation(endView, 0, 1, null);
-        // TODO: end listener to make sure we end at 1 no matter what
     }
 
     @Override
-    protected boolean preDisappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
+    protected Animator disappear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
         if ((mFadingMode & OUT) != OUT) {
-            return false;
+            return null;
         }
+        View view;
+        View startView = (startValues != null) ? startValues.view : null;
+        View endView = (endValues != null) ? endValues.view : null;
         if (Transition.DBG) {
             Log.d(LOG_TAG, "Fade.predisappear: startView, startVis, endView, endVis = " +
                         startView + ", " + startVisibility + ", " + endView + ", " + endVisibility);
         }
-        View view;
         View overlayView = null;
         View viewToKeep = null;
         if (endView == null) {
@@ -134,76 +140,66 @@
                 }
             }
         }
+        final int finalVisibility = endVisibility;
         // TODO: add automatic facility to Visibility superclass for keeping views around
         if (overlayView != null) {
             // TODO: Need to do this for general case of adding to overlay
+            int screenX = (Integer) startValues.values.get(PROPNAME_SCREEN_X);
+            int screenY = (Integer) startValues.values.get(PROPNAME_SCREEN_Y);
+            int[] loc = new int[2];
+            sceneRoot.getLocationOnScreen(loc);
+            overlayView.offsetLeftAndRight((screenX - loc[0]) - overlayView.getLeft());
+            overlayView.offsetTopAndBottom((screenY - loc[1]) - overlayView.getTop());
             sceneRoot.getOverlay().add(overlayView);
-            return true;
+            // TODO: add automatic facility to Visibility superclass for keeping views around
+            final float startAlpha = view.getAlpha();
+            float endAlpha = 0;
+            final View finalView = view;
+            final View finalOverlayView = overlayView;
+            final View finalViewToKeep = viewToKeep;
+            final ViewGroup finalSceneRoot = sceneRoot;
+            final Animator.AnimatorListener endListener = new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    finalView.setAlpha(startAlpha);
+                    // TODO: restore view offset from overlay repositioning
+                    if (finalViewToKeep != null) {
+                        finalViewToKeep.setVisibility(finalVisibility);
+                    }
+                    if (finalOverlayView != null) {
+                        finalSceneRoot.getOverlay().remove(finalOverlayView);
+                    }
+                }
+            };
+            return runAnimation(view, startAlpha, endAlpha, endListener);
         }
         if (viewToKeep != null) {
             // TODO: find a different way to do this, like just changing the view to be
             // VISIBLE for the duration of the transition
             viewToKeep.setVisibility((View.VISIBLE));
-            return true;
-        }
-        return false;
-    }
-
-    @Override
-    protected Animator disappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
-        if ((mFadingMode & OUT) != OUT) {
-            return null;
-        }
-        if (Transition.DBG) {
-            Log.d(LOG_TAG, "Fade.disappear: startView, startVis, endView, endVis = " +
-                startView + ", " + startVisibility + ", " + endView + ", " + endVisibility);
-        }
-        View view;
-        View overlayView = null;
-        View viewToKeep = null;
-        final int finalVisibility = endVisibility;
-        if (endView == null) {
-            // view was removed: add the start view to the Overlay
-            view = startView;
-            overlayView = view;
-        } else {
-            // visibility change
-            if (endVisibility == View.INVISIBLE) {
-                view = endView;
-                viewToKeep = view;
-            } else {
-                // Becoming GONE
-                if (startView == endView) {
-                    view = endView;
-                    viewToKeep = view;
-                } else {
-                    view = startView;
-                    overlayView = view;
+            // TODO: add automatic facility to Visibility superclass for keeping views around
+            final float startAlpha = view.getAlpha();
+            float endAlpha = 0;
+            final View finalView = view;
+            final View finalOverlayView = overlayView;
+            final View finalViewToKeep = viewToKeep;
+            final ViewGroup finalSceneRoot = sceneRoot;
+            final Animator.AnimatorListener endListener = new AnimatorListenerAdapter() {
+                @Override
+                public void onAnimationEnd(Animator animation) {
+                    finalView.setAlpha(startAlpha);
+                    // TODO: restore view offset from overlay repositioning
+                    if (finalViewToKeep != null) {
+                        finalViewToKeep.setVisibility(finalVisibility);
+                    }
+                    if (finalOverlayView != null) {
+                        finalSceneRoot.getOverlay().remove(finalOverlayView);
+                    }
                 }
-            }
+            };
+            return runAnimation(view, startAlpha, endAlpha, endListener);
         }
-        // TODO: add automatic facility to Visibility superclass for keeping views around
-        final float startAlpha = view.getAlpha();
-        float endAlpha = 0;
-        final View finalView = view;
-        final View finalOverlayView = overlayView;
-        final View finalViewToKeep = viewToKeep;
-        final ViewGroup finalSceneRoot = sceneRoot;
-        final Animator.AnimatorListener endListener = new AnimatorListenerAdapter() {
-            @Override
-            public void onAnimationEnd(Animator animation) {
-                finalView.setAlpha(startAlpha);
-                // TODO: restore view offset from overlay repositioning
-                if (finalViewToKeep != null) {
-                    finalViewToKeep.setVisibility(finalVisibility);
-                }
-                if (finalOverlayView != null) {
-                    finalSceneRoot.getOverlay().remove(finalOverlayView);
-                }
-            }
-        };
-        return runAnimation(view, startAlpha, endAlpha, endListener);
+        return null;
     }
 
 }
\ No newline at end of file
diff --git a/core/java/android/view/transition/Move.java b/core/java/android/view/transition/Move.java
index 1d05419..ceda5a5 100644
--- a/core/java/android/view/transition/Move.java
+++ b/core/java/android/view/transition/Move.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -83,24 +84,21 @@
         if (startValues == null || endValues == null) {
             return null;
         }
-        final View view = endValues.view;
-        if (view.getParent() == null) {
-            // TODO: Might want to make it possible to Move an disappearing view.
-            // This workaround is here because if a parallel Fade is not running on the view
-            // Then it won't get added to the hierarchy and the animator below will not fire,
-            // causing the transition to not end
-            return null;
-        }
-        // TODO: need to handle non-VG case?
-        ViewGroup startParent = (ViewGroup) startValues.values.get(PROPNAME_PARENT);
-        ViewGroup endParent = (ViewGroup) endValues.values.get(PROPNAME_PARENT);
+        Map<String, Object> startParentVals = startValues.values;
+        Map<String, Object> endParentVals = endValues.values;
+        ViewGroup startParent = (ViewGroup) startParentVals.get(PROPNAME_PARENT);
+        ViewGroup endParent = (ViewGroup) endParentVals.get(PROPNAME_PARENT);
         if (startParent == null || endParent == null) {
             return null;
         }
+        final View view = endValues.view;
         boolean parentsEqual = (startParent == endParent) ||
                 (startParent.getId() == endParent.getId());
+        // TODO: Might want reparenting to be separate/subclass transition, or at least
+        // triggered by a property on Move. Otherwise, we're forcing the requirement that
+        // all parents in layouts have IDs to avoid layout-inflation resulting in a side-effect
+        // of reparenting the views.
         if (!mReparent || parentsEqual) {
-            // Common case - view belongs to the same layout before/after. Just animate its bounds
             Rect startBounds = (Rect) startValues.values.get(PROPNAME_BOUNDS);
             Rect endBounds = (Rect) endValues.values.get(PROPNAME_BOUNDS);
             int startLeft = startBounds.left;
@@ -117,13 +115,6 @@
             int endHeight = endBottom - endTop;
             int numChanges = 0;
             if (startWidth != 0 && startHeight != 0 && endWidth != 0 && endHeight != 0) {
-                if (Transition.DBG) {
-                    Log.v(LOG_TAG, "Target = " + endValues.view);
-                    Log.v(LOG_TAG, "    start bounds: " + startLeft + ", " + startTop + ", " +
-                            startRight + ", " + startBottom);
-                    Log.v(LOG_TAG, "    end bounds: " + endLeft + ", " + endTop + ", " +
-                            endRight + ", " + endBottom);
-                }
                 if (startLeft != endLeft) ++numChanges;
                 if (startTop != endTop) ++numChanges;
                 if (startRight != endRight) ++numChanges;
@@ -133,6 +124,10 @@
                 if (!mResizeClip) {
                     PropertyValuesHolder pvh[] = new PropertyValuesHolder[numChanges];
                     int pvhIndex = 0;
+                    if (startLeft != endLeft) view.setLeft(startLeft);
+                    if (startTop != endTop) view.setTop(startTop);
+                    if (startRight != endRight) view.setRight(startRight);
+                    if (startBottom != endBottom) view.setBottom(startBottom);
                     if (startLeft != endLeft) {
                         pvh[pvhIndex++] = PropertyValuesHolder.ofInt("left", startLeft, endLeft);
                     }
@@ -160,6 +155,13 @@
                     }
                     return anim;
                 } else {
+                    if (startWidth != endWidth) view.setRight(endLeft +
+                            Math.max(startWidth, endWidth));
+                    if (startHeight != endHeight) view.setBottom(endTop +
+                            Math.max(startHeight, endHeight));
+                    // TODO: don't clobber TX/TY
+                    if (startLeft != endLeft) view.setTranslationX(startLeft - endLeft);
+                    if (startTop != endTop) view.setTranslationY(startTop - endTop);
                     // Animate location with translationX/Y and size with clip bounds
                     float transXDelta = endLeft - startLeft;
                     float transYDelta = endTop - startTop;
@@ -206,71 +208,6 @@
                 }
             }
         } else {
-            return (ObjectAnimator) endValues.values.get("drawableAnim");
-        }
-        return null;
-    }
-
-    @Override
-    protected boolean prePlay(final ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues) {
-        if (startValues == null || endValues == null) {
-            return false;
-        }
-        Map<String, Object> startParentVals = startValues.values;
-        Map<String, Object> endParentVals = endValues.values;
-        ViewGroup startParent = (ViewGroup) startParentVals.get(PROPNAME_PARENT);
-        ViewGroup endParent = (ViewGroup) endParentVals.get(PROPNAME_PARENT);
-        if (startParent == null || endParent == null) {
-            return false;
-        }
-        final View view = endValues.view;
-        boolean parentsEqual = (startParent == endParent) ||
-                (startParent.getId() == endParent.getId());
-        // TODO: Might want reparenting to be separate/subclass transition, or at least
-        // triggered by a property on Move. Otherwise, we're forcing the requirement that
-        // all parents in layouts have IDs to avoid layout-inflation resulting in a side-effect
-        // of reparenting the views.
-        if (!mReparent || parentsEqual) {
-            Rect startBounds = (Rect) startValues.values.get(PROPNAME_BOUNDS);
-            Rect endBounds = (Rect) endValues.values.get(PROPNAME_BOUNDS);
-            int startLeft = startBounds.left;
-            int endLeft = endBounds.left;
-            int startTop = startBounds.top;
-            int endTop = endBounds.top;
-            int startRight = startBounds.right;
-            int endRight = endBounds.right;
-            int startBottom = startBounds.bottom;
-            int endBottom = endBounds.bottom;
-            int startWidth = startRight - startLeft;
-            int startHeight = startBottom - startTop;
-            int endWidth = endRight - endLeft;
-            int endHeight = endBottom - endTop;
-            int numChanges = 0;
-            if (startWidth != 0 && startHeight != 0 && endWidth != 0 && endHeight != 0) {
-                if (startLeft != endLeft) ++numChanges;
-                if (startTop != endTop) ++numChanges;
-                if (startRight != endRight) ++numChanges;
-                if (startBottom != endBottom) ++numChanges;
-            }
-            if (numChanges > 0) {
-                if (!mResizeClip) {
-                    if (startLeft != endLeft) view.setLeft(startLeft);
-                    if (startTop != endTop) view.setTop(startTop);
-                    if (startRight != endRight) view.setRight(startRight);
-                    if (startBottom != endBottom) view.setBottom(startBottom);
-                } else {
-                    if (startWidth != endWidth) view.setRight(endLeft +
-                            Math.max(startWidth, endWidth));
-                    if (startHeight != endHeight) view.setBottom(endTop +
-                            Math.max(startHeight, endHeight));
-                    // TODO: don't clobber TX/TY
-                    if (startLeft != endLeft) view.setTranslationX(startLeft - endLeft);
-                    if (startTop != endTop) view.setTranslationY(startTop - endTop);
-                }
-                return true;
-            }
-        } else {
             int startX = (Integer) startValues.values.get(PROPNAME_WINDOW_X);
             int startY = (Integer) startValues.values.get(PROPNAME_WINDOW_Y);
             int endX = (Integer) endValues.values.get(PROPNAME_WINDOW_X);
@@ -285,14 +222,14 @@
                 final BitmapDrawable drawable = new BitmapDrawable(bitmap);
                 view.setVisibility(View.INVISIBLE);
                 sceneRoot.getOverlay().add(drawable);
-                Rect startBounds = new Rect(startX - tempLocation[0], startY - tempLocation[1],
+                Rect startBounds1 = new Rect(startX - tempLocation[0], startY - tempLocation[1],
                         startX - tempLocation[0] + view.getWidth(),
                         startY - tempLocation[1] + view.getHeight());
-                Rect endBounds = new Rect(endX - tempLocation[0], endY - tempLocation[1],
+                Rect endBounds1 = new Rect(endX - tempLocation[0], endY - tempLocation[1],
                         endX - tempLocation[0] + view.getWidth(),
                         endY - tempLocation[1] + view.getHeight());
                 ObjectAnimator anim = ObjectAnimator.ofObject(drawable, "bounds",
-                        sRectEvaluator, startBounds, endBounds);
+                        sRectEvaluator, startBounds1, endBounds1);
                 anim.addListener(new AnimatorListenerAdapter() {
                     @Override
                     public void onAnimationEnd(Animator animation) {
@@ -300,10 +237,9 @@
                         view.setVisibility(View.VISIBLE);
                     }
                 });
-                endParentVals.put("drawableAnim", anim);
-                return true;
+                return anim;
             }
         }
-        return false;
+        return null;
     }
 }
diff --git a/core/java/android/view/transition/Recolor.java b/core/java/android/view/transition/Recolor.java
index 45407e1..e4858c4 100644
--- a/core/java/android/view/transition/Recolor.java
+++ b/core/java/android/view/transition/Recolor.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -50,10 +51,10 @@
     }
 
     @Override
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
+    protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
         if (startValues == null || endValues == null) {
-            return false;
+            return null;
         }
         final View view = endValues.view;
         Drawable startBackground = (Drawable) startValues.values.get(PROPNAME_BACKGROUND);
@@ -65,6 +66,8 @@
             if (startColor.getColor() != endColor.getColor()) {
                 endColor.setColor(startColor.getColor());
                 changed = true;
+                return ObjectAnimator.ofObject(endBackground, "color",
+                        new ArgbEvaluator(), startColor.getColor(), endColor.getColor());
             }
         }
         if (view instanceof TextView) {
@@ -74,46 +77,10 @@
             if (start != end) {
                 textView.setTextColor(end);
                 changed = true;
-            }
-        }
-        return changed;
-    }
-
-    @Override
-    protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues) {
-        if (startValues == null || endValues == null) {
-            return null;
-        }
-        ObjectAnimator anim = null;
-        final View view = endValues.view;
-        Map<String, Object> startVals = startValues.values;
-        Map<String, Object> endVals = endValues.values;
-        Drawable startBackground = (Drawable) startVals.get(PROPNAME_BACKGROUND);
-        Drawable endBackground = (Drawable) endVals.get(PROPNAME_BACKGROUND);
-        if (startBackground instanceof ColorDrawable && endBackground instanceof ColorDrawable) {
-            ColorDrawable startColor = (ColorDrawable) startBackground;
-            ColorDrawable endColor = (ColorDrawable) endBackground;
-            if (startColor.getColor() != endColor.getColor()) {
-                anim = ObjectAnimator.ofObject(endBackground, "color",
-                        new ArgbEvaluator(), startColor.getColor(), endColor.getColor());
-                if (getStartDelay() > 0) {
-                    endColor.setColor(startColor.getColor());
-                }
-            }
-        }
-        if (view instanceof TextView) {
-            TextView textView = (TextView) view;
-            int start = (Integer) startValues.values.get(PROPNAME_TEXT_COLOR);
-            int end = (Integer) endValues.values.get(PROPNAME_TEXT_COLOR);
-            if (start != end) {
-                anim = ObjectAnimator.ofObject(textView, "textColor",
+                return ObjectAnimator.ofObject(textView, "textColor",
                         new ArgbEvaluator(), start, end);
-                if (getStartDelay() > 0) {
-                    textView.setTextColor(end);
-                }
             }
         }
-        return anim;
+        return null;
     }
 }
diff --git a/core/java/android/view/transition/Rotate.java b/core/java/android/view/transition/Rotate.java
index b42fbe5..d35a6dc7 100644
--- a/core/java/android/view/transition/Rotate.java
+++ b/core/java/android/view/transition/Rotate.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -34,22 +35,6 @@
     }
 
     @Override
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues) {
-        if (startValues == null || endValues == null) {
-            return false;
-        }
-        final View view = endValues.view;
-        float startRotation = (Float) startValues.values.get(PROPNAME_ROTATION);
-        float endRotation = (Float) endValues.values.get(PROPNAME_ROTATION);
-        if (startRotation != endRotation) {
-            view.setRotation(startRotation);
-            return true;
-        }
-        return false;
-    }
-
-    @Override
     protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
         if (startValues == null || endValues == null) {
@@ -59,6 +44,7 @@
         float startRotation = (Float) startValues.values.get(PROPNAME_ROTATION);
         float endRotation = (Float) endValues.values.get(PROPNAME_ROTATION);
         if (startRotation != endRotation) {
+            view.setRotation(startRotation);
             return ObjectAnimator.ofFloat(view, View.ROTATION,
                     startRotation, endRotation);
         }
diff --git a/core/java/android/view/transition/Scene.java b/core/java/android/view/transition/Scene.java
index 62cb9d3..cf3eadb 100644
--- a/core/java/android/view/transition/Scene.java
+++ b/core/java/android/view/transition/Scene.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.content.Context;
diff --git a/core/java/android/view/transition/Slide.java b/core/java/android/view/transition/Slide.java
index 8630ee2..b2f5db5 100644
--- a/core/java/android/view/transition/Slide.java
+++ b/core/java/android/view/transition/Slide.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -36,8 +37,11 @@
     private static final TimeInterpolator sDecelerator = new DecelerateInterpolator();
 
     @Override
-    protected Animator appear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
+    protected Animator appear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
+        View endView = (endValues != null) ? endValues.view : null;
+        endView.setTranslationY(-2 * endView.getHeight());
         ObjectAnimator anim = ObjectAnimator.ofFloat(endView, View.TRANSLATION_Y,
                 -2 * endView.getHeight(), 0);
         anim.setInterpolator(sDecelerator);
@@ -45,22 +49,11 @@
     }
 
     @Override
-    protected boolean preAppear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
-        endView.setTranslationY(-2 * endView.getHeight());
-        return true;
-    }
-
-    @Override
-    protected boolean preDisappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
+    protected Animator disappear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
+        View startView = (startValues != null) ? startValues.view : null;
         startView.setTranslationY(0);
-        return true;
-    }
-
-    @Override
-    protected Animator disappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
         ObjectAnimator anim = ObjectAnimator.ofFloat(startView, View.TRANSLATION_Y, 0,
                 -2 * startView.getHeight());
         anim.setInterpolator(sAccelerator);
diff --git a/core/java/android/view/transition/TextChange.java b/core/java/android/view/transition/TextChange.java
index ac2852c..f033e63 100644
--- a/core/java/android/view/transition/TextChange.java
+++ b/core/java/android/view/transition/TextChange.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -46,24 +47,6 @@
     }
 
     @Override
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues) {
-        if (startValues == null || endValues == null || !(endValues.view instanceof TextView)) {
-            return false;
-        }
-        final TextView view = (TextView) endValues.view;
-        Map<String, Object> startVals = startValues.values;
-        Map<String, Object> endVals = endValues.values;
-        String startText = (String) startVals.get(PROPNAME_TEXT);
-        String endText = (String) endVals.get(PROPNAME_TEXT);
-        if (!startText.equals(endText)) {
-            view.setText(startText);
-            return true;
-        }
-        return false;
-    }
-
-    @Override
     protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
         if (startValues == null || endValues == null || !(endValues.view instanceof TextView)) {
@@ -72,11 +55,10 @@
         final TextView view = (TextView) endValues.view;
         Map<String, Object> startVals = startValues.values;
         Map<String, Object> endVals = endValues.values;
-        final String startText = (String) startVals.get(PROPNAME_TEXT);
+        String startText = (String) startVals.get(PROPNAME_TEXT);
         final String endText = (String) endVals.get(PROPNAME_TEXT);
         if (!startText.equals(endText)) {
-            // This noop animation is just used to keep the text in its start state
-            // until the transition ends
+            view.setText(startText);
             ValueAnimator anim = ValueAnimator.ofFloat(0, 1);
             anim.addListener(new AnimatorListenerAdapter() {
                 @Override
diff --git a/core/java/android/view/transition/Transition.java b/core/java/android/view/transition/Transition.java
index 205c825..2cffd26 100644
--- a/core/java/android/view/transition/Transition.java
+++ b/core/java/android/view/transition/Transition.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
@@ -20,6 +21,7 @@
 import android.animation.TimeInterpolator;
 import android.util.ArrayMap;
 import android.util.LongSparseArray;
+import android.util.Pair;
 import android.util.SparseArray;
 import android.view.SurfaceView;
 import android.view.TextureView;
@@ -52,7 +54,7 @@
  * with TextureView because they rely on {@link ViewOverlay} functionality,
  * which does not currently work with TextureView.</p>
  */
-public abstract class Transition {
+public abstract class Transition implements Cloneable {
 
     private static final String LOG_TAG = "Transition";
     static final boolean DBG = false;
@@ -62,18 +64,14 @@
     TimeInterpolator mInterpolator = null;
     int[] mTargetIds;
     View[] mTargets;
-    private ArrayMap<View, TransitionValues> mStartValues =
-            new ArrayMap<View, TransitionValues>();
-    private SparseArray<TransitionValues> mStartIdValues = new SparseArray<TransitionValues>();
-    private LongSparseArray<TransitionValues> mStartItemIdValues =
-            new LongSparseArray<TransitionValues>();
-    private ArrayMap<View, TransitionValues> mEndValues =
-            new ArrayMap<View, TransitionValues>();
-    private SparseArray<TransitionValues> mEndIdValues = new SparseArray<TransitionValues>();
-    private LongSparseArray<TransitionValues> mEndItemIdValues =
-            new LongSparseArray<TransitionValues>();
+    private TransitionValuesMaps mStartValues = new TransitionValuesMaps();
+    private TransitionValuesMaps mEndValues = new TransitionValuesMaps();
+    TransitionGroup mParent = null;
 
-    // Used to carry data between preplay() and play(), cleared before every scene transition
+    // Scene Root is set at play() time in the cloned Transition
+    ViewGroup mSceneRoot = null;
+
+    // Used to carry data between setup() and play(), cleared before every scene transition
     private ArrayList<TransitionValues> mPlayStartValuesList = new ArrayList<TransitionValues>();
     private ArrayList<TransitionValues> mPlayEndValuesList = new ArrayList<TransitionValues>();
 
@@ -152,49 +150,32 @@
     /**
      * This method is called by the transition's parent (all the way up to the
      * topmost Transition in the hierarchy) with the sceneRoot and start/end
-     * values that the transition may need to run animations on its target
-     * views. The method is called for every applicable target object, which
-     * is stored in the {@link TransitionValues#view} field. When the method
-     * results in an animation needing to be run, the transition will construct
-     * the appropriate {@link Animator} object and return it. The transition
-     * mechanism will apply any applicable duration, startDelay, and interpolator
-     * to that animation and start it. Returning null from the method tells the
-     * transition engine that there is no animation to be played (TransitionGroup
-     * will return null because any applicable animations were started on its child
-     * transitions already and there is no animation to be run on the group itself).
-     *
-     * @param sceneRoot
-     * @param startValues
-     * @param endValues
-     * @return Animator The animation to run.
-     */
-    protected abstract Animator play(ViewGroup sceneRoot, TransitionValues startValues,
-            TransitionValues endValues);
-
-    /**
-     * This method is called by the transition's parent (all the way up to the
-     * topmost Transition in the hierarchy) with the sceneRoot and start/end
-     * values that the transition may need to set things up at the start of a
-     * Transition. For example, if an overall Transition consists of several
+     * values that the transition may need to set up initial target values
+     * and construct an appropriate animation. For example, if an overall
+     * Transition is a {@link TransitionGroup} consisting of several
      * child transitions in sequence, then some of the child transitions may
      * want to set initial values on target views prior to the overall
-     * Transition commencing, to put them in an appropriate scene for the
+     * Transition commencing, to put them in an appropriate state for the
      * delay between that start and the child Transition start time. For
      * example, a transition that fades an item in may wish to set the starting
      * alpha value to 0, to avoid it blinking in prior to the transition
      * actually starting the animation. This is necessary because the scene
      * change that triggers the Transition will automatically set the end-scene
      * on all target views, so a Transition that wants to animate from a
-     * different value should set that value in the preplay() method.
+     * different value should set that value prior to returning from this method.
      *
      * <p>Additionally, a Transition can perform logic to determine whether
      * the transition needs to run on the given target and start/end values.
      * For example, a transition that resizes objects on the screen may wish
      * to avoid running for views which are not present in either the start
-     * or end scenes. A return value of <code>false</code> indicates that
-     * the transition should not run, and there will be no ensuing call to the
-     * {@link #play(ViewGroup, TransitionValues, TransitionValues)} method during
-     * this scene change. The default implementation returns true.</p>
+     * or end scenes. A return value of <code>null</code> indicates that
+     * no animation should run. The default implementation returns null.</p>
+     *
+     * <p>If there is an animator created and returned from this method, the
+     * transition mechanism will apply any applicable duration, startDelay,
+     * and interpolator to that animation and start it. A return value of
+     * <code>null</code> indicates that no animation should run. The default
+     * implementation returns null.</p>
      *
      * <p>The method is called for every applicable target object, which is
      * stored in the {@link TransitionValues#view} field.</p>
@@ -202,56 +183,47 @@
      * @param sceneRoot
      * @param startValues
      * @param endValues
-     * @return True if the Transition's {@link #play(ViewGroup,
-     * TransitionValues, TransitionValues) play()} method should be called
-     * during this scene change, false otherwise.
+     * @return A non-null Animator to be started at the appropriate time in the
+     * overall transition for this scene change, null otherwise.
      */
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
+    protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
-        return true;
+        return null;
     }
 
     /**
-     * This version of prePlay() is called with the entire set of start/end
+     * This version of play() is called with the entire set of start/end
      * values. The implementation in Transition iterates through these lists
-     * and calls {@link #prePlay(ViewGroup, TransitionValues, TransitionValues)}
+     * and calls {@link #play(ViewGroup, TransitionValues, TransitionValues)}
      * with each set of start/end values on this transition. The
      * TransitionGroup subclass overrides this method and delegates it to
-     * each of its children in succession. The intention in splitting
-     * preplay() out from play() is to allow all Transitions in the tree to
-     * set up the appropriate start scene for their target objects prior to
-     * any calls to play(), which is necessary when there is a sequential
-     * Transition, where a child transition which is not the first may want to
-     * set up a target's scene prior to the overall Transition start.
+     * each of its children in succession.
      *
      * @hide
      */
-    protected void prePlay(ViewGroup sceneRoot, ArrayMap<View, TransitionValues> startValues,
-            SparseArray<TransitionValues> startIdValues,
-            LongSparseArray<TransitionValues> startItemIdValues,
-            ArrayMap<View, TransitionValues> endValues,
-            SparseArray<TransitionValues> endIdValues,
-            LongSparseArray<TransitionValues> endItemIdValues) {
+    protected void play(ViewGroup sceneRoot, TransitionValuesMaps startValues,
+            TransitionValuesMaps endValues) {
         mPlayStartValuesList.clear();
         mPlayEndValuesList.clear();
-        ArrayMap<View, TransitionValues> endCopy = new ArrayMap<View, TransitionValues>(endValues);
+        ArrayMap<View, TransitionValues> endCopy =
+                new ArrayMap<View, TransitionValues>(endValues.viewValues);
         SparseArray<TransitionValues> endIdCopy =
-                new SparseArray<TransitionValues>(endIdValues.size());
-        for (int i = 0; i < endIdValues.size(); ++i) {
-            int id = endIdValues.keyAt(i);
-            endIdCopy.put(id, endIdValues.valueAt(i));
+                new SparseArray<TransitionValues>(endValues.idValues.size());
+        for (int i = 0; i < endValues.idValues.size(); ++i) {
+            int id = endValues.idValues.keyAt(i);
+            endIdCopy.put(id, endValues.idValues.valueAt(i));
         }
         LongSparseArray<TransitionValues> endItemIdCopy =
-                new LongSparseArray<TransitionValues>(endItemIdValues.size());
-        for (int i = 0; i < endItemIdValues.size(); ++i) {
-            long id = endItemIdValues.keyAt(i);
-            endItemIdCopy.put(id, endItemIdValues.valueAt(i));
+                new LongSparseArray<TransitionValues>(endValues.itemIdValues.size());
+        for (int i = 0; i < endValues.itemIdValues.size(); ++i) {
+            long id = endValues.itemIdValues.keyAt(i);
+            endItemIdCopy.put(id, endValues.itemIdValues.valueAt(i));
         }
         // Walk through the start values, playing everything we find
         // Remove from the end set as we go
         ArrayList<TransitionValues> startValuesList = new ArrayList<TransitionValues>();
         ArrayList<TransitionValues> endValuesList = new ArrayList<TransitionValues>();
-        for (View view : startValues.keySet()) {
+        for (View view : startValues.viewValues.keySet()) {
             TransitionValues start = null;
             TransitionValues end = null;
             boolean isInListView = false;
@@ -260,13 +232,13 @@
             }
             if (!isInListView) {
                 int id = view.getId();
-                start = startValues.get(view) != null ?
-                        startValues.get(view) : startIdValues.get(id);
-                if (endValues.get(view) != null) {
-                    end = endValues.get(view);
+                start = startValues.viewValues.get(view) != null ?
+                        startValues.viewValues.get(view) : startValues.idValues.get(id);
+                if (endValues.viewValues.get(view) != null) {
+                    end = endValues.viewValues.get(view);
                     endCopy.remove(view);
                 } else {
-                    end = endIdValues.get(id);
+                    end = endValues.idValues.get(id);
                     View removeView = null;
                     for (View viewToRemove : endCopy.keySet()) {
                         if (viewToRemove.getId() == id) {
@@ -287,7 +259,7 @@
                 if (parent.getAdapter().hasStableIds()) {
                     int position = parent.getPositionForView(view);
                     long itemId = parent.getItemIdAtPosition(position);
-                    start = startItemIdValues.get(itemId);
+                    start = startValues.itemIdValues.get(itemId);
                     endItemIdCopy.remove(itemId);
                     // TODO: deal with targetIDs for itemIDs for ListView items
                     startValuesList.add(start);
@@ -295,12 +267,12 @@
                 }
             }
         }
-        int startItemIdCopySize = startItemIdValues.size();
+        int startItemIdCopySize = startValues.itemIdValues.size();
         for (int i = 0; i < startItemIdCopySize; ++i) {
-            long id = startItemIdValues.keyAt(i);
+            long id = startValues.itemIdValues.keyAt(i);
             if (isValidTarget(null, id)) {
-                TransitionValues start = startItemIdValues.get(id);
-                TransitionValues end = endItemIdValues.get(id);
+                TransitionValues start = startValues.itemIdValues.get(id);
+                TransitionValues end = endValues.itemIdValues.get(id);
                 endItemIdCopy.remove(id);
                 startValuesList.add(start);
                 endValuesList.add(end);
@@ -310,8 +282,8 @@
         for (View view : endCopy.keySet()) {
             int id = view.getId();
             if (isValidTarget(view, id)) {
-                TransitionValues start = startValues.get(view) != null ?
-                        startValues.get(view) : startIdValues.get(id);
+                TransitionValues start = startValues.viewValues.get(view) != null ?
+                        startValues.viewValues.get(view) : startValues.idValues.get(id);
                 TransitionValues end = endCopy.get(view);
                 endIdCopy.remove(id);
                 startValuesList.add(start);
@@ -322,7 +294,7 @@
         for (int i = 0; i < endIdCopySize; ++i) {
             int id = endIdCopy.keyAt(i);
             if (isValidTarget(null, id)) {
-                TransitionValues start = startIdValues.get(id);
+                TransitionValues start = startValues.idValues.get(id);
                 TransitionValues end = endIdCopy.get(id);
                 startValuesList.add(start);
                 endValuesList.add(end);
@@ -332,7 +304,7 @@
         for (int i = 0; i < endItemIdCopySize; ++i) {
             long id = endItemIdCopy.keyAt(i);
             // TODO: Deal with targetIDs and itemIDs
-            TransitionValues start = startItemIdValues.get(id);
+            TransitionValues start = startValues.itemIdValues.get(id);
             TransitionValues end = endItemIdCopy.get(id);
             startValuesList.add(start);
             endValuesList.add(end);
@@ -341,7 +313,9 @@
             TransitionValues start = startValuesList.get(i);
             TransitionValues end = endValuesList.get(i);
             // TODO: what to do about targetIds and itemIds?
-            if (prePlay(sceneRoot, start, end)) {
+            Animator animator = play(sceneRoot, start, end);
+            if (animator != null) {
+                mAnimatorMap.put(new Pair(start, end), animator);
                 // Note: we've already done the check against targetIDs in these lists
                 mPlayStartValuesList.add(start);
                 mPlayEndValuesList.add(end);
@@ -349,6 +323,9 @@
         }
     }
 
+    ArrayMap<Pair<TransitionValues, TransitionValues>, Animator> mAnimatorMap =
+            new ArrayMap<Pair<TransitionValues, TransitionValues>, Animator>();
+
     /**
      * Internal utility method for checking whether a given view/id
      * is valid for this transition, where "valid" means that either
@@ -381,22 +358,12 @@
     }
 
     /**
-     * This version of play() is called with the entire set of start/end
-     * values. The implementation in Transition iterates through these lists
-     * and calls {@link #play(ViewGroup, TransitionValues, TransitionValues)}
-     * with each set of start/end values on this transition. The
-     * TransitionGroup subclass overrides this method and delegates it to
-     * each of its children in succession.
+     * This is called internally once all animations have been set up by the
+     * transition hierarchy. \
      *
      * @hide
      */
-    protected void play(ViewGroup sceneRoot,
-            final ArrayMap<View, TransitionValues> startValues,
-            final SparseArray<TransitionValues> startIdValues,
-            final LongSparseArray<TransitionValues> startItemIdValues,
-            final ArrayMap<View, TransitionValues> endValues,
-            final SparseArray<TransitionValues> endIdValues,
-            final LongSparseArray<TransitionValues> endItemIdValues) {
+    protected void runAnimations() {
 
         startTransition();
         // Now walk the list of TransitionValues, calling play for each pair
@@ -404,10 +371,11 @@
             TransitionValues start = mPlayStartValuesList.get(i);
             TransitionValues end = mPlayEndValuesList.get(i);
             startTransition();
-            runAnimator(play(sceneRoot, start, end));
+            runAnimator(mAnimatorMap.get(new Pair(start, end)));
         }
         mPlayStartValuesList.clear();
         mPlayEndValuesList.clear();
+        mAnimatorMap.clear();
         endTransition();
     }
 
@@ -436,19 +404,18 @@
      * <code>start</code>. The main concern for an implementation is what the
      * properties are that the transition cares about and what the values are
      * for all of those properties. The start and end values will be compared
-     * later during the preplay and play() methods to determine what, if any,
-     * animations, should be run.
+     * later during the
+     * {@link #play(android.view.ViewGroup, TransitionValues, TransitionValues)}
+     * method to determine what, if any, animations, should be run.
      *
-     * @param transitionValues The holder any values that the Transition
-     * wishes to store. Values are stored in the fields of this
-     * TransitionValues object, according to their type, and are keyed from
-     * a String value. For example, to start a view's rotation value,
-     * a Transition might call
-     * <code>transitionValues.floatValues.put("rotation", view.getRotation())
-     * </code>. The target <code>View</code> will already be stored in
-     * the transitionValues structure when this method is called. The other
-     * fields in TransitionValues, e.g. <code>floatValues</code>,
-     * may need to be instantiated if they have not yet been created.
+     * @param transitionValues The holder for any values that the Transition
+     * wishes to store. Values are stored in the <code>values</code> field
+     * of this TransitionValues object and are keyed from
+     * a String value. For example, to store a view's rotation value,
+     * a transition might call
+     * <code>transitionValues.values.put("appname:transitionname:rotation",
+     * view.getRotation())</code>. The target view will already be stored in
+     * the transitionValues structure when this method is called.
      */
     protected abstract void captureValues(TransitionValues transitionValues, boolean start);
 
@@ -553,14 +520,14 @@
                         values.view = view;
                         captureValues(values, start);
                         if (start) {
-                            mStartValues.put(view, values);
+                            mStartValues.viewValues.put(view, values);
                             if (id >= 0) {
-                                mStartIdValues.put(id, values);
+                                mStartValues.idValues.put(id, values);
                             }
                         } else {
-                            mEndValues.put(view, values);
+                            mEndValues.viewValues.put(view, values);
                             if (id >= 0) {
-                                mEndIdValues.put(id, values);
+                                mEndValues.idValues.put(id, values);
                             }
                         }
                     }
@@ -574,9 +541,9 @@
                         values.view = view;
                         captureValues(values, start);
                         if (start) {
-                            mStartValues.put(view, values);
+                            mStartValues.viewValues.put(view, values);
                         } else {
-                            mEndValues.put(view, values);
+                            mEndValues.viewValues.put(view, values);
                         }
                     }
                 }
@@ -622,21 +589,21 @@
         captureValues(values, start);
         if (start) {
             if (!isListViewItem) {
-                mStartValues.put(view, values);
+                mStartValues.viewValues.put(view, values);
                 if (id >= 0) {
-                    mStartIdValues.put((int) id, values);
+                    mStartValues.idValues.put((int) id, values);
                 }
             } else {
-                mStartItemIdValues.put(id, values);
+                mStartValues.itemIdValues.put(id, values);
             }
         } else {
             if (!isListViewItem) {
-                mEndValues.put(view, values);
+                mEndValues.viewValues.put(view, values);
                 if (id >= 0) {
-                    mEndIdValues.put((int) id, values);
+                    mEndValues.idValues.put((int) id, values);
                 }
             } else {
-                mEndItemIdValues.put(id, values);
+                mEndValues.itemIdValues.put(id, values);
             }
         }
         if (view instanceof ViewGroup) {
@@ -648,18 +615,45 @@
     }
 
     /**
-     * Called by TransitionManager to play the transition. This calls
-     * prePlay() and then play() with the full set of per-view
-     * transitionValues objects
+     * This method can be called by transitions to get the TransitionValues for
+     * any particular view during the transition-playing process. This might be
+     * necessary, for example, to query the before/after state of related views
+     * for a given transition.
      */
-    void play(ViewGroup sceneRoot) {
-        // prePlay() must be called on entire transition hierarchy and set of views
+    protected TransitionValues getTransitionValues(View view, boolean start) {
+        if (mParent != null) {
+            return mParent.getTransitionValues(view, start);
+        }
+        TransitionValuesMaps valuesMaps = start ? mStartValues : mEndValues;
+        TransitionValues values = valuesMaps.viewValues.get(view);
+        if (values == null) {
+            int id = view.getId();
+            if (id >= 0) {
+                values = valuesMaps.idValues.get(id);
+            }
+            if (values == null && view.getParent() instanceof ListView) {
+                ListView listview = (ListView) view.getParent();
+                int position = listview.getPositionForView(view);
+                long itemId = listview.getItemIdAtPosition(position);
+                values = valuesMaps.itemIdValues.get(itemId);
+            }
+            // TODO: Doesn't handle the case where a view was parented to a
+            // ListView (with an itemId), but no longer is
+        }
+        return values;
+    }
+
+    /**
+     * Called by TransitionManager to play the transition. This calls
+     * play() to set things up and create all of the animations and then
+     * runAnimations() to actually start the animations.
+     */
+    void playTransition(ViewGroup sceneRoot) {
+        // setup() must be called on entire transition hierarchy and set of views
         // before calling play() on anything; every transition needs a chance to set up
         // target views appropriately before transitions begin running
-        prePlay(sceneRoot, mStartValues, mStartIdValues, mStartItemIdValues,
-                mEndValues, mEndIdValues, mEndItemIdValues);
-        play(sceneRoot, mStartValues, mStartIdValues, mStartItemIdValues,
-                mEndValues, mEndIdValues, mEndItemIdValues);
+        play(sceneRoot, mStartValues, mEndValues);
+        runAnimations();
     }
 
     /**
@@ -766,26 +760,26 @@
                     tmpListeners.get(i).onTransitionEnd(this);
                 }
             }
-            for (int i = 0; i < mStartItemIdValues.size(); ++i) {
-                TransitionValues tv = mStartItemIdValues.valueAt(i);
+            for (int i = 0; i < mStartValues.itemIdValues.size(); ++i) {
+                TransitionValues tv = mStartValues.itemIdValues.valueAt(i);
                 View v = tv.view;
                 if (v.hasTransientState()) {
                     v.setHasTransientState(false);
                 }
             }
-            for (int i = 0; i < mEndItemIdValues.size(); ++i) {
-                TransitionValues tv = mEndItemIdValues.valueAt(i);
+            for (int i = 0; i < mEndValues.itemIdValues.size(); ++i) {
+                TransitionValues tv = mEndValues.itemIdValues.valueAt(i);
                 View v = tv.view;
                 if (v.hasTransientState()) {
                     v.setHasTransientState(false);
                 }
             }
-            mStartValues.clear();
-            mStartIdValues.clear();
-            mStartItemIdValues.clear();
-            mEndValues.clear();
-            mEndIdValues.clear();
-            mEndItemIdValues.clear();
+            mStartValues.viewValues.clear();
+            mStartValues.idValues.clear();
+            mStartValues.itemIdValues.clear();
+            mEndValues.viewValues.clear();
+            mEndValues.idValues.clear();
+            mEndValues.itemIdValues.clear();
             mCurrentAnimators.clear();
         }
     }
@@ -853,11 +847,25 @@
         return mListeners;
     }
 
+    void setSceneRoot(ViewGroup sceneRoot) {
+        mSceneRoot = sceneRoot;
+    }
+
     @Override
     public String toString() {
         return toString("");
     }
 
+    @Override
+    public Transition clone() {
+        Transition clone = null;
+        try {
+            clone = (Transition) super.clone();
+        } catch (CloneNotSupportedException e) {}
+
+        return clone;
+    }
+
     String toString(String indent) {
         String result = indent + getClass().getSimpleName() + "@" +
                 Integer.toHexString(hashCode()) + ": ";
diff --git a/core/java/android/view/transition/TransitionGroup.java b/core/java/android/view/transition/TransitionGroup.java
index 8ff46b6..d0e61ea 100644
--- a/core/java/android/view/transition/TransitionGroup.java
+++ b/core/java/android/view/transition/TransitionGroup.java
@@ -13,14 +13,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
-import android.animation.Animator;
 import android.util.AndroidRuntimeException;
-import android.util.ArrayMap;
-import android.util.LongSparseArray;
-import android.util.SparseArray;
-import android.view.View;
 import android.view.ViewGroup;
 
 import java.util.ArrayList;
@@ -106,6 +102,7 @@
             int numTransitions = transitions.length;
             for (int i = 0; i < numTransitions; ++i) {
                 mTransitions.add(transitions[i]);
+                transitions[i].mParent = this;
                 if (mDuration >= 0) {
                     transitions[0].setDuration(mDuration);
                 }
@@ -139,6 +136,7 @@
      */
     public void removeTransition(Transition transition) {
         mTransitions.remove(transition);
+        transition.mParent = null;
     }
 
     /**
@@ -147,8 +145,9 @@
      * must finish first).
      */
     private void setupStartEndListeners() {
+        TransitionGroupListener listener = new TransitionGroupListener(this);
         for (Transition childTransition : mTransitions) {
-            childTransition.addListener(mListener);
+            childTransition.addListener(listener);
         }
         mCurrentListeners = mTransitions.size();
     }
@@ -157,57 +156,48 @@
      * This listener is used to detect when all child transitions are done, at
      * which point this transition group is also done.
      */
-    private TransitionListener mListener = new TransitionListenerAdapter() {
+    static class TransitionGroupListener extends TransitionListenerAdapter {
+        TransitionGroup mTransitionGroup;
+        TransitionGroupListener(TransitionGroup transitionGroup) {
+            mTransitionGroup = transitionGroup;
+        }
         @Override
         public void onTransitionStart(Transition transition) {
-            if (!mStarted) {
-                startTransition();
-                mStarted = true;
+            if (!mTransitionGroup.mStarted) {
+                mTransitionGroup.startTransition();
+                mTransitionGroup.mStarted = true;
             }
         }
 
         @Override
         public void onTransitionEnd(Transition transition) {
-            --mCurrentListeners;
-            if (mCurrentListeners == 0) {
+            --mTransitionGroup.mCurrentListeners;
+            if (mTransitionGroup.mCurrentListeners == 0) {
                 // All child trans
-                mStarted = false;
-                endTransition();
+                mTransitionGroup.mStarted = false;
+                mTransitionGroup.endTransition();
             }
             transition.removeListener(this);
         }
-    };
-
-    /**
-     * @hide
-     */
-    @Override
-    protected void prePlay(ViewGroup sceneRoot,
-            ArrayMap<View, TransitionValues> startValues,
-            SparseArray<TransitionValues> startIdValues,
-            LongSparseArray<TransitionValues> startItemIdValues,
-            ArrayMap<View, TransitionValues> endValues,
-            SparseArray<TransitionValues> endIdValues,
-            LongSparseArray<TransitionValues> endItemIdValues) {
-        for (Transition childTransition : mTransitions) {
-            childTransition.prePlay(sceneRoot, startValues, startIdValues, startItemIdValues,
-                    endValues, endIdValues, endItemIdValues);
-        }
     }
 
     /**
      * @hide
      */
     @Override
-    protected void play(ViewGroup sceneRoot,
-            final ArrayMap<View, TransitionValues> startValues,
-            final SparseArray<TransitionValues> startIdValues,
-            final LongSparseArray<TransitionValues> startItemIdValues,
-            final ArrayMap<View, TransitionValues> endValues,
-            final SparseArray<TransitionValues> endIdValues,
-            final LongSparseArray<TransitionValues> endItemIdValues) {
+    protected void play(ViewGroup sceneRoot, TransitionValuesMaps startValues,
+            TransitionValuesMaps endValues) {
+        for (Transition childTransition : mTransitions) {
+            childTransition.play(sceneRoot, startValues, endValues);
+        }
+    }
+
+    /**
+     * @hide
+     */
+    @Override
+    protected void runAnimations() {
         setupStartEndListeners();
-        final ViewGroup finalSceneRoot = sceneRoot;
         if (!mPlayTogether) {
             // Setup sequence with listeners
             // TODO: Need to add listeners in such a way that we can remove them later if canceled
@@ -217,82 +207,23 @@
                 previousTransition.addListener(new TransitionListenerAdapter() {
                     @Override
                     public void onTransitionEnd(Transition transition) {
-                        nextTransition.play(finalSceneRoot,
-                                startValues, startIdValues, startItemIdValues,
-                                endValues, endIdValues, endItemIdValues);
+                        nextTransition.runAnimations();
                         transition.removeListener(this);
                     }
                 });
             }
             Transition firstTransition = mTransitions.get(0);
             if (firstTransition != null) {
-                firstTransition.play(finalSceneRoot, startValues, startIdValues, startItemIdValues,
-                        endValues, endIdValues, endItemIdValues);
+                firstTransition.runAnimations();
             }
         } else {
             for (Transition childTransition : mTransitions) {
-                childTransition.play(finalSceneRoot, startValues, startIdValues, startItemIdValues,
-                        endValues, endIdValues, endItemIdValues);
+                childTransition.runAnimations();
             }
         }
     }
 
     @Override
-    protected Animator play(ViewGroup sceneRoot,
-            TransitionValues startValues, TransitionValues endValues) {
-        final View view = (endValues != null) ? endValues.view :
-                (startValues != null) ? startValues.view : null;
-        final int targetId = (view != null) ? view.getId() : -1;
-        // TODO: not sure this is a valid check - what about auto-targets? No need for ids.
-        if (targetId < 0) {
-            return null;
-        }
-        setupStartEndListeners();
-        if (!mPlayTogether) {
-            final ViewGroup finalSceneRoot = sceneRoot;
-            final TransitionValues finalStartValues = startValues;
-            final TransitionValues finalEndValues = endValues;
-            // Setup sequence with listeners
-            // TODO: Need to add listeners in such a way that we can remove them later if canceled
-            for (int i = 1; i < mTransitions.size(); ++i) {
-                Transition previousTransition = mTransitions.get(i - 1);
-                final Transition nextTransition = mTransitions.get(i);
-                previousTransition.addListener(new TransitionListenerAdapter() {
-                    @Override
-                    public void onTransitionEnd(Transition transition) {
-                        nextTransition.startTransition();
-                        if (nextTransition.isValidTarget(view, targetId)) {
-                            animate(nextTransition.play(finalSceneRoot, finalStartValues,
-                                    finalEndValues));
-                        } else {
-                            nextTransition.endTransition();
-                        }
-                    }
-                });
-            }
-            Transition firstTransition = mTransitions.get(0);
-            if (firstTransition != null) {
-                firstTransition.startTransition();
-                if (firstTransition.isValidTarget(view, targetId)) {
-                    animate(firstTransition.play(finalSceneRoot, finalStartValues, finalEndValues));
-                } else {
-                    firstTransition.endTransition();
-                }
-            }
-        } else {
-            for (Transition childTransition : mTransitions) {
-                childTransition.startTransition();
-                if (childTransition.isValidTarget(view, targetId)) {
-                    animate(childTransition.play(sceneRoot, startValues, endValues));
-                } else {
-                    childTransition.endTransition();
-                }
-            }
-        }
-        return null;
-    }
-
-    @Override
     protected void captureValues(TransitionValues transitionValues, boolean start) {
         int targetId = transitionValues.view.getId();
         for (Transition childTransition : mTransitions) {
@@ -312,6 +243,15 @@
     }
 
     @Override
+    void setSceneRoot(ViewGroup sceneRoot) {
+        super.setSceneRoot(sceneRoot);
+        int numTransitions = mTransitions.size();
+        for (int i = 0; i < numTransitions; ++i) {
+            mTransitions.get(i).setSceneRoot(sceneRoot);
+        }
+    }
+
+    @Override
     String toString(String indent) {
         String result = super.toString(indent);
         for (int i = 0; i < mTransitions.size(); ++i) {
@@ -320,4 +260,15 @@
         return result;
     }
 
+    @Override
+    public TransitionGroup clone() {
+        TransitionGroup clone = (TransitionGroup) super.clone();
+        clone.mTransitions = new ArrayList<Transition>();
+        int numTransitions = mTransitions.size();
+        for (int i = 0; i < numTransitions; ++i) {
+            clone.mTransitions.add((Transition) mTransitions.get(i).clone());
+        }
+        return clone;
+    }
+
 }
diff --git a/core/java/android/view/transition/TransitionInflater.java b/core/java/android/view/transition/TransitionInflater.java
index dc930d5..be658af 100644
--- a/core/java/android/view/transition/TransitionInflater.java
+++ b/core/java/android/view/transition/TransitionInflater.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.content.Context;
diff --git a/core/java/android/view/transition/TransitionManager.java b/core/java/android/view/transition/TransitionManager.java
index 8088f6b..59b07b1 100644
--- a/core/java/android/view/transition/TransitionManager.java
+++ b/core/java/android/view/transition/TransitionManager.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.util.ArrayMap;
@@ -142,15 +143,18 @@
      * @param scene The scene being entered
      * @param transition The transition to play for this scene change
      */
-    private static void changeScene(Scene scene, final Transition transition) {
+    private static void changeScene(Scene scene, Transition transition) {
 
         final ViewGroup sceneRoot = scene.getSceneRoot();
 
-        sceneChangeSetup(sceneRoot, transition);
+        Transition transitionClone = transition.clone();
+        transitionClone.setSceneRoot(sceneRoot);
+
+        sceneChangeSetup(sceneRoot, transitionClone);
 
         scene.enter();
 
-        sceneChangeRunTransition(sceneRoot, transition);
+        sceneChangeRunTransition(sceneRoot, transitionClone);
     }
 
     private static void sceneChangeRunTransition(final ViewGroup sceneRoot,
@@ -169,7 +173,7 @@
                         }
                     });
                     transition.captureValues(sceneRoot, false);
-                    transition.play(sceneRoot);
+                    transition.playTransition(sceneRoot);
                     return true;
                 }
             });
@@ -317,7 +321,7 @@
             if (transition == null) {
                 transition = sDefaultTransition;
             }
-            final Transition finalTransition = transition;
+            final Transition finalTransition = transition.clone();
             sceneChangeSetup(sceneRoot, transition);
             sceneRoot.setCurrentScene(null);
             sceneRoot.postOnAnimation(new Runnable() {
diff --git a/core/java/android/view/transition/TransitionValues.java b/core/java/android/view/transition/TransitionValues.java
index 1ef6bf4..f361666 100644
--- a/core/java/android/view/transition/TransitionValues.java
+++ b/core/java/android/view/transition/TransitionValues.java
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.util.ArrayMap;
@@ -35,9 +36,9 @@
  * {@link Transition#captureValues(TransitionValues, boolean)}
  * capture} phases of a scene change, once when the start values are captured
  * and again when the end values are captured. These start/end values are then
- * passed into the transitions during the play phase of the scene change,
- * for {@link Transition#prePlay(ViewGroup, TransitionValues, TransitionValues)} and
- * for {@link Transition#play(ViewGroup, TransitionValues, TransitionValues)}.</p>
+ * passed into the transitions via the
+ * for {@link Transition#play(ViewGroup, TransitionValues, TransitionValues)}
+ * method.</p>
  */
 public class TransitionValues {
 
@@ -55,7 +56,10 @@
     public String toString() {
         String returnValue = "TransitionValues@" + Integer.toHexString(hashCode()) + ":\n";
         returnValue += "    view = " + view + "\n";
-        returnValue += "    values = " + values + "\n";
+        returnValue += "    values:";
+        for (String s : values.keySet()) {
+            returnValue += "    " + s + ": " + values.get(s) + "\n";
+        }
         return returnValue;
     }
 }
\ No newline at end of file
diff --git a/core/java/android/view/transition/TransitionValuesMaps.java b/core/java/android/view/transition/TransitionValuesMaps.java
new file mode 100644
index 0000000..4cfce4d
--- /dev/null
+++ b/core/java/android/view/transition/TransitionValuesMaps.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package android.view.transition;
+
+import android.util.ArrayMap;
+import android.util.LongSparseArray;
+import android.util.SparseArray;
+import android.view.View;
+
+class TransitionValuesMaps {
+    ArrayMap<View, TransitionValues> viewValues =
+            new ArrayMap<View, TransitionValues>();
+    SparseArray<TransitionValues> idValues = new SparseArray<TransitionValues>();
+    LongSparseArray<TransitionValues> itemIdValues =
+            new LongSparseArray<TransitionValues>();
+}
diff --git a/core/java/android/view/transition/Visibility.java b/core/java/android/view/transition/Visibility.java
index a3e6e77..6d39ab6 100644
--- a/core/java/android/view/transition/Visibility.java
+++ b/core/java/android/view/transition/Visibility.java
@@ -13,11 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package android.view.transition;
 
 import android.animation.Animator;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewParent;
 
 /**
  * This transition tracks changes to the visibility of target views in the
@@ -27,16 +29,28 @@
  * utility for subclasses such as {@link Fade}, which use this visibility
  * information to determine the specific animations to run when visibility
  * changes occur. Subclasses should implement one or more of the methods
- * {@link #preAppear(ViewGroup, View, int, View, int)},
- * {@link #preDisappear(ViewGroup, View, int, View, int)},
- * {@link #appear(ViewGroup, View, int, View, int)}, and
- * {@link #disappear(ViewGroup, View, int, View, int)}.
+ * {@link #appear(ViewGroup, TransitionValues, int, TransitionValues, int)},
+ * {@link #disappear(ViewGroup, TransitionValues, int, TransitionValues, int)},
+ * {@link #appear(ViewGroup, TransitionValues, int, TransitionValues, int)}, and
+ * {@link #disappear(ViewGroup, TransitionValues, int, TransitionValues, int)}.
  */
 public abstract class Visibility extends Transition {
 
     private static final String PROPNAME_VISIBILITY = "android:visibility:visibility";
     private static final String PROPNAME_PARENT = "android:visibility:parent";
 
+    private static class VisibilityInfo {
+        boolean visibilityChange;
+        boolean fadeIn;
+        int startVisibility;
+        int endVisibility;
+        View startParent;
+        View endParent;
+    }
+
+    // Temporary structure, used in calculating state in setup() and play()
+    private VisibilityInfo mTmpVisibilityInfo = new VisibilityInfo();
+
     @Override
     protected void captureValues(TransitionValues values, boolean start) {
         int visibility = values.view.getVisibility();
@@ -44,140 +58,107 @@
         values.values.put(PROPNAME_PARENT, values.view.getParent());
     }
 
-    @Override
-    protected boolean prePlay(ViewGroup sceneRoot, TransitionValues startValues,
+    private boolean isHierarchyVisibilityChanging(ViewGroup sceneRoot, ViewGroup view) {
+
+        if (view == sceneRoot) {
+            return false;
+        }
+        TransitionValues startValues = getTransitionValues(view, true);
+        TransitionValues endValues = getTransitionValues(view, false);
+
+        if (startValues == null || endValues == null) {
+            return true;
+        }
+        int startVisibility = (Integer) startValues.values.get(PROPNAME_VISIBILITY);
+        View startParent = (View) startValues.values.get(PROPNAME_PARENT);
+        int endVisibility = (Integer) endValues.values.get(PROPNAME_VISIBILITY);
+        View endParent = (View) endValues.values.get(PROPNAME_PARENT);
+        if (startVisibility != endVisibility || startParent != endParent) {
+            return true;
+        }
+
+        ViewParent parent = view.getParent();
+        if (parent instanceof ViewGroup && parent != sceneRoot) {
+            return isHierarchyVisibilityChanging(sceneRoot, (ViewGroup) parent);
+        }
+        return false;
+    }
+
+    private VisibilityInfo getVisibilityChangeInfo(TransitionValues startValues,
             TransitionValues endValues) {
-        boolean visibilityChange = false;
-        boolean fadeIn = false;
-        int startVisibility, endVisibility;
-        View startParent, endParent;
+        final VisibilityInfo visInfo = mTmpVisibilityInfo;
+        visInfo.visibilityChange = false;
+        visInfo.fadeIn = false;
         if (startValues != null) {
-            startVisibility = (Integer) startValues.values.get(PROPNAME_VISIBILITY);
-            startParent = (View) startValues.values.get(PROPNAME_PARENT);
+            visInfo.startVisibility = (Integer) startValues.values.get(PROPNAME_VISIBILITY);
+            visInfo.startParent = (View) startValues.values.get(PROPNAME_PARENT);
         } else {
-            startVisibility = -1;
-            startParent = null;
+            visInfo.startVisibility = -1;
+            visInfo.startParent = null;
         }
         if (endValues != null) {
-            endVisibility = (Integer) endValues.values.get(PROPNAME_VISIBILITY);
-            endParent = (View) endValues.values.get(PROPNAME_PARENT);
+            visInfo.endVisibility = (Integer) endValues.values.get(PROPNAME_VISIBILITY);
+            visInfo.endParent = (View) endValues.values.get(PROPNAME_PARENT);
         } else {
-            endVisibility = -1;
-            endParent = null;
+            visInfo.endVisibility = -1;
+            visInfo.endParent = null;
         }
-        boolean existenceChange = false;
         if (startValues != null && endValues != null) {
-            if (startVisibility == endVisibility && startParent == endParent) {
-                return false;
+            if (visInfo.startVisibility == visInfo.endVisibility &&
+                    visInfo.startParent == visInfo.endParent) {
+                return visInfo;
             } else {
-                if (startVisibility != endVisibility) {
-                    if (startVisibility == View.VISIBLE) {
-                        fadeIn = false;
-                        visibilityChange = true;
-                    } else if (endVisibility == View.VISIBLE) {
-                        fadeIn = true;
-                        visibilityChange = true;
+                if (visInfo.startVisibility != visInfo.endVisibility) {
+                    if (visInfo.startVisibility == View.VISIBLE) {
+                        visInfo.fadeIn = false;
+                        visInfo.visibilityChange = true;
+                    } else if (visInfo.endVisibility == View.VISIBLE) {
+                        visInfo.fadeIn = true;
+                        visInfo.visibilityChange = true;
                     }
                     // no visibilityChange if going between INVISIBLE and GONE
-                } else if (startParent != endParent) {
-                    existenceChange = true;
-                    if (endParent == null) {
-                        fadeIn = false;
-                        visibilityChange = true;
-                    } else if (startParent == null) {
-                        fadeIn = true;
-                        visibilityChange = true;
+                } else if (visInfo.startParent != visInfo.endParent) {
+                    if (visInfo.endParent == null) {
+                        visInfo.fadeIn = false;
+                        visInfo.visibilityChange = true;
+                    } else if (visInfo.startParent == null) {
+                        visInfo.fadeIn = true;
+                        visInfo.visibilityChange = true;
                     }
                 }
             }
         }
         if (startValues == null) {
-            existenceChange = true;
-            fadeIn = true;
-            visibilityChange = true;
+            visInfo.fadeIn = true;
+            visInfo.visibilityChange = true;
         } else if (endValues == null) {
-            existenceChange = true;
-            fadeIn = false;
-            visibilityChange = true;
+            visInfo.fadeIn = false;
+            visInfo.visibilityChange = true;
         }
-        if (visibilityChange) {
-            if (fadeIn) {
-                return preAppear(sceneRoot, existenceChange ? null : startValues.view,
-                        startVisibility, endValues.view, endVisibility);
-            } else {
-                return preDisappear(sceneRoot, startValues.view, startVisibility,
-                        existenceChange ? null : endValues.view, endVisibility);
-            }
-        } else {
-            return false;
-        }
+        return visInfo;
     }
 
     @Override
     protected Animator play(ViewGroup sceneRoot, TransitionValues startValues,
             TransitionValues endValues) {
-        boolean visibilityChange = false;
-        boolean fadeIn = false;
-        int startVisibility, endVisibility;
-        View startParent, endParent;
-        if (startValues != null) {
-            startVisibility = (Integer) startValues.values.get(PROPNAME_VISIBILITY);
-            startParent = (View) startValues.values.get(PROPNAME_PARENT);
-        } else {
-            startVisibility = -1;
-            startParent = null;
-        }
-        if (endValues != null) {
-            endVisibility = (Integer) endValues.values.get(PROPNAME_VISIBILITY);
-            endParent = (View) endValues.values.get(PROPNAME_PARENT);
-        } else {
-            endVisibility = -1;
-            endParent = null;
-        }
-        boolean existenceChange = false;
-        if (startValues != null && endValues != null) {
-            if (startVisibility == endVisibility && startParent == endParent) {
-                return null;
-            } else {
-                if (startVisibility != endVisibility) {
-                    if (startVisibility == View.VISIBLE) {
-                        fadeIn = false;
-                        visibilityChange = true;
-                    } else if (endVisibility == View.VISIBLE) {
-                        fadeIn = true;
-                        visibilityChange = true;
-                    }
-                    // no visibilityChange if going between INVISIBLE and GONE
-                } else if (startParent != endParent) {
-                    existenceChange = true;
-                    if (endParent == null) {
-                        fadeIn = false;
-                        visibilityChange = true;
-                    } else if (startParent == null) {
-                        fadeIn = true;
-                        visibilityChange = true;
+        VisibilityInfo visInfo = getVisibilityChangeInfo(startValues, endValues);
+        // Ensure not in parent hierarchy that's also becoming visible/invisible
+        if (visInfo.visibilityChange) {
+            ViewGroup parent = (ViewGroup) ((visInfo.endParent != null) ?
+                    visInfo.endParent : visInfo.startParent);
+            if (parent != null) {
+                if (!isHierarchyVisibilityChanging(sceneRoot, parent)) {
+                    if (visInfo.fadeIn) {
+                        return appear(sceneRoot, startValues, visInfo.startVisibility,
+                                endValues, visInfo.endVisibility);
+                    } else {
+                        return disappear(sceneRoot, startValues, visInfo.startVisibility,
+                                endValues, visInfo.endVisibility
+                        );
                     }
                 }
             }
         }
-        if (startValues == null) {
-            existenceChange = true;
-            fadeIn = true;
-            visibilityChange = true;
-        } else if (endValues == null) {
-            existenceChange = true;
-            fadeIn = false;
-            visibilityChange = true;
-        }
-        if (visibilityChange) {
-            if (fadeIn) {
-                return appear(sceneRoot, existenceChange ? null : startValues.view, startVisibility,
-                        endValues.view, endVisibility);
-            } else {
-                return disappear(sceneRoot, startValues.view, startVisibility,
-                        existenceChange ? null : endValues.view, endVisibility);
-            }
-        }
         return null;
     }
 
@@ -187,57 +168,34 @@
      * transition starting.
      *
      * @param sceneRoot
-     * @param startView
+     * @param startValues
      * @param startVisibility
-     * @param endView
+     * @param endValues
      * @param endVisibility
      * @return
      */
-    protected boolean preAppear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
-        return true;
+    protected Animator appear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
+        return null;
     }
 
     /**
      * The default implementation of this method does nothing. Subclasses
      * should override if they need to set up anything prior to the
      * transition starting.
+     *
      * @param sceneRoot
-     * @param startView
+     * @param startValues
      * @param startVisibility
-     * @param endView
+     * @param endValues
      * @param endVisibility
      * @return
      */
-    protected boolean preDisappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) {
-        return true;
+    protected Animator disappear(ViewGroup sceneRoot,
+            TransitionValues startValues, int startVisibility,
+            TransitionValues endValues, int endVisibility) {
+        return null;
     }
 
-    /**
-     * The default implementation of this method does nothing. Subclasses
-     * should override if they need to do anything when target objects
-     * appear during the scene change.
-     * @param sceneRoot
-     * @param startView
-     * @param startVisibility
-     * @param endView
-     * @param endVisibility
-     */
-    protected Animator appear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) { return null; }
-
-    /**
-     * The default implementation of this method does nothing. Subclasses
-     * should override if they need to do anything when target objects
-     * disappear during the scene change.
-     * @param sceneRoot
-     * @param startView
-     * @param startVisibility
-     * @param endView
-     * @param endVisibility
-     */
-    protected Animator disappear(ViewGroup sceneRoot, View startView, int startVisibility,
-            View endView, int endVisibility) { return null; }
-
 }
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 1991af1..bb1f954 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1280,12 +1280,12 @@
     }
 
     /**
-     * If fast scroll is visible, then don't draw the vertical scrollbar.
+     * If fast scroll is enabled, then don't draw the vertical scrollbar.
      * @hide
      */
     @Override
     protected boolean isVerticalScrollBarHidden() {
-        return mFastScroller != null && mFastScroller.isVisible();
+        return mFastScrollEnabled;
     }
 
     /**
@@ -1337,7 +1337,7 @@
      */
     void invokeOnItemScrollListener() {
         if (mFastScroller != null) {
-            mFastScroller.onScroll(this, mFirstPosition, getChildCount(), mItemCount);
+            mFastScroller.onScroll(mFirstPosition, getChildCount(), mItemCount);
         }
         if (mOnScrollListener != null) {
             mOnScrollListener.onScroll(this, mFirstPosition, getChildCount(), mItemCount);
@@ -2009,7 +2009,7 @@
             }
             mRecycler.markChildrenDirty();
         }
-        
+
         if (mFastScroller != null && mItemCount != mOldItemCount) {
             mFastScroller.onItemCountChanged(mOldItemCount, mItemCount);
         }
@@ -3752,18 +3752,6 @@
                 canvas.restoreToCount(restoreCount);
             }
         }
-        if (mFastScroller != null) {
-            final int scrollY = mScrollY;
-            if (scrollY != 0) {
-                // Pin to the top/bottom during overscroll
-                int restoreCount = canvas.save();
-                canvas.translate(0, scrollY);
-                mFastScroller.draw(canvas);
-                canvas.restoreToCount(restoreCount);
-            } else {
-                mFastScroller.draw(canvas);
-            }
-        }
     }
 
     /**
@@ -3820,11 +3808,8 @@
             return false;
         }
 
-        if (mFastScroller != null) {
-            boolean intercepted = mFastScroller.onInterceptTouchEvent(ev);
-            if (intercepted) {
-                return true;
-            }
+        if (mFastScroller != null && mFastScroller.onInterceptTouchEvent(ev)) {
+            return true;
         }
 
         switch (action & MotionEvent.ACTION_MASK) {
@@ -5672,78 +5657,96 @@
             return mDefInputConnection.sendKeyEvent(event);
         }
 
+        @Override
         public CharSequence getTextBeforeCursor(int n, int flags) {
             if (mTarget == null) return "";
             return mTarget.getTextBeforeCursor(n, flags);
         }
 
+        @Override
         public CharSequence getTextAfterCursor(int n, int flags) {
             if (mTarget == null) return "";
             return mTarget.getTextAfterCursor(n, flags);
         }
 
+        @Override
         public CharSequence getSelectedText(int flags) {
             if (mTarget == null) return "";
             return mTarget.getSelectedText(flags);
         }
 
+        @Override
         public int getCursorCapsMode(int reqModes) {
             if (mTarget == null) return InputType.TYPE_TEXT_FLAG_CAP_SENTENCES;
             return mTarget.getCursorCapsMode(reqModes);
         }
 
+        @Override
         public ExtractedText getExtractedText(ExtractedTextRequest request, int flags) {
             return getTarget().getExtractedText(request, flags);
         }
 
+        @Override
         public boolean deleteSurroundingText(int beforeLength, int afterLength) {
             return getTarget().deleteSurroundingText(beforeLength, afterLength);
         }
 
+        @Override
         public boolean setComposingText(CharSequence text, int newCursorPosition) {
             return getTarget().setComposingText(text, newCursorPosition);
         }
 
+        @Override
         public boolean setComposingRegion(int start, int end) {
             return getTarget().setComposingRegion(start, end);
         }
 
+        @Override
         public boolean finishComposingText() {
             return mTarget == null || mTarget.finishComposingText();
         }
 
+        @Override
         public boolean commitText(CharSequence text, int newCursorPosition) {
             return getTarget().commitText(text, newCursorPosition);
         }
 
+        @Override
         public boolean commitCompletion(CompletionInfo text) {
             return getTarget().commitCompletion(text);
         }
 
+        @Override
         public boolean commitCorrection(CorrectionInfo correctionInfo) {
             return getTarget().commitCorrection(correctionInfo);
         }
 
+        @Override
         public boolean setSelection(int start, int end) {
             return getTarget().setSelection(start, end);
         }
 
+        @Override
         public boolean performContextMenuAction(int id) {
             return getTarget().performContextMenuAction(id);
         }
 
+        @Override
         public boolean beginBatchEdit() {
             return getTarget().beginBatchEdit();
         }
 
+        @Override
         public boolean endBatchEdit() {
             return getTarget().endBatchEdit();
         }
 
+        @Override
         public boolean clearMetaKeyStates(int states) {
             return getTarget().clearMetaKeyStates(states);
         }
 
+        @Override
         public boolean performPrivateCommand(String action, Bundle data) {
             return getTarget().performPrivateCommand(action, data);
         }
@@ -6037,9 +6040,9 @@
 
     /**
      * Sets up the onClickHandler to be used by the RemoteViewsAdapter when inflating RemoteViews
-     * 
+     *
      * @param handler The OnClickHandler to use when inflating RemoteViews.
-     * 
+     *
      * @hide
      */
     public void setRemoteViewsOnClickHandler(OnClickHandler handler) {
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index aa33384..62e15786 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -16,49 +16,66 @@
 
 package android.widget;
 
+import android.animation.Animator;
+import android.animation.Animator.AnimatorListener;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.animation.PropertyValuesHolder;
 import android.content.Context;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.Paint;
 import android.graphics.Rect;
-import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
-import android.graphics.drawable.NinePatchDrawable;
-import android.os.Handler;
-import android.os.SystemClock;
+import android.os.Build;
+import android.text.TextUtils.TruncateAt;
+import android.util.IntProperty;
+import android.util.MathUtils;
+import android.util.Property;
+import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.View.MeasureSpec;
 import android.view.ViewConfiguration;
+import android.view.ViewGroup.LayoutParams;
+import android.view.ViewGroupOverlay;
 import android.widget.AbsListView.OnScrollListener;
 
+import com.android.internal.R;
+
 /**
  * Helper class for AbsListView to draw and control the Fast Scroll thumb
  */
 class FastScroller {
-    private static final String TAG = "FastScroller";
+    /** Duration of fade-out animation. */
+    private static final int DURATION_FADE_OUT = 300;
 
-    // Minimum number of pages to justify showing a fast scroll thumb
-    private static int MIN_PAGES = 4;
-    // Scroll thumb not showing
+    /** Duration of fade-in animation. */
+    private static final int DURATION_FADE_IN = 150;
+
+    /** Duration of transition cross-fade animation. */
+    private static final int DURATION_CROSS_FADE = 50;
+
+    /** Duration of transition resize animation. */
+    private static final int DURATION_RESIZE = 100;
+
+    /** Inactivity timeout before fading controls. */
+    private static final long FADE_TIMEOUT = 1500;
+
+    /** Minimum number of pages to justify showing a fast scroll thumb. */
+    private static final int MIN_PAGES = 4;
+
+    /** Scroll thumb and preview not showing. */
     private static final int STATE_NONE = 0;
-    // Not implemented yet - fade-in transition
-    @SuppressWarnings("unused")
-    private static final int STATE_ENTER = 1;
-    // Scroll thumb visible and moving along with the scrollbar
-    private static final int STATE_VISIBLE = 2;
-    // Scroll thumb being dragged by user
-    private static final int STATE_DRAGGING = 3;
-    // Scroll thumb fading out due to inactivity timeout
-    private static final int STATE_EXIT = 4;
 
-    private static final int[] PRESSED_STATES = new int[] {
-        android.R.attr.state_pressed
-    };
+    /** Scroll thumb visible and moving along with the scrollbar. */
+    private static final int STATE_VISIBLE = 1;
 
-    private static final int[] DEFAULT_STATES = new int[0];
+    /** Scroll thumb and preview being dragged by user. */
+    private static final int STATE_DRAGGING = 2;
 
+    /** Styleable attributes. */
     private static final int[] ATTRS = new int[] {
         android.R.attr.fastScrollTextColor,
         android.R.attr.fastScrollThumbDrawable,
@@ -68,6 +85,7 @@
         android.R.attr.fastScrollOverlayPosition
     };
 
+    // Styleable attribute indices.
     private static final int TEXT_COLOR = 0;
     private static final int THUMB_DRAWABLE = 1;
     private static final int TRACK_DRAWABLE = 2;
@@ -75,113 +93,247 @@
     private static final int PREVIEW_BACKGROUND_RIGHT = 4;
     private static final int OVERLAY_POSITION = 5;
 
+    // Positions for preview image and text.
     private static final int OVERLAY_FLOATING = 0;
     private static final int OVERLAY_AT_THUMB = 1;
 
-    private Drawable mThumbDrawable;
-    private Drawable mOverlayDrawable;
-    private Drawable mTrackDrawable;
+    // Indices for mPreviewResId.
+    private static final int PREVIEW_LEFT = 0;
+    private static final int PREVIEW_RIGHT = 1;
 
-    private Drawable mOverlayDrawableLeft;
-    private Drawable mOverlayDrawableRight;
+    /** Delay before considering a tap in the thumb area to be a drag. */
+    private static final long TAP_TIMEOUT = ViewConfiguration.getTapTimeout();
 
-    int mThumbH;
-    int mThumbW;
-    int mThumbY;
+    private final Rect mTempBounds = new Rect();
+    private final Rect mTempMargins = new Rect();
 
-    private RectF mOverlayPos;
-    private int mOverlaySize;
-    private int mOverlayPadding;
+    private final AbsListView mList;
+    private final ViewGroupOverlay mOverlay;
+    private final TextView mPrimaryText;
+    private final TextView mSecondaryText;
+    private final ImageView mThumbImage;
+    private final ImageView mTrackImage;
+    private final ImageView mPreviewImage;
 
-    AbsListView mList;
-    boolean mScrollCompleted;
-    private int mVisibleItem;
-    private Paint mPaint;
-    private int mListOffset;
+    /**
+     * Preview image resource IDs for left- and right-aligned layouts. See
+     * {@link #PREVIEW_LEFT} and {@link #PREVIEW_RIGHT}.
+     */
+    private final int[] mPreviewResId = new int[2];
+
+    /**
+     * Padding in pixels around the preview text. Applied as layout margins to
+     * the preview text and padding to the preview image.
+     */
+    private final int mPreviewPadding;
+
+    /** Whether there is a track image to display. */
+    private final boolean mHasTrackImage;
+
+    /** Set containing decoration transition animations. */
+    private AnimatorSet mDecorAnimation;
+
+    /** Set containing preview text transition animations. */
+    private AnimatorSet mPreviewAnimation;
+
+    /** Whether the primary text is showing. */
+    private boolean mShowingPrimary;
+
+    /** Whether we're waiting for completion of scrollTo(). */
+    private boolean mScrollCompleted;
+
+    /** The position of the first visible item in the list. */
+    private int mFirstVisibleItem;
+
+    /** The number of headers at the top of the view. */
+    private int mHeaderCount;
+
+    /** The number of items in the list. */
     private int mItemCount = -1;
+
+    /** The index of the current section. */
+    private int mCurrentSection = -1;
+
+    /** Whether the list is long enough to need a fast scroller. */
     private boolean mLongList;
 
-    private Object [] mSections;
-    private String mSectionText;
-    private boolean mDrawOverlay;
-    private ScrollFade mScrollFade;
+    private Object[] mSections;
 
+    /**
+     * Current decoration state, one of:
+     * <ul>
+     * <li>{@link #STATE_NONE}, nothing visible
+     * <li>{@link #STATE_VISIBLE}, showing track and thumb
+     * <li>{@link #STATE_DRAGGING}, visible and showing preview
+     * </ul>
+     */
     private int mState;
 
-    private Handler mHandler = new Handler();
-
-    BaseAdapter mListAdapter;
+    private BaseAdapter mListAdapter;
     private SectionIndexer mSectionIndexer;
 
-    private boolean mChangedBounds;
+    /** Whether decorations should be laid out from right to left. */
+    private boolean mLayoutFromRight;
 
-    private int mPosition;
-
+    /** Whether the scrollbar and decorations should always be shown. */
     private boolean mAlwaysShow;
 
+    /**
+     * Position for the preview image and text. One of:
+     * <ul>
+     * <li>{@link #OVERLAY_AT_THUMB}
+     * <li>{@link #OVERLAY_FLOATING}
+     * </ul>
+     */
     private int mOverlayPosition;
 
+    /** Whether to precisely match the thumb position to the list. */
     private boolean mMatchDragPosition;
 
-    float mInitialTouchY;
-    boolean mPendingDrag;
+    private float mInitialTouchY;
+    private boolean mHasPendingDrag;
     private int mScaledTouchSlop;
 
-    private static final int FADE_TIMEOUT = 1500;
-    private static final int PENDING_DRAG_DELAY = 180;
-
-    private final Rect mTmpRect = new Rect();
-
     private final Runnable mDeferStartDrag = new Runnable() {
         @Override
         public void run() {
             if (mList.mIsAttached) {
                 beginDrag();
 
-                final int viewHeight = mList.getHeight();
-                // Jitter
-                int newThumbY = (int) mInitialTouchY - mThumbH + 10;
-                if (newThumbY < 0) {
-                    newThumbY = 0;
-                } else if (newThumbY + mThumbH > viewHeight) {
-                    newThumbY = viewHeight - mThumbH;
-                }
-                mThumbY = newThumbY;
-                scrollTo((float) mThumbY / (viewHeight - mThumbH));
+                final float pos = getPosFromMotionEvent(mInitialTouchY);
+                scrollTo(pos);
             }
 
-            mPendingDrag = false;
+            mHasPendingDrag = false;
+        }
+    };
+
+    /**
+     * Used to delay hiding fast scroll decorations.
+     */
+    private final Runnable mDeferHide = new Runnable() {
+        @Override
+        public void run() {
+            setState(STATE_NONE);
+        }
+    };
+
+    /**
+     * Used to effect a transition from primary to secondary text.
+     */
+    private final AnimatorListener mSwitchPrimaryListener = new AnimatorListenerAdapter() {
+        @Override
+        public void onAnimationEnd(Animator animation) {
+            mShowingPrimary = !mShowingPrimary;
         }
     };
 
     public FastScroller(Context context, AbsListView listView) {
         mList = listView;
-        init(context);
+        mOverlay = listView.getOverlay();
+
+        mScaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+
+        final Resources res = context.getResources();
+        final TypedArray ta = context.getTheme().obtainStyledAttributes(ATTRS);
+
+        mTrackImage = new ImageView(context);
+
+        // Add track to overlay if it has an image.
+        final int trackResId = ta.getResourceId(TRACK_DRAWABLE, 0);
+        if (trackResId != 0) {
+            mHasTrackImage = true;
+            mTrackImage.setBackgroundResource(trackResId);
+            mOverlay.add(mTrackImage);
+        } else {
+            mHasTrackImage = false;
+        }
+
+        mThumbImage = new ImageView(context);
+
+        // Add thumb to overlay if it has an image.
+        final Drawable thumbDrawable = ta.getDrawable(THUMB_DRAWABLE);
+        if (thumbDrawable != null) {
+            mThumbImage.setImageDrawable(thumbDrawable);
+            mOverlay.add(mThumbImage);
+        }
+
+        // If necessary, apply minimum thumb width and height.
+        if (thumbDrawable.getIntrinsicWidth() <= 0 || thumbDrawable.getIntrinsicHeight() <= 0) {
+            mThumbImage.setMinimumWidth(res.getDimensionPixelSize(R.dimen.fastscroll_thumb_width));
+            mThumbImage.setMinimumHeight(
+                    res.getDimensionPixelSize(R.dimen.fastscroll_thumb_height));
+        }
+
+        final int previewSize = res.getDimensionPixelSize(R.dimen.fastscroll_overlay_size);
+        mPreviewImage = new ImageView(context);
+        mPreviewImage.setMinimumWidth(previewSize);
+        mPreviewImage.setMinimumHeight(previewSize);
+        mPreviewImage.setAlpha(0f);
+        mOverlay.add(mPreviewImage);
+
+        mPreviewPadding = res.getDimensionPixelSize(R.dimen.fastscroll_overlay_padding);
+
+        mPrimaryText = createPreviewTextView(context, ta);
+        mOverlay.add(mPrimaryText);
+        mSecondaryText = createPreviewTextView(context, ta);
+        mOverlay.add(mSecondaryText);
+
+        mPreviewResId[PREVIEW_LEFT] = ta.getResourceId(PREVIEW_BACKGROUND_LEFT, 0);
+        mPreviewResId[PREVIEW_RIGHT] = ta.getResourceId(PREVIEW_BACKGROUND_RIGHT, 0);
+        mOverlayPosition = ta.getInt(OVERLAY_POSITION, OVERLAY_FLOATING);
+        ta.recycle();
+
+        mScrollCompleted = true;
+        mState = STATE_VISIBLE;
+        mMatchDragPosition =
+                context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB;
+
+        getSectionsFromIndexer();
+        refreshDrawablePressedState();
+        setScrollbarPosition(mList.getVerticalScrollbarPosition());
+
+        mList.postDelayed(mDeferHide, FADE_TIMEOUT);
     }
 
+    /**
+     * @param alwaysShow Whether the fast scroll thumb should always be shown
+     */
     public void setAlwaysShow(boolean alwaysShow) {
         mAlwaysShow = alwaysShow;
+
         if (alwaysShow) {
-            mHandler.removeCallbacks(mScrollFade);
             setState(STATE_VISIBLE);
         } else if (mState == STATE_VISIBLE) {
-            mHandler.postDelayed(mScrollFade, FADE_TIMEOUT);
+            mList.postDelayed(mDeferHide, FADE_TIMEOUT);
         }
     }
 
+    /**
+     * @return Whether the fast scroll thumb will always be shown
+     * @see #setAlwaysShow(boolean)
+     */
     public boolean isAlwaysShowEnabled() {
         return mAlwaysShow;
     }
 
-    private void refreshDrawableState() {
-        int[] state = mState == STATE_DRAGGING ? PRESSED_STATES : DEFAULT_STATES;
+    /**
+     * Immediately transitions the fast scroller decorations to a hidden state.
+     */
+    public void stop() {
+        setState(STATE_NONE);
+    }
 
-        if (mThumbDrawable != null && mThumbDrawable.isStateful()) {
-            mThumbDrawable.setState(state);
+    /**
+     * @return Whether the fast scroll thumb should be shown.
+     */
+    public boolean shouldShow() {
+        // Don't show if the list is as tall as or shorter than the thumbnail.
+        if (mList.getHeight() <= mThumbImage.getHeight()) {
+            return false;
         }
-        if (mTrackDrawable != null && mTrackDrawable.isStateful()) {
-            mTrackDrawable.setState(state);
-        }
+
+        return true;
     }
 
     public void setScrollbarPosition(int position) {
@@ -189,374 +341,403 @@
             position = mList.isLayoutRtl() ?
                     View.SCROLLBAR_POSITION_LEFT : View.SCROLLBAR_POSITION_RIGHT;
         }
-        mPosition = position;
-        switch (position) {
-            default:
-            case View.SCROLLBAR_POSITION_RIGHT:
-                mOverlayDrawable = mOverlayDrawableRight;
-                break;
-            case View.SCROLLBAR_POSITION_LEFT:
-                mOverlayDrawable = mOverlayDrawableLeft;
-                break;
+
+        mLayoutFromRight = position != View.SCROLLBAR_POSITION_LEFT;
+
+        final int previewResId = mPreviewResId[mLayoutFromRight ? PREVIEW_RIGHT : PREVIEW_LEFT];
+        mPreviewImage.setBackgroundResource(previewResId);
+
+        // Add extra padding for text.
+        final Drawable background = mPreviewImage.getBackground();
+        if (background != null) {
+            final Rect padding = mTempBounds;
+            background.getPadding(padding);
+            padding.offset(mPreviewPadding, mPreviewPadding);
+            mPreviewImage.setPadding(padding.left, padding.top, padding.right, padding.bottom);
         }
+
+        updateLayout();
     }
 
     public int getWidth() {
-        return mThumbW;
+        return mThumbImage.getWidth();
     }
 
-    public void setState(int state) {
-        switch (state) {
-            case STATE_NONE:
-                mHandler.removeCallbacks(mScrollFade);
-                mList.invalidate();
-                break;
-            case STATE_VISIBLE:
-                if (mState != STATE_VISIBLE) { // Optimization
-                    resetThumbPos();
-                }
-                // Fall through
-            case STATE_DRAGGING:
-                mHandler.removeCallbacks(mScrollFade);
-                break;
-            case STATE_EXIT:
-                final int viewWidth = mList.getWidth();
-                final int top = mThumbY;
-                final int bottom = mThumbY + mThumbH;
-                final int left;
-                final int right;
-                switch (mList.getLayoutDirection()) {
-                    case View.LAYOUT_DIRECTION_RTL:
-                        left = 0;
-                        right = mThumbW;
-                        break;
-                    case View.LAYOUT_DIRECTION_LTR:
-                    default:
-                        left = viewWidth - mThumbW;
-                        right = viewWidth;
-                }
-                mList.invalidate(left, top, right, bottom);
-                break;
+    public void onSizeChanged(int w, int h, int oldw, int oldh) {
+        updateLayout();
+    }
+
+    public void onItemCountChanged(int oldTotalItemCount, int totalItemCount) {
+        final int visibleItemCount = mList.getChildCount();
+        final boolean hasMoreItems = totalItemCount - visibleItemCount > 0;
+        if (hasMoreItems && mState != STATE_DRAGGING) {
+            final int firstVisibleItem = mList.getFirstVisiblePosition();
+            setThumbPos(getPosFromItemCount(firstVisibleItem, visibleItemCount, totalItemCount));
         }
-        mState = state;
-        refreshDrawableState();
     }
 
-    public int getState() {
-        return mState;
-    }
-
-    private void resetThumbPos() {
-        final int viewWidth = mList.getWidth();
-        // Bounds are always top right. Y coordinate get's translated during draw
-        switch (mPosition) {
-            case View.SCROLLBAR_POSITION_RIGHT:
-                mThumbDrawable.setBounds(viewWidth - mThumbW, 0, viewWidth, mThumbH);
-                break;
-            case View.SCROLLBAR_POSITION_LEFT:
-                mThumbDrawable.setBounds(0, 0, mThumbW, mThumbH);
-                break;
-        }
-        mThumbDrawable.setAlpha(ScrollFade.ALPHA_MAX);
-    }
-
-    private void useThumbDrawable(Context context, Drawable drawable) {
-        mThumbDrawable = drawable;
-        if (drawable instanceof NinePatchDrawable) {
-            mThumbW = context.getResources().getDimensionPixelSize(
-                    com.android.internal.R.dimen.fastscroll_thumb_width);
-            mThumbH = context.getResources().getDimensionPixelSize(
-                    com.android.internal.R.dimen.fastscroll_thumb_height);
-        } else {
-            mThumbW = drawable.getIntrinsicWidth();
-            mThumbH = drawable.getIntrinsicHeight();
-        }
-        mChangedBounds = true;
-    }
-
-    private void init(Context context) {
-        // Get both the scrollbar states drawables
-        final TypedArray ta = context.getTheme().obtainStyledAttributes(ATTRS);
-        useThumbDrawable(context, ta.getDrawable(THUMB_DRAWABLE));
-        mTrackDrawable = ta.getDrawable(TRACK_DRAWABLE);
-
-        mOverlayDrawableLeft = ta.getDrawable(PREVIEW_BACKGROUND_LEFT);
-        mOverlayDrawableRight = ta.getDrawable(PREVIEW_BACKGROUND_RIGHT);
-        mOverlayPosition = ta.getInt(OVERLAY_POSITION, OVERLAY_FLOATING);
-
-        mScrollCompleted = true;
-
-        getSectionsFromIndexer();
-
+    /**
+     * Creates a view into which preview text can be placed.
+     */
+    private TextView createPreviewTextView(Context context, TypedArray ta) {
+        final LayoutParams params = new LayoutParams(
+                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
         final Resources res = context.getResources();
-        mOverlaySize = res.getDimensionPixelSize(
-                com.android.internal.R.dimen.fastscroll_overlay_size);
-        mOverlayPadding = res.getDimensionPixelSize(
-                com.android.internal.R.dimen.fastscroll_overlay_padding);
-        mOverlayPos = new RectF();
-        mScrollFade = new ScrollFade();
-        mPaint = new Paint();
-        mPaint.setAntiAlias(true);
-        mPaint.setTextAlign(Paint.Align.CENTER);
-        mPaint.setTextSize(mOverlaySize / 2);
+        final int minSize = res.getDimensionPixelSize(R.dimen.fastscroll_overlay_size);
+        final ColorStateList textColor = ta.getColorStateList(TEXT_COLOR);
+        final float textSize = res.getDimension(R.dimen.fastscroll_overlay_text_size);
+        final TextView textView = new TextView(context);
+        textView.setLayoutParams(params);
+        textView.setTextColor(textColor);
+        textView.setTextSize(textSize);
+        textView.setSingleLine(true);
+        textView.setEllipsize(TruncateAt.MIDDLE);
+        textView.setGravity(Gravity.CENTER);
+        textView.setAlpha(0f);
 
-        ColorStateList textColor = ta.getColorStateList(TEXT_COLOR);
-        int textColorNormal = textColor.getDefaultColor();
-        mPaint.setColor(textColorNormal);
-        mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+        // Manually propagate inherited layout direction.
+        textView.setLayoutDirection(mList.getLayoutDirection());
 
-        // to show mOverlayDrawable properly
-        if (mList.getWidth() > 0 && mList.getHeight() > 0) {
-            onSizeChanged(mList.getWidth(), mList.getHeight(), 0, 0);
+        return textView;
+    }
+
+    /**
+     * Measures and layouts the scrollbar and decorations.
+     */
+    private void updateLayout() {
+        layoutThumb();
+        layoutTrack();
+
+        final Rect bounds = mTempBounds;
+        measurePreview(mPrimaryText, bounds);
+        applyLayout(mPrimaryText, bounds);
+        measurePreview(mSecondaryText, bounds);
+        applyLayout(mSecondaryText, bounds);
+
+        if (mPreviewImage != null) {
+            // Apply preview image padding.
+            bounds.left -= mPreviewImage.getPaddingLeft();
+            bounds.top -= mPreviewImage.getPaddingTop();
+            bounds.right += mPreviewImage.getPaddingRight();
+            bounds.bottom += mPreviewImage.getPaddingBottom();
+            applyLayout(mPreviewImage, bounds);
+        }
+    }
+
+    /**
+     * Layouts a view within the specified bounds and pins the pivot point to
+     * the appropriate edge.
+     *
+     * @param view The view to layout.
+     * @param bounds Bounds at which to layout the view.
+     */
+    private void applyLayout(View view, Rect bounds) {
+        view.layout(bounds.left, bounds.top, bounds.right, bounds.bottom);
+        view.setPivotX(mLayoutFromRight ? bounds.right - bounds.left : 0);
+    }
+
+    /**
+     * Measures the preview text bounds, taking preview image padding into
+     * account. This method should only be called after {@link #layoutThumb()}
+     * and {@link #layoutTrack()} have both been called at least once.
+     *
+     * @param v The preview text view to measure.
+     * @param out Rectangle into which measured bounds are placed.
+     */
+    private void measurePreview(View v, Rect out) {
+        // Apply the preview image's padding as layout margins.
+        final Rect margins = mTempMargins;
+        margins.left = mPreviewImage.getPaddingLeft();
+        margins.top = mPreviewImage.getPaddingTop();
+        margins.right = mPreviewImage.getPaddingRight();
+        margins.bottom = mPreviewImage.getPaddingBottom();
+
+        if (mOverlayPosition == OVERLAY_AT_THUMB) {
+            measureViewToSide(v, mThumbImage, margins, out);
+        } else {
+            measureFloating(v, margins, out);
+        }
+    }
+
+    /**
+     * Measures the bounds for a view that should be laid out against the edge
+     * of an adjacent view. If no adjacent view is provided, lays out against
+     * the list edge.
+     *
+     * @param view The view to measure for layout.
+     * @param adjacent (Optional) The adjacent view, may be null to align to the
+     *            list edge.
+     * @param margins Layout margins to apply to the view.
+     * @param out Rectangle into which measured bounds are placed.
+     */
+    private void measureViewToSide(View view, View adjacent, Rect margins, Rect out) {
+        final int marginLeft;
+        final int marginTop;
+        final int marginRight;
+        if (margins == null) {
+            marginLeft = 0;
+            marginTop = 0;
+            marginRight = 0;
+        } else {
+            marginLeft = margins.left;
+            marginTop = margins.top;
+            marginRight = margins.right;
         }
 
-        mState = STATE_NONE;
-        refreshDrawableState();
+        final int listWidth = mList.getWidth();
+        final int maxWidth;
+        if (adjacent == null) {
+            maxWidth = listWidth;
+        } else if (mLayoutFromRight) {
+            maxWidth = adjacent.getLeft();
+        } else {
+            maxWidth = listWidth - adjacent.getRight();
+        }
 
-        ta.recycle();
+        final int adjMaxWidth = maxWidth - marginLeft - marginRight;
+        final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(adjMaxWidth, MeasureSpec.AT_MOST);
+        final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+        view.measure(widthMeasureSpec, heightMeasureSpec);
 
-        mScaledTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+        // Align to the left or right.
+        final int width = view.getMeasuredWidth();
+        final int left;
+        final int right;
+        if (mLayoutFromRight) {
+            right = (adjacent == null ? listWidth : adjacent.getLeft()) - marginRight;
+            left = right - width;
+        } else {
+            left = (adjacent == null ? 0 : adjacent.getRight()) + marginLeft;
+            right = left + width;
+        }
 
-        mMatchDragPosition = context.getApplicationInfo().targetSdkVersion >=
-                android.os.Build.VERSION_CODES.HONEYCOMB;
-
-        setScrollbarPosition(mList.getVerticalScrollbarPosition());
+        // Don't adjust the vertical position.
+        final int top = marginTop;
+        final int bottom = top + view.getMeasuredHeight();
+        out.set(left, top, right, bottom);
     }
 
-    void stop() {
-        setState(STATE_NONE);
+    private void measureFloating(View preview, Rect margins, Rect out) {
+        final int marginLeft;
+        final int marginTop;
+        final int marginRight;
+        if (margins == null) {
+            marginLeft = 0;
+            marginTop = 0;
+            marginRight = 0;
+        } else {
+            marginLeft = margins.left;
+            marginTop = margins.top;
+            marginRight = margins.right;
+        }
+
+        final View list = mList;
+        final int listWidth = list.getWidth();
+        final int adjMaxWidth = listWidth - marginLeft - marginRight;
+        final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(adjMaxWidth, MeasureSpec.AT_MOST);
+        final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+        preview.measure(widthMeasureSpec, heightMeasureSpec);
+
+        // Align at the vertical center, 10% from the top.
+        final int width = preview.getMeasuredWidth();
+        final int top = list.getHeight() / 10 + marginTop;
+        final int bottom = top + preview.getMeasuredHeight();
+        final int left = (listWidth - width) / 2;
+        final int right = left + width;
+        out.set(left, top, right, bottom);
     }
 
-    boolean isVisible() {
-        return !(mState == STATE_NONE);
+    /**
+     * Lays out the thumb according to the current scrollbar position.
+     */
+    private void layoutThumb() {
+        final Rect bounds = mTempBounds;
+        measureViewToSide(mThumbImage, null, null, bounds);
+        applyLayout(mThumbImage, bounds);
     }
 
-    public void draw(Canvas canvas) {
+    /**
+     * Lays out the track centered on the thumb, if available, or against the
+     * edge if no thumb is available. Must be called after {@link #layoutThumb}.
+     */
+    private void layoutTrack() {
+        final View track = mTrackImage;
+        final View thumb = mThumbImage;
+        final View list = mList;
+        final int listWidth = list.getWidth();
+        final int widthMeasureSpec = MeasureSpec.makeMeasureSpec(listWidth, MeasureSpec.AT_MOST);
+        final int heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+        track.measure(widthMeasureSpec, heightMeasureSpec);
 
-        if (mState == STATE_NONE) {
-            // No need to draw anything
+        final int trackWidth = track.getMeasuredWidth();
+        final int thumbHalfHeight = thumb == null ? 0 : thumb.getHeight() / 2;
+        final int left = thumb == null ? listWidth - trackWidth :
+            thumb.getLeft() + (thumb.getWidth() - trackWidth) / 2;
+        final int right = left + trackWidth;
+        final int top = thumbHalfHeight;
+        final int bottom = list.getHeight() - thumbHalfHeight;
+        track.layout(left, top, right, bottom);
+    }
+
+    private void setState(int state) {
+        mList.removeCallbacks(mDeferHide);
+
+        if (mAlwaysShow && state == STATE_NONE) {
+            state = STATE_VISIBLE;
+        }
+
+        if (state == mState) {
             return;
         }
 
-        final int y = mThumbY;
-        final int viewWidth = mList.getWidth();
-        final FastScroller.ScrollFade scrollFade = mScrollFade;
-
-        int alpha = -1;
-        if (mState == STATE_EXIT) {
-            alpha = scrollFade.getAlpha();
-            if (alpha < ScrollFade.ALPHA_MAX / 2) {
-                mThumbDrawable.setAlpha(alpha * 2);
-            }
-            int left = 0;
-            switch (mPosition) {
-                case View.SCROLLBAR_POSITION_RIGHT:
-                    left = viewWidth - (mThumbW * alpha) / ScrollFade.ALPHA_MAX;
-                    break;
-                case View.SCROLLBAR_POSITION_LEFT:
-                    left = -mThumbW + (mThumbW * alpha) / ScrollFade.ALPHA_MAX;
-                    break;
-            }
-            mThumbDrawable.setBounds(left, 0, left + mThumbW, mThumbH);
-            mChangedBounds = true;
+        switch (state) {
+            case STATE_NONE:
+                transitionToHidden();
+                break;
+            case STATE_VISIBLE:
+                transitionToVisible();
+                break;
+            case STATE_DRAGGING:
+                transitionToDragging();
+                break;
         }
 
-        if (mTrackDrawable != null) {
-            final Rect thumbBounds = mThumbDrawable.getBounds();
-            final int left = thumbBounds.left;
-            final int halfThumbHeight = (thumbBounds.bottom - thumbBounds.top) / 2;
-            final int trackWidth = mTrackDrawable.getIntrinsicWidth();
-            final int trackLeft = (left + mThumbW / 2) - trackWidth / 2;
-            mTrackDrawable.setBounds(trackLeft, halfThumbHeight,
-                    trackLeft + trackWidth, mList.getHeight() - halfThumbHeight);
-            mTrackDrawable.draw(canvas);
-        }
+        mState = state;
 
-        canvas.translate(0, y);
-        mThumbDrawable.draw(canvas);
-        canvas.translate(0, -y);
-
-        // If user is dragging the scroll bar, draw the alphabet overlay
-        if (mState == STATE_DRAGGING && mDrawOverlay) {
-            final Drawable overlay = mOverlayDrawable;
-            final Paint paint = mPaint;
-            final String sectionText = mSectionText;
-            final Rect tmpRect = mTmpRect;
-
-            // TODO: Use a text view in an overlay for transition animations and
-            // handling of text overflow.
-            paint.getTextBounds(sectionText, 0, sectionText.length(), tmpRect);
-            final int textWidth = tmpRect.width();
-            final int textHeight = tmpRect.height();
-
-            overlay.getPadding(tmpRect);
-            final int overlayWidth = Math.max(
-                    mOverlaySize, textWidth + tmpRect.left + tmpRect.right + mOverlayPadding * 2);
-            final int overlayHeight = Math.max(
-                    mOverlaySize, textHeight + tmpRect.top + tmpRect.bottom + mOverlayPadding * 2);
-            final RectF pos = mOverlayPos;
-
-            if (mOverlayPosition == OVERLAY_AT_THUMB) {
-                final Rect thumbBounds = mThumbDrawable.getBounds();
-
-                switch (mPosition) {
-                    case View.SCROLLBAR_POSITION_LEFT:
-                        pos.left = Math.min(
-                                thumbBounds.right + mThumbW, mList.getWidth() - overlayWidth);
-                        break;
-                    case View.SCROLLBAR_POSITION_RIGHT:
-                    default:
-                        pos.left = Math.max(0, thumbBounds.left - mThumbW - overlayWidth);
-                        break;
-                }
-
-                pos.top = Math.max(0, Math.min(
-                        y + (mThumbH - overlayHeight) / 2, mList.getHeight() - overlayHeight));
-            }
-
-            pos.right = pos.left + overlayWidth;
-            pos.bottom = pos.top + overlayHeight;
-
-            overlay.setBounds((int) pos.left, (int) pos.top, (int) pos.right, (int) pos.bottom);
-            overlay.draw(canvas);
-
-            final float hOff = (tmpRect.right - tmpRect.left) / 2.0f;
-            final float vOff = (tmpRect.bottom - tmpRect.top) / 2.0f;
-            final float cX = pos.centerX() - hOff;
-            final float cY = pos.centerY() + (overlayHeight / 4.0f) - paint.descent() - vOff;
-            canvas.drawText(mSectionText, cX, cY, paint);
-        } else if (mState == STATE_EXIT) {
-            if (alpha == 0) { // Done with exit
-                setState(STATE_NONE);
-            } else {
-                final int left, right, top, bottom;
-                if (mTrackDrawable != null) {
-                    top = 0;
-                    bottom = mList.getHeight();
-                } else {
-                    top = y;
-                    bottom = y + mThumbH;
-                }
-                switch (mList.getLayoutDirection()) {
-                    case View.LAYOUT_DIRECTION_RTL:
-                        left = 0;
-                        right = mThumbW;
-                        break;
-                    case View.LAYOUT_DIRECTION_LTR:
-                    default:
-                        left = viewWidth - mThumbW;
-                        right = viewWidth;
-                }
-                mList.invalidate(left, top, right, bottom);
-            }
-        }
+        refreshDrawablePressedState();
     }
 
-    void onSizeChanged(int w, int h, int oldw, int oldh) {
-        if (mThumbDrawable != null) {
-            switch (mPosition) {
-                default:
-                case View.SCROLLBAR_POSITION_RIGHT:
-                    mThumbDrawable.setBounds(w - mThumbW, 0, w, mThumbH);
-                    break;
-                case View.SCROLLBAR_POSITION_LEFT:
-                    mThumbDrawable.setBounds(0, 0, mThumbW, mThumbH);
-                    break;
-            }
-        }
-        if (mOverlayPosition == OVERLAY_FLOATING) {
-            final RectF pos = mOverlayPos;
-            pos.left = (w - mOverlaySize) / 2;
-            pos.right = pos.left + mOverlaySize;
-            pos.top = h / 10; // 10% from top
-            pos.bottom = pos.top + mOverlaySize;
-            if (mOverlayDrawable != null) {
-                mOverlayDrawable.setBounds((int) pos.left, (int) pos.top,
-                        (int) pos.right, (int) pos.bottom);
-            }
-        }
+    private void refreshDrawablePressedState() {
+        final boolean isPressed = mState == STATE_DRAGGING;
+        mThumbImage.setPressed(isPressed);
+        mTrackImage.setPressed(isPressed);
     }
 
-    void onItemCountChanged(int oldCount, int newCount) {
-        if (mAlwaysShow) {
-            mLongList = true;
+    /**
+     * Shows nothing.
+     */
+    private void transitionToHidden() {
+        if (mDecorAnimation != null) {
+            mDecorAnimation.cancel();
         }
+
+        final Animator fadeOut = groupAnimatorOfFloat(View.ALPHA, 0f, mThumbImage, mTrackImage,
+                mPreviewImage, mPrimaryText, mSecondaryText).setDuration(DURATION_FADE_OUT);
+
+        // Push the thumb and track outside the list bounds.
+        final float offset = mLayoutFromRight ? mThumbImage.getWidth() : -mThumbImage.getWidth();
+        final Animator slideOut = groupAnimatorOfFloat(
+                View.TRANSLATION_X, offset, mThumbImage, mTrackImage)
+                .setDuration(DURATION_FADE_OUT);
+
+        mDecorAnimation = new AnimatorSet();
+        mDecorAnimation.playTogether(fadeOut, slideOut);
+        mDecorAnimation.start();
     }
 
-    void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
-            int totalItemCount) {
-        // Are there enough pages to require fast scroll? Recompute only if total count changes
+    /**
+     * Shows the thumb and track.
+     */
+    private void transitionToVisible() {
+        if (mDecorAnimation != null) {
+            mDecorAnimation.cancel();
+        }
+
+        final Animator fadeIn = groupAnimatorOfFloat(View.ALPHA, 1f, mThumbImage, mTrackImage)
+                .setDuration(DURATION_FADE_IN);
+        final Animator fadeOut = groupAnimatorOfFloat(
+                View.ALPHA, 0f, mPreviewImage, mPrimaryText, mSecondaryText)
+                .setDuration(DURATION_FADE_OUT);
+        final Animator slideIn = groupAnimatorOfFloat(
+                View.TRANSLATION_X, 0f, mThumbImage, mTrackImage).setDuration(DURATION_FADE_IN);
+
+        mDecorAnimation = new AnimatorSet();
+        mDecorAnimation.playTogether(fadeIn, fadeOut, slideIn);
+        mDecorAnimation.start();
+    }
+
+    /**
+     * Shows the thumb, preview, and track.
+     */
+    private void transitionToDragging() {
+        if (mDecorAnimation != null) {
+            mDecorAnimation.cancel();
+        }
+
+        final Animator fadeIn = groupAnimatorOfFloat(
+                View.ALPHA, 1f, mThumbImage, mTrackImage, mPreviewImage)
+                .setDuration(DURATION_FADE_IN);
+        final Animator slideIn = groupAnimatorOfFloat(
+                View.TRANSLATION_X, 0f, mThumbImage, mTrackImage).setDuration(DURATION_FADE_IN);
+
+        mDecorAnimation = new AnimatorSet();
+        mDecorAnimation.playTogether(fadeIn, slideIn);
+        mDecorAnimation.start();
+
+        // Ensure the preview text is correct.
+        final String previewText = getPreviewText();
+        transitionPreviewLayout(previewText);
+    }
+
+    private boolean isLongList(int visibleItemCount, int totalItemCount) {
+        // Are there enough pages to require fast scroll? Recompute only if
+        // total count changes.
         if (mItemCount != totalItemCount && visibleItemCount > 0) {
             mItemCount = totalItemCount;
             mLongList = mItemCount / visibleItemCount >= MIN_PAGES;
         }
-        if (mAlwaysShow) {
-            mLongList = true;
-        }
-        if (!mLongList) {
-            if (mState != STATE_NONE) {
-                setState(STATE_NONE);
-            }
+
+        return mLongList;
+    }
+
+    public void onScroll(int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+        if (!mAlwaysShow && !isLongList(visibleItemCount, totalItemCount)) {
+            setState(STATE_NONE);
             return;
         }
-        if (totalItemCount - visibleItemCount > 0 && mState != STATE_DRAGGING) {
-            mThumbY = getThumbPositionForListPosition(firstVisibleItem, visibleItemCount,
-                    totalItemCount);
-            if (mChangedBounds) {
-                resetThumbPos();
-                mChangedBounds = false;
-            }
+
+        final boolean hasMoreItems = totalItemCount - visibleItemCount > 0;
+        if (hasMoreItems && mState != STATE_DRAGGING) {
+            setThumbPos(getPosFromItemCount(firstVisibleItem, visibleItemCount, totalItemCount));
         }
+
         mScrollCompleted = true;
-        if (firstVisibleItem == mVisibleItem) {
-            return;
-        }
-        mVisibleItem = firstVisibleItem;
-        if (mState != STATE_DRAGGING) {
-            setState(STATE_VISIBLE);
-            if (!mAlwaysShow) {
-                mHandler.postDelayed(mScrollFade, FADE_TIMEOUT);
+
+        if (mFirstVisibleItem != firstVisibleItem) {
+            mFirstVisibleItem = firstVisibleItem;
+
+            // Show the thumb, if necessary, and set up auto-fade.
+            if (mState != STATE_DRAGGING) {
+                setState(STATE_VISIBLE);
+                mList.postDelayed(mDeferHide, FADE_TIMEOUT);
             }
         }
     }
 
-    SectionIndexer getSectionIndexer() {
-        return mSectionIndexer;
-    }
-
-    Object[] getSections() {
-        if (mListAdapter == null && mList != null) {
-            getSectionsFromIndexer();
-        }
-        return mSections;
-    }
-
-    void getSectionsFromIndexer() {
-        Adapter adapter = mList.getAdapter();
+    private void getSectionsFromIndexer() {
         mSectionIndexer = null;
+
+        Adapter adapter = mList.getAdapter();
         if (adapter instanceof HeaderViewListAdapter) {
-            mListOffset = ((HeaderViewListAdapter)adapter).getHeadersCount();
-            adapter = ((HeaderViewListAdapter)adapter).getWrappedAdapter();
+            mHeaderCount = ((HeaderViewListAdapter) adapter).getHeadersCount();
+            adapter = ((HeaderViewListAdapter) adapter).getWrappedAdapter();
         }
+
         if (adapter instanceof ExpandableListConnector) {
-            ExpandableListAdapter expAdapter = ((ExpandableListConnector)adapter).getAdapter();
+            final ExpandableListAdapter expAdapter = ((ExpandableListConnector) adapter)
+                    .getAdapter();
             if (expAdapter instanceof SectionIndexer) {
                 mSectionIndexer = (SectionIndexer) expAdapter;
                 mListAdapter = (BaseAdapter) adapter;
                 mSections = mSectionIndexer.getSections();
             }
+        } else if (adapter instanceof SectionIndexer) {
+            mListAdapter = (BaseAdapter) adapter;
+            mSectionIndexer = (SectionIndexer) adapter;
+            mSections = mSectionIndexer.getSections();
         } else {
-            if (adapter instanceof SectionIndexer) {
-                mListAdapter = (BaseAdapter) adapter;
-                mSectionIndexer = (SectionIndexer) adapter;
-                mSections = mSectionIndexer.getSections();
-                if (mSections == null) {
-                    mSections = new String[] { " " };
-                }
-            } else {
-                mListAdapter = (BaseAdapter) adapter;
-                mSections = new String[] { " " };
-            }
+            mListAdapter = (BaseAdapter) adapter;
+            mSections = null;
         }
     }
 
@@ -564,21 +745,24 @@
         mListAdapter = null;
     }
 
-    void scrollTo(float position) {
-        int count = mList.getCount();
+    /**
+     * Scrolls to a specific position within the section
+     * @param position
+     */
+    private void scrollTo(float position) {
         mScrollCompleted = false;
-        float fThreshold = (1.0f / count) / 8;
+
+        final int count = mList.getCount();
         final Object[] sections = mSections;
+        final int sectionCount = sections == null ? 0 : sections.length;
         int sectionIndex;
-        if (sections != null && sections.length > 1) {
-            final int nSections = sections.length;
-            int section = (int) (position * nSections);
-            if (section >= nSections) {
-                section = nSections - 1;
-            }
-            int exactSection = section;
-            sectionIndex = section;
-            int index = mSectionIndexer.getPositionForSection(section);
+        if (sections != null && sectionCount > 1) {
+            final int exactSection = MathUtils.constrain(
+                    (int) (position * sectionCount), 0, sectionCount - 1);
+            int targetSection = exactSection;
+            int targetIndex = mSectionIndexer.getPositionForSection(targetSection);
+            sectionIndex = targetSection;
+
             // Given the expected section and index, the following code will
             // try to account for missing sections (no names starting with..)
             // It will compute the scroll space of surrounding empty sections
@@ -586,25 +770,26 @@
             // available space, so that there is always some list movement while
             // the user moves the thumb.
             int nextIndex = count;
-            int prevIndex = index;
-            int prevSection = section;
-            int nextSection = section + 1;
+            int prevIndex = targetIndex;
+            int prevSection = targetSection;
+            int nextSection = targetSection + 1;
+
             // Assume the next section is unique
-            if (section < nSections - 1) {
-                nextIndex = mSectionIndexer.getPositionForSection(section + 1);
+            if (targetSection < sectionCount - 1) {
+                nextIndex = mSectionIndexer.getPositionForSection(targetSection + 1);
             }
 
             // Find the previous index if we're slicing the previous section
-            if (nextIndex == index) {
+            if (nextIndex == targetIndex) {
                 // Non-existent letter
-                while (section > 0) {
-                    section--;
-                    prevIndex = mSectionIndexer.getPositionForSection(section);
-                    if (prevIndex != index) {
-                        prevSection = section;
-                        sectionIndex = section;
+                while (targetSection > 0) {
+                    targetSection--;
+                    prevIndex = mSectionIndexer.getPositionForSection(targetSection);
+                    if (prevIndex != targetIndex) {
+                        prevSection = targetSection;
+                        sectionIndex = targetSection;
                         break;
-                    } else if (section == 0) {
+                    } else if (targetSection == 0) {
                         // When section reaches 0 here, sectionIndex must follow it.
                         // Assuming mSectionIndexer.getPositionForSection(0) == 0.
                         sectionIndex = 0;
@@ -612,131 +797,281 @@
                     }
                 }
             }
+
             // Find the next index, in case the assumed next index is not
             // unique. For instance, if there is no P, then request for P's
             // position actually returns Q's. So we need to look ahead to make
             // sure that there is really a Q at Q's position. If not, move
             // further down...
             int nextNextSection = nextSection + 1;
-            while (nextNextSection < nSections &&
+            while (nextNextSection < sectionCount &&
                     mSectionIndexer.getPositionForSection(nextNextSection) == nextIndex) {
                 nextNextSection++;
                 nextSection++;
             }
+
             // Compute the beginning and ending scroll range percentage of the
-            // currently visible letter. This could be equal to or greater than
-            // (1 / nSections).
-            float fPrev = (float) prevSection / nSections;
-            float fNext = (float) nextSection / nSections;
-            if (prevSection == exactSection && position - fPrev < fThreshold) {
-                index = prevIndex;
+            // currently visible section. This could be equal to or greater than
+            // (1 / nSections). If the target position is near the previous
+            // position, snap to the previous position.
+            final float prevPosition = (float) prevSection / sectionCount;
+            final float nextPosition = (float) nextSection / sectionCount;
+            final float snapThreshold = (count == 0) ? Float.MAX_VALUE : .125f / count;
+            if (prevSection == exactSection && position - prevPosition < snapThreshold) {
+                targetIndex = prevIndex;
             } else {
-                index = prevIndex + (int) ((nextIndex - prevIndex) * (position - fPrev)
-                    / (fNext - fPrev));
+                targetIndex = prevIndex + (int) ((nextIndex - prevIndex) * (position - prevPosition)
+                    / (nextPosition - prevPosition));
             }
-            // Don't overflow
-            if (index > count - 1) index = count - 1;
+
+            // Clamp to valid positions.
+            targetIndex = MathUtils.constrain(targetIndex, 0, count - 1);
 
             if (mList instanceof ExpandableListView) {
-                ExpandableListView expList = (ExpandableListView) mList;
+                final ExpandableListView expList = (ExpandableListView) mList;
                 expList.setSelectionFromTop(expList.getFlatListPosition(
-                        ExpandableListView.getPackedPositionForGroup(index + mListOffset)), 0);
+                        ExpandableListView.getPackedPositionForGroup(targetIndex + mHeaderCount)),
+                        0);
             } else if (mList instanceof ListView) {
-                ((ListView)mList).setSelectionFromTop(index + mListOffset, 0);
+                ((ListView) mList).setSelectionFromTop(targetIndex + mHeaderCount, 0);
             } else {
-                mList.setSelection(index + mListOffset);
+                mList.setSelection(targetIndex + mHeaderCount);
             }
         } else {
-            int index = (int) (position * count);
-            // Don't overflow
-            if (index > count - 1) index = count - 1;
+            final int index = MathUtils.constrain((int) (position * count), 0, count - 1);
 
             if (mList instanceof ExpandableListView) {
                 ExpandableListView expList = (ExpandableListView) mList;
                 expList.setSelectionFromTop(expList.getFlatListPosition(
-                        ExpandableListView.getPackedPositionForGroup(index + mListOffset)), 0);
+                        ExpandableListView.getPackedPositionForGroup(index + mHeaderCount)), 0);
             } else if (mList instanceof ListView) {
-                ((ListView)mList).setSelectionFromTop(index + mListOffset, 0);
+                ((ListView)mList).setSelectionFromTop(index + mHeaderCount, 0);
             } else {
-                mList.setSelection(index + mListOffset);
+                mList.setSelection(index + mHeaderCount);
             }
+
             sectionIndex = -1;
         }
 
-        if (sectionIndex >= 0) {
-            String text = mSectionText = sections[sectionIndex].toString();
-            mDrawOverlay = (text.length() != 1 || text.charAt(0) != ' ') &&
-                    sectionIndex < sections.length;
+        if (sectionIndex >= 0 && sectionIndex < sections.length) {
+            // If we moved sections, display section.
+            if (mCurrentSection != sectionIndex) {
+                mCurrentSection = sectionIndex;
+                final String section = sections[sectionIndex].toString();
+                transitionToDragging();
+                transitionPreviewLayout(section);
+            }
         } else {
-            mDrawOverlay = false;
+            // No current section, transition out of preview.
+            transitionPreviewLayout(null);
+            transitionToVisible();
         }
     }
 
-    private int getThumbPositionForListPosition(int firstVisibleItem, int visibleItemCount,
-            int totalItemCount) {
+    private String getPreviewText() {
+        final Object[] sections = mSections;
+        if (sections == null) {
+            return null;
+        }
+
+        final int sectionIndex = mCurrentSection;
+        if (sectionIndex < 0 || sectionIndex >= sections.length) {
+            return null;
+        }
+
+        return sections[sectionIndex].toString();
+    }
+
+    /**
+     * Transitions the preview text to a new value. Handles animation,
+     * measurement, and layout.
+     *
+     * @param text The preview text to transition to.
+     */
+    private void transitionPreviewLayout(CharSequence text) {
+        final Rect bounds = mTempBounds;
+        final ImageView preview = mPreviewImage;
+        final TextView showing;
+        final TextView target;
+        if (mShowingPrimary) {
+            showing = mPrimaryText;
+            target = mSecondaryText;
+        } else {
+            showing = mSecondaryText;
+            target = mPrimaryText;
+        }
+
+        // Set and layout target immediately.
+        target.setText(text);
+        measurePreview(target, bounds);
+        applyLayout(target, bounds);
+
+        if (mPreviewAnimation != null) {
+            mPreviewAnimation.cancel();
+        }
+
+        // Cross-fade preview text.
+        final Animator showTarget = animateAlpha(target, 1f).setDuration(DURATION_CROSS_FADE);
+        final Animator hideShowing = animateAlpha(showing, 0f).setDuration(DURATION_CROSS_FADE);
+        hideShowing.addListener(mSwitchPrimaryListener);
+
+        // Apply preview image padding and animate bounds, if necessary.
+        bounds.left -= mPreviewImage.getPaddingLeft();
+        bounds.top -= mPreviewImage.getPaddingTop();
+        bounds.right += mPreviewImage.getPaddingRight();
+        bounds.bottom += mPreviewImage.getPaddingBottom();
+        final Animator resizePreview = animateBounds(preview, bounds);
+        resizePreview.setDuration(DURATION_RESIZE);
+
+        mPreviewAnimation = new AnimatorSet();
+        final AnimatorSet.Builder builder = mPreviewAnimation.play(hideShowing).with(showTarget);
+        builder.with(resizePreview);
+
+        // The current preview size is unaffected by hidden or showing. It's
+        // used to set starting scales for things that need to be scaled down.
+        final int previewWidth = preview.getWidth() - preview.getPaddingLeft()
+                - preview.getPaddingRight();
+
+        // If target is too large, shrink it immediately to fit and expand to
+        // target size. Otherwise, start at target size.
+        final int targetWidth = target.getWidth();
+        if (targetWidth > previewWidth) {
+            target.setScaleX((float) previewWidth / targetWidth);
+            final Animator scaleAnim = animateScaleX(target, 1f).setDuration(DURATION_RESIZE);
+            builder.with(scaleAnim);
+        } else {
+            target.setScaleX(1f);
+        }
+
+        // If showing is larger than target, shrink to target size.
+        final int showingWidth = showing.getWidth();
+        if (showingWidth > targetWidth) {
+            final float scale = (float) targetWidth / showingWidth;
+            final Animator scaleAnim = animateScaleX(showing, scale).setDuration(DURATION_RESIZE);
+            builder.with(scaleAnim);
+        }
+
+        mPreviewAnimation.start();
+    }
+
+    /**
+     * Positions the thumb and preview widgets.
+     *
+     * @param position The position, between 0 and 1, along the track at which
+     *            to place the thumb.
+     */
+    private void setThumbPos(float position) {
+        final int top = 0;
+        final int bottom = mList.getHeight();
+
+        final float thumbHalfHeight = mThumbImage.getHeight() / 2f;
+        final float min = top + thumbHalfHeight;
+        final float max = bottom - thumbHalfHeight;
+        final float offset = min;
+        final float range = max - min;
+        final float thumbMiddle = position * range + offset;
+        mThumbImage.setTranslationY(thumbMiddle - thumbHalfHeight);
+
+        // Center the preview on the thumb, constrained to the list bounds.
+        final float previewHalfHeight = mPreviewImage.getHeight() / 2f;
+        final float minP = top + previewHalfHeight;
+        final float maxP = bottom - previewHalfHeight;
+        final float previewMiddle = MathUtils.constrain(thumbMiddle, minP, maxP);
+        final float previewTop = previewMiddle - previewHalfHeight;
+
+        mPreviewImage.setTranslationY(previewTop);
+        mPrimaryText.setTranslationY(previewTop);
+        mSecondaryText.setTranslationY(previewTop);
+    }
+
+    private float getPosFromMotionEvent(float y) {
+        final int top = 0;
+        final int bottom = mList.getHeight();
+
+        final float thumbHalfHeight = mThumbImage.getHeight() / 2f;
+        final float min = top + thumbHalfHeight;
+        final float max = bottom - thumbHalfHeight;
+        final float offset = min;
+        final float range = max - min;
+
+        // If the list is the same height as the thumbnail or shorter,
+        // effectively disable scrolling.
+        if (range <= 0) {
+            return 0f;
+        }
+
+        return MathUtils.constrain((y - offset) / range, 0f, 1f);
+    }
+
+    private float getPosFromItemCount(
+            int firstVisibleItem, int visibleItemCount, int totalItemCount) {
         if (mSectionIndexer == null || mListAdapter == null) {
             getSectionsFromIndexer();
         }
-        if (mSectionIndexer == null || !mMatchDragPosition) {
-            return ((mList.getHeight() - mThumbH) * firstVisibleItem)
-                    / (totalItemCount - visibleItemCount);
+
+        final boolean hasSections = mSectionIndexer != null && mSections != null
+                && mSections.length > 0;
+        if (!hasSections || !mMatchDragPosition) {
+            return firstVisibleItem / (totalItemCount - visibleItemCount);
         }
 
-        firstVisibleItem -= mListOffset;
+        firstVisibleItem -= mHeaderCount;
         if (firstVisibleItem < 0) {
             return 0;
         }
-        totalItemCount -= mListOffset;
 
-        final int trackHeight = mList.getHeight() - mThumbH;
+        totalItemCount -= mHeaderCount;
 
         final int section = mSectionIndexer.getSectionForPosition(firstVisibleItem);
         final int sectionPos = mSectionIndexer.getPositionForSection(section);
         final int nextSectionPos = mSectionIndexer.getPositionForSection(section + 1);
         final int sectionCount = mSections.length;
-        final int positionsInSection = nextSectionPos - sectionPos;
+        final int positionsInSection = Math.max(1, nextSectionPos - sectionPos);
 
         final View child = mList.getChildAt(0);
         final float incrementalPos = child == null ? 0 : firstVisibleItem +
-                (float) (mList.getPaddingTop() - child.getTop()) / child.getHeight();
+                (float) (mList.getPaddingTop() - child.getTop()) / Math.max(1, child.getHeight());
         final float posWithinSection = (incrementalPos - sectionPos) / positionsInSection;
-        int result = (int) ((section + posWithinSection) / sectionCount * trackHeight);
-
-        // Fake out the scrollbar for the last item. Since the section indexer won't
-        // ever actually move the list in this end space, make scrolling across the last item
-        // account for whatever space is remaining.
-        if (firstVisibleItem > 0 && firstVisibleItem + visibleItemCount == totalItemCount) {
-            final View lastChild = mList.getChildAt(visibleItemCount - 1);
-            final float lastItemVisible = (float) (mList.getHeight() - mList.getPaddingBottom()
-                    - lastChild.getTop()) / lastChild.getHeight();
-            result += (trackHeight - result) * lastItemVisible;
-        }
-
-        return result;
+        return (section + posWithinSection) / sectionCount;
     }
 
+    /**
+     * Cancels an ongoing fling event by injecting a
+     * {@link MotionEvent#ACTION_CANCEL} into the host view.
+     */
     private void cancelFling() {
-        // Cancel the list fling
-        MotionEvent cancelFling = MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0);
+        final MotionEvent cancelFling = MotionEvent.obtain(
+                0, 0, MotionEvent.ACTION_CANCEL, 0, 0, 0);
         mList.onTouchEvent(cancelFling);
         cancelFling.recycle();
     }
 
-    void cancelPendingDrag() {
+    /**
+     * Cancels a pending drag.
+     *
+     * @see #startPendingDrag()
+     */
+    private void cancelPendingDrag() {
         mList.removeCallbacks(mDeferStartDrag);
-        mPendingDrag = false;
+        mHasPendingDrag = false;
     }
 
-    void startPendingDrag() {
-        mPendingDrag = true;
-        mList.postDelayed(mDeferStartDrag, PENDING_DRAG_DELAY);
+    /**
+     * Delays dragging until after the framework has determined that the user is
+     * scrolling, rather than tapping.
+     */
+    private void startPendingDrag() {
+        mHasPendingDrag = true;
+        mList.postDelayed(mDeferStartDrag, TAP_TIMEOUT);
     }
 
-    void beginDrag() {
+    private void beginDrag() {
         setState(STATE_DRAGGING);
+
         if (mListAdapter == null && mList != null) {
             getSectionsFromIndexer();
         }
+
         if (mList != null) {
             mList.requestDisallowInterceptTouchEvent(true);
             mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
@@ -745,16 +1080,23 @@
         cancelFling();
     }
 
-    boolean onInterceptTouchEvent(MotionEvent ev) {
+    public boolean onInterceptTouchEvent(MotionEvent ev) {
         switch (ev.getActionMasked()) {
             case MotionEvent.ACTION_DOWN:
-                if (mState > STATE_NONE && isPointInside(ev.getX(), ev.getY())) {
-                    if (!mList.isInScrollingContainer()) {
-                        beginDrag();
-                        return true;
+                if (isPointInside(ev.getX(), ev.getY())) {
+                    // If the parent has requested that its children delay
+                    // pressed state (e.g. is a scrolling container) then we
+                    // need to allow the parent time to decide whether it wants
+                    // to intercept events. If it does, we will receive a CANCEL
+                    // event.
+                    if (mList.isInScrollingContainer()) {
+                        mInitialTouchY = ev.getY();
+                        startPendingDrag();
+                        return false;
                     }
-                    mInitialTouchY = ev.getY();
-                    startPendingDrag();
+
+                    beginDrag();
+                    return true;
                 }
                 break;
             case MotionEvent.ACTION_UP:
@@ -762,70 +1104,56 @@
                 cancelPendingDrag();
                 break;
         }
+
         return false;
     }
 
-    boolean onTouchEvent(MotionEvent me) {
-        if (mState == STATE_NONE) {
-            return false;
-        }
-
-        final int action = me.getAction();
-
-        if (action == MotionEvent.ACTION_DOWN) {
-            if (isPointInside(me.getX(), me.getY())) {
-                if (!mList.isInScrollingContainer()) {
+    public boolean onTouchEvent(MotionEvent me) {
+        switch (me.getActionMasked()) {
+            case MotionEvent.ACTION_DOWN: {
+                if (isPointInside(me.getX(), me.getY())) {
                     beginDrag();
                     return true;
                 }
-                mInitialTouchY = me.getY();
-                startPendingDrag();
-            }
-        } else if (action == MotionEvent.ACTION_UP) { // don't add ACTION_CANCEL here
-            if (mPendingDrag) {
-                // Allow a tap to scroll.
-                beginDrag();
+            } break;
 
-                final int viewHeight = mList.getHeight();
-                // Jitter
-                int newThumbY = (int) me.getY() - mThumbH + 10;
-                if (newThumbY < 0) {
-                    newThumbY = 0;
-                } else if (newThumbY + mThumbH > viewHeight) {
-                    newThumbY = viewHeight - mThumbH;
-                }
-                mThumbY = newThumbY;
-                scrollTo((float) mThumbY / (viewHeight - mThumbH));
+            case MotionEvent.ACTION_UP: {
+                if (mHasPendingDrag) {
+                    // Allow a tap to scroll.
+                    beginDrag();
 
-                cancelPendingDrag();
-                // Will hit the STATE_DRAGGING check below
-            }
-            if (mState == STATE_DRAGGING) {
-                if (mList != null) {
-                    // ViewGroup does the right thing already, but there might
-                    // be other classes that don't properly reset on touch-up,
-                    // so do this explicitly just in case.
-                    mList.requestDisallowInterceptTouchEvent(false);
-                    mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
-                }
-                setState(STATE_VISIBLE);
-                final Handler handler = mHandler;
-                handler.removeCallbacks(mScrollFade);
-                if (!mAlwaysShow) {
-                    handler.postDelayed(mScrollFade, 1000);
+                    final float pos = getPosFromMotionEvent(me.getY());
+                    setThumbPos(pos);
+                    scrollTo(pos);
+
+                    cancelPendingDrag();
+                    // Will hit the STATE_DRAGGING check below
                 }
 
-                mList.invalidate();
-                return true;
-            }
-        } else if (action == MotionEvent.ACTION_MOVE) {
-            if (mPendingDrag) {
-                final float y = me.getY();
-                if (Math.abs(y - mInitialTouchY) > mScaledTouchSlop) {
+                if (mState == STATE_DRAGGING) {
+                    if (mList != null) {
+                        // ViewGroup does the right thing already, but there might
+                        // be other classes that don't properly reset on touch-up,
+                        // so do this explicitly just in case.
+                        mList.requestDisallowInterceptTouchEvent(false);
+                        mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
+                    }
+
+                    setState(STATE_VISIBLE);
+                    mList.postDelayed(mDeferHide, FADE_TIMEOUT);
+
+                    return true;
+                }
+            } break;
+
+            case MotionEvent.ACTION_MOVE: {
+                if (mHasPendingDrag && Math.abs(me.getY() - mInitialTouchY) > mScaledTouchSlop) {
                     setState(STATE_DRAGGING);
+
                     if (mListAdapter == null && mList != null) {
                         getSectionsFromIndexer();
                     }
+
                     if (mList != null) {
                         mList.requestDisallowInterceptTouchEvent(true);
                         mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
@@ -835,87 +1163,168 @@
                     cancelPendingDrag();
                     // Will hit the STATE_DRAGGING check below
                 }
-            }
-            if (mState == STATE_DRAGGING) {
-                final int viewHeight = mList.getHeight();
-                // Jitter
-                int newThumbY = (int) me.getY() - mThumbH + 10;
-                if (newThumbY < 0) {
-                    newThumbY = 0;
-                } else if (newThumbY + mThumbH > viewHeight) {
-                    newThumbY = viewHeight - mThumbH;
-                }
-                if (Math.abs(mThumbY - newThumbY) < 2) {
+
+                if (mState == STATE_DRAGGING) {
+                    // TODO: Ignore jitter.
+                    final float pos = getPosFromMotionEvent(me.getY());
+                    setThumbPos(pos);
+
+                    // If the previous scrollTo is still pending
+                    if (mScrollCompleted) {
+                        scrollTo(pos);
+                    }
+
                     return true;
                 }
-                mThumbY = newThumbY;
-                // If the previous scrollTo is still pending
-                if (mScrollCompleted) {
-                    scrollTo((float) mThumbY / (viewHeight - mThumbH));
-                }
-                return true;
-            }
-        } else if (action == MotionEvent.ACTION_CANCEL) {
-            cancelPendingDrag();
+            } break;
+
+            case MotionEvent.ACTION_CANCEL: {
+                cancelPendingDrag();
+            } break;
         }
+
         return false;
     }
 
-    boolean isPointInside(float x, float y) {
-        boolean inTrack = false;
-        switch (mPosition) {
-            default:
-            case View.SCROLLBAR_POSITION_RIGHT:
-                inTrack = x > mList.getWidth() - mThumbW;
-                break;
-            case View.SCROLLBAR_POSITION_LEFT:
-                inTrack = x < mThumbW;
-                break;
-        }
-
-        // Allow taps in the track to start moving.
-        return inTrack && (mTrackDrawable != null || y >= mThumbY && y <= mThumbY + mThumbH);
+    /**
+     * Returns whether a coordinate is inside the scroller's activation area. If
+     * there is a track image, touching anywhere within the thumb-width of the
+     * track activates scrolling. Otherwise, the user has to touch inside thumb
+     * itself.
+     *
+     * @param x The x-coordinate.
+     * @param y The y-coordinate.
+     * @return Whether the coordinate is inside the scroller's activation area.
+     */
+    private boolean isPointInside(float x, float y) {
+        return isPointInsideX(x) && (mHasTrackImage || isPointInsideY(y));
     }
 
-    public class ScrollFade implements Runnable {
+    private boolean isPointInsideX(float x) {
+        if (mLayoutFromRight) {
+            return x >= mThumbImage.getLeft();
+        } else {
+            return x <= mThumbImage.getRight();
+        }
+    }
 
-        long mStartTime;
-        long mFadeDuration;
-        static final int ALPHA_MAX = 208;
-        static final long FADE_DURATION = 200;
+    private boolean isPointInsideY(float y) {
+        return y >= mThumbImage.getTop() && y <= mThumbImage.getBottom();
+    }
 
-        void startFade() {
-            mFadeDuration = FADE_DURATION;
-            mStartTime = SystemClock.uptimeMillis();
-            setState(STATE_EXIT);
+    /**
+     * Constructs an animator for the specified property on a group of views.
+     * See {@link ObjectAnimator#ofFloat(Object, String, float...)} for
+     * implementation details.
+     *
+     * @param property The property being animated.
+     * @param value The value to which that property should animate.
+     * @param views The target views to animate.
+     * @return An animator for all the specified views.
+     */
+    private static Animator groupAnimatorOfFloat(
+            Property<View, Float> property, float value, View... views) {
+        AnimatorSet animSet = new AnimatorSet();
+        AnimatorSet.Builder builder = null;
+
+        for (int i = views.length - 1; i >= 0; i--) {
+            final Animator anim = ObjectAnimator.ofFloat(views[i], property, value);
+            if (builder == null) {
+                builder = animSet.play(anim);
+            } else {
+                builder.with(anim);
+            }
         }
 
-        int getAlpha() {
-            if (getState() != STATE_EXIT) {
-                return ALPHA_MAX;
-            }
-            int alpha;
-            long now = SystemClock.uptimeMillis();
-            if (now > mStartTime + mFadeDuration) {
-                alpha = 0;
-            } else {
-                alpha = (int) (ALPHA_MAX - ((now - mStartTime) * ALPHA_MAX) / mFadeDuration);
-            }
-            return alpha;
+        return animSet;
+    }
+
+    /**
+     * Returns an animator for the view's scaleX value.
+     */
+    private static Animator animateScaleX(View v, float target) {
+        return ObjectAnimator.ofFloat(v, View.SCALE_X, target);
+    }
+
+    /**
+     * Returns an animator for the view's alpha value.
+     */
+    private static Animator animateAlpha(View v, float alpha) {
+        return ObjectAnimator.ofFloat(v, View.ALPHA, alpha);
+    }
+
+    /**
+     * A Property wrapper around the <code>left</code> functionality handled by the
+     * {@link View#setLeft(int)} and {@link View#getLeft()} methods.
+     */
+    private static Property<View, Integer> LEFT = new IntProperty<View>("left") {
+        @Override
+        public void setValue(View object, int value) {
+            object.setLeft(value);
         }
 
         @Override
-        public void run() {
-            if (getState() != STATE_EXIT) {
-                startFade();
-                return;
-            }
-
-            if (getAlpha() > 0) {
-                mList.invalidate();
-            } else {
-                setState(STATE_NONE);
-            }
+        public Integer get(View object) {
+            return object.getLeft();
         }
+    };
+
+    /**
+     * A Property wrapper around the <code>top</code> functionality handled by the
+     * {@link View#setTop(int)} and {@link View#getTop()} methods.
+     */
+    private static Property<View, Integer> TOP = new IntProperty<View>("top") {
+        @Override
+        public void setValue(View object, int value) {
+            object.setTop(value);
+        }
+
+        @Override
+        public Integer get(View object) {
+            return object.getTop();
+        }
+    };
+
+    /**
+     * A Property wrapper around the <code>right</code> functionality handled by the
+     * {@link View#setRight(int)} and {@link View#getRight()} methods.
+     */
+    private static Property<View, Integer> RIGHT = new IntProperty<View>("right") {
+        @Override
+        public void setValue(View object, int value) {
+            object.setRight(value);
+        }
+
+        @Override
+        public Integer get(View object) {
+            return object.getRight();
+        }
+    };
+
+    /**
+     * A Property wrapper around the <code>bottom</code> functionality handled by the
+     * {@link View#setBottom(int)} and {@link View#getBottom()} methods.
+     */
+    private static Property<View, Integer> BOTTOM = new IntProperty<View>("bottom") {
+        @Override
+        public void setValue(View object, int value) {
+            object.setBottom(value);
+        }
+
+        @Override
+        public Integer get(View object) {
+            return object.getBottom();
+        }
+    };
+
+    /**
+     * Returns an animator for the view's bounds.
+     */
+    private static Animator animateBounds(View v, Rect bounds) {
+        final PropertyValuesHolder left = PropertyValuesHolder.ofInt(LEFT, bounds.left);
+        final PropertyValuesHolder top = PropertyValuesHolder.ofInt(TOP, bounds.top);
+        final PropertyValuesHolder right = PropertyValuesHolder.ofInt(RIGHT, bounds.right);
+        final PropertyValuesHolder bottom = PropertyValuesHolder.ofInt(BOTTOM, bounds.bottom);
+        return ObjectAnimator.ofPropertyValuesHolder(v, left, top, right, bottom);
     }
 }
diff --git a/core/java/com/android/internal/util/FastPrintWriter.java b/core/java/com/android/internal/util/FastPrintWriter.java
new file mode 100644
index 0000000..6ad8e66
--- /dev/null
+++ b/core/java/com/android/internal/util/FastPrintWriter.java
@@ -0,0 +1,478 @@
+package com.android.internal.util;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+import java.nio.charset.CoderResult;
+import java.nio.charset.CodingErrorAction;
+
+public class FastPrintWriter extends PrintWriter {
+    private static final int BUFFER_LEN = 8192;
+
+    private final char[] mText = new char[BUFFER_LEN];
+    private int mPos;
+
+    final private OutputStream mOutputStream;
+    private CharsetEncoder mCharset;
+    final private ByteBuffer mBytes = ByteBuffer.allocate(BUFFER_LEN);
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code out} as its target
+     * stream. By default, the new print writer does not automatically flush its
+     * contents to the target stream when a newline is encountered.
+     *
+     * @param out
+     *            the target output stream.
+     * @throws NullPointerException
+     *             if {@code out} is {@code null}.
+     */
+    public FastPrintWriter(OutputStream out) {
+        super(out);
+        mOutputStream = out;
+        initDefaultEncoder();
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code out} as its target
+     * stream. The parameter {@code autoFlush} determines if the print writer
+     * automatically flushes its contents to the target stream when a newline is
+     * encountered.
+     *
+     * @param out
+     *            the target output stream.
+     * @param autoFlush
+     *            indicates whether contents are flushed upon encountering a
+     *            newline sequence.
+     * @throws NullPointerException
+     *             if {@code out} is {@code null}.
+     */
+    public FastPrintWriter(OutputStream out, boolean autoFlush) {
+        super(out, autoFlush);
+        mOutputStream = out;
+        initDefaultEncoder();
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code wr} as its target
+     * writer. By default, the new print writer does not automatically flush its
+     * contents to the target writer when a newline is encountered.
+     *
+     * @param wr
+     *            the target writer.
+     * @throws NullPointerException
+     *             if {@code wr} is {@code null}.
+     */
+    public FastPrintWriter(Writer wr) {
+        super(wr);
+        mOutputStream = null;
+        initDefaultEncoder();
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code out} as its target
+     * writer. The parameter {@code autoFlush} determines if the print writer
+     * automatically flushes its contents to the target writer when a newline is
+     * encountered.
+     *
+     * @param wr
+     *            the target writer.
+     * @param autoFlush
+     *            indicates whether to flush contents upon encountering a
+     *            newline sequence.
+     * @throws NullPointerException
+     *             if {@code out} is {@code null}.
+     */
+    public FastPrintWriter(Writer wr, boolean autoFlush) {
+        super(wr, autoFlush);
+        mOutputStream = null;
+        initDefaultEncoder();
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code file} as its target. The
+     * VM's default character set is used for character encoding.
+     * The print writer does not automatically flush its contents to the target
+     * file when a newline is encountered. The output to the file is buffered.
+     *
+     * @param file
+     *            the target file. If the file already exists, its contents are
+     *            removed, otherwise a new file is created.
+     * @throws java.io.FileNotFoundException
+     *             if an error occurs while opening or creating the target file.
+     */
+    public FastPrintWriter(File file) throws FileNotFoundException {
+        super(file);
+        mOutputStream = null;
+        initDefaultEncoder();
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with {@code file} as its target. The
+     * character set named {@code csn} is used for character encoding.
+     * The print writer does not automatically flush its contents to the target
+     * file when a newline is encountered. The output to the file is buffered.
+     *
+     * @param file
+     *            the target file. If the file already exists, its contents are
+     *            removed, otherwise a new file is created.
+     * @param csn
+     *            the name of the character set used for character encoding.
+     * @throws FileNotFoundException
+     *             if an error occurs while opening or creating the target file.
+     * @throws NullPointerException
+     *             if {@code csn} is {@code null}.
+     * @throws java.io.UnsupportedEncodingException
+     *             if the encoding specified by {@code csn} is not supported.
+     */
+    public FastPrintWriter(File file, String csn) throws FileNotFoundException,
+            UnsupportedEncodingException {
+        super(file, csn);
+        mOutputStream = null;
+        initEncoder(csn);
+    }
+
+    /**
+     * Constructs a new {@code PrintWriter} with the file identified by {@code
+     * fileName} as its target. The VM's default character set is
+     * used for character encoding. The print writer does not automatically
+     * flush its contents to the target file when a newline is encountered. The
+     * output to the file is buffered.
+     *
+     * @param fileName
+     *            the target file's name. If the file already exists, its
+     *            contents are removed, otherwise a new file is created.
+     * @throws FileNotFoundException
+     *             if an error occurs while opening or creating the target file.
+     */
+    public FastPrintWriter(String fileName) throws FileNotFoundException {
+        super(fileName);
+        mOutputStream = null;
+        initDefaultEncoder();
+    }
+
+     /**
+     * Constructs a new {@code PrintWriter} with the file identified by {@code
+     * fileName} as its target. The character set named {@code csn} is used for
+     * character encoding. The print writer does not automatically flush its
+     * contents to the target file when a newline is encountered. The output to
+     * the file is buffered.
+     *
+     * @param fileName
+     *            the target file's name. If the file already exists, its
+     *            contents are removed, otherwise a new file is created.
+     * @param csn
+     *            the name of the character set used for character encoding.
+     * @throws FileNotFoundException
+     *             if an error occurs while opening or creating the target file.
+     * @throws NullPointerException
+     *             if {@code csn} is {@code null}.
+     * @throws UnsupportedEncodingException
+     *             if the encoding specified by {@code csn} is not supported.
+     */
+    public FastPrintWriter(String fileName, String csn)
+            throws FileNotFoundException, UnsupportedEncodingException {
+        super(fileName, csn);
+        mOutputStream = null;
+        initEncoder(csn);
+    }
+
+    private final void initEncoder(String csn) throws UnsupportedEncodingException {
+        try {
+            mCharset = Charset.forName(csn).newEncoder();
+        } catch (Exception e) {
+            throw new UnsupportedEncodingException(csn);
+        }
+        mCharset.onMalformedInput(CodingErrorAction.REPLACE);
+        mCharset.onUnmappableCharacter(CodingErrorAction.REPLACE);
+    }
+
+    private final void initDefaultEncoder() {
+        mCharset = Charset.defaultCharset().newEncoder();
+        mCharset.onMalformedInput(CodingErrorAction.REPLACE);
+        mCharset.onUnmappableCharacter(CodingErrorAction.REPLACE);
+    }
+
+    private void appendInner(char c) throws IOException {
+        int pos = mPos;
+        if (pos >= (BUFFER_LEN-1)) {
+            flush();
+            pos = mPos;
+        }
+        mText[pos] = c;
+        mPos = pos+1;
+    }
+
+    private void appendInner(String str, int i, final int length) throws IOException {
+        if (length > BUFFER_LEN) {
+            final int end = i + length;
+            while (i < end) {
+                int next = i + BUFFER_LEN;
+                appendInner(str, i, next<end ? BUFFER_LEN : (end-i));
+                i = next;
+            }
+            return;
+        }
+        int pos = mPos;
+        if ((pos+length) > BUFFER_LEN) {
+            flush();
+            pos = mPos;
+        }
+        str.getChars(i, i + length, mText, pos);
+        mPos = pos + length;
+    }
+
+    private void appendInner(char[] buf, int i, final int length) throws IOException {
+        if (length > BUFFER_LEN) {
+            final int end = i + length;
+            while (i < end) {
+                int next = i + BUFFER_LEN;
+                appendInner(buf, i, next < end ? BUFFER_LEN : (end - i));
+                i = next;
+            }
+            return;
+        }
+        int pos = mPos;
+        if ((pos+length) > BUFFER_LEN) {
+            flush();
+            pos = mPos;
+        }
+        System.arraycopy(buf, i, mText, pos, length);
+        mPos = pos + length;
+    }
+
+    private void flushBytesInner() throws IOException {
+        int position;
+        if ((position = mBytes.position()) > 0) {
+            mBytes.flip();
+            mOutputStream.write(mBytes.array(), 0, position);
+            mBytes.clear();
+        }
+    }
+
+    private void flushInner() throws IOException {
+        //Log.i("PackageManager", "flush mPos=" + mPos);
+        if (mPos > 0) {
+            if (mOutputStream != null) {
+                CharBuffer charBuffer = CharBuffer.wrap(mText, 0, mPos);
+                CoderResult result = mCharset.encode(charBuffer, mBytes, true);
+                while (true) {
+                    if (result.isError()) {
+                        throw new IOException(result.toString());
+                    } else if (result.isOverflow()) {
+                        flushBytesInner();
+                        result = mCharset.encode(charBuffer, mBytes, true);
+                        continue;
+                    }
+                    break;
+                }
+                flushBytesInner();
+                mOutputStream.flush();
+            } else {
+                out.write(mText, 0, mPos);
+                out.flush();
+            }
+            mPos = 0;
+        }
+    }
+
+    /**
+     * Ensures that all pending data is sent out to the target. It also
+     * flushes the target. If an I/O error occurs, this writer's error
+     * state is set to {@code true}.
+     */
+    @Override
+    public void flush() {
+        try {
+            flushInner();
+        } catch (IOException e) {
+        }
+        super.flush();
+    }
+
+    /**
+     * Prints the string representation of the specified character array
+     * to the target.
+     *
+     * @param charArray
+     *            the character array to print to the target.
+     * @see #print(String)
+     */
+    public void print(char[] charArray) {
+        try {
+            appendInner(charArray, 0, charArray.length);
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Prints the string representation of the specified character to the
+     * target.
+     *
+     * @param ch
+     *            the character to print to the target.
+     * @see #print(String)
+     */
+    public void print(char ch) {
+        try {
+            appendInner(ch);
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Prints a string to the target. The string is converted to an array of
+     * bytes using the encoding chosen during the construction of this writer.
+     * The bytes are then written to the target with {@code write(int)}.
+     * <p>
+     * If an I/O error occurs, this writer's error flag is set to {@code true}.
+     *
+     * @param str
+     *            the string to print to the target.
+     * @see #write(int)
+     */
+    public void print(String str) {
+        if (str == null) {
+            str = String.valueOf((Object) null);
+        }
+        try {
+            appendInner(str, 0, str.length());
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Prints the string representation of the character array {@code chars} followed by a newline.
+     * Flushes this writer if the autoFlush flag is set to {@code true}.
+     */
+    public void println(char[] chars) {
+        print(chars);
+        println();
+    }
+
+    /**
+     * Prints the string representation of the char {@code c} followed by a newline.
+     * Flushes this writer if the autoFlush flag is set to {@code true}.
+     */
+    public void println(char c) {
+        print(c);
+        println();
+    }
+
+    /**
+     * Writes {@code count} characters from {@code buffer} starting at {@code
+     * offset} to the target.
+     * <p>
+     * This writer's error flag is set to {@code true} if this writer is closed
+     * or an I/O error occurs.
+     *
+     * @param buf
+     *            the buffer to write to the target.
+     * @param offset
+     *            the index of the first character in {@code buffer} to write.
+     * @param count
+     *            the number of characters in {@code buffer} to write.
+     * @throws IndexOutOfBoundsException
+     *             if {@code offset < 0} or {@code count < 0}, or if {@code
+     *             offset + count} is greater than the length of {@code buf}.
+     */
+    @Override
+    public void write(char[] buf, int offset, int count) {
+        try {
+            appendInner(buf, offset, count);
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Writes one character to the target. Only the two least significant bytes
+     * of the integer {@code oneChar} are written.
+     * <p>
+     * This writer's error flag is set to {@code true} if this writer is closed
+     * or an I/O error occurs.
+     *
+     * @param oneChar
+     *            the character to write to the target.
+     */
+    @Override
+    public void write(int oneChar) {
+        try {
+            appendInner((char) oneChar);
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Writes the characters from the specified string to the target.
+     *
+     * @param str
+     *            the non-null string containing the characters to write.
+     */
+    @Override
+    public void write(String str) {
+        try {
+            appendInner(str, 0, str.length());
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Writes {@code count} characters from {@code str} starting at {@code
+     * offset} to the target.
+     *
+     * @param str
+     *            the non-null string containing the characters to write.
+     * @param offset
+     *            the index of the first character in {@code str} to write.
+     * @param count
+     *            the number of characters from {@code str} to write.
+     * @throws IndexOutOfBoundsException
+     *             if {@code offset < 0} or {@code count < 0}, or if {@code
+     *             offset + count} is greater than the length of {@code str}.
+     */
+    @Override
+    public void write(String str, int offset, int count) {
+        try {
+            appendInner(str, offset, count);
+        } catch (IOException e) {
+        }
+    }
+
+    /**
+     * Appends a subsequence of the character sequence {@code csq} to the
+     * target. This method works the same way as {@code
+     * PrintWriter.print(csq.subsequence(start, end).toString())}. If {@code
+     * csq} is {@code null}, then the specified subsequence of the string "null"
+     * will be written to the target.
+     *
+     * @param csq
+     *            the character sequence appended to the target.
+     * @param start
+     *            the index of the first char in the character sequence appended
+     *            to the target.
+     * @param end
+     *            the index of the character following the last character of the
+     *            subsequence appended to the target.
+     * @return this writer.
+     * @throws StringIndexOutOfBoundsException
+     *             if {@code start > end}, {@code start < 0}, {@code end < 0} or
+     *             either {@code start} or {@code end} are greater or equal than
+     *             the length of {@code csq}.
+     */
+    @Override
+    public PrintWriter append(CharSequence csq, int start, int end) {
+        if (csq == null) {
+            csq = "null";
+        }
+        String output = csq.subSequence(start, end).toString();
+        write(output, 0, output.length());
+        return this;
+    }
+}
diff --git a/core/java/com/android/internal/widget/PointerLocationView.java b/core/java/com/android/internal/widget/PointerLocationView.java
index 52c2cdd..d82831f 100644
--- a/core/java/com/android/internal/widget/PointerLocationView.java
+++ b/core/java/com/android/internal/widget/PointerLocationView.java
@@ -46,6 +46,7 @@
         // Trace of previous points.
         private float[] mTraceX = new float[32];
         private float[] mTraceY = new float[32];
+        private boolean[] mTraceCurrent = new boolean[32];
         private int mTraceCount;
         
         // True if the pointer is down.
@@ -76,7 +77,7 @@
             mTraceCount = 0;
         }
         
-        public void addTrace(float x, float y) {
+        public void addTrace(float x, float y, boolean current) {
             int traceCapacity = mTraceX.length;
             if (mTraceCount == traceCapacity) {
                 traceCapacity *= 2;
@@ -87,10 +88,15 @@
                 float[] newTraceY = new float[traceCapacity];
                 System.arraycopy(mTraceY, 0, newTraceY, 0, mTraceCount);
                 mTraceY = newTraceY;
+
+                boolean[] newTraceCurrent = new boolean[traceCapacity];
+                System.arraycopy(mTraceCurrent, 0, newTraceCurrent, 0, mTraceCount);
+                mTraceCurrent= newTraceCurrent;
             }
             
             mTraceX[mTraceCount] = x;
             mTraceY[mTraceCount] = y;
+            mTraceCurrent[mTraceCount] = current;
             mTraceCount += 1;
         }
     }
@@ -106,6 +112,7 @@
     private final Paint mTextBackgroundPaint;
     private final Paint mTextLevelPaint;
     private final Paint mPaint;
+    private final Paint mCurrentPointPaint;
     private final Paint mTargetPaint;
     private final Paint mPathPaint;
     private final FontMetricsInt mTextMetrics = new FontMetricsInt();
@@ -147,6 +154,11 @@
         mPaint.setARGB(255, 255, 255, 255);
         mPaint.setStyle(Paint.Style.STROKE);
         mPaint.setStrokeWidth(2);
+        mCurrentPointPaint = new Paint();
+        mCurrentPointPaint.setAntiAlias(true);
+        mCurrentPointPaint.setARGB(255, 255, 0, 0);
+        mCurrentPointPaint.setStyle(Paint.Style.STROKE);
+        mCurrentPointPaint.setStrokeWidth(2);
         mTargetPaint = new Paint();
         mTargetPaint.setAntiAlias(false);
         mTargetPaint.setARGB(255, 0, 0, 192);
@@ -294,7 +306,8 @@
                 }
                 if (haveLast) {
                     canvas.drawLine(lastX, lastY, x, y, mPathPaint);
-                    canvas.drawPoint(lastX, lastY, mPaint);
+                    final Paint paint = ps.mTraceCurrent[i] ? mCurrentPointPaint : mPaint;
+                    canvas.drawPoint(lastX, lastY, paint);
                     drawn = true;
                 }
                 lastX = x;
@@ -574,7 +587,7 @@
                     logCoords("Pointer", action, i, coords, id, event);
                 }
                 if (ps != null) {
-                    ps.addTrace(coords.x, coords.y);
+                    ps.addTrace(coords.x, coords.y, false);
                 }
             }
         }
@@ -587,7 +600,7 @@
                 logCoords("Pointer", action, i, coords, id, event);
             }
             if (ps != null) {
-                ps.addTrace(coords.x, coords.y);
+                ps.addTrace(coords.x, coords.y, true);
                 ps.mXVelocity = mVelocity.getXVelocity(id);
                 ps.mYVelocity = mVelocity.getYVelocity(id);
                 mVelocity.getEstimator(id, ps.mEstimator);
@@ -626,7 +639,7 @@
                 if (mActivePointerId == id) {
                     mActivePointerId = event.getPointerId(index == 0 ? 1 : 0);
                 }
-                ps.addTrace(Float.NaN, Float.NaN);
+                ps.addTrace(Float.NaN, Float.NaN, false);
             }
         }
 
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 188941b..faaf588 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -140,6 +140,7 @@
 	android_util_FileObserver.cpp \
 	android/opengl/poly_clip.cpp.arm \
 	android/opengl/util.cpp.arm \
+	android/print/android_print_pdf_PdfDocument.cpp \
 	android_server_NetworkManagementSocketTagger.cpp \
 	android_server_Watchdog.cpp \
 	android_ddm_DdmHandleNativeHeap.cpp \
@@ -164,6 +165,7 @@
 	$(call include-path-for, libhardware_legacy)/hardware_legacy \
 	$(TOP)/frameworks/av/include \
 	external/skia/src/core \
+	external/skia/src/pdf \
 	external/skia/src/images \
 	external/skia/include/utils \
 	external/sqlite/dist \
@@ -193,7 +195,6 @@
 	libcamera_client \
 	libskia \
 	libsqlite \
-	libdvm \
 	libEGL \
 	libGLESv1_CM \
 	libGLESv2 \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index de32e44..144cc84 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -33,6 +33,7 @@
 
 #include "jni.h"
 #include "JNIHelp.h"
+#include "JniInvocation.h"
 #include "android_util_Binder.h"
 
 #include <stdio.h>
@@ -143,6 +144,7 @@
 extern int register_android_os_FileUtils(JNIEnv *env);
 extern int register_android_os_UEventObserver(JNIEnv* env);
 extern int register_android_os_MemoryFile(JNIEnv* env);
+extern int register_android_print_pdf_PdfDocument(JNIEnv* env);
 extern int register_android_net_LocalSocketImpl(JNIEnv* env);
 extern int register_android_net_NetworkUtils(JNIEnv* env);
 extern int register_android_net_TrafficStats(JNIEnv* env);
@@ -840,6 +842,8 @@
     //ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);
 
     /* start the virtual machine */
+    JniInvocation jni_invocation;
+    jni_invocation.Init(NULL);
     JNIEnv* env;
     if (startVm(&mJavaVM, &env) != 0) {
         return;
@@ -1179,6 +1183,7 @@
     REG_JNI(register_android_os_SELinux),
     REG_JNI(register_android_os_Trace),
     REG_JNI(register_android_os_UEventObserver),
+    REG_JNI(register_android_print_pdf_PdfDocument),
     REG_JNI(register_android_net_LocalSocketImpl),
     REG_JNI(register_android_net_NetworkUtils),
     REG_JNI(register_android_net_TrafficStats),
diff --git a/core/jni/android/print/android_print_pdf_PdfDocument.cpp b/core/jni/android/print/android_print_pdf_PdfDocument.cpp
new file mode 100644
index 0000000..745fe8a
--- /dev/null
+++ b/core/jni/android/print/android_print_pdf_PdfDocument.cpp
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#include "jni.h"
+#include "GraphicsJNI.h"
+#include <android_runtime/AndroidRuntime.h>
+
+#include "SkCanvas.h"
+#include "SkPDFDevice.h"
+#include "SkPDFDocument.h"
+#include "SkRect.h"
+#include "SkSize.h"
+#include "CreateJavaOutputStreamAdaptor.h"
+
+namespace android {
+
+static jint nativeCreateDocument(JNIEnv* env, jobject clazz) {
+    return reinterpret_cast<jint>(new SkPDFDocument());
+}
+
+static void nativeFinalize(JNIEnv* env, jobject thiz, jint documentPtr) {
+    delete reinterpret_cast<SkPDFDocument*>(documentPtr);
+}
+
+static jint nativeCreatePage(JNIEnv* env, jobject thiz,
+        jobject pageSize, jobject contentSize, jint initialTransformation) {
+    SkIRect skPageSizeRect;
+    GraphicsJNI::jrect_to_irect(env, pageSize, &skPageSizeRect);
+    SkISize skPageSize = SkISize::Make(skPageSizeRect.width(),
+            skPageSizeRect.height());
+
+    SkIRect skContentRect;
+    GraphicsJNI::jrect_to_irect(env, contentSize, &skContentRect);
+    SkISize skContentSize = SkISize::Make(skContentRect.width(),
+            skContentRect.height());
+
+    SkMatrix* transformation = reinterpret_cast<SkMatrix*>(initialTransformation);
+    SkPDFDevice* skPdfDevice = new SkPDFDevice(skPageSize, skContentSize, *transformation);
+
+    return reinterpret_cast<jint>(new SkCanvas(skPdfDevice));
+}
+
+static void nativeAppendPage(JNIEnv* env, jobject thiz, jint documentPtr, jint pagePtr) {
+    SkCanvas* page = reinterpret_cast<SkCanvas*>(pagePtr);
+    SkPDFDocument* document = reinterpret_cast<SkPDFDocument*>(documentPtr);
+    SkPDFDevice* device = static_cast<SkPDFDevice*>(page->getDevice());
+    document->appendPage(device);
+}
+
+static void nativeWriteTo(JNIEnv* env, jobject clazz, jint documentPtr,
+        jobject out, jbyteArray chunk) {
+    SkWStream* skWStream = CreateJavaOutputStreamAdaptor(env, out, chunk);
+    SkPDFDocument* document = reinterpret_cast<SkPDFDocument*>(documentPtr);
+    document->emitPDF(skWStream);
+    delete skWStream;
+}
+
+static JNINativeMethod gPdfDocument_Methods[] = {
+    {"nativeCreateDocument", "()I", (void*) nativeCreateDocument},
+    {"nativeFinalize", "(I)V", (void*) nativeFinalize},
+    {"nativeCreatePage", "(Landroid/graphics/Rect;Landroid/graphics/Rect;I)I",
+            (void*) nativeCreatePage},
+    {"nativeAppendPage", "(II)V", (void*) nativeAppendPage},
+    {"nativeWriteTo", "(ILjava/io/OutputStream;[B)V", (void*) nativeWriteTo}
+};
+
+int register_android_print_pdf_PdfDocument(JNIEnv* env) {
+    int result = android::AndroidRuntime::registerNativeMethods(
+            env, "android/print/pdf/PdfDocument", gPdfDocument_Methods,
+            NELEM(gPdfDocument_Methods));
+    return result;
+}
+
+};
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index df2aea8..ca274e3 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1849,6 +1849,22 @@
         android:description="@string/permdesc_bindAccessibilityService"
         android:protectionLevel="signature" />
 
+    <!-- Must be required by an {@link android.printservice.PrintService},
+         to ensure that only the system can bind to it. -->
+    <permission android:name="android.permission.BIND_PRINT_SERVICE"
+        android:label="@string/permlab_bindPrintService"
+        android:description="@string/permdesc_bindPrintService"
+        android:protectionLevel="signature" />
+
+    <!-- Allows an application to call APIs that give it access to all print jobs
+         on the device. Usually an app can access only the print jobts it created.
+         This permission is not available to third party applications.
+         @hide -->
+    <permission android:name="android.permission.ACCESS_ALL_PRINT_JOBS"
+        android:label="@string/permlab_accessAllPrintJobs"
+        android:description="@string/permdesc_accessAllPrintJobs"
+        android:protectionLevel="signature" />
+
     <!-- Must be required by a TextService (e.g. SpellCheckerService)
          to ensure that only the system can bind to it. -->
     <permission android:name="android.permission.BIND_TEXT_SERVICE"
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 7961c47..2512fd7 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Koppel tans..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Beskikbaar"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nie beskikbaar nie"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"In gebruik"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Ingeboude skerm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-skerm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Oorlegger #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index b098764..7cb0ad1 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"በማገናኘት ላይ..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"የሚገኙ"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"አይገኝም"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index c6e1a49..40a0320 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"جارٍ الاتصال..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"متاح"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"غير متاح"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 9223b81..5f11579 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Установява се връзка..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Налице"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Не е налице"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 65a94a7..9806779 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Opretter forbindelse..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Tilgængelig"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ikke tilgængelig"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"I brug"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Indbygget skærm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-skærm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlejring nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index d892b3c..d8ded2a 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Verbindung wird hergestellt..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Verfügbar"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nicht verfügbar"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"In Verwendung"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Integrierter Bildschirm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-Bildschirm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay-Nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index c867d65..db6d161 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Σύνδεση…"</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Διαθέσιμη"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Μη διαθέσιμο"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index ecad00a..5a32c1e 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Connecting..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Available"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Not available"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"In use"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Built-in Screen"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI Screen"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 5fb1580..991e9e0 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Conectando..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponible"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"No disponible"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"En uso"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Pantalla integrada"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Pantalla HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposición #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index c283ab5..72e5694 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Conectando..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponible"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"No disponible"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"En uso"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Pantalla integrada"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Pantalla HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposición #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 1336790..89851e8 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Ühendan..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Saadaval"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ei ole saadaval"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Kasutusel"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Sisseehitatud ekraan"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-ekraan"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Ülekate nr .<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 22ca8b3..65853a1 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"درحال اتصال…"</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"در دسترس"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"در دسترس نیست"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 97c1820..c29ed64 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Yhdistetään..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Käytettävissä"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ei käytettävissä"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Käytössä"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Yhdysrakenteinen näyttö"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-ruutu"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Peittokuva # <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 173ee18..6df108f 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Connexion en cours..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponible"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Indisponible"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"En cours d\'utilisation"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Écran intégré"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Écran HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Superposition n° <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index e3434e1..76c62ea 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"कनेक्ट हो रहा है..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"उपलब्ध"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"उपलब्‍ध नहीं"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 9d97504..e53fb2d 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Povezivanje..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Dostupno"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nije dostupno"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"U upotrebi"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Ugrađeni zaslon"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI zaslon"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Preklapanje br. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 7e90a2d6..c4c7f0a 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Kapcsolódás..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Elérhető"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nem érhető el"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Használatban"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Beépített képernyő"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-képernyő"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"<xliff:g id="ID">%1$d</xliff:g>. fedvény"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index a597bc8..e0e3fca 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Menyambung..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Tersedia"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Tidak tersedia"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Sedang digunakan"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Layar Bawaan"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Layar HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Hamparan #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 12a675c..8079b41 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Connessione..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponibile"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Non disponibili"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"In uso"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Schermo incorporato"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Schermo HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay n. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 410982f..4926a11 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"מתחבר..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"זמין"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"לא זמין"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 0cb3984..89354bf 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"接続中..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"利用できます"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"利用できません"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index a41bb81..b9f2459 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"연결 중..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"사용 가능"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"사용할 수 없음"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 18fc7464..bcd82a9 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Jungiama..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Pasiekiama"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nepasiekiama"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Naudojama"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Integruotas ekranas"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI ekranas"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Perdanga nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 728fed0..3e35a45 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Notiek savienojuma izveide..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Pieejams"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nav pieejams"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Tiek lietots"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Iebūvēts ekrāns"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI ekrāns"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Pārklājums Nr. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 6486d8a..45ed50f 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Menyambung..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Tersedia"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Tidak tersedia"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Sedang digunakan"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Skrin Terbina Dalam"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Skrin HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Tindih #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 0e5446a..5aa260d 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Kobler til ..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Tilgjengelig"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ikke tilgjengelig"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"I bruk"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Innebygd skjerm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-skjerm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlegg #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 2104df4..7f902b2 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Verbinden..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Beschikbaar"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Niet beschikbaar"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"In gebruik"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Ingebouwd scherm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-scherm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 3a5ace4..e0daead 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Łączę..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Dostępne"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Niedostępne"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"W użyciu"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Wbudowany ekran"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Ekran HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Nakładka nr <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 123786a..bbf6f84 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"A ligar..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponível"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Não disponível"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Em utilização"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Ecrã Integrado"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Ecrã HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Sobreposição #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index c491e08..f5d8b9e 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Se conectează..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Disponibilă"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Indisponibilă"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"În uz"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Ecran încorporat"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Ecran HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Suprapunerea <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 4707e3b..70da18e 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Подключение..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Доступен"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Недоступные"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 4181016..fde5bbb 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Prebieha pripájanie…"</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"K dispozícii"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Nie je k dispozícii"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Používa sa"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Vstavaná obrazovka"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Obrazovka HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Prekrytie č. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 05ea4c0..6166e2f 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Vzpostavljanje povezave ..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Na voljo"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ni na voljo"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"V uporabi"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Vgrajen zaslon"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Zaslon HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Prekrivanje #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 412c142..616787a 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Повезивање..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Доступна"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Нису доступне"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 3a04e7b..89426d1 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Ansluter ..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Tillgängliga"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ej tillgängligt"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Används"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Inbyggd skärm"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI-skärm"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Överlagring #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 0265cc0..7f5144f 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -871,7 +871,7 @@
     <string name="factorytest_no_action" msgid="872991874799998561">"Hakuna furushi lililopatikana ambalo linatoa tendo la JARIBIO_LA KIWANDA."</string>
     <string name="factorytest_reboot" msgid="6320168203050791643">"Washa tena"</string>
     <string name="js_dialog_title" msgid="1987483977834603872">"Ukurasa wa \"<xliff:g id="TITLE">%s</xliff:g>\" unasema:"</string>
-    <string name="js_dialog_title_default" msgid="6961903213729667573">"HatiJava"</string>
+    <string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
     <string name="js_dialog_before_unload_title" msgid="2619376555525116593">"Thibitisha jinsi ya kuelekea"</string>
     <string name="js_dialog_before_unload_positive_button" msgid="3112752010600484130">"Toka kwenye Ukurasa huu"</string>
     <string name="js_dialog_before_unload_negative_button" msgid="5614861293026099715">"Bakia kwenye Ukurasa huu"</string>
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Inaunganisha..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Inapatikana"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Haipatikani"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Inatumika"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Skrini Iliyojengwa ndani"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Skrini ya HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Uwekeleaji #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 06de4df..8d730a5 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"กำลังเชื่อมต่อ..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"พร้อมใช้งาน"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"ไม่พร้อมใช้งาน"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 07c6650..ac771173 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Kumukonekta..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Available"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Hindi available"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Ginagamit"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Built-in na Screen"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI Screen"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Overlay #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index bb6a93f..0e7710d 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Bağlanılıyor..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Kullanılabilir"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Yok"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Kullanımda"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Yerleşik Ekran"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"HDMI Ekran"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Yer Paylaşımı No. <xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 9ab3666..d3e8b2e 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"З’єднання..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Доступно"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Недоступно"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 7c9d8b8..871a244e 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Đang kết nối..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Khả dụng"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Không khả dụng"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Đang được sử dụng"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Màn hình tích hợp"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Màn hình HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Lớp phủ #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 9e1a534..c04017a 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"正在连接..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"可连接"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"无法连接"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index ac65ccb..a7df755 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"連線中…"</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"可以使用"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"無法使用"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <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>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 394b384..6d3e3ad 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1446,8 +1446,7 @@
     <string name="media_route_status_connecting" msgid="6422571716007825440">"Iyaxhuma..."</string>
     <string name="media_route_status_available" msgid="6983258067194649391">"Kuyatholakala"</string>
     <string name="media_route_status_not_available" msgid="6739899962681886401">"Ayitholakali"</string>
-    <!-- no translation found for media_route_status_in_use (4533786031090198063) -->
-    <skip />
+    <string name="media_route_status_in_use" msgid="4533786031090198063">"Kuyasebenza"</string>
     <string name="display_manager_built_in_display_name" msgid="2583134294292563941">"Okwakhelwe ngaphakathi kwesikrini"</string>
     <string name="display_manager_hdmi_display_name" msgid="1555264559227470109">"Isikrini se-HDMI"</string>
     <string name="display_manager_overlay_display_name" msgid="5142365982271620716">"Isendlalelo #<xliff:g id="ID">%1$d</xliff:g>"</string>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 459a634..99f7e7a 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2562,6 +2562,21 @@
         <attr name="description" />
     </declare-styleable>
 
+    <!-- Use <code>print-service</code> as the root tag of the XML resource that
+         describes an {@link android.printservice.PrintService} service, which is
+         referenced from its {@link android.printservice.PrintService#SERVICE_META_DATA}
+         meta-data entry. -->
+    <declare-styleable name="PrintService">
+        <!-- Fully qualified class name of an activity that allows the user to modify
+             the settings for this service. -->
+        <attr name="settingsActivity" />
+        <!-- Fully qualified class name of an activity that allows the user to manually
+             add printers to this print service. -->
+        <attr name="addPrintersActivity" format="string"/>
+        <!-- The vendor name if this print service is vendor specific. -->
+        <attr name="vendor" format="string"/>
+    </declare-styleable>
+
     <declare-styleable name="ActionMenuItemView">
         <attr name="minWidth" />
     </declare-styleable>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index ccca2d8..00caac9 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -52,6 +52,8 @@
 
     <!-- Minimum size of the fastscroll overlay -->
     <dimen name="fastscroll_overlay_size">104dp</dimen>
+    <!-- Text size of the fastscroll overlay -->
+    <dimen name="fastscroll_overlay_text_size">24sp</dimen>
     <!-- Padding of the fastscroll overlay -->
     <dimen name="fastscroll_overlay_padding">16dp</dimen>
     <!-- Width of the fastscroll thumb -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 3858dcf..3ab8825 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2066,5 +2066,7 @@
   <public type="attr" name="ssp" />
   <public type="attr" name="sspPrefix" />
   <public type="attr" name="sspPattern" />
+  <public type="attr" name="addPrintersActivity" />
+  <public type="attr" name="vendor" />
 
 </resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 3e2d8d3..1938b88 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -970,6 +970,18 @@
         interface of an accessibility service. Should never be needed for normal apps.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_bindPrintService">bind to a print service</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_bindPrintService">Allows the holder to bind to the top-level
+        interface of a print service. Should never be needed for normal apps.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_accessAllPrintJobs">access all print jobs</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_accessAllPrintJobs">Allows the holder to access print jobs
+        created by another app. Should never be needed for normal apps.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_bindTextService">bind to a text service</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_bindTextService">Allows the holder to bind to the top-level
@@ -4130,4 +4142,89 @@
     <!-- Message informing user that the requested activity could not be found [CHAR LIMIT=none] -->
     <string name="app_not_found">No application found to handle this action</string>
     <string name="revoke">Revoke</string>
+
+    <!-- Printing -->
+
+    <!-- ISO A0 media size: 33.11" × 46.81" -->
+    <string name="mediaSize_iso_a0">ISO A0</string>
+    <!-- ISO A1 media size: 23.39" × 33.11" -->
+    <string name="mediaSize_iso_a1">ISO A1</string>
+    <!-- ISO A2 media size: 16.54" x 23.39" -->
+    <string name="mediaSize_iso_a2">ISO A2</string>
+    <!-- ISO A3 media size: 11.69" x 16.54" -->
+    <string name="mediaSize_iso_a3">ISO A3</string>
+    <!-- ISO A4 media size: 8.27" x 11.69" -->
+    <string name="mediaSize_iso_a4">ISO A4</string>
+    <!-- ISO A5 media size: 5.83" x 8.27" -->
+    <string name="mediaSize_iso_a5">ISO A5</string>
+    <!-- ISO A6 media size: 4.13" x 5.83" -->
+    <string name="mediaSize_iso_a6">ISO A6</string>
+    <!-- ISO A7 media size: 2.91" x 4.13" -->
+    <string name="mediaSize_iso_a7">ISO A7</string>
+    <!-- ISO A8 media size: 2.05" x 2.91" -->
+    <string name="mediaSize_iso_a8">ISO A8</string>
+    <!-- ISO A9 media size: 1.46" x 2.05" -->
+    <string name="mediaSize_iso_a9">ISO A9</string>
+    <!-- ISO A10 media size: 1.02" x 1.46" -->
+    <string name="mediaSize_iso_a10">ISO A10</string>
+
+    <!-- ISO B0 media size: 39.37" x 55.67" -->
+    <string name="mediaSize_iso_b0">ISO B0</string>
+    <!-- ISO B1 media size: 27.83" x 39.37" -->
+    <string name="mediaSize_iso_b1">ISO B1</string>
+    <!-- ISO B2 media size - 19.69" x 27.83" -->
+    <string name="mediaSize_iso_b2">ISO B2</string>
+    <!-- ISO B3 media size: 13.90" x 19.69" -->
+    <string name="mediaSize_iso_b3">ISO B3</string>
+    <!-- ISO B4 media size: 9.84" x 13.90" -->
+    <string name="mediaSize_iso_b4">ISO B4</string>
+    <!-- ISO B5 media size: 6.93" x 9.84" -->
+    <string name="mediaSize_iso_b5">ISO B5</string>
+    <!-- ISO B6 media size: 4.92" x 6.93" -->
+    <string name="mediaSize_iso_b6">ISO B6</string>
+    <!-- ISO B7 media size: 3.46" x 4.92" -->
+    <string name="mediaSize_iso_b7">ISO B7</string>
+    <!-- ISO B8 media size: 2.44" x 3.46" -->
+    <string name="mediaSize_iso_b8">ISO B8</string>
+    <!-- ISO B9 media size: 1.73" x 2.44" -->
+    <string name="mediaSize_iso_b9">ISO B9</string>
+    <!-- ISO B10 media size: 1.22" x 1.73" -->
+    <string name="mediaSize_iso_b10">ISO B10</string>
+
+    <!-- ISO C0 media size: 36.10" x 51.06" -->
+    <string name="mediaSize_iso_c0">ISO C0</string>
+    <!-- ISO C1 media size: 25.51" x 36.10" -->
+    <string name="mediaSize_iso_c1">ISO C1</string>
+    <!-- ISO C2 media size: 18.03" x 25.51" -->
+    <string name="mediaSize_iso_c2">ISO C2</string>
+    <!-- ISO C3 media size: 12.76" x 18.03" -->
+    <string name="mediaSize_iso_c3">ISO C3</string>
+    <!-- ISO C4 media size: 9.02" x 12.76" -->
+    <string name="mediaSize_iso_c4">ISO C4</string>
+    <!-- ISO C5 media size: 6.38" x 9.02" -->
+    <string name="mediaSize_iso_c5">ISO C5</string>
+    <!-- ISO C6 media size: 4.49" x 6.38" -->
+    <string name="mediaSize_iso_c6">ISO C6</string>
+    <!-- ISO C7 media size: 3.19" x 4.49" -->
+    <string name="mediaSize_iso_c7">ISO C7</string>
+    <!-- ISO ISO C8 media size: 2.24" x 3.19" -->
+    <string name="mediaSize_iso_c8">ISO C8</string>
+    <!-- ISO ISO C9 media size: 1.57" x 2.24" -->
+    <string name="mediaSize_iso_c9">ISO C9</string>
+    <!-- ISO C10 media size: 1.10" x 1.57" -->
+    <string name="mediaSize_iso_c10">ISO C10</string>
+
+    <!-- North America Letter media size: 8.5" × 11" -->
+    <string name="mediaSize_na_letter">Letter</string>
+    <!-- North America Government Letter media size: 8.0" × 10.5" -->
+    <string name="mediaSize_na_gvrnmt_letter">Government Letter</string>
+    <!-- North America Legal media size: 8.5" × 14" -->
+    <string name="mediaSize_na_legal">Legal</string>
+    <!-- North America Junior Legal media size: 8.0" × 5.0" -->
+    <string name="mediaSize_na_junior_legal">Junior Legal</string>
+    <!-- North America Ledger media size: 17" × 11" -->
+    <string name="mediaSize_na_ledger">Ledger</string>
+    <!-- North America Tabloid media size: 11" × 17" -->
+    <string name="mediaSize_na_tabloid">Tabloid</string>
+
 </resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e1d1e33..7f39364 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -309,6 +309,7 @@
   <java-symbol type="dimen" name="dropdownitem_icon_width" />
   <java-symbol type="dimen" name="dropdownitem_text_padding_left" />
   <java-symbol type="dimen" name="fastscroll_overlay_size" />
+  <java-symbol type="dimen" name="fastscroll_overlay_text_size" />
   <java-symbol type="dimen" name="fastscroll_overlay_padding" />
   <java-symbol type="dimen" name="fastscroll_thumb_height" />
   <java-symbol type="dimen" name="fastscroll_thumb_width" />
@@ -858,6 +859,45 @@
   <java-symbol type="string" name="action_bar_home_description_format" />
   <java-symbol type="string" name="action_bar_home_subtitle_description_format" />
   <java-symbol type="string" name="wireless_display_route_description" />
+  <java-symbol type="string" name="mediaSize_iso_a0" />
+  <java-symbol type="string" name="mediaSize_iso_a1" />
+  <java-symbol type="string" name="mediaSize_iso_a2" />
+  <java-symbol type="string" name="mediaSize_iso_a3" />
+  <java-symbol type="string" name="mediaSize_iso_a4" />
+  <java-symbol type="string" name="mediaSize_iso_a5" />
+  <java-symbol type="string" name="mediaSize_iso_a6" />
+  <java-symbol type="string" name="mediaSize_iso_a7" />
+  <java-symbol type="string" name="mediaSize_iso_a8" />
+  <java-symbol type="string" name="mediaSize_iso_a9" />
+  <java-symbol type="string" name="mediaSize_iso_a10" />
+  <java-symbol type="string" name="mediaSize_iso_b0" />
+  <java-symbol type="string" name="mediaSize_iso_b1" />
+  <java-symbol type="string" name="mediaSize_iso_b2" />
+  <java-symbol type="string" name="mediaSize_iso_b3" />
+  <java-symbol type="string" name="mediaSize_iso_b4" />
+  <java-symbol type="string" name="mediaSize_iso_b5" />
+  <java-symbol type="string" name="mediaSize_iso_b6" />
+  <java-symbol type="string" name="mediaSize_iso_b7" />
+  <java-symbol type="string" name="mediaSize_iso_b8" />
+  <java-symbol type="string" name="mediaSize_iso_b9" />
+  <java-symbol type="string" name="mediaSize_iso_b10" />
+  <java-symbol type="string" name="mediaSize_iso_c0" />
+  <java-symbol type="string" name="mediaSize_iso_c1" />
+  <java-symbol type="string" name="mediaSize_iso_c2" />
+  <java-symbol type="string" name="mediaSize_iso_c3" />
+  <java-symbol type="string" name="mediaSize_iso_c4" />
+  <java-symbol type="string" name="mediaSize_iso_c5" />
+  <java-symbol type="string" name="mediaSize_iso_c6" />
+  <java-symbol type="string" name="mediaSize_iso_c7" />
+  <java-symbol type="string" name="mediaSize_iso_c8" />
+  <java-symbol type="string" name="mediaSize_iso_c9" />
+  <java-symbol type="string" name="mediaSize_iso_c10" />
+  <java-symbol type="string" name="mediaSize_na_letter" />
+  <java-symbol type="string" name="mediaSize_na_gvrnmt_letter" />
+  <java-symbol type="string" name="mediaSize_na_legal" />
+  <java-symbol type="string" name="mediaSize_na_junior_legal" />
+  <java-symbol type="string" name="mediaSize_na_ledger" />
+  <java-symbol type="string" name="mediaSize_na_tabloid" />
 
   <java-symbol type="plurals" name="abbrev_in_num_days" />
   <java-symbol type="plurals" name="abbrev_in_num_hours" />
diff --git a/docs/html/about/about_toc.cs b/docs/html/about/about_toc.cs
index 64cdadf..b752e20 100644
--- a/docs/html/about/about_toc.cs
+++ b/docs/html/about/about_toc.cs
@@ -10,6 +10,7 @@
     <div class="nav-section-header"><a href="<?cs var:toroot ?>about/versions/jelly-bean.html">
       <span class="en">Jelly Bean</span></a></div>
       <ul>
+        <li><a href="<?cs var:toroot ?>about/versions/android-4.3.html">Android 4.3 APIs</a></li>
         <li><a href="<?cs var:toroot ?>about/versions/android-4.2.html">Android 4.2 APIs</a></li>
         <li><a href="<?cs var:toroot ?>about/versions/android-4.1.html">Android 4.1 APIs</a></li>
       </ul>
diff --git a/docs/html/about/versions/android-4.0.jd b/docs/html/about/versions/android-4.0.jd
index 1d81bc2..1ce005d 100644
--- a/docs/html/about/versions/android-4.0.jd
+++ b/docs/html/about/versions/android-4.0.jd
@@ -54,8 +54,8 @@
     <strong>Table of Contents</strong>
   </a></p>
 
-  <div class="toggle-content-toggleme" style="padding-left:2em;">
-    <ol class="toc" style="margin-left:-1em">
+  <div class="toggle-content-toggleme" style="padding: 5px 18px">
+    <ol>
       <li><a href="#Contacts">Social APIs in Contacts Provider</a></li>
       <li><a href="#Calendar">Calendar Provider</a></li>
       <li><a href="#Voicemail">Voicemail Provider</a></li>
diff --git a/docs/html/about/versions/android-4.3.jd b/docs/html/about/versions/android-4.3.jd
new file mode 100644
index 0000000..0ca3bc6
--- /dev/null
+++ b/docs/html/about/versions/android-4.3.jd
@@ -0,0 +1,1163 @@
+page.title=Android 4.3 APIs
+excludeFromSuggestions=true
+sdk.platform.version=4.3
+sdk.platform.apiLevel=18
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+  
+<h2>In this document
+    <a href="#" onclick="hideNestedItems('#toc43',this);return false;" class="header-toggle">
+        <span class="more">show more</span>
+        <span class="less" style="display:none">show less</span></a></h2>
+
+<ol id="toc43" class="hide-nested">
+  <li><a href="#ApiLevel">Update your target API level</a></li>
+  <li><a href="#Behaviors">Important Behavior Changes</a>
+    <ol>
+      <li><a href="#BehaviorsIntents">If your app uses implicit intents...</a></li>
+      <li><a href="#BehaviorsAccounts">If your app depends on accounts...</a></li>
+    </ol>
+  </li>
+  <li><a href="#RestrictedProfiles">Restricted Profiles</a>
+    <ol>
+      <li><a href="#AccountsInProfile">Supporting accounts in a restricted profile</a></li>
+    </ol>
+  </li>
+  <li><a href="#Wireless">Wireless and Connectivity</a>
+    <ol>
+      <li><a href="#BTLE">Bluetooth Low Energy (Smart Ready)</a></li>
+      <li><a href="#WiFiScan">Wi-Fi scan-only mode</a></li>
+      <li><a href="#WiFiConfig">Wi-Fi configuration</a></li>
+      <li><a href="#QuickResponse">Quick response for incoming calls</a></li>
+    </ol>
+  </li>
+  <li><a href="#Multimedia">Multimedia</a>
+    <ol>
+      <li><a href="#DASH">MPEG DASH support</a></li>
+      <li><a href="#DRM">Media DRM</a></li>
+      <li><a href="#EncodingSurface">Video encoding from a Surface</a></li>
+      <li><a href="#MediaMuxing">Media muxing</a></li>
+      <li><a href="#ProgressAndScrubbing">Playback progress and scrubbing for RemoteControlClient</a></li>
+    </ol>
+  </li>
+  <li><a href="#Graphics">Graphics</a>
+    <ol>
+      <li><a href="#OpenGL">Support for OpenGL ES 3.0</a></li>
+      <li><a href="#MipMap">Mipmapping for drawables</a></li>
+    </ol>
+  </li>
+  <li><a href="#UI">User Interface</a>
+    <ol>
+      <li><a href="#ViewOverlay">View overlays</a></li>
+      <li><a href="#OpticalBounds">Optical bounds layout</a></li>
+      <li><a href="#AnimationRect">Animation for Rect values</a></li>
+      <li><a href="#AttachFocus">Window attach and focus listener</a></li>
+      <li><a href="#Overscan">TV overscan support</a></li>
+      <li><a href="#Orientation">Screen orientation</a></li>
+      <li><a href="#RotationAnimation">Rotation animations</a></li>
+    </ol>
+  </li>
+  <li><a href="#UserInput">User Input</a>
+    <ol>
+      <li><a href="#SignificantMotion">Detect significant motion</a></li>
+      <li><a href="#Sensors">New sensor types</a></li>
+    </ol>
+  </li>
+  <li><a href="#NotificationListener">Notification Listener</a></li>
+  <li><a href="#Contacts">Contacts Provider</a>
+    <ol>
+      <li><a href="#Contactables">Query for "contactables"</a></li>
+      <li><a href="#ContactsDelta">Query for contacts deltas</a></li>
+    </ol>
+  </li>
+  <li><a href="#Localization">Localization</a>
+    <ol>
+      <li><a href="#BiDi">Improved support for bi-directional text</a></li>
+    </ol>
+  </li>
+  <li><a href="#A11yService">Accessibility Services</a>
+    <ol>
+      <li><a href="#A11yKeyEvents">Handle key events</a></li>
+      <li><a href="#A11yText">Select text and copy/paste</a></li>
+      <li><a href="#A11yFeatures">Declare accessibility features</a></li>
+    </ol>
+  </li>
+  <li><a href="#Testing">Testing and Debugging</a>
+    <ol>
+      <li><a href="#UiAutomation">Automated UI testing</a></li>
+      <li><a href="#Systrace">Systrace events for apps</a></li>
+    </ol>
+  </li>
+  <li><a href="#Security">Security</a>
+    <ol>
+      <li><a href="#KeyStore">Android key store for app-private keys</a></li>
+      <li><a href="#HardwareKeyChain">Hardware credential storage</a></li>
+    </ol>
+  </li>
+  <li><a href="#Manifest">Manifest Declarations</a>
+    <ol>
+      <li><a href="#ManifestFeatures">Declarable required features</a></li>
+      <li><a href="#ManifestPermissions">User permissions</a></li>
+    </ol>
+  </li>
+</ol>
+
+<h2>See also</h2>
+<ol>
+<li><a href="{@docRoot}sdk/api_diff/18/changes.html">API
+Differences Report &raquo;</a> </li>
+<li><a
+href="{@docRoot}tools/extras/support-library.html">Support Library</a></li>
+</ol>
+
+</div>
+</div>
+
+
+
+<p>API Level: {@sdkPlatformApiLevel}</p>
+
+<p>Android {@sdkPlatformVersion} ({@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2})
+is an update to the Jelly Bean release that offers new features for users and app
+developers. This document provides an introduction to the most notable
+new APIs.</p>
+
+<p>As an app developer, you should download the Android {@sdkPlatformVersion} system image
+and SDK platform from the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> as
+soon as possible. If you don't have a device running Android {@sdkPlatformVersion} on which to
+test your app, use the Android {@sdkPlatformVersion} system
+image to test your app on the <a href="{@docRoot}tools/devices/emulator.html">Android emulator</a>.
+Then build your apps against the Android {@sdkPlatformVersion} platform to begin using the
+latest APIs.</p>
+
+  
+<h3 id="ApiLevel">Update your target API level</h3>
+
+<p>To better optimize your app for devices running Android {@sdkPlatformVersion},
+  you should set your <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> to
+<code>"{@sdkPlatformApiLevel}"</code>, install it on an Android {@sdkPlatformVersion} system image,
+test it, then publish an update with this change.</p>
+
+<p>You can use APIs in Android {@sdkPlatformVersion} while also supporting older versions by adding
+conditions to your code that check for the system API level before executing
+APIs not supported by your <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>. 
+To learn more about maintaining backward compatibility, read <a
+href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different
+Platform Versions</a>.</p>
+
+<p>Various APIs are also available in the Android <a
+href="{@docRoot}tools/extras/support-library.html">Support Library</a> that allow you to implement
+new features on older versions of the platform.</p>
+
+<p>For more information about how API levels work, read <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">What is API
+Level?</a></p>
+
+
+
+
+
+<h2 id="Behaviors">Important Behavior Changes</h2>
+
+<p>If you have previously published an app for Android, be aware that your app might
+be affected by changes in Android {@sdkPlatformVersion}.</p>
+
+
+<h3 id="BehaviorsIntents">If your app uses implicit intents...</h3>
+
+<p>Your app might misbehave in a restricted profile environment.</p>
+
+<p>Users in a <a href="#RestrictedProfiles">restricted profile</a> environment might not 
+have all the standard Android apps available. For example, a restricted profile might have the 
+web browser and camera app disabled. So your app should not make assumptions about which apps are 
+available, because if you call {@link android.app.Activity#startActivity startActivity()} without 
+verifying whether an app is available to handle the {@link android.content.Intent}, 
+your app might crash in a restricted profile.</p>
+
+<p>When using an implicit intent, you should always verify that an app is available to handle the intent by calling {@link android.content.Intent#resolveActivity resolveActivity()} or {@link android.content.pm.PackageManager#queryIntentActivities queryIntentActivities()}. For example:</p>
+
+<pre>
+Intent intent = new Intent(Intent.ACTION_SEND);
+...
+if (intent.resolveActivity(getPackageManager()) != null) {
+    startActivity(intent);
+} else {
+    Toast.makeText(context, R.string.app_not_available, Toast.LENGTH_LONG).show();
+}
+</pre>
+
+
+<h3 id="BehaviorsAccounts">If your app depends on accounts...</h3>
+
+<p>Your app might misbehave in a restricted profile environment.</p>
+
+<p>Users within a restricted profile environment do not have access to user accounts by default.
+If your app depends on an {@link android.accounts.Account}, then your app might crash or behave 
+unexpectedly when used in a restricted profile.</p>
+
+<p>If you'd like to prevent restricted profiles from using your app entirely because your
+app depends on account information that's sensitive, specify the <a 
+href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code 
+android:requiredAccountType}</a> attribute in your manifest's <a 
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application>}</a> 
+element.</p>
+
+<p>If you’d like to allow restricted profiles to continue using your app even though they can’t 
+create their own accounts, then you can either disable your app features that require an account 
+or allow restricted profiles to access the accounts created by the primary user. For more
+information, see the section 
+below about <a href="#AccountsInProfile">Supporting accounts in a restricted profile</a>.</p>
+
+
+
+
+<h2 id="RestrictedProfiles">Restricted Profiles</h2>
+
+<p>On Android tablets, users can now create restricted profiles based on the primary user. 
+When users create a restricted profile, they can enable restrictions such as which apps are
+available to the profile. A new set of APIs in Android 4.3 also allow you to build fine-grain
+restriction settings for the apps you develop. For example, by using the new APIs, you can 
+allow users to control what type of content is available within your app when running in a 
+restricted profile environment.</p>
+
+<p>The UI for users to control the restrictions you've built is managed by the system's 
+Settings application. To make your app's restriction settings appear to the user,
+you must declare the restrictions your app provides by creating a {@link 
+android.content.BroadcastReceiver} that receives the {@link android.content.Intent#ACTION_GET_RESTRICTION_ENTRIES} intent. The system invokes this intent to query 
+all apps for available restrictions, then builds the UI to allow the primary user to 
+manage restrictions for each restricted profile. </p>
+
+<p>In the {@link android.content.BroadcastReceiver#onReceive onReceive()} method of 
+your {@link android.content.BroadcastReceiver}, you must create a {@link 
+android.content.RestrictionEntry} for each restriction your app provides. Each {@link 
+android.content.RestrictionEntry} defines a restriction title, description, and one of the 
+following data types:</p>
+
+<ul>
+  <li>{@link android.content.RestrictionEntry#TYPE_BOOLEAN} for a restriction that is 
+  either true or false.
+  <li>{@link android.content.RestrictionEntry#TYPE_CHOICE} for a restriction that has 
+  multiple choices that are mutually exclusive (radio button choices).
+  <li>{@link android.content.RestrictionEntry#TYPE_MULTI_SELECT} for a restriction that 
+  has multiple choices that are <em>not</em> mutually exclusive (checkbox choices).
+</ul>
+
+<p>You then put all the {@link android.content.RestrictionEntry} objects into an {@link 
+java.util.ArrayList} and put it into the broadcast receiver's result as the value for the 
+{@link android.content.Intent#EXTRA_RESTRICTIONS_LIST} extra.</p>
+
+<p>The system creates the UI for your app's restrictions in the Settings app and saves each 
+restriction with the unique key you provided for each {@link android.content.RestrictionEntry} 
+object. When the user opens your app, you can query for any current restrictions by 
+calling {@link android.os.UserManager#getApplicationRestrictions getApplicationRestrictions()}. 
+This returns a {@link android.os.Bundle} containing the key-value pairs for each restriction
+you defined with the {@link android.content.RestrictionEntry} objects.</p>
+
+<p>If you want to provide more specific restrictions that can't be handled by boolean, single 
+choice, and multi-choice values, then you can create an activity where the user can specify the 
+restrictions and allow users to open that activity from the restriction settings. In your 
+broadcast receiver, include the {@link android.content.Intent#EXTRA_RESTRICTIONS_INTENT} extra 
+in the result {@link android.os.Bundle}. This extra must specify an {@link android.content.Intent}
+indicating the {@link android.app.Activity} class to launch (use the 
+{@link android.os.Bundle#putParcelable putParcelable()} method to pass {@link 
+android.content.Intent#EXTRA_RESTRICTIONS_INTENT} with the intent).
+When the primary user enters your activity to set custom restrictions, your 
+activity must then return a result containing the restriction values in an extra using either 
+the {@link android.content.Intent#EXTRA_RESTRICTIONS_LIST} or {@link 
+android.content.Intent#EXTRA_RESTRICTIONS_BUNDLE} key, depending on whether you specify
+{@link android.content.RestrictionEntry} objects or key-value pairs, respectively.</p>
+
+
+<h3 id="AccountsInProfile">Supporting accounts in a restricted profile</h3>
+
+<p>Any accounts added to the primary user are available to a restricted profile, but the 
+accounts are not accessible from the {@link android.accounts.AccountManager} APIs by default. 
+If you attempt to add an account with {@link android.accounts.AccountManager} while in a restricted
+profile, you will get a failure result. Due to these restrictions, you have the following 
+three options:</p>
+
+<li><strong>Allow access to the owner’s accounts from a restricted profile.</strong>
+<p>To get access to an account from a restricted profile, you must add the <a href="{@docRoot}guide/topics/manifest/application-element.html#restrictedAccountType">{@code android:restrictedAccountType}</a> attribute to the <a
+href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application></a> tag:</p>
+<pre>
+&lt;application ...
+    android:restrictedAccountType="com.example.account.type" >
+</pre>
+
+<p class="caution"><strong>Caution:</strong> Enabling this attribute provides your 
+app access to the primary user's accounts from restricted profiles. So you should allow this 
+only if the information displayed by your app does not reveal personally identifiable
+information (PII) that’s considered sensitive.</p>
+</li>
+
+
+<li><strong>Disable certain functionality when unable to modify accounts.</strong>
+<p>If you want to use accounts, but don’t actually require them for your app’s primary 
+functionality, you can check for account availability and disable features when not available. 
+You should first check if there is an existing account available. If not, then query whether 
+it’s possible to create a new account by calling {@link 
+android.os.UserManager#getUserRestrictions()} and check the {@link 
+android.os.UserManager#DISALLOW_MODIFY_ACCOUNTS} extra in the result. If it is {@code true}, 
+then you should disable whatever functionality of your app requires access to accounts. 
+For example:</p>
+<pre>
+UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
+Bundle restrictions = um.getUserRestrictions();
+if (restrictions.getBoolean(UserManager.DISALLOW_MODIFY_ACCOUNTS, false)) {
+   // cannot add accounts, disable some functionality
+}
+</pre>
+<p class="note"><strong>Note:</strong> In this scenario, you should <em>not</em> declare 
+any new attributes in your manifest file.</p>
+</li>
+
+<li><strong>Disable your app when unable to access private accounts.</strong>
+<p>If it’s instead important that your app not be available to restricted profiles because 
+your app depends on sensitive personal information in an account (and because restricted profiles 
+currently cannot add new accounts), add
+the <a href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code 
+android:requiredAccountType}</a> attribute to the <a
+href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application></a> tag:</p>
+<pre>
+&lt;application ...
+    android:requiredAccountType="com.example.account.type" >
+</pre>
+<p>For example, the Gmail app uses this attribute to disable itself for restricted profiles,
+because the owner's personal email should not be available to restricted profiles.</p>
+</li>
+
+
+
+<h2 id="Wireless">Wireless and Connectivity</h2>
+
+
+<h3 id="BTLE">Bluetooth Low Energy (Smart Ready)</h3>
+
+<p>Android now supports Bluetooth Low Energy (LE) with new APIs in {@link android.bluetooth}. 
+With the new APIs, you can build Android apps that communicate with Bluetooth Low Energy 
+peripherals such as heart rate monitors and pedometers.</p>
+
+<p>Because Bluetooth LE is a hardware feature that is not available on all 
+Android-powered devices, you must declare in your manifest file a <a
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature>}</a>
+element for {@code "android.hardware.bluetooth_le"}:</p>
+<pre>
+&lt;uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
+</pre>
+
+<p>If you're already familiar with Android's Classic Bluetooth APIs, notice that using the 
+Bluetooth LE APIs has some differences. Most importantly is that there's now a {@link 
+android.bluetooth.BluetoothManager} class that you should use for some high level operations 
+such as acquiring a {@link android.bluetooth.BluetoothAdapter}, getting a list of connected 
+devices, and checking the state of a device. For example, here's how you should now get the 
+{@link android.bluetooth.BluetoothAdapter}:</p>
+<pre>
+final BluetoothManager bluetoothManager =
+        (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
+mBluetoothAdapter = bluetoothManager.getAdapter();
+</pre>
+
+<p>To discover Bluetooth LE peripherals, call {@link android.bluetooth.BluetoothAdapter#startLeScan 
+startLeScan()} on the {@link android.bluetooth.BluetoothAdapter}, passing it an implementation 
+of the {@link android.bluetooth.BluetoothAdapter.LeScanCallback} interface. When the Bluetooth 
+adapter detects a Bluetooth LE peripheral, your {@link 
+android.bluetooth.BluetoothAdapter.LeScanCallback} implementation receives a call to the 
+{@link android.bluetooth.BluetoothAdapter.LeScanCallback#onLeScan onLeScan()} method. This 
+method provides you with a {@link android.bluetooth.BluetoothDevice} object representing the 
+detected device, the RSSI value for the device, and a byte array containing the device's 
+advertisement record.</p>
+
+<p>If you want to scan for only specific types of peripherals, you can instead call {@link 
+android.bluetooth.BluetoothAdapter#startLeScan startLeScan()} and include an array of {@link 
+java.util.UUID} objects that specify the GATT services your app supports.</p>
+
+<p class="note"><strong>Note:</strong> You can only scan for Bluetooth LE devices <em>or</em> 
+scan for Classic Bluetooth devices using previous APIs. You cannot scan for both LE and Classic 
+Bluetooth devices at once.</p>
+
+<p>To then connect to a Bluetooth LE peripheral, call {@link 
+android.bluetooth.BluetoothDevice#connectGatt connectGatt()} on the corresponding 
+{@link android.bluetooth.BluetoothDevice} object, passing it an implementation of 
+{@link android.bluetooth.BluetoothGattCallback}. Your implementation of {@link 
+android.bluetooth.BluetoothGattCallback} receives callbacks regarding the connectivity 
+state with the device and other events. It's during the {@link 
+android.bluetooth.BluetoothGattCallback#onConnectionStateChange onConnectionStateChange()} 
+callback that you can begin communicating with the device if the method passes {@link 
+android.bluetooth.BluetoothProfile#STATE_CONNECTED} as the new state.</p>
+
+<p>Accessing Bluetooth features on a device also requires that your app request certain
+Bluetooth user permissions. For more information, see the <a
+href="{@docRoot}guide/topics/connectivity/bluetooth-le.html">Bluetooth Low Energy</a> API guide.</p>
+
+
+<h3 id="WiFiScan">Wi-Fi scan-only mode</h3>
+
+<p>When attempting to identify the user's location, Android may use Wi-Fi to help determine 
+the location by scanning nearby access points. However, users often keep Wi-Fi turned off to 
+conserve battery, resulting in location data that's less accurate. Android now includes a 
+scan-only mode that allows the device Wi-Fi to scan access points to help obtain the location 
+without connecting to an access point, thus greatly reducing battery usage.</p>
+
+<p>If you want to acquire the user's location but Wi-Fi is currently off, you can request the 
+user to enable Wi-Fi scan-only mode by calling {@link android.content.Context#startActivity 
+startActivity()} with the action {@link 
+android.net.wifi.WifiManager#ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE}.</p>
+
+
+<h3 id="WiFiConfig">Wi-Fi configuration</h3>
+
+<p>New {@link android.net.wifi.WifiEnterpriseConfig} APIs allow enterprise-oriented services to 
+automate Wi-Fi configuration for managed devices.</p>
+
+
+<h3 id="QuickResponse">Quick response for incoming calls</h3>
+
+<p>Since Android 4.0, a feature called "Quick response" allows users to respond to incoming 
+calls with an immediate text message without needing to pick up the call or unlock the device. 
+Until now, these quick messages were always handled by the default Messaging app. Now any app 
+can declare its capability to handle these messages by creating a {@link android.app.Service} 
+with an intent filter for {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE}.</p>
+
+<p>When the user responds to an incoming call with a quick response, the Phone app sends 
+the {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE} intent with a URI 
+describing the recipient (the caller) and the {@link android.content.Intent#EXTRA_TEXT} extra 
+with the message the user wants to send. When your service receives the intent, it should deliver 
+the message and immediately stop itself (your app should not show an activity).</p>
+
+<p>In order to receive this intent, you must declare the {@link 
+android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE} permission.</p>
+
+
+
+<h2 id="Multimedia">Multimedia</h2>
+
+<h3 id="DASH">MPEG DASH support</h3>
+
+<p>Android now supports Dynamic Adaptive Streaming over HTTP (DASH) in accordance with the 
+ISO/IEC 23009-1 standard, using existing APIs in {@link android.media.MediaCodec} and {@link 
+android.media.MediaExtractor}. The framework underlying these APIs has been updated to support 
+parsing of fragmented MP4 files, but your app is still responsible for parsing the MPD metadata 
+and passing the individual streams to {@link android.media.MediaExtractor}.</p>
+
+<p>If you want to use DASH with encrypted content, notice that the {@link android.media.MediaExtractor#getSampleCryptoInfo getSampleCryptoInfo()} method returns the {@link 
+android.media.MediaCodec.CryptoInfo} metadata describing the structure of each encrypted media 
+sample. Also, the {@link android.media.MediaExtractor#getPsshInfo()} method has been added to 
+{@link android.media.MediaExtractor} so you can access the PSSH metadata for your DASH media. 
+This method returns a map of {@link java.util.UUID} objects to bytes, with the 
+{@link java.util.UUID} specifying the crypto scheme, and the bytes being the data specific 
+to that scheme.</p>
+
+
+<h3 id="DRM">Media DRM</h3>
+
+<p>The new {@link android.media.MediaDrm} class provides a modular solution for digital rights
+management (DRM) with your media content by separating DRM concerns from media playback. For 
+instance, this API separation allows you to play back Widevine-encrypted content without having 
+to use the Widevine media format. This DRM solution also supports DASH Common Encryption so you 
+can use a variety of DRM schemes with your streaming content.</p>
+
+<p>You can use {@link android.media.MediaDrm} to obtain opaque key-request messages and process 
+key-response messages from the server for license acquisition and provisioning. Your app is 
+responsible for handling the network communication with the servers; the {@link 
+android.media.MediaDrm} class provides only the ability to generate and process the messages.</p>
+
+<p>The {@link android.media.MediaDrm} APIs are  intended to be used in conjunction with the 
+{@link android.media.MediaCodec} APIs that were introduced in Android 4.1 (API level 16), 
+including {@link android.media.MediaCodec} for encoding and decoding your content, {@link 
+android.media.MediaCrypto} for handling encrypted content, and {@link android.media.MediaExtractor} 
+for extracting and demuxing your content.</p>
+
+<p>You must first construct {@link android.media.MediaExtractor} and 
+{@link android.media.MediaCodec} objects. You can then access the DRM-scheme-identifying 
+{@link java.util.UUID}, typically from metadata in the content, and use it to construct an 
+instance of a {@link android.media.MediaDrm} object with its constructor.</p>
+
+
+<h3 id="EncodingSurface">Video encoding from a Surface</h3>
+
+<p>Android 4.1 (API level 16) added the {@link android.media.MediaCodec} class for low-level 
+encoding and decoding of media content. When encoding video, Android 4.1 required that you provide 
+the media with a {@link java.nio.ByteBuffer} array, but Android 4.3 now allows you to use a {@link 
+android.view.Surface} as the input to an encoder. For instance, this allows you to encode input 
+from an existing video file or using frames generated from OpenGL ES.</p>
+
+<p>To use a {@link android.view.Surface} as the input to your encoder, first call {@link 
+android.media.MediaCodec#configure configure()} for your {@link android.media.MediaCodec}. 
+Then call {@link android.media.MediaCodec#createInputSurface()} to receive the {@link 
+android.view.Surface} upon which you can stream your media.</p>
+
+<p>For example, you can use the given {@link android.view.Surface} as the window for an OpenGL 
+context by passing it to {@link android.opengl.EGL14#eglCreateWindowSurface 
+eglCreateWindowSurface()}. Then while rendering the surface, call {@link 
+android.opengl.EGL14#eglSwapBuffers eglSwapBuffers()} to pass the frame to the {@link 
+android.media.MediaCodec}.</p>
+
+<p>To begin encoding, call {@link android.media.MediaCodec#start()} on the {@link 
+android.media.MediaCodec}. When done, call {@link android.media.MediaCodec#signalEndOfInputStream} 
+to terminate encoding, and call {@link android.view.Surface#release()} on the 
+{@link android.view.Surface}.</p>
+
+
+<h3 id="MediaMuxing">Media muxing</h3>
+
+<p>The new {@link android.media.MediaMuxer} class enables multiplexing between one audio stream 
+and one video stream. These APIs serve as a counterpart to the {@link android.media.MediaExtractor} 
+class added in Android 4.2 for de-multiplexing (demuxing) media.</p>
+
+<p>Supported output formats are defined in {@link android.media.MediaMuxer.OutputFormat}. Currently, 
+MP4 is the only supported output format and {@link android.media.MediaMuxer} currently supports 
+only one audio stream and/or one video stream at a time.</p>
+
+<p>{@link android.media.MediaMuxer} is mostly designed to work with {@link android.media.MediaCodec} 
+so you can perform video processing through {@link android.media.MediaCodec} then save the 
+output to an MP4 file through {@link android.media.MediaMuxer}. You can also use {@link 
+android.media.MediaMuxer} in combination with {@link android.media.MediaExtractor} to perform 
+media editing without the need to encode or decode.</p>
+
+
+<h3 id="ProgressAndScrubbing">Playback progress and scrubbing for RemoteControlClient</h3>
+
+<p>In Android 4.0 (API level 14), the {@link android.media.RemoteControlClient} was added to 
+enable media playback controls from remote control clients such as the controls available on the 
+lock screen. Android 4.3 now provides the ability for such controllers to display the playback 
+position and controls for scrubbing the playback. If you've enabled remote control for your 
+media app with the {@link android.media.RemoteControlClient} APIs, then you can allow playback 
+scrubbing by implementing two new interfaces.</p>
+
+<p>First, you must enable the {@link 
+android.media.RemoteControlClient#FLAG_KEY_MEDIA_POSITION_UPDATE} flag by passing it to 
+{@link android.media.RemoteControlClient#setTransportControlFlags setTransportControlsFlags()}.</p> 
+
+<p>Then implement the following two new interfaces:</p>
+<dl>
+  <dt>{@link android.media.RemoteControlClient.OnGetPlaybackPositionListener}</dt>
+  <dd>This includes the callback {@link android.media.RemoteControlClient.OnGetPlaybackPositionListener#onGetPlaybackPosition}, which requests the current position 
+  of your media when the remote control needs to update the progress in its UI.</dd>
+
+  <dt>{@link android.media.RemoteControlClient.OnPlaybackPositionUpdateListener}</dt>
+  <dd>This includes the callback {@link android.media.RemoteControlClient.OnPlaybackPositionUpdateListener#onPlaybackPositionUpdate onPlaybackPositionUpdate()}, which 
+  tells your app the new time code for your media when the user scrubs the playback with the 
+  remote control UI.
+    <p>Once you update your playback with the new position, call {@link 
+    android.media.RemoteControlClient#setPlaybackState setPlaybackState()} to indicate the 
+    new playback state, position, and speed.</p>
+  </dd>
+</dl>
+
+<p>With these interfaces defined, you can set them for your {@link 
+android.media.RemoteControlClient} by calling {@link android.media.RemoteControlClient#setOnGetPlaybackPositionListener setOnGetPlaybackPositionListener()} and 
+{@link android.media.RemoteControlClient#setPlaybackPositionUpdateListener 
+setPlaybackPositionUpdateListener()}, respectively.</p>
+
+
+
+<h2 id="Graphics">Graphics</h2>
+
+<h3 id="OpenGL">Support for OpenGL ES 3.0</h3>
+
+<p>Android 4.3 adds Java interfaces and native support for OpenGL ES 3.0. Key new functionality 
+provided in OpenGL ES 3.0 includes:</p>
+<ul>
+  <li>Acceleration of advanced visual effects</li>
+  <li>High quality ETC2/EAC texture compression as a standard feature</li>
+  <li>A new version of the GLSL ES shading language with integer and 32-bit floating point support</li>
+  <li>Advanced texture rendering</li>
+  <li>Broader standardization of texture size and render-buffer formats</li>
+</ul>
+
+<p>The Java interface for OpenGL ES 3.0 on Android is provided with {@link android.opengl.GLES30}. 
+When using OpenGL ES 3.0, be sure that you declare it in your manifest file with the 
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature></a>
+tag and the {@code android:glEsVersion} attribute. For example:</p>
+<pre>
+&lt;manifest>
+    &lt;uses-feature android:glEsVersion="0x00030000" />
+    ...
+&lt;/manifest>
+</pre>
+
+<p>And remember to specify the OpenGL ES context by calling {@link android.opengl.GLSurfaceView#setEGLContextClientVersion setEGLContextClientVersion()}, passing {@code 3} as the version.</p>
+
+
+<h3 id="MipMap">Mipmapping for drawables</h3>
+
+<p>Using a mipmap as the source for your bitmap or drawable is a simple way to provide a 
+quality image and various image scales, which can be particularly useful if you expect your 
+image to be scaled during an animation.</p>
+
+<p>Android 4.2 (API level 17) added support for mipmaps in the {@link android.graphics.Bitmap} 
+class&mdash;Android swaps the mip images in your {@link android.graphics.Bitmap} when you've 
+supplied a mipmap source and have enabled {@link android.graphics.Bitmap#setHasMipMap 
+setHasMipMap()}. Now in Android 4.3, you can enable mipmaps for a {@link 
+android.graphics.drawable.BitmapDrawable} object as well, by providing a mipmap asset and 
+setting the {@code android:mipMap} attribute in a bitmap resource file or by calling {@link 
+android.graphics.drawable.BitmapDrawable#hasMipMap hasMipMap()}.
+</p>
+
+
+
+<h2 id="UI">User Interface</h2>
+
+<h3 id="ViewOverlay">View overlays</h3>
+
+<p>The new {@link android.view.ViewOverlay} class provides a transparent layer on top of 
+a {@link android.view.View} on which you can add visual content and which does not affect 
+the layout hierarchy. You can get a {@link android.view.ViewOverlay} for any {@link 
+android.view.View} by calling {@link android.view.View#getOverlay}. The overlay 
+always has the same size and position as its host view (the view from which it was created), 
+allowing you to add content that appears in front of the host view, but which cannot extend 
+the bounds of that host view.
+</p>
+
+<p>Using a {@link android.view.ViewOverlay} is particularly useful when you want to create 
+animations such as sliding a view outside of its container or moving items around the screen 
+without affecting the view hierarchy. However, because the usable area of an overlay is 
+restricted to the same area as its host view, if you want to animate a view moving outside 
+its position in the layout, you must use an overlay from a parent view that has the desired 
+layout bounds.</p>
+
+<p>When you create an overlay for a widget view such as a {@link android.widget.Button}, you 
+can add {@link android.graphics.drawable.Drawable} objects to the overlay by calling 
+{@link android.view.ViewOverlay#add(Drawable)}. If you call {@link 
+android.view.ViewGroup#getOverlay} for a layout view, such as {@link android.widget.RelativeLayout},
+the object returned is a {@link android.view.ViewGroupOverlay}. The
+{@link android.view.ViewGroupOverlay} class is a subclass 
+of {@link android.view.ViewOverlay} that  also allows you to add {@link android.view.View} 
+objects by calling {@link android.view.ViewGroupOverlay#add(View)}.
+</p>
+
+<p class="note"><strong>Note:</strong> All drawables and views that you add to an overlay 
+are visual only. They cannot receive focus or input events.</p>
+
+<p>For example, the following code animates a view sliding to the right by placing the view 
+in the parent view's overlay, then performing a translation animation on that view:</p>
+<pre>
+View view = findViewById(R.id.view_to_remove);
+ViewGroup container = (ViewGroup) view.getParent();
+container.getOverlay().add(view);
+ObjectAnimator anim = ObjectAnimator.ofFloat(view, "translationX", container.getRight());
+anim.start();
+</pre>
+
+
+<h3 id="OpticalBounds">Optical bounds layout</h3>
+
+<p>For views that contain nine-patch background images, you can now specify that they should 
+be aligned with neighboring views based on the "optical" bounds of the background image rather 
+than the "clip" bounds of the view.</p>
+
+<p>For example, figures 1 and 2 each show the same layout, but the version in figure 1 is 
+using clip bounds (the default behavior), while figure 2 is using optical bounds. Because the 
+nine-patch images used for the button and the photo frame include padding around the edges, 
+they don’t appear to align with each other or the text when using clip bounds.</p>
+
+<p class="note"><strong>Note:</strong> The screenshot in figures 1 and 2 have the "Show 
+layout bounds" developer setting enabled. For each view, red lines indicate the optical 
+bounds, blue lines indicate the clip bounds, and pink indicates margins.</p>
+
+<script type="text/javascript">
+function toggleOpticalImages(mouseover) {
+
+  $("img.optical-img").each(function() {
+    $img = $(this);
+    var index = $img.attr('src').lastIndexOf("/") + 1;
+    var path = $img.attr('src').substr(0,index);
+    var name = $img.attr('src').substr(index);
+    var splitname;
+    var highres = false;
+    if (name.indexOf("@2x") != -1) {
+      splitname = name.split("@2x.");
+      highres = true;
+    } else {
+      splitname = name.split(".");
+    }
+
+    var newname;
+    if (mouseover) {
+      if (highres) {
+        newname = splitname[0] + "-normal@2x.png";
+      } else {
+        newname = splitname[0] + "-normal.png";
+      }
+    } else {
+      if (highres) {
+        newname = splitname[0].split("-normal")[0] + "@2x.png";
+      } else {
+        newname = splitname[0].split("-normal")[0] + ".png";
+      }
+    }
+
+    $img.attr('src', path + newname);
+
+  });
+}
+</script>
+
+<p class="table-caption"><em>Mouse over to hide the layout bounds.</em></p>
+<div style="float:left;width:296px">
+<img src="{@docRoot}images/tools/clipbounds@2x.png" width="296" alt="" class="optical-img"
+    onmouseover="toggleOpticalImages(true)" onmouseout="toggleOpticalImages(false)" />
+<p class="img-caption"><strong>Figure 1.</strong> Layout using clip bounds (default).</p>
+</div>
+<div style="float:left;width:296px;margin-left:60px">
+<img src="{@docRoot}images/tools/opticalbounds@2x.png" width="296" alt="" class="optical-img"
+    onmouseover="toggleOpticalImages(true)" onmouseout="toggleOpticalImages(false)" />
+<p class="img-caption"><strong>Figure 2.</strong> Layout using optical bounds.</p>
+</div>
+
+
+<p style="clear:left">To align the views based on their optical bounds, set the {@code android:layoutMode} attribute to {@code "opticalBounds"} in one of the parent layouts. For example:</p>
+
+<pre>
+&lt;LinearLayout android:layoutMode="opticalBounds" ... >
+</pre>
+
+
+<div class="figure" style="width:155px">
+<img src="{@docRoot}images/tools/ninepatch_opticalbounds@2x.png" width="121" alt="" />
+<p class="img-caption"><strong>Figure 3.</strong> Zoomed view of the Holo button nine-patch with
+optical bounds.
+</p>
+</div>
+
+<p>For this to work, the nine-patch images applied to the background of your views must specify 
+the optical bounds using red lines along the bottom and right-side of the nine-patch file (as 
+shown in figure 3). The red lines indicate the region that should be subtracted from 
+the clip bounds, leaving the optical bounds of the image.</p>
+
+<p>When you enable optical bounds for a {@link android.view.ViewGroup} in your layout, all 
+descendant views inherit the optical bounds layout mode unless you override it for a group by 
+setting {@code android:layoutMode} to {@code "clipBounds"}. All layout elements also honor the 
+optical bounds of their child views, adapting their own bounds based on the optical bounds of 
+the views within them. However, layout elements (subclasses of {@link android.view.ViewGroup}) 
+currently do not support optical bounds for nine-patch images applied to their own background.</p>
+
+<p>If you create a custom view by subclassing {@link android.view.View}, {@link android.view.ViewGroup}, or any subclasses thereof, your view will inherit these optical bound behaviors.</p>
+
+<p class="note"><strong>Note:</strong> All widgets supported by the Holo theme have been updated
+with optical bounds, including {@link android.widget.Button},  {@link android.widget.Spinner}, 
+{@link android.widget.EditText}, and others. So you can immediately benefit by setting the
+{@code android:layoutMode} attribute to {@code "opticalBounds"} if your app applies a Holo theme 
+({@link android.R.style#Theme_Holo Theme.Holo}, {@link android.R.style#Theme_Holo_Light 
+Theme.Holo.Light}, etc.).
+</p>
+
+<p>To specify optical bounds for your own nine-patch images with the <a 
+href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> tool, hold CTRL when clicking on 
+the border pixels.</p>
+
+
+
+
+<h3 id="AnimationRect">Animation for Rect values</h3>
+
+<p>You can now animate between two {@link android.graphics.Rect} values with the new {@link 
+android.animation.RectEvaluator}. This new class is an implementation of {@link 
+android.animation.TypeEvaluator} that you can pass to {@link 
+android.animation.ValueAnimator#setEvaluator ValueAnimator.setEvaluator()}.
+</p>
+
+<h3 id="AttachFocus">Window attach and focus listener</h3>
+
+<p>Previously, if you wanted to listen for when your view attached/detached to the window or 
+when its focus changed, you needed to override the {@link android.view.View} class to 
+implement {@link android.view.View#onAttachedToWindow onAttachedToWindow()} and {@link 
+android.view.View#onDetachedFromWindow onDetachedFromWindow()}, or  {@link 
+android.view.View#onWindowFocusChanged onWindowFocusChanged()}, respectively.
+</p>
+
+<p>Now, to receive attach and detach events you can instead implement {@link 
+android.view.ViewTreeObserver.OnWindowAttachListener} and set it on a view with 
+{@link android.view.ViewTreeObserver#addOnWindowAttachListener addOnWindowAttachListener()}. 
+And to receive focus events, you can implement {@link 
+android.view.ViewTreeObserver.OnWindowFocusChangeListener} and set it on a view with 
+{@link android.view.ViewTreeObserver#addOnWindowFocusChangeListener 
+addOnWindowFocusChangeListener()}.
+</p>
+
+
+<h3 id="Overscan">TV overscan support</h3>
+
+<p>To be sure your app fills the entire screen on every television, you can now enable overscan 
+for you app layout. Overscan mode is determined by the {@link android.view.WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag, which you can enable with platform themes such as 
+{@link android.R.style#Theme_DeviceDefault_NoActionBar_Overscan} or by enabling the 
+{@link android.R.attr#windowOverscan} style in a custom theme.</p>
+
+
+<h3 id="Orientation">Screen orientation</h3>
+
+<p>The <a 
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity>}</a>
+tag's <a 
+href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code screenOrientation}</a>
+attribute now supports additional values to honor the user's preference for auto-rotation:</p>
+<dl>
+<dt>{@code "userLandscape"}</dt>
+<dd>Behaves the same as {@code "sensorLandscape"}, except if the user disables auto-rotate 
+then it locks in the normal landscape orientation and will not flip.
+</dd>
+
+<dt>{@code "userPortrait"}</dt>
+<dd>Behaves the same as {@code "sensorPortrait"}, except if the user disables auto-rotate then 
+it locks in the normal portrait orientation and will not flip.
+</dd>
+
+<dt>{@code "fullUser"}</dt>
+<dd>Behaves the same as {@code "fullSensor"} and allows rotation in all four directions, except 
+if the user disables auto-rotate then it locks in the user's preferred orientation.
+</dd></dl>
+
+<p>Additionally, you can now also declare {@code "locked"} to lock your app's orientation into
+the screen's current orientation.</p>
+
+
+<h3 id="RotationAnimation">Rotation animations</h3>
+
+<p>The new {@link android.view.WindowManager.LayoutParams#rotationAnimation} field in 
+{@link android.view.WindowManager} allows you to select between one of three animations you 
+want to use when the system switches screen orientations. The three animations are:</p>
+<ul>
+  <li>{@link android.view.WindowManager.LayoutParams#ROTATION_ANIMATION_CROSSFADE}</li>
+  <li>{@link android.view.WindowManager.LayoutParams#ROTATION_ANIMATION_JUMPCUT}</li>
+  <li>{@link android.view.WindowManager.LayoutParams#ROTATION_ANIMATION_ROTATE}</li>
+</ul>
+
+<p class="note"><strong>Note:</strong> These animations are available only if you've set your activity to use "fullscreen" mode, which you can enable with themes such as {@link android.R.style#Theme_Holo_NoActionBar_Fullscreen Theme.Holo.NoActionBar.Fullscreen}.</p>
+
+<p>For example, here's how you can enable the "crossfade" animation:</p>
+<pre>
+protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+
+    WindowManager.LayoutParams params = getWindow().getAttributes();
+    params.rotationAnimation = WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE;
+    getWindow().setAttributes(params);
+    ...
+}
+</pre>
+
+
+<h2 id="UserInput">User Input</h2>
+
+<h3 id="SignificantMotion">Detect significant motion</h3>
+
+<p>The {@link android.hardware.SensorManager} APIs now allow you to request a callback when the 
+device sensors detect "significant motion." For instance, this event may be triggered by new 
+motion such as when the user starts to walk.</p>
+
+<p>To register a listener for significant motion, extend the {@link android.hardware.TriggerEventListener} class and implement the {@link android.hardware.TriggerEventListener#onTrigger onTrigger()} callback method. Then register your event listener with the {@link android.hardware.SensorManager} by passing it to {@link android.hardware.SensorManager#requestTriggerSensor requestTriggerSensor()}, passing it your {@link android.hardware.TriggerEventListener} and {@link android.hardware.Sensor#TYPE_SIGNIFICANT_MOTION}.</p>
+
+<h3 id="Sensors">New sensor types</h3>
+<p>The new {@link android.hardware.Sensor#TYPE_GAME_ROTATION_VECTOR} sensor allows you to detect the device's rotations without worrying about magnetic interferences. Unlike the {@link android.hardware.Sensor#TYPE_ROTATION_VECTOR} sensor, the {@link android.hardware.Sensor#TYPE_GAME_ROTATION_VECTOR} is not based on magnetic north.</p>
+
+<p>The new {@link android.hardware.Sensor#TYPE_GYROSCOPE_UNCALIBRATED} and {@link 
+android.hardware.Sensor#TYPE_MAGNETIC_FIELD_UNCALIBRATED} sensors provide raw sensor data without 
+consideration for bias estimations. That is, the existing {@link 
+android.hardware.Sensor#TYPE_GYROSCOPE} and {@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD} 
+sensors provide sensor data that takes into account estimated bias from gyro-drift and hard iron 
+in the device, respectively. Whereas the new "uncalibrated" versions of these sensors instead provide 
+the raw sensor data and offer the estimated bias values separately. These sensors allow you to 
+provide your own custom calibration for the sensor data by enhancing the estimated bias with 
+external data.</p>
+
+
+
+<h2 id="NotificationListener">Notification Listener</h2>
+
+<p>Android 4.3 adds a new service class, {@link android.service.notification.NotificationListenerService}, that allows your app to receive information about new notifications as they are posted by the system. </p>
+
+<p>If your app currently uses the accessibility service APIs to access system notifications, you should update your app to use these APIs instead.</p>
+
+
+
+
+<h2 id="Contacts">Contacts Provider</h2>
+
+<h3 id="Contactables">Query for "contactables"</h3>
+
+<p>The new Contacts Provider query, {@link android.provider.ContactsContract.CommonDataKinds.Contactables#CONTENT_URI Contactables.CONTENT_URI}, provides an efficient way to get one {@link android.database.Cursor} that contains all email addresses and phone numbers belonging to all contacts matching the specified query.</p>
+
+
+<h3 id="ContactsDelta">Query for contacts deltas</h3>
+
+<p>New APIs have been added to Contacts Provider that allow you to efficiently query recent changes to the contacts data. Previously, your app could be notified when something in the contacts data changed, but you would not know exactly what changed and would need to retrieve all contacts then iterate through them to discover the change.</p>
+
+<p>To track changes to inserts and updates, you can now include the {@link android.provider.ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP} parameter with your selection to query only the contacts that have changed since the last time you queried the provider.</p>
+
+<p>To track which contacts have been deleted, the new table {@link android.provider.ContactsContract.DeletedContacts} provides a log of contacts that have been deleted (but each contact deleted is held in this table for a limited time). Similar to {@link android.provider.ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP}, you can use the new selection parameter, {@link android.provider.ContactsContract.DeletedContacts#CONTACT_DELETED_TIMESTAMP} to check which contacts have been deleted since the last time you queried the provider. The table also contains the constant {@link android.provider.ContactsContract.DeletedContacts#DAYS_KEPT_MILLISECONDS} containing the number of days (in milliseconds) that the log will be kept.</p>
+
+<p>Additionally, the Contacts Provider now broadcasts the {@link 
+android.provider.ContactsContract.Intents#CONTACTS_DATABASE_CREATED} action when the user 
+clears the contacts storage through the system settings menu, effectively recreating the 
+Contacts Provider database. It’s intended to signal apps that they need to drop all the contact 
+information they’ve stored and reload it with a new query.</p>
+
+<p>For sample code using these APIs to check for changes to the contacts, look in the ApiDemos 
+sample available in the <a href="{@docRoot}tools/samples/index.html">SDK Samples</a> download.</p>
+
+
+<h2 id="Localization">Localization</h2>
+
+<h3 id="BiDi">Improved support for bi-directional text</h3>
+
+<p>Previous versions of Android support right-to-left (RTL) languages and layout, 
+but sometimes don't properly handle mixed-direction text. So Android 4.3 adds the {@link 
+android.text.BidiFormatter} APIs that help you properly format text with opposite-direction 
+content without garbling any parts of it.</p>
+
+<p>For example, when you want to create a sentence with a string variable, such as "Did you mean 
+15 Bay Street, Laurel, CA?", you normally pass a localized string resource and the variable to 
+{@link java.lang.String#format String.format()}:</p>
+<pre>
+Resources res = getResources();
+String suggestion = String.format(res.getString(R.string.did_you_mean), address);
+</pre>
+
+<p>However, if the locale is Hebrew, then the formatted string comes out like this:</p>
+
+<p dir="rtl">האם התכוונת ל 15 Bay Street, Laurel, CA?</p>
+
+<p>That's wrong because the "15" should be left of "Bay Street." The solution is to use {@link 
+android.text.BidiFormatter} and its {@link android.text.BidiFormatter#unicodeWrap(String) 
+unicodeWrap()} method. For example, the code above becomes:</p>
+<pre>
+Resources res = getResources();
+BidiFormatter bidiFormatter = BidiFormatter.getInstance();
+String suggestion = String.format(res.getString(R.string.did_you_mean),
+        bidiFormatter.unicodeWrap(address));
+</pre>
+
+<p>
+By default, {@link android.text.BidiFormatter#unicodeWrap(String) unicodeWrap()} uses the 
+first-strong directionality estimation heuristic, which can get things wrong if the first 
+signal for text direction does not represent the appropriate direction for the content as a whole. 
+If necessary, you can specify a different heuristic by passing one of the {@link 
+android.text.TextDirectionHeuristic} constants from {@link android.text.TextDirectionHeuristics} 
+to {@link android.text.BidiFormatter#unicodeWrap(String,TextDirectionHeuristic) unicodeWrap()}.</p>
+
+<p class="note"><strong>Note:</strong> These new APIs are also available for previous versions
+of Android through the Android <a href="{@docRoot}tools/extras/support-library.html">Support
+Library</a>, with the {@link android.support.v4.text.BidiFormatter} class and related APIs.</p>
+
+
+
+<h2 id="A11yService">Accessibility Services</h2>
+
+<h3 id="A11yKeyEvents">Handle key events</h3>
+
+<p>An {@link android.accessibilityservice.AccessibilityService} can now receive a callback for 
+key input events with the {@link android.accessibilityservice.AccessibilityService#onKeyEvent 
+onKeyEvent()} callback method. This allows your accessibility service to handle input for 
+key-based input devices such as a keyboard and translate those events to special actions that 
+previously may have been possible only with touch input or the device's directional pad.</p>
+
+
+<h3 id="A11yText">Select text and copy/paste</h3>
+
+<p>The {@link android.view.accessibility.AccessibilityNodeInfo} now provides APIs that allow 
+an {@link android.accessibilityservice.AccessibilityService} to select, cut, copy, and paste 
+text in a node.</p>
+
+<p>To specify the selection of text to cut or copy, your accessibility service can use the new 
+action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_SET_SELECTION}, passing 
+with it the selection start and end position with {@link 
+android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_START_INT} and {@link 
+android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_END_INT}. 
+Alternatively you can select text by manipulating the cursor position using the existing 
+action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_NEXT_AT_MOVEMENT_GRANULARITY} 
+(previously only for moving the cursor position), and adding the argument {@link 
+android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN}.</p>
+
+<p>You can then cut or copy with {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_CUT}, 
+{@link android.view.accessibility.AccessibilityNodeInfo#ACTION_COPY}, then later paste with 
+{@link android.view.accessibility.AccessibilityNodeInfo#ACTION_PASTE}.</p>
+
+
+<p class="note"><strong>Note:</strong> These new APIs are also available for previous versions
+of Android through the Android <a href="{@docRoot}tools/extras/support-library.html">Support
+Library</a>, with the {@link android.support.v4.view.accessibility.AccessibilityNodeInfoCompat}
+class.</p>
+
+
+
+<h3 id="A11yFeatures">Declare accessibility features</h3>
+
+<p>Beginning with Android 4.3, an accessibility service must declare accessibility capabilities 
+in its metadata file in order to use certain accessibility features. If the capability is not 
+requested in the metadata file, then the feature will be a no-op. To declare your service's 
+accessibility capabilities, you must use XML attributes that correspond to the various 
+"capability" constants in the {@link android.accessibilityservice.AccessibilityServiceInfo} 
+class.</p>
+
+<p>For example, if a service does not request the {@link android.R.styleable#AccessibilityService_canRequestFilterKeyEvents flagRequestFilterKeyEvents} capability, 
+then it will not receive key events.</p>
+
+
+<h2 id="Testing">Testing and Debugging</h2>
+
+<h3 id="UiAutomation">Automated UI testing</h3>
+
+<p>The new {@link android.app.UiAutomation} class provides APIs that allow you to simulate user 
+actions for test automation. By using the platform's {@link 
+android.accessibilityservice.AccessibilityService} APIs, the {@link android.app.UiAutomation} 
+APIs allow you to inspect the screen content and inject arbitrary keyboard and touch events.</p>
+
+<p>To get an instance of {@link android.app.UiAutomation}, call {@link 
+android.app.Instrumentation#getUiAutomation Instrumentation.getUiAutomation()}. In order 
+for this to work, you must supply the {@code -w} option with the {@code instrument} command 
+when running your {@link android.test.InstrumentationTestCase} from <a 
+href="{@docRoot}tools/help/adb.html#am">{@code adb shell}</a>.</p>
+
+<p>With the {@link android.app.UiAutomation} instance, you can execute arbitrary events to test 
+your app by calling {@link android.app.UiAutomation#executeAndWaitForEvent 
+executeAndWaitForEvent()}, passing it a {@link java.lang.Runnable} to perform, a timeout 
+period for the operation, and an implementation of the {@link 
+android.app.UiAutomation.AccessibilityEventFilter} interface. It's within your {@link 
+android.app.UiAutomation.AccessibilityEventFilter} implementation that you'll receive a call 
+that allows you to filter the events that you're interested in and determine the success or 
+failure of a given test case.</p>
+
+<p>To observe all the events during a test, create an implementation of {@link 
+android.app.UiAutomation.OnAccessibilityEventListener} and pass it to {@link 
+android.app.UiAutomation#setOnAccessibilityEventListener setOnAccessibilityEventListener()}.  
+Your listener interface then receives a call to {@link 
+android.app.UiAutomation.OnAccessibilityEventListener#onAccessibilityEvent onAccessibilityEvent()} 
+each time an event occurs, receiving an {@link android.view.accessibility.AccessibilityEvent} object 
+that describes the event.</p>
+
+<p>There is a variety of other operations that the {@link android.app.UiAutomation} APIs expose 
+at a very low level to encourage the development of UI test tools such as <a href="{@docRoot}tools/help/uiautomator/index.html">uiautomator</a>. For instance, 
+{@link android.app.UiAutomation} can also:</p>
+<ul>
+  <li>Inject input events
+  <li>Change the orientation of the screen
+  <li>Take screenshots
+</ul>
+
+<p>And most importantly for UI test tools, the {@link android.app.UiAutomation} APIs work 
+across application boundaries, unlike those in {@link android.app.Instrumentation}.</p>
+
+
+<h3 id="Systrace">Systrace events for apps</h3>
+
+<p>Android 4.3 adds the {@link android.os.Trace} class with two static methods, 
+{@link android.os.Trace#beginSection beginSection()} and {@link android.os.Trace#endSection()}, 
+which allow you to define blocks of code to include with the systrace report. By creating 
+sections of traceable code in your app, the systrace logs provide you a much more detailed 
+analysis of where slowdown occurs within your app.</p>
+
+<p>For information about using the Systrace tool, read <a href="{@docRoot}tools/debugging/systrace.html">Analyzing Display and Performance with Systrace</a>.</p>
+
+
+<h2 id="Security">Security</h2>
+
+<h3 id="KeyStore">Android key store for app-private keys</h3>
+
+<p>Android now offers a custom Java Security Provider in the {@link java.security.KeyStore} 
+facility, called Android Key Store, which allows you to generate and save private keys that 
+may be seen and used by only your app. To load the Android Key Store, pass 
+{@code "AndroidKeyStore"} to {@link java.security.KeyStore#getInstance(String) 
+KeyStore.getInstance()}.</p>
+
+<p>To manage your app's private credentials in the Android Key Store, generate a new key with 
+{@link java.security.KeyPairGenerator} with {@link android.security.KeyPairGeneratorSpec}. First 
+get an instance of {@link java.security.KeyPairGenerator} by calling {@link 
+java.security.KeyPairGenerator#getInstance getInstance()}. Then call 
+{@link java.security.KeyPairGenerator#initialize initialize()}, passing it an instance of 
+{@link android.security.KeyPairGeneratorSpec}, which you can get using 
+{@link android.security.KeyPairGeneratorSpec.Builder KeyPairGeneratorSpec.Builder}. 
+Finally, get your {@link java.security.KeyPair} by calling {@link 
+java.security.KeyPairGenerator#generateKeyPair generateKeyPair()}.</p>
+
+
+<h3 id="HardwareKeyChain">Hardware credential storage</h3>
+
+<p>Android also now supports hardware-backed storage for your {@link android.security.KeyChain} 
+credentials, providing more security by making the keys unavailable for extraction. That is, once 
+keys are in a hardware-backed key store (Secure Element, TPM, or TrustZone), they can be used for 
+cryptographic operations but the private key material cannot be exported. Even the OS kernel 
+cannot access this key material. While not all Android-powered devices support storage on 
+hardware, you can check at runtime if hardware-backed storage is available by calling 
+{@link android.security.KeyChain#isBoundKeyAlgorithm KeyChain.IsBoundKeyAlgorithm()}.</p>
+
+
+
+<h2 id="Manifest">Manifest Declarations</h2>
+
+<h3 id="ManifestFeatures">Declarable required features</h3>
+
+<p>The following values are now supported in the <a 
+href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature>}</a>
+element so you can ensure that your app is installed only on devices that provide the features 
+your app needs.</p>
+
+<dl>
+<dt>{@link android.content.pm.PackageManager#FEATURE_APP_WIDGETS}</dt>
+<dd>Declares that your app provides an app widget and should be installed only on devices that
+include a Home screen or similar location where users can embed app widgets.
+Example:
+<pre>
+&lt;uses-feature android:name="android.software.app_widgets" android:required="true" />
+</pre>
+</dd>
+
+<dt>{@link android.content.pm.PackageManager#FEATURE_HOME_SCREEN}</dt>
+<dd>Declares that your app behaves as a Home screen replacement and should be installed only on
+devices that support third-party Home screen apps.
+Example:
+<pre>
+&lt;uses-feature android:name="android.software.home_screen" android:required="true" />
+</pre>
+</dd>
+
+<dt>{@link android.content.pm.PackageManager#FEATURE_INPUT_METHODS}</dt>
+<dd>Declares that your app provides a custom input method (a keyboard built with {@link
+android.inputmethodservice.InputMethodService}) and should be installed only on devices that
+support third-party input methods.
+Example:
+<pre>
+&lt;uses-feature android:name="android.software.input_methods" android:required="true" />
+</pre>
+</dd>
+
+<dt>{@link android.content.pm.PackageManager#FEATURE_BLUETOOTH_LE}</dt>
+<dd>Declares that your app uses Bluetooth Low Energy APIs and should be installed only on devices
+that are capable of communicating with other devices via Bluetooth Low Energy.
+Example:
+<pre>
+&lt;uses-feature android:name="android.software.bluetooth_le" android:required="true" />
+</pre>
+</dd>
+</dl>
+
+
+<h3 id="ManifestPermissions">User permissions</h3>
+<p>The following values are now supported in the <a 
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code &lt;uses-permission>}</a> 
+to declare the
+permissions your app requires in order to access certain APIs.</p>
+
+<dl>
+<dt>{@link android.Manifest.permission#BIND_NOTIFICATION_LISTENER_SERVICE}
+</dt>
+<dd>Required to use the new {@link android.service.notification.NotificationListenerService} APIs.
+</dd>
+
+<dt>{@link android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE}</dt>
+<dd>Required to receive the {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE}
+intent.</dd>
+</dl>
+
+
+
+
+<p class="note">For a detailed view of all API changes in Android 4.3, see the
+<a href="{@docRoot}sdk/api_diff/18/changes.html">API Differences Report</a>.</p>
+
+
+
diff --git a/docs/html/distribute/distribute_toc.cs b/docs/html/distribute/distribute_toc.cs
index 907d267..75cf9f9 100644
--- a/docs/html/distribute/distribute_toc.cs
+++ b/docs/html/distribute/distribute_toc.cs
@@ -88,6 +88,7 @@
     <ul>
       <li><a href="<?cs var:toroot ?>distribute/googleplay/edu/about.html">About</a></li>
       <li><a href="<?cs var:toroot ?>distribute/googleplay/edu/start.html">Get Started</a></li>
+      <li><a href="<?cs var:toroot ?>distribute/googleplay/edu/guidelines.html">Guidelines</a></li>
       <li><a href="<?cs var:toroot ?>distribute/googleplay/edu/contact.html">Sign Up</a></li>
     </ul>  
   </li>
diff --git a/docs/html/distribute/googleplay/edu/about.jd b/docs/html/distribute/googleplay/edu/about.jd
index 7306c5b..cc131c64 100644
--- a/docs/html/distribute/googleplay/edu/about.jd
+++ b/docs/html/distribute/googleplay/edu/about.jd
@@ -24,6 +24,7 @@
 that will help schools. We want to help you create innovative educational apps,
 without having to knock on school doors to reach teachers and students.</p>
 
+<p><a class="landing-page-link" style="text-align:right;" href="#video">Watch a Video</a></p>
 
 <div class="landing-docs">
   <div class="col-6 normal-links">
@@ -79,3 +80,25 @@
 
 
 </div>
+<div id="video" style="background: #F0F0F0;
+            border-top: 1px solid #DDD;
+            padding: 0px 0 24px 0;
+            overflow: auto;
+            clear:both;
+            margin-bottom:40px;
+            margin-top:30px;">
+   <div style="padding:0 0 0 29px;">
+        <h4>Introducing Google Play for Education</h4>
+
+          <div style="width:700px;">
+          <p style="margin-top:26px;
+                    margin-bottom:12px;">
+          Hear how Google Play for Education works and how developers can leverage the unique business opportunities in creating educational apps for the K-12 market. There's a demo at 4m10s.</p>
+           </div>
+           <iframe style="float:left;
+             margin-right:24px;
+             margin-top:14px;" width="700" height="394" src=
+             "http://www.youtube.com/embed/haEmsMo0f3w?HD=1;rel=0;origin=developer.android.com;" frameborder="0" allowfullscreen>
+           </iframe>
+   </div> 
+</div>
diff --git a/docs/html/distribute/googleplay/edu/contact.jd b/docs/html/distribute/googleplay/edu/contact.jd
index a302bc9..804d925 100644
--- a/docs/html/distribute/googleplay/edu/contact.jd
+++ b/docs/html/distribute/googleplay/edu/contact.jd
@@ -24,7 +24,7 @@
 Whether you have an existing educational app or are developing a fresh idea that
 will unlock learning in the classroom &mdash; sign up to receive information about
 the upcoming launch of Google Play for Education. To get your apps ready, read our
-<a href="{@docRoot}distribute/googleplay/edu/start.html">guidelines</a> for building
+<a href="{@docRoot}distribute/googleplay/edu/guidelines.html">guidelines</a> for building
 educational apps.</p>
     </p><a href="http://developer.android.com/edu/signup">Developer Sign Up »</a>
   </div>
diff --git a/docs/html/distribute/googleplay/edu/guidelines.jd b/docs/html/distribute/googleplay/edu/guidelines.jd
new file mode 100644
index 0000000..c1d3065
--- /dev/null
+++ b/docs/html/distribute/googleplay/edu/guidelines.jd
@@ -0,0 +1,252 @@
+page.title=Guidelines for Apps
+page.metaDescription=Get your apps ready for Google Play for Education.
+excludeFromSuggestions=true
+@jd:body
+
+<div style="position:absolute;margin-left: 636px;
+            margin-top:-76px;color:#777;">If you're interested<br>
+            <a href="{@docRoot}distribute/googleplay/edu/contact.html"
+            class="go-link"
+            style="display: block;text-align: right;">SIGN UP</a></div>
+
+<div
+style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">You
+can now include your apps in the Google Play for Education <a
+href="{@docRoot}distribute/googleplay/edu/start.html#program">pilot program</a>,
+getting it into the hands of participating schools and key influencers in the
+education technology community. See <a href="start.html">Get Started</a> to
+learn how to participate. </div>
+
+<p>The sections below list the guidelines and requirements for apps
+participating in Google Play for Education.
+
+<p>Before you include your app in Google Play for Education, set up a <a
+href="#test-environment">test environment</a> and make sure your app meets all
+of the safety, usability, and quality guidelines given here. You can use the
+linked resources to help
+you develop a great app for students that offers compelling content and an
+intuitive user experience on Android tablets.</p>
+
+<p>In addition, ensure that your app complies with the terms of a <a
+href="https://play.google.com/about/developer-distribution-agreement-addendum.
+html" target="_policies">Google Play for Education Addendum</a>, as well as
+the standard  <a
+href="http://play.google.com/about/developer-content-policy.html"
+target="_policies">Google Play Developer Program Policies</a> and <a
+href="http://play.google.com/about/developer-distribution-agreement.html"
+target="_policies">Developer Distribution Agreement</a>.</p>
+
+
+<h2 id="requirements">Safety First</h2>
+
+<p>To participate, your apps must be designed to be appropriate for
+the K-12 market. The basic requirements that your apps must meet are:</p>
+
+<ol>
+  <li>Apps and the ads they contain must not collect personally identifiable
+information other than user credentials or data required to operate and improve
+the app.</li>
+  <li>Apps must not use student data for purposes unrelated to its educational
+function.</li>
+  <li>Apps must have a content rating of "Everyone" or "Low Maturity" (apps with
+a "Medium Maturity" rating are allowed, if they have that rating solely because
+they allow communication between students).</li>
+  <li>App content, including ads displayed by the app, must be consistent with
+the app's maturity rating. The app must not display any “offensive” content, as
+described in the <a
+href="http://play.google.com/about/developer-content-policy.html">Google Play
+Developer Program Policies</a> and <a
+href="https://support.google.com/googleplay/android-developer/answer/188189">
+content-rating guidelines</a>.</p></li>
+<li>Apps must comply with the Children’s Online Privacy Protection Act
+and all other applicable laws and regulations.</li>
+</ol>
+
+
+<h2 id="inapp">Monetizing and Ads</h2>
+
+<p>Google Play for Education provides a simple and secure environment for students
+and teachers. To support that environment, priced or free apps that do not use in-app
+purchases are preferred, as are apps that do not display ads. Apps that use in-app
+payments or ads are acceptable, but you must declare those behaviors when opting-in
+to Google Play for Education. Your app's use of in-app purchases or ads will be
+disclosed to educators when they are browsing for content.</p>
+
+<p>Follow the guidelines below to help your app receive the
+  highest ratings and offer the best possible user-experience.</p>
+
+<p>If your app is priced or sells in-app products, you must:</p>
+
+<ul>
+  <li>Sell all content and services through Google Play for Education</li>
+  <li>Allow Google Play to offer teachers limited free trials before purchase
+(through business terms only, no development work is needed)</li>
+<li>Disable in-app purchases if possible, or ensure that:
+
+<ul>
+<li>Users can access your app's core functionality for a classroom setting without
+an in-app purchase.</li>
+<li>In-app purchases are clearly identifiable in your UI.</li>
+<li>You declare the use of in-app purchases at <a href="{@docRoot}distribute/googleplay/edu/start.html#opt-in">opt-in</a>.</li>
+</ul>
+</li>
+</ul>
+
+<p class="note"><strong>Note</strong>: In-app
+purchases are blocked on Google Play for Education tablets at this time.</p>
+
+<p>If your app displays ads, you should:
+  <ul>
+  <li>Disable the display of ads if possible, or ensure that:
+  <ul>
+    <li>Ads are not distracting for students or teachers</li>
+    <li>Ads do not occupy a significant portion of the screen</li>
+    <li>Ads content does not exceed the maturity rating of the app.</li>
+    <li>You declare the use of ads at <a href="{@docRoot}distribute/googleplay/edu/start.html#opt-in">opt-in</a>.</li>
+  </ul>
+  </li>
+</ul>
+
+
+<h2 id="approved">Educational Value</h2>
+
+<p>Apps submitted to Google Play for Education will be evaluated by a
+third-party educator network, which will review them based on alignment with <a
+href="http://www.corestandards.org/" class="external-link"
+target="_android">Common Core Standards</a> and other factors. This will help
+make your content more discoverable for teachers and administrators as they
+browse by grade level, subject, core curriculum, and other parameters. </p>
+
+<p>Apps with highest educational value will have these characteristics:</p>
+<ul>
+  <li>Designed for use in K-12 classrooms.</li>
+  <li>Aligned with a common core standard or support common-core learning.</li>
+  <li>Simple, easy to use, and intuitive for the grade levels the app is targeting.
+  App is relatively easy to navigate without teacher guidance. Not distracting
+  or overwhelming to students.</li>
+  <li>Enjoyable and interactive. App is engaging to students and lets them control
+  their experience.</li>
+  <li>Versatile. App has features make the it useful for more than one classroom
+  function or lesson throughout the school year.</li>
+  <li>Supports the "4Cs":
+    <ul>
+    <li><em>Creativity</em> &mdash; Allows students to create in order to express
+    understanding of the learning objectives, and try new approaches, innovation
+    and invention to get things done.</li>
+    <li><em>Critical thinking</em> &mdash; Allows students to look at problems in
+    a new way, linking learning across subjects and disciplines.</li>
+    <li><em>Collaboration</em> &mdash; Allows students and (if appropriate) educators
+    to work together to reach a goal.</li>
+    <li><em>Communication</em> &mdash; Allows students to comprehend, critique and
+    share thoughts, questions, ideas and solutions.</li>
+    </ul>
+  </li>
+</ul>
+
+<p>As you design and develop your app, make sure it offers high educational value
+by addressing as many of those characteristics as possible.</p>
+
+
+<h2 id="quality">App Quality</h2>
+
+<p>Google Play for Education brings educational content to students and teachers
+on Android tablets. Your apps should be designed to perform well and look great
+on Android tablets, and they should offer the best user experience possible.
+</p>
+
+<p>High quality apps are engaging, intuitive, and offer compelling content.
+Google Play for Education will highlight high-quality apps for easy discovery in
+the store. Here are some recommendations for making your app easy for students
+and teachers to enjoy.</p>
+
+<ul>
+  <li>Meet Core app quality guidelines
+    <ul>
+      <li>Follow <a
+      href="{@docRoot}design/index.html">Android Design Guidelines</a>. Pay special
+      attention to the sections on <a href="{@docRoot}design/patterns/actionbar.html">Action
+      Bar</a>, <a href="{@docRoot}design/patterns/navigation.html">Navigation</a> and <a
+      href="{@docRoot}design/patterns/pure-android.html">Pure Android</a>.</li>
+      <li>Test your apps against the <a href="{@docRoot}distribute/googleplay/quality/core.html">Core
+      App Quality Guidelines</a>.</li>
+    </ul>
+  </li>
+<li>Meet tablet app quality guidelines
+  <ul>
+   <li>Follow our best practices for tablet app development</li>
+   <li>Review the <a href="{@docRoot}distribute/googleplay/quality/tablet.html">Tablet App
+   Quality Checklist</a> and <a
+   href="http://android-developers.blogspot.com/2012/11/designing-for-tablets-were-here-to-help.html"
+   target="_android">blog post on designing for tablets</a></li>
+   <li>Check your Optimization Tips in the Google Play Developer Console (if you've
+   already uploaded your app)</li>
+  </ul>
+<li>Strive for simplicity and highest usability for students
+  <ul>
+    <li>Design your app so that teachers and students can use all capabilities of
+    your app without having to sign-in to multiple accounts and remember
+    multiple passwords.</li>
+    <li>Every student or teacher using a Google Play for Education tablet will already be
+    signed in with a Google account on the device.  You can take advantage of that to provide a
+    simple, seamless sign-in experience in your app. A recommended approach is to use
+    <a href="{@docRoot}google/play-services/auth.html">Google OAuth 2 authorization</a>
+    through Google Play Services.</li>
+  </ul>
+</li>
+</ul>
+
+
+<h2 id="test-environment">Test Environment</h2>
+
+<p>To test your app and assess it against the guidelines in this document, it's
+recommended that you set up a test environment that replicates the actual
+environment in which students and teachers will run your app.</p>
+
+<p>In general, you should use the test environment described in <a
+href="{@docRoot}distribute/googleplay/quality/tablet.html#test-environment">
+Setting Up a Test Environment for Tablets</a>, including a small number of
+actual hardware devices that replicate the tablet form factors used in the
+Google Play for Education.</p>
+
+<h3 id="devices">Android tablets</h3>
+
+<p>Google Play for Education uses primarily Nexus 7 devices, so
+your testing can focus on that specific hardware device. You can purchase the
+device from <a href="https://play.google.com/store/devices/details?id=nexus_7_16gb"
+target="_android">Google Play</a> and other stores. Although testing on Nexus
+devices is preferred, you can test on other 7-inch (or 10-inch) tablets or virtual
+devices if you don't have access to Nexus devices.</p>
+
+<h3 id="conditions">Test conditions</h3>
+
+<p>Once you've set up a suitable hardware environment, make sure to test your
+apps under conditions that simulate those of schools. For example, Google Play
+for Education lets administrators control or disable certain capabilities for
+students, so it's good to test your app with those capabilities disabled. Below
+are some conditions to test your app in, to ensure best results in the Google
+Play for Education environment:</p>
+
+<ul>
+<li><em>Android version</em> &mdash; Test the app on devices running Android
+4.2. Google Play for Education devices will be running Android 4.2 or higher
+(API level 17).</li>
+<li><em>Proxy server</em> &mdash; Test the app in network environment that uses
+proxies. Many schools use proxies.</li>
+<li><em>Secondary user account</em> &mdash; Test the app using a secondary user
+account. Most Google Play for Education users will not be using the primary <a
+href="{@docRoot}about/versions/jelly-bean.html#42-multiuser">multiuser</a>
+account on their devices. For testing, create a secondary multiuser account on
+your tablet.</li>
+<li><em>No location services</em> &mdash; Test the app to make sure it works
+properly with location services disabled. Many schools will disable location
+services for student devices.</li>
+<li><em>No In-app Billing</em> &mdash; Test the app to make sure it works
+properly without access to In-app Billing. In-app purchases are blocked on
+Google Play for Education devices at this time.</li>
+<li><em>No Bluetooth</em> &mdash; Test the app to make sure it works properly
+when Bluetooth is disabled. Many schools will disable Bluetooth on student
+devices.</li>
+<li><em>No access to network</em> &mdash; Test the app to make sure it works
+properly when the device cannot connect to the internet. </li>
+</ul>
+
diff --git a/docs/html/distribute/googleplay/edu/start.jd b/docs/html/distribute/googleplay/edu/start.jd
index e740cce..419d5ea 100644
--- a/docs/html/distribute/googleplay/edu/start.jd
+++ b/docs/html/distribute/googleplay/edu/start.jd
@@ -1,5 +1,5 @@
 page.title=Get Started
-page.metaDescription=Get your apps ready for Google Play for Education.
+page.metaDescription=Get Started with Google Play for Education
 excludeFromSuggestions=true
 @jd:body
 
@@ -9,126 +9,256 @@
             class="go-link"
             style="display: block;text-align: right;">SIGN UP</a></div>
 
+<div style="background-color:#fffdeb;width:100%;margin-bottom:1em;padding:.5em;">You
+can now include your apps in the Google Play for Education <a href="#program">pilot program</a>,
+getting it into the hands of participating schools and key influencers in the education technology
+community. See the sections below to learn more.</div>
+
 <p>If you've got a great app for education or just an idea for one, plan to be a
 part of Google Play for Education to reach even more teachers and students. It's
-easy to participate, and you will be able to offer new or existing Android apps
-using the familiar tools in Google Play.</p>
+easy to participate, and you'll be able to offer new or existing Android apps
+using familiar tools and processes in Google Play.</p>
 
-<p>To get started, review the sections in this document and learn about the
-safety, usability, and quality guidelines that apps should meet. Assess your
-apps against these guidelines and make any adjustments needed. You can use the
-linked resources to help you develop a great app for students that offers
-compelling content and an intuitive user experience on Android tablets.</p>
+<p>To get started, review the sections in this document and learn how to make
+your apps available through Google Play for Education. Also make sure to read <a
+href="{@docRoot}distribute/googleplay/edu/guidelines.html">Guidelines for
+Apps</a>  for information on the safety, usability, and quality standards that
+your apps should meet. When your app is ready, you can opt-in to Google Play for
+Education from the Developer Console.</p>
 
-<h2 id="requirements">Safety First</h2>
+<p>Note that the initial launch of Google Play for Education is planned for Fall
+2013 and will include schools in the United States only, with support for other
+countries to follow. At this time, please include your app in Google Play for
+Education only if it is targeting the <strong>US K-12 market</strong>. </p>
 
-<p>To participate, your apps must be designed to be usable and appropriate for
-the K-12 market. The basic requirements that your apps must meet are:</p>
+
+<h2 id="participate">How to Participate</h2>
+
+<div style="float:right; padding-top:2em;"><img
+src="{@docRoot}images/gp-edu-process.png"></div>
+
+<p>Google Play for Education lets you put your educational apps in front of a
+new audience of teachers and students. You can develop and publish using
+familiar tools and processes, such as your existing Developer Console account
+and your current distribution and pricing settings. It's easy to participate
+&mdash; the sections below outline the process.</p>
+
+<h3 id="basic-info">1. Understand guidelines and policies</h3>
+
+<p>To prepare for a successful launch on Google Play for Education, start by
+reviewing the guidelines for educational apps in Google Play and the policies
+that apply to your apps. See <a
+href="{@docRoot}distribute/googleplay/edu/guidelines.html">Guidelines for
+Apps</a> for details.</p>
+
+<p>Also, make sure that your are familiar with the policies that your app must
+comply with, including
+<a href="http://play.google.com/about/developer-content-policy.html" target="_policies">content
+policies</a>, the <a
+href="http://play.google.com/about/developer-distribution-agreement.html"
+target="_policies">developer agreement</a>,  and <a
+href="https://play.google.com/about/developer-distribution-agreement-addendum.
+html" target="_policies">Google Play for Education Addendum</a>.</p>
+
+<h3 id="developing">2. Design and develop a great app for education</h3>
+
+<p>A great app for educators and students is designed for classroom use, looks
+great on tablets, and delivers a compelling feature set for teachers and
+students. If you are developing an app for education, make sure that it is
+appropriate for K-12 classrooms, offers educational value, and is refined to
+offer a polished, high-quality tablet experience.</p>
+
+<p>Assess your app against the criteria listed in <a
+href="{@docRoot}distribute/googleplay/edu/guidelines.html">Guidelines for
+Apps</a> and plan on supporting them to the greatest extent possible. In some
+cases you might need to modify your features or UI to support the requirements
+of the classroom use-case. It's a good idea to identify those areas early in
+development so that you are able address them properly. </p>
+
+<p>With Google Play for Education, optimizing your app for tablets is a crucial
+part of getting your app ready for distribution to educators. A variety of
+resources are available to help you understand what you need to optimize for
+tablets &mdash; a good starting point is the <a
+href="{@docRoot}distribute/googleplay/quality/tablet.html">Tablet App Quality
+Guidelines</a>. </p>
+
+<p>Throughout design and development, it's important to have a suitable device
+on which to prototype and test your user experience. It's highly recommended
+that you acquire one or more tablet devices and set up your testing environment
+as early as possible. The recommended hardware device that replicates the Google
+Play for Education environment is the Nexus 7, which is available from <a href="https://play.google.com/store/devices/details?id=nexus_7_16gb" target="_android">Google Play</a> and other stores.</p>
+
+<p>Proper testing and quality assurance are key aspects of delivering a great
+app for teachers and students. Make sure you set up a <a
+href="{@docRoot}distribute/googleplay/edu/guidelines.html#test-environment">
+proper test environment</a> to ensure that your app meets guidelines under
+realistic conditions.</p>
+
+<h3 id="opt-in">3. Opt-in to Google Play for Education and publish</h3>
+
+<div class="sidebox-wrapper">
+<div class="sidebox">
+<h2>Before you opt-in</h2>
+<p>To participate in Google Play for Education, you must agree to a <a
+href="https://play.google.com/about/developer-distribution-agreement-addendum.html"
+target="_policies">Google Play for Education Addendum</a>
+to the standard Developer Distribution Agreement.</p>
+
+<p>Before you opt-in, review the Addendum completely and make any necessary
+modifications to your app.</p>
+</div>
+</div>
+
+<p>When you've built your release-ready APK and tested to ensure that it meets
+the <a href="{@docRoot}distribute/googleplay/edu/guidelines.html">app guidelines</a>,
+upload it to the Developer Console, create your store listing, and set
+distribution options. If you aren't familiar with how to prepare for launch on
+Google Play, see the <a
+href="{@docRoot}distribute/googleplay/publish/preparing.html">Launch Checklist</a>. </p>
+
+<p>When your app is ready to publish, you can <em>opt-in</em> to Google Play for
+Education from the Developer Console. Opt-in means that you want your app to be
+made available to educators through Google Play for Education, including review,
+classification, and approval by our third-party educator network. Note that
+opt-in does not affect the availability of your app in Google Play Store.</p>
+
+<p>Opt-in also confirms that your app complies with <a
+href="http://play.google.com/about/developer-content-policy.html"
+target="_policies">Google Play Developer Program
+Policies</a> and the <a
+href="http://play.google.com/about/developer-distribution-agreement.html"
+target="_policies">Developer Distribution Agreement</a>,
+including a <a
+href="https://play.google.com/about/developer-distribution-agreement-addendum.
+html" target="_policies">Google Play for Education
+Addendum</a>. If you are not familiar with these policy documents or the
+Addendum, make sure to read them before opting-in. </p>
+
+<p>Here's how to opt-in to Google Play for Education for a specific app:</p>
 
 <ol>
-  <li>Apps and the ads they contain must not collect personally identifiable
-information other than user credentials or data required to operate and improve
-the app.</li>
-  <li>Apps must not use student data for purposes unrelated to its educational
-function.</li>
-  <li>Apps must have a content rating of "Everyone" or "Low Maturity" (apps with
-a "Medium Maturity" rating are allowed, if they have that rating solely because
-they allow communication between students).</li>
-  <li>App content, including ads displayed by the app, must be consistent with
-the app's maturity rating. The app must not display any “offensive” content, as
-described in the <a
-href="http://play.google.com/about/developer-content-policy.html">Google Play
-Developer Program Policies</a> and <a
-href="https://support.google.com/googleplay/android-developer/answer/188189">
-content-rating guidelines</a>.</p></li>
+  <li>In the Developer Console All Applications page, click the app you want to
+opt-in. </li>
+  <li>Under Pricing and Distribution, scroll down to find "Google Play for
+Education" and the opt-in checkbox. </li>
+  <li>Click the checkbox next to "Include my app in Google Play for
+Education..."</li>
+  <li>After you've opted-in, find the "Ads" and "In-app purchases" checkboxes below.
+Check each checkbox that applies. Your app's use of ads or in-app purchases will
+be shown to educators when they are browsing your app. </li>
+  <li>Click "Save" to save your Pricing and Distribution changes.</li>
 </ol>
 
+<div style="clear:both;margin-top:1.5em;margin-bottom:1.5em;width:660px;">
+<img src="{@docRoot}images/gp-edu-optin.png" style="border:2px solid #ddd;width:660px;">
+<p class="image-caption"><span style="font-weight:500;">Opt-in for apps</span>:
+Include your app in Google Play for Education by opting-in from the Developer Console.</p>
+</div>
 
-<h2 id="approved">With the Help of Educators</h2>
+<p>Once you save changes and publish your app, the app will be submitted to our
+third-party educator network for review and approval. If the app is already
+published, it will be submitted for review as soon as you opt-in and save your
+changes. </p>
 
-<p>App content submitted to Google Play for Education will be reviewed by
-educators who will categorize the apps and align them with <a
-href="http://www.corestandards.org/" class="external-link"
-target="_android">Common Core Standards</a>. This will help make your content
-discoverable in a way that is easy for teachers and administrators. </p>
+<p class="note"><strong>Note</strong>: Google Play for Education is part of
+Google Play. When you publish an app that's opted-in to Google Play for
+Education, the app becomes available to users in Google Play right away. After
+the app is reviewed and approved, it then becomes available to educators in
+Google Play for Education.</p>
 
+<h3 id="review">4. Track your review and approval</h3>
 
-<h2 id="secure">Sold Simply</h2>
+<p>Google Play for Education provides content to educators in a way that's
+properly organized by subject, grade level, and common core standards (where
+applicable). To ensure high educational value and proper classification, we work
+with a third-party educator network to review and approve apps before making
+them discoverable through the Google Play for Education browsing tools. </p>
 
-<p>Google Play for Education provides a simple and secure environment in which
-educators can buy apps in a way that's easy for schools &mdash; through purchase
-orders. Your apps must support this environment by ensuring that they:</p>
+<p>Our third-party educator network will evaluate apps according to educational
+value and alignment with K-12 core standards, then assign the metadata for
+subject, grade level, and core curriculum that makes them easily browseable for
+educators. To understand how your apps will be evaluated, please see the <a
+href="{@docRoot}distribute/googleplay/edu/guidelines.html">Guidelines for
+Apps</a> document.</p>
 
-<ul>
-  <li>Sell all content and services through Google Play for Education</li>
-  <li>Permit Google Play to offer teachers limited free trials before purchase
-(through business terms only, no development work is needed)</li>
-</ul>
+<p>As soon as you opt-in to Google Play for Education and publish, your app is
+queued for review by our third-party educator network. The review and approval
+process can take <strong>3-4 weeks or more</strong>. You'll receive notification
+by email (to your developer account address) when the review is complete, with a
+summary of the review results. </p>
 
-<p>In addition, it's highly recommended that your apps:</p>
-<ul>
-  <li>Disable in-app purchase in any UI accessible to students.</li>
-</ul>
-
-<h2 id="quality">High Quality and Usability</h2>
-
-<p>Google Play for Education brings educational content to students and teachers
-on Android tablets. Your apps should be designed to perform well and look great
-on Android tablets, and they should offer the best user experience possible.
+<p class="note"><strong>Note</strong>: Until the full product launch in Fall
+2013, please expect the initial review of your app to take longer than usual.
 </p>
 
-<p>High quality apps are engaging, intuitive, and offer compelling content.
-Google Play for Education will highlight high-quality apps for easy discovery in
-the store. Here are some recommendations for making your app easy for students
-and teachers to enjoy.</p>
+<p>At any time, you can check the review and approval status of your app in the
+Developer Console, under "Google Play for Education" in the app's Pricing and
+Distribution page. There are three approval states:</p>
 
 <ul>
-  <li>Meet Core app quality guidelines
-    <ul>
-      <li>Follow <a href="{@docRoot}design/index.html">Android Design Guidelines</a>. 
-      Pay special attention to the sections on <a href="{@docRoot}design/patterns/actionbar.html">Action
-      Bar</a>, <a href="{@docRoot}design/patterns/navigation.html">Navigation</a> and <a 
-      href="{@docRoot}design/patterns/pure-android.html">Pure Android</a>.</li>
-      <li>Test your apps against the <a href="{@docRoot}distribute/googleplay/quality/core.html">Core
-      App Quality Guidelines</a>.</li>
-    </ul>
-  </li>
-<li>Meet tablet app quality guidelines
-  <ul>
-   <li>Follow our best practices for tablet app development</li>
-   <li>Review the <a href="{@docRoot}distribute/googleplay/quality/tablet.html">Tablet App
-   Quality Checklist</a> and <a href="http://android-developers.blogspot.com/2012/11/designing-for-tablets-were-here-to-help.html"
-   class="external-link;" target="_android">blog post on designing for tablets</a></li>
-   <li>Check your Optimization Tips in the Google Play Developer Console (if you've already uploaded your app)</li>
-  </ul>
-<li>Strive for simplicity and highest usability for students
-  <ul>
-    <li>Design your app so that teachers and students can use all capabilities of your app without
-    having to sign-in to multiple accounts and remember multiple passwords. </li>
-    <li>For best experience, use Google sign-in in your apps, which provides seamless authentication
-    across apps. <!--Google Account login service and integrate with Google Drive where appropriate. --></li>
-  </ul>
-</li>
-</ul>
-<p>In addition, it's highly recommended that your apps:</p>
-<ul>
-  <li>Disable advertisements in any UI accessible to students.</li>
+<li><em>Pending</em> &mdash; Your app was sent for review and the review
+is not yet complete.</li>
+<li><em>Approved</em> &mdash; Your app was reviewed and approved. The app
+will be made available directly to educators through Google Play for Education.
+Until the full product launch later this year, your app will be available to a
+limited number of educators through the <a
+href="{@docRoot}distribute/googleplay/edu/start.html#program">pilot program</a>.
+Once your app is approved, you can update it at your convenience without needing
+another full review. </li>
+<li><em>Not approved</em> &mdash; Your app was reviewed and not approved.
+Check the notification email for information about why the app was not approved.
+You can address any issues and opt-in again for another review. </li>
 </ul>
 
+<p>If you have questions about the review status of your app, follow the process
+discussed in the next section. </p>
 
-<h2 id="strategies">Strategies for Development</h2>
+<h3 id="appeal">5. Get support or appeal your review results</h3>
 
-  <p>If you have an existing educational app in Google Play, the classroom
-environment offered by Google Play for Education presents a slightly different
-set of needs, requirements, and also opportunities.</p> 
+<p>After your app is reviewed you'll receive an email giving you the review
+results, including whether the app was approved, how the app was classified, and
+what issues may need to be addressed. You'll receive the email at the address
+you specified for your developer account. </p>
 
-  <p>We're working to give you the tools you need to build for the classroom
-environment from a single APK, delivered as a single product to all of your
-users in Google Play. Our goal is to let you customize your app's UI and
-features as minimally or deeply as you need, to provide a simple, intuitive, and
-beautiful learning experience. </p>
+<p>If you believe your app was reviewed or classified incorrectly, you will be
+able to appeal and request reconsideration. Watch for more information on the
+appeal process and links in the weeks to come.</p>
 
-  <p>Watch for more information on developer tools coming in the weeks ahead.
-We'll update this page as we roll out tools for you to use. As a starting point,
-we recommend planning your app's design and ensuring its optimization on Nexus
-tablets.</p>
+<p class="note"><strong>Note</strong>: Support and appeal forms are not yet
+available, but will be available soon.</p>
+
+
+<h2 id="program">Including Your Apps in the Pilot Program</h2>
+
+<p>Leading up to the Fall 2013 launch, the Google Play for Education team is
+conducting an extensive series of pilots that include schools and students across
+the United States. Educators in participating schools can browse for apps and
+purchase them in bulk, then deploy them instantly to teacher and student
+devices. </p>
+
+<h3 id="pilot">Early opt-in and publishing</h3>
+<p>As an app developer, you can take part in the pilot program, getting your app
+into the hands of schools and key influencers in the education technology
+community. It's a great way to get early feedback on your educational app. </p>
+
+<p>To offer your app in the pilot program, prepare the app and ensure that it meets
+the <a href="{@docRoot}distribute/googleplay/edu/guidelines.html">Guidelines
+for Apps</a>. Then opt-in to Google Play for Education and publish as soon
+as you are ready. Once your app is approved during review by our third-party
+educator network, it will be made available to educators in the pilot program
+right away. Note that during the pilot program, the review and approval process
+may take longer than usual.</p>
+
+<h3 id="launch">Full launch to US schools</h3>
+<p>The initial launch of Google Play for Education is planned for Fall 2013. The
+pilot program and full launch will include schools in the United States only,
+with support for schools in other countries to follow. </p>
+
+<p>At this time, you should include your app in Google Play for Education only
+if it is targeting the US K-12 market. </p>
+
+<h3 id="more">More information</h3>
+
+<p>If you'd like to be notified by email of the latest information about Google Play
+for Education, visit the <a href="{@docRoot}distribute/googleplay/edu/contact.html">
+Sign Up</a> page and fill out the form. </p>
\ No newline at end of file
diff --git a/docs/html/distribute/googleplay/promote/badges.jd b/docs/html/distribute/googleplay/promote/badges.jd
index 738e76b..9a32921 100644
--- a/docs/html/distribute/googleplay/promote/badges.jd
+++ b/docs/html/distribute/googleplay/promote/badges.jd
@@ -201,10 +201,8 @@
           onchange="changeBadgeLang()">
     <option title="Afrikaans"
             value="af">Afrikaans</option>
-<!--
     <option title="Arabic"
             value="ar">العربية</option>
--->
     <option title="Belarusian"
             value="be">Беларуская</option>
     <option title="Bulgarian"
diff --git a/docs/html/distribute/googleplay/publish/preparing.jd b/docs/html/distribute/googleplay/publish/preparing.jd
index 0cbc270..5593f4f 100644
--- a/docs/html/distribute/googleplay/publish/preparing.jd
+++ b/docs/html/distribute/googleplay/publish/preparing.jd
@@ -81,6 +81,10 @@
 <tr>
 <td><p>Related resources:</p>
 <ul style="margin-top:-.5em;">
+
+<li><strong><a href="{@docRoot}distribute/googleplay/policies/index.html">Google Play Policies and Guidelines</a></strong> &mdash; An overview of Google Play policies for spam, intellectual property, and ads, with examples of common problems. </li>
+</a></strong> &mdash; Help Center document describing various content policies and processes.</li>
+
 <li><strong><a href="http://support.google.com/googleplay/android-developer/bin/topic.py?hl=en&topic=2364761&parent=2365624&ctx=topic">Policy and Best Practices
 </a></strong> &mdash; Help Center document describing various content policies and processes.</li>
 
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 16dca9d..6d95338 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -388,15 +388,19 @@
 
 
 
-      <li class="nav-section">
+<li class="nav-section">
         <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/connectivity/index.html">
                <span class="en">Connectivity</span>
              </a></div>
         <ul>
-          <li><a href="<?cs var:toroot?>guide/topics/connectivity/bluetooth.html">
-              <span class="en">Bluetooth</span>
-            </a>
-          </li>
+          <li class="nav-section">
+        <div class="nav-section-header"><a href="<?cs var:toroot?>guide/topics/connectivity/bluetooth.html">
+          <span class="en">Bluetooth</span></a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>guide/topics/connectivity/bluetooth-le.html">Bluetooth Low Energy</a></li>
+        </ul>
+      </li>
       <li class="nav-section">
         <div class="nav-section-header"><a href="<?cs var:toroot?>guide/topics/connectivity/nfc/index.html">
           <span class="en">NFC</span></a>
@@ -426,6 +430,7 @@
     </ul>
   </li><!-- end of connectivity -->
 
+
       <li class="nav-section">
         <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/text/index.html">
             <span class="en">Text and Input</span>
diff --git a/docs/html/guide/topics/connectivity/bluetooth-le.jd b/docs/html/guide/topics/connectivity/bluetooth-le.jd
new file mode 100644
index 0000000..21950c2
--- /dev/null
+++ b/docs/html/guide/topics/connectivity/bluetooth-le.jd
@@ -0,0 +1,608 @@
+page.title=Bluetooth Low Energy
+page.tags="wireless","bluetoothadapter","bluetoothdevice","BLE","BTLE"
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+  <h2>In this document</h2>
+  <ol>
+    <li><a href="#terms">Key Terms and Concepts</a>
+    <ol>
+      <li><a href="#roles">Roles and Responsibilities</a></li>
+    </ol>
+    </li>
+    <li><a href="#permissions">BLE Permissions</a></li>
+    <li><a href="#setup">Setting Up BLE</a></li>
+    <li><a href="#find">Finding BLE Devices</a></li>
+    <li><a href="#connect">Connecting to a GATT Server</a></li>
+    <li><a href="#read">Reading BLE Attributes</a></li>
+    <li><a href="#notification">Receiving GATT Notifications</a></li>
+    <li><a href="#close">Closing the Client App</a></li>
+  </ol>
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.bluetooth.BluetoothGatt}</li>
+    <li>{@link android.bluetooth.BluetoothGattCallback}</li>
+    <li>{@link android.bluetooth.BluetoothGattCharacteristic}</li>
+    <li>{@link android.bluetooth.BluetoothGattService}</li>
+  </ol>
+
+  <h2>Related samples</h2>
+  <ol>
+    <li><a href="{@docRoot}tools/samples/index.html">Bluetooth LE sample</a></li>
+  </ol>
+
+   <h2>See Also</h2>
+  <ol>
+    <li><a href="http://developers.google.com/events/io/sessions/326240948">
+    Best Practices for Bluetooth Development</a> (video)</li>
+
+  </ol>
+
+</div>
+</div>
+
+
+<p>
+Android 4.3 (API Level 18) introduces built-in platform support for Bluetooth Low
+Energy in the <em>central role</em> and provides APIs that apps can use to discover
+devices, query for services, and read/write characteristics.
+In contrast to
+<a href="{@docRoot}guide/topics/connectivity/bluetooth.html">Classic Bluetooth</a>,
+Bluetooth Low Energy (BLE) is designed to provide significantly lower power consumption.
+This allows Android apps to communicate with BLE devices that have low power requirements,
+such as proximity sensors, heart rate monitors, fitness devices, and so on.</p>
+
+<h2 id="terms">Key Terms and Concepts</h2>
+<p>Here is a summary of key BLE terms and concepts:</p>
+<ul>
+  <li><strong>Generic Attribute Profile (GATT)</strong>&mdash;The GATT profile
+is a general specification for sending and receiving short pieces of data known
+as "attributes" over a BLE link. All current Low Energy application profiles are
+based on GATT.
+    <ul>
+      <li>The Bluetooth SIG defines many
+<a href="https://www.bluetooth.org/en-us/specification/adopted-specifications">profiles</a>
+for Low Energy devices. A profile is a specification for how a device works in a
+particular application. Note that a device can implement more than one profile.
+For example, a device could contain a heart rate monitor and a battery level
+detector.</li>
+    </ul>
+  </li>
+  <li><strong>Attribute Protocol (ATT)</strong>&mdash;GATT is built on top of
+the Attribute Protocol (ATT). This is also referred to as GATT/ATT. ATT is
+optimized to run on BLE devices. To this end, it uses as few bytes as possible.
+Each attribute is uniquely identified by a Universally Unique Identifier (UUID),
+which is a standardized 128-bit format for a string ID used to uniquely
+identify information. The <em>attributes</em> transported by ATT are formatted
+as <em>characteristics</em> and <em>services</em>. </li>
+
+  <li><strong>Characteristic</strong>&mdash;A characteristic contains a single
+value and 0-n descriptors that describe the characteristic's value. A
+characteristic can be thought of as a type, analogous to a class. </li>
+  <li><strong>Descriptor</strong>&mdash;Descriptors are defined attributes that
+describe a characteristic value. For example, a descriptor might specify a
+human-readable description, an acceptable range for a characteristic's value, or
+a unit of measure that is specific to a characteristic's value.</li>
+
+  <li><strong>Service</strong>&mdash;A service is a collection of
+characteristics. For example, you could have a service called
+&quot;Heart Rate Monitor&quot; that includes characteristics such as
+&quot;heart rate measurement.&quot; You can find a list of existing GATT-based
+profiles and services on
+<a href="https://www.bluetooth.org/en-us/specification/adopted-specifications">
+bluetooth.org</a>.</li>
+
+</ul>
+
+<h3 id="roles">Roles and Responsibilities</h3>
+
+<p>Here are the roles and responsibilities that apply when
+an Android device interacts with a BLE device:</p>
+
+<ul>
+  <li>Central vs. peripheral. This applies to the BLE connection itself. The
+  device in the central role scans, looking for advertisement, and the device in
+  the peripheral role makes the advertisement.</li>
+  <li>GATT server vs. GATT client. This determines how two devices talk to each
+other once they've established the connection.</li>
+</ul>
+
+<p>To understand the distinction, imagine that you have an Android phone and
+an activity tracker that is a BLE device. The phone supports the
+central role; the activity tracker supports the peripheral role (to
+establish a BLE connection you need one of each&mdash;two things that only support
+peripheral couldn't talk to each other, nor could two things that only support
+central).</p>
+
+<p>Once the phone and the activity tracker have established a connection, they
+start transferring GATT metadata to one another. Depending on the kind of data they transfer,
+one or the other might act as the server. For example, if the activity tracker
+wants to report sensor data to the phone, it might make sense for the activity
+tracker to act as the server. If the activity tracker wants to receive updates
+from the phone, then it might make sense for the phone to act
+as the server.</p>
+
+<p>
+In the example used in this document, the Android app (running on an Android
+device) is the GATT client. The app gets data from the GATT server, which is a
+BLE heart rate monitor that supports the
+<a href="http://developer.bluetooth.org/TechnologyOverview/Pages/HRP.aspx">Heart
+Rate Profile</a>.  But you could alternatively design
+your Android app to play the GATT server
+role. See {@link android.bluetooth.BluetoothGattServer} for more
+information.</p>
+
+<h2 id="permissions">BLE Permissions</h2>
+
+<p>In order to use Bluetooth features in your application, you must declare
+the Bluetooth permission {@link android.Manifest.permission#BLUETOOTH}.
+You need this permission to perform any Bluetooth communication,
+such as requesting a connection, accepting a connection, and transferring data.</p>
+
+<p>If you want your app to initiate device discovery or manipulate Bluetooth
+settings, you must also declare the {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+permission. <strong>Note:</strong> If you use the
+{@link android.Manifest.permission#BLUETOOTH_ADMIN} permission, then you must
+also have the {@link android.Manifest.permission#BLUETOOTH} permission.</p>
+
+<p>Declare the Bluetooth permission(s) in your application manifest file. For
+example:</p>
+
+<pre>
+&lt;uses-permission android:name=&quot;android.permission.BLUETOOTH&quot;/&gt;
+&lt;uses-permission android:name=&quot;android.permission.BLUETOOTH_ADMIN&quot;/&gt;</pre>
+
+<p>If you want to declare that your app is available to BLE-capable devices only,
+include the following in your app's manifest:</p>
+
+<pre>&lt;uses-feature android:name=&quot;android.hardware.bluetooth_le&quot; android:required=&quot;true&quot;/&gt;
+</pre>
+
+<p>However, if you want to make your app available to devices that don't support BLE,
+you should still include this element in your app's manifest, but set {@code required="false"}. 
+Then at run-time you can determine BLE availability by using
+{@link android.content.pm.PackageManager#hasSystemFeature PackageManager.hasSystemFeature()}:
+
+<pre>// Use this check to determine whether BLE is supported on the device. Then
+// you can selectively disable BLE-related features.
+if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
+    Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
+    finish();
+}</pre>
+
+<h2 id="setup">Setting Up BLE</h2>
+
+<p>Before your application can communicate over BLE, you need
+to verify that BLE is supported on the device, and if so, ensure that it is enabled.
+Note that this check is only necessary if {@code &lt;uses-feature.../&gt;}
+is set to false.</p>
+
+<p>If BLE is not supported, then you should gracefully disable any
+BLE features. If BLE is supported, but disabled, then you can request that the
+user enable Bluetooth without leaving your application. This setup is
+accomplished in two steps, using the {@link android.bluetooth.BluetoothAdapter}.
+</p>
+
+
+<ol>
+<li>Get the {@link android.bluetooth.BluetoothAdapter}
+<p>The {@link android.bluetooth.BluetoothAdapter} is required for any and all
+Bluetooth activity. The {@link android.bluetooth.BluetoothAdapter} represents
+the device's own Bluetooth adapter (the Bluetooth radio). There's one Bluetooth
+adapter for the entire system, and your application can interact with it using
+this object. The snippet below shows how to get the adapter. Note that this approach
+uses {@link android.content.Context#getSystemService getSystemService()} to return
+an instance of {@link android.bluetooth.BluetoothManager}, which is then
+used to get the adapter. Android 4.3 (API Level 18) introduces
+{@link android.bluetooth.BluetoothManager}:</p>
+
+<pre>// Initializes Bluetooth adapter.
+final BluetoothManager bluetoothManager =
+        (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
+mBluetoothAdapter = bluetoothManager.getAdapter();
+</pre>
+</li>
+
+<li>Enable Bluetooth
+<p>Next, you need to ensure that Bluetooth is enabled. Call {@link
+android.bluetooth.BluetoothAdapter#isEnabled()} to check whether Bluetooth is
+currently enabled. If this method returns false, then Bluetooth is disabled.
+The following snippet checks whether Bluetooth is enabled. If it isn't, the
+snippet displays an error prompting the user to go to Settings to enable
+Bluetooth:</p>
+<pre>private BluetoothAdapter mBluetoothAdapter;
+...
+// Ensures Bluetooth is available on the device and it is enabled. If not,
+// displays a dialog requesting user permission to enable Bluetooth.
+if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) {
+    Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
+    startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
+}
+</li>
+</ol>
+
+
+
+<h2 id="find">Finding BLE Devices</h2>
+
+<p>To find BLE devices, you use the
+{@link android.bluetooth.BluetoothAdapter#startLeScan startLeScan()} method.
+This method takes a  {@link android.bluetooth.BluetoothAdapter.LeScanCallback}
+as a parameter. You must implement this callback, because that is how scan
+results are returned. Because scanning is battery-intensive, you should observe
+the following guidelines:</p>
+<ul>
+  <li>As soon as you find the desired device, stop scanning.</li>
+  <li>Never scan on a loop, and set a time limit on your scan. A device that was
+previously available may have moved out of range, and continuing to scan drains
+the battery.</li>
+</ul>
+
+<p>The following snippet shows how to start and stop a scan:</p>
+
+<pre>/**
+ * Activity for scanning and displaying available BLE devices.
+ */
+public class DeviceScanActivity extends ListActivity {
+
+    private BluetoothAdapter mBluetoothAdapter;
+    private boolean mScanning;
+    private Handler mHandler;
+
+    // Stops scanning after 10 seconds.
+    private static final long SCAN_PERIOD = 10000;
+    ...
+    private void scanLeDevice(final boolean enable) {
+        if (enable) {
+            // Stops scanning after a pre-defined scan period.
+            mHandler.postDelayed(new Runnable() {
+                &#64;Override
+                public void run() {
+                    mScanning = false;
+                    mBluetoothAdapter.stopLeScan(mLeScanCallback);
+                }
+            }, SCAN_PERIOD);
+
+            mScanning = true;
+            mBluetoothAdapter.startLeScan(mLeScanCallback);
+        } else {
+            mScanning = false;
+            mBluetoothAdapter.stopLeScan(mLeScanCallback);
+        }
+        ...
+    }
+...
+}
+</pre>
+
+<p>If you want to scan for only specific types of peripherals, you can instead
+call {@link android.bluetooth.BluetoothAdapter#startLeScan startLeScan(UUID[], BluetoothAdapter.LeScanCallback)},
+providing an array of {@link java.util.UUID} objects that specify the GATT
+services your app supports.</p>
+
+<p>Here is an implementation of the
+{@link android.bluetooth.BluetoothAdapter.LeScanCallback},
+which is the interface used to deliver BLE scan results:</p>
+
+<pre>
+private LeDeviceListAdapter mLeDeviceListAdapter;
+...
+// Device scan callback.
+private BluetoothAdapter.LeScanCallback mLeScanCallback =
+        new BluetoothAdapter.LeScanCallback() {
+    &#64;Override
+    public void onLeScan(final BluetoothDevice device, int rssi,
+            byte[] scanRecord) {
+        runOnUiThread(new Runnable() {
+           &#64;Override
+           public void run() {
+               mLeDeviceListAdapter.addDevice(device);
+               mLeDeviceListAdapter.notifyDataSetChanged();
+           }
+       });
+   }
+};</pre>
+
+
+<p class="note"><strong>Note:</strong> You can only scan for Bluetooth LE devices
+<em>or</em> scan for Classic Bluetooth devices, as described in
+<a href="{@docRoot}guide/topics/connectivity/bluetooth.html">Bluetooth</a>. You cannot
+scan for both Bluetooth LE and classic devices at the same time.</p>
+
+<h2 id="connect">Connecting to a GATT Server</h2>
+
+<p>The first step in interacting with a BLE device is connecting to it&mdash;
+more specifically, connecting to the GATT server on the device. To
+connect to a GATT server on a BLE device, you use the
+{@link android.bluetooth.BluetoothDevice#connectGatt connectGatt()} method.
+This method takes three parameters: a {@link android.content.Context} object,
+<code>autoConnect</code> (boolean indicating whether to automatically connect to
+the BLE device as soon as it becomes available), and a reference to a
+{@link android.bluetooth.BluetoothGattCallback}: </p>
+
+<pre>mBluetoothGatt = device.connectGatt(this, false, mGattCallback);</pre>
+
+<p>This connects to the GATT server hosted by the BLE device, and returns a
+{@link android.bluetooth.BluetoothGatt} instance, which you can then use to
+conduct GATT client operations. The caller (the Android app) is the GATT client.
+The {@link android.bluetooth.BluetoothGattCallback} is used to deliver results
+to the client, such as connection status, as well as any further GATT client
+operations.</p>
+
+<p>In this example, the BLE app provides an activity
+(<code>DeviceControlActivity</code>) to connect,
+display data, and display GATT services and characteristics
+supported by the device.  Based on user input, this activity communicates with a
+{@link android.app.Service} called {@code BluetoothLeService},
+which interacts with the BLE device via the Android BLE API:</p>
+
+<pre>
+// A service that interacts with the BLE device via the Android BLE API.
+public class BluetoothLeService extends Service {
+    private final static String TAG = BluetoothLeService.class.getSimpleName();
+
+    private BluetoothManager mBluetoothManager;
+    private BluetoothAdapter mBluetoothAdapter;
+    private String mBluetoothDeviceAddress;
+    private BluetoothGatt mBluetoothGatt;
+    private int mConnectionState = STATE_DISCONNECTED;
+
+    private static final int STATE_DISCONNECTED = 0;
+    private static final int STATE_CONNECTING = 1;
+    private static final int STATE_CONNECTED = 2;
+
+    public final static String ACTION_GATT_CONNECTED =
+            "com.example.bluetooth.le.ACTION_GATT_CONNECTED";
+    public final static String ACTION_GATT_DISCONNECTED =
+            "com.example.bluetooth.le.ACTION_GATT_DISCONNECTED";
+    public final static String ACTION_GATT_SERVICES_DISCOVERED =
+            "com.example.bluetooth.le.ACTION_GATT_SERVICES_DISCOVERED";
+    public final static String ACTION_DATA_AVAILABLE =
+            "com.example.bluetooth.le.ACTION_DATA_AVAILABLE";
+    public final static String EXTRA_DATA =
+            "com.example.bluetooth.le.EXTRA_DATA";
+
+    public final static UUID UUID_HEART_RATE_MEASUREMENT =
+            UUID.fromString(SampleGattAttributes.HEART_RATE_MEASUREMENT);
+
+    // Various callback methods defined by the BLE API.
+    private final BluetoothGattCallback mGattCallback =
+            new BluetoothGattCallback() {
+        &#64;Override
+        public void onConnectionStateChange(BluetoothGatt gatt, int status,
+                int newState) {
+            String intentAction;
+            if (newState == BluetoothProfile.STATE_CONNECTED) {
+                intentAction = ACTION_GATT_CONNECTED;
+                mConnectionState = STATE_CONNECTED;
+                broadcastUpdate(intentAction);
+                Log.i(TAG, "Connected to GATT server.");
+                Log.i(TAG, "Attempting to start service discovery:" +
+                        mBluetoothGatt.discoverServices());
+
+            } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
+                intentAction = ACTION_GATT_DISCONNECTED;
+                mConnectionState = STATE_DISCONNECTED;
+                Log.i(TAG, "Disconnected from GATT server.");
+                broadcastUpdate(intentAction);
+            }
+        }
+
+        &#64;Override
+        // New services discovered
+        public void onServicesDiscovered(BluetoothGatt gatt, int status) {
+            if (status == BluetoothGatt.GATT_SUCCESS) {
+                broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED);
+            } else {
+                Log.w(TAG, "onServicesDiscovered received: " + status);
+            }
+        }
+
+        &#64;Override
+        // Result of a characteristic read operation
+        public void onCharacteristicRead(BluetoothGatt gatt,
+                BluetoothGattCharacteristic characteristic,
+                int status) {
+            if (status == BluetoothGatt.GATT_SUCCESS) {
+                broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
+            }
+        }
+     ...
+    };
+...
+}</pre>
+
+<p>When a particular callback is triggered, it calls the appropriate
+{@code broadcastUpdate()} helper method and passes it an action. Note that the data
+parsing in this section is performed in accordance with the Bluetooth Heart Rate
+Measurement
+<a href="http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_measurement.xml">
+profile specifications</a>:</p>
+
+<pre>private void broadcastUpdate(final String action) {
+    final Intent intent = new Intent(action);
+    sendBroadcast(intent);
+}
+
+private void broadcastUpdate(final String action,
+                             final BluetoothGattCharacteristic characteristic) {
+    final Intent intent = new Intent(action);
+
+    // This is special handling for the Heart Rate Measurement profile. Data
+    // parsing is carried out as per profile specifications.
+    if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) {
+        int flag = characteristic.getProperties();
+        int format = -1;
+        if ((flag &amp; 0x01) != 0) {
+            format = BluetoothGattCharacteristic.FORMAT_UINT16;
+            Log.d(TAG, &quot;Heart rate format UINT16.&quot;);
+        } else {
+            format = BluetoothGattCharacteristic.FORMAT_UINT8;
+            Log.d(TAG, &quot;Heart rate format UINT8.&quot;);
+        }
+        final int heartRate = characteristic.getIntValue(format, 1);
+        Log.d(TAG, String.format(&quot;Received heart rate: %d&quot;, heartRate));
+        intent.putExtra(EXTRA_DATA, String.valueOf(heartRate));
+    } else {
+        // For all other profiles, writes the data formatted in HEX.
+        final byte[] data = characteristic.getValue();
+        if (data != null &amp;&amp; data.length &gt; 0) {
+            final StringBuilder stringBuilder = new StringBuilder(data.length);
+            for(byte byteChar : data)
+                stringBuilder.append(String.format(&quot;%02X &quot;, byteChar));
+            intent.putExtra(EXTRA_DATA, new String(data) + &quot;\n&quot; +
+                    stringBuilder.toString());
+        }
+    }
+    sendBroadcast(intent);
+}</pre>
+
+
+
+<p>Back in <code>DeviceControlActivity</code>, these events are handled by a
+{@link android.content.BroadcastReceiver}:</p>
+
+<pre>// Handles various events fired by the Service.
+// ACTION_GATT_CONNECTED: connected to a GATT server.
+// ACTION_GATT_DISCONNECTED: disconnected from a GATT server.
+// ACTION_GATT_SERVICES_DISCOVERED: discovered GATT services.
+// ACTION_DATA_AVAILABLE: received data from the device. This can be a
+// result of read or notification operations.
+private final BroadcastReceiver mGattUpdateReceiver = new BroadcastReceiver() {
+    &#64;Override
+    public void onReceive(Context context, Intent intent) {
+        final String action = intent.getAction();
+        if (BluetoothLeService.ACTION_GATT_CONNECTED.equals(action)) {
+            mConnected = true;
+            updateConnectionState(R.string.connected);
+            invalidateOptionsMenu();
+        } else if (BluetoothLeService.ACTION_GATT_DISCONNECTED.equals(action)) {
+            mConnected = false;
+            updateConnectionState(R.string.disconnected);
+            invalidateOptionsMenu();
+            clearUI();
+        } else if (BluetoothLeService.
+                ACTION_GATT_SERVICES_DISCOVERED.equals(action)) {
+            // Show all the supported services and characteristics on the
+            // user interface.
+            displayGattServices(mBluetoothLeService.getSupportedGattServices());
+        } else if (BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)) {
+            displayData(intent.getStringExtra(BluetoothLeService.EXTRA_DATA));
+        }
+    }
+};
+</pre>
+
+<h2 id="read">Reading BLE Attributes</h2>
+
+<p>Once your Android app has connected to a GATT server and discovered services,
+it can read and write attributes, where supported. For example, this snippet iterates
+through the server's services and characteristics and displays them in the UI:</p>
+
+<pre>
+public class DeviceControlActivity extends Activity {
+    ...
+    // Demonstrates how to iterate through the supported GATT
+    // Services/Characteristics.
+    // In this sample, we populate the data structure that is bound to the
+    // ExpandableListView on the UI.
+    private void displayGattServices(List&lt;BluetoothGattService&gt; gattServices) {
+        if (gattServices == null) return;
+        String uuid = null;
+        String unknownServiceString = getResources().
+                getString(R.string.unknown_service);
+        String unknownCharaString = getResources().
+                getString(R.string.unknown_characteristic);
+        ArrayList&lt;HashMap&lt;String, String&gt;&gt; gattServiceData =
+                new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
+        ArrayList&lt;ArrayList&lt;HashMap&lt;String, String&gt;&gt;&gt; gattCharacteristicData
+                = new ArrayList&lt;ArrayList&lt;HashMap&lt;String, String&gt;&gt;&gt;();
+        mGattCharacteristics =
+                new ArrayList&lt;ArrayList&lt;BluetoothGattCharacteristic&gt;&gt;();
+
+        // Loops through available GATT Services.
+        for (BluetoothGattService gattService : gattServices) {
+            HashMap&lt;String, String&gt; currentServiceData =
+                    new HashMap&lt;String, String&gt;();
+            uuid = gattService.getUuid().toString();
+            currentServiceData.put(
+                    LIST_NAME, SampleGattAttributes.
+                            lookup(uuid, unknownServiceString));
+            currentServiceData.put(LIST_UUID, uuid);
+            gattServiceData.add(currentServiceData);
+
+            ArrayList&lt;HashMap&lt;String, String&gt;&gt; gattCharacteristicGroupData =
+                    new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
+            List&lt;BluetoothGattCharacteristic&gt; gattCharacteristics =
+                    gattService.getCharacteristics();
+            ArrayList&lt;BluetoothGattCharacteristic&gt; charas =
+                    new ArrayList&lt;BluetoothGattCharacteristic&gt;();
+           // Loops through available Characteristics.
+            for (BluetoothGattCharacteristic gattCharacteristic :
+                    gattCharacteristics) {
+                charas.add(gattCharacteristic);
+                HashMap&lt;String, String&gt; currentCharaData =
+                        new HashMap&lt;String, String&gt;();
+                uuid = gattCharacteristic.getUuid().toString();
+                currentCharaData.put(
+                        LIST_NAME, SampleGattAttributes.lookup(uuid,
+                                unknownCharaString));
+                currentCharaData.put(LIST_UUID, uuid);
+                gattCharacteristicGroupData.add(currentCharaData);
+            }
+            mGattCharacteristics.add(charas);
+            gattCharacteristicData.add(gattCharacteristicGroupData);
+         }
+    ...
+    }
+...
+}</pre>
+
+<h2 id="notification">Receiving GATT Notifications</h2>
+
+<p>It's common for BLE apps to ask to be notified when a particular
+characteristic changes on the device. This snippet shows how to set a notification
+for a characteristic, using the
+{@link android.bluetooth.BluetoothGatt#setCharacteristicNotification setCharacteristicNotification()}
+method:</p>
+
+<pre>
+private BluetoothGatt mBluetoothGatt;
+BluetoothGattCharacteristic characteristic;
+boolean enabled;
+...
+mBluetoothGatt.setCharacteristicNotification(characteristic, enabled);
+...
+BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
+        UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
+descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
+mBluetoothGatt.writeDescriptor(descriptor);</pre>
+
+<p>Once notifications are enabled for a characteristic,
+an {@link android.bluetooth.BluetoothGattCallback#onCharacteristicChanged onCharacteristicChanged()}
+callback is triggered if the characteristic changes on the remote device:</p>
+
+<pre>&#64;Override
+// Characteristic notification
+public void onCharacteristicChanged(BluetoothGatt gatt,
+        BluetoothGattCharacteristic characteristic) {
+    broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
+}
+</pre>
+
+<h2 id="close">Closing the Client App</h2>
+
+<p>Once your app has finished using a BLE device, it should call
+{@link android.bluetooth.BluetoothGatt#close close()}
+so the system can release resources appropriately:</p>
+
+<pre>public void close() {
+    if (mBluetoothGatt == null) {
+        return;
+    }
+    mBluetoothGatt.close();
+    mBluetoothGatt = null;
+}</pre>
diff --git a/docs/html/guide/topics/connectivity/bluetooth.jd b/docs/html/guide/topics/connectivity/bluetooth.jd
index 1c55d8b..b57f3e2 100644
--- a/docs/html/guide/topics/connectivity/bluetooth.jd
+++ b/docs/html/guide/topics/connectivity/bluetooth.jd
@@ -2,19 +2,13 @@
 page.tags="wireless","bluetoothadapter","bluetoothdevice"
 @jd:body
 
-<div id="qv-wrapper"> 
-<div id="qv"> 
+<div id="qv-wrapper">
+<div id="qv">
  
-  <h2>Quickview</h2> 
-  <ul> 
-    <li>Android's bluetooth APIs allow your application to perform wireless data transactions with
-other devices</li> 
-  </ul> 
- 
-  <h2>In this document</h2> 
+  <h2>In this document</h2>
   <ol> 
-    <li><a href="#TheBasics">The Basics</a></li> 
-    <li><a href="#Permissions">Bluetooth Permissions</a></li> 
+    <li><a href="#TheBasics">The Basics</a></li>
+    <li><a href="#Permissions">Bluetooth Permissions</a></li>
     <li><a href="#SettingUp">Setting Up Bluetooth</a></li> 
     <li><a href="#FindingDevices">Finding Devices</a> 
       <ol> 
@@ -70,6 +64,11 @@
   <li>Manage multiple connections</li>
 </ul>
 
+<p>This document describes how to use <em>Classic Bluetooth</em>. Classic
+Bluetooth is the right choice for more battery-intensive operations such as streaming
+and communicating between Android devices. For Bluetooth devices with low power requirements,
+Android 4.3 (API Level 18) introduces API support for Bluetooth Low Energy. To learn more,
+see <a href="{@docRoot}guide/topics/connectivity/bluetooth-le.html">Bluetooth Low Energy</a>.</p>
 
 <h2 id="TheBasics">The Basics</h2>
 
@@ -164,22 +163,18 @@
  
 <h2 id="Permissions">Bluetooth Permissions</h2> 
  
-<p>In order to use Bluetooth features in your application, you need to declare
-at least one of two Bluetooth permissions: {@link
-android.Manifest.permission#BLUETOOTH} and {@link
-android.Manifest.permission#BLUETOOTH_ADMIN}.</p> 
- 
-<p>You must request the {@link android.Manifest.permission#BLUETOOTH} permission
-in order to perform any Bluetooth communication, such as requesting a
-connection, accepting a connection, and transferring data.</p> 
- 
-<p>You must request the {@link android.Manifest.permission#BLUETOOTH_ADMIN}
-permission in order to initiate device discovery or manipulate Bluetooth
-settings. Most applications need this permission solely for the
+<p>In order to use Bluetooth features in your application, you must declare
+the Bluetooth permission {@link android.Manifest.permission#BLUETOOTH}.
+You need this permission to perform any Bluetooth communication,
+such as requesting a connection, accepting a connection, and transferring data.</p>
+
+<p>If you want your app to initiate device discovery or manipulate Bluetooth
+settings, you must also declare the {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+permission. Most applications need this permission solely for the
 ability to discover local Bluetooth devices. The other abilities granted by this
 permission should not be used, unless the application is a "power manager" that
 will modify Bluetooth settings upon user request. <strong>Note:</strong> If you
-use {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission, then must
+use {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission, then you must
 also have the {@link android.Manifest.permission#BLUETOOTH} permission.</p> 
  
 <p>Declare the Bluetooth permission(s) in your application manifest file. For
diff --git a/docs/html/images/brand/ar_generic_rgb_wo_45.png b/docs/html/images/brand/ar_generic_rgb_wo_45.png
index bdb0ff6..c403608 100644
--- a/docs/html/images/brand/ar_generic_rgb_wo_45.png
+++ b/docs/html/images/brand/ar_generic_rgb_wo_45.png
Binary files differ
diff --git a/docs/html/images/brand/ar_generic_rgb_wo_60.png b/docs/html/images/brand/ar_generic_rgb_wo_60.png
index ba9fc69..95e31eb 100644
--- a/docs/html/images/brand/ar_generic_rgb_wo_60.png
+++ b/docs/html/images/brand/ar_generic_rgb_wo_60.png
Binary files differ
diff --git a/docs/html/images/gp-edu-optin.png b/docs/html/images/gp-edu-optin.png
new file mode 100644
index 0000000..91e4e0d
--- /dev/null
+++ b/docs/html/images/gp-edu-optin.png
Binary files differ
diff --git a/docs/html/images/gp-edu-process.png b/docs/html/images/gp-edu-process.png
new file mode 100644
index 0000000..febf007
--- /dev/null
+++ b/docs/html/images/gp-edu-process.png
Binary files differ
diff --git a/docs/html/images/tools/clipbounds-normal@2x.png b/docs/html/images/tools/clipbounds-normal@2x.png
new file mode 100644
index 0000000..99e0e14
--- /dev/null
+++ b/docs/html/images/tools/clipbounds-normal@2x.png
Binary files differ
diff --git a/docs/html/images/tools/clipbounds@2x.png b/docs/html/images/tools/clipbounds@2x.png
new file mode 100644
index 0000000..d5261e6
--- /dev/null
+++ b/docs/html/images/tools/clipbounds@2x.png
Binary files differ
diff --git a/docs/html/images/tools/ninepatch_opticalbounds@2x.png b/docs/html/images/tools/ninepatch_opticalbounds@2x.png
new file mode 100644
index 0000000..cb7eb08
--- /dev/null
+++ b/docs/html/images/tools/ninepatch_opticalbounds@2x.png
Binary files differ
diff --git a/docs/html/images/tools/opticalbounds-normal@2x.png b/docs/html/images/tools/opticalbounds-normal@2x.png
new file mode 100644
index 0000000..6662264
--- /dev/null
+++ b/docs/html/images/tools/opticalbounds-normal@2x.png
Binary files differ
diff --git a/docs/html/images/tools/opticalbounds@2x.png b/docs/html/images/tools/opticalbounds@2x.png
new file mode 100644
index 0000000..bd09f9b
--- /dev/null
+++ b/docs/html/images/tools/opticalbounds@2x.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index af271ee..d82deec 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -13,6 +13,20 @@
         <div class="frame">
             <ul>
                 <li class="item carousel-home">
+                    <div class="content-left col-9">
+                        <a href="{@docRoot}about/versions/jelly-bean.html"><img src="{@docRoot}images/home/android-jellybean.png" ></a>
+                    </div>
+                    <div class="content-right col-6">
+                    <h1>More Jelly Beans!</h1>
+                    <p>Android 4.3 is now available with a variety of performance improvements
+                    and new developer features. </p>
+                    <p>With this release, Android now supports Bluetooth Low Energy for battery
+                    savings with wireless peripherals, OpenGL ES 3.0 for the most advanced mobile 3D
+                    graphics, MPEG DASH support for high quality media streaming, and much more.</p>
+                    <p><a href="{@docRoot}about/versions/jelly-bean.html" class="button">Learn More</a></p>
+                    </div>
+                </li>
+                <li class="item carousel-home">
                     <div class="content-left col-11" style="padding-top:10px;">
                         <a href="{@docRoot}channels/io2013.html">
                           <img src="{@docRoot}images/home/io-videos-2013.png" style="margin:60px 0 0;
@@ -76,17 +90,6 @@
                     </div>
                 </li>
                 <li class="item carousel-home">
-                    <div class="content-left col-9">
-                        <a href="{@docRoot}about/versions/jelly-bean.html"><img src="{@docRoot}images/home/android-jellybean.png" ></a>
-                    </div>
-                    <div class="content-right col-6">
-                    <h1>Android 4.2 Jelly Bean!</h1>
-                    <p>The latest version of Jelly Bean is here, with performance optimizations, a refreshed UI, and great new features for developers. </p>
-                    <p>Android 4.2 includes APIs for developing lock sceen widgets and Daydream screensavers, using external displays, creating RTL layouts, building flexible UI with nested Fragments, and much more.</p>
-                    <p><a href="{@docRoot}about/versions/jelly-bean.html" class="button">Learn More</a></p>
-                    </div>
-                </li>
-                <li class="item carousel-home">
                     <div class="content-left col-10">
                         <img src="{@docRoot}images/home/design.png" style="margin-top:30px">
                     </div>
diff --git a/docs/html/reference/renderscript/annotated.html b/docs/html/reference/renderscript/annotated.html
index 62badd9..9ddbc81 100644
--- a/docs/html/reference/renderscript/annotated.html
+++ b/docs/html/reference/renderscript/annotated.html
@@ -29,23 +29,23 @@
 </div>
 <div class="contents">
 <div class="textblock"> </div><table>
-  <tr><td class="indexkey"><a class="el" href="structrs__allocation.html">rs_allocation</a></td><td class="indexvalue">Opaque handle to a Renderscript allocation </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__element.html">rs_element</a></td><td class="indexvalue">Opaque handle to a Renderscript element </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__font.html">rs_font</a></td><td class="indexvalue">Opaque handle to a Renderscript font object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__allocation.html">rs_allocation</a></td><td class="indexvalue">Opaque handle to a RenderScript allocation </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__element.html">rs_element</a></td><td class="indexvalue">Opaque handle to a RenderScript element </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__font.html">rs_font</a></td><td class="indexvalue">Opaque handle to a RenderScript font object </td></tr>
   <tr><td class="indexkey"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a></td><td class="indexvalue">2x2 float matrix </td></tr>
   <tr><td class="indexkey"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a></td><td class="indexvalue">3x3 float matrix </td></tr>
   <tr><td class="indexkey"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a></td><td class="indexvalue">4x4 float matrix </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__mesh.html">rs_mesh</a></td><td class="indexvalue">Opaque handle to a Renderscript mesh object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__path.html">rs_path</a></td><td class="indexvalue">Opaque handle to a Renderscript Path object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__program__fragment.html">rs_program_fragment</a></td><td class="indexvalue">Opaque handle to a Renderscript ProgramFragment object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__program__raster.html">rs_program_raster</a></td><td class="indexvalue">Opaque handle to a Renderscript ProgramRaster object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__program__store.html">rs_program_store</a></td><td class="indexvalue">Opaque handle to a Renderscript ProgramStore object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__program__vertex.html">rs_program_vertex</a></td><td class="indexvalue">Opaque handle to a Renderscript ProgramVertex object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__sampler.html">rs_sampler</a></td><td class="indexvalue">Opaque handle to a Renderscript sampler object </td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__script.html">rs_script</a></td><td class="indexvalue">Opaque handle to a Renderscript script object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__mesh.html">rs_mesh</a></td><td class="indexvalue">Opaque handle to a RenderScript mesh object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__path.html">rs_path</a></td><td class="indexvalue">Opaque handle to a RenderScript Path object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__program__fragment.html">rs_program_fragment</a></td><td class="indexvalue">Opaque handle to a RenderScript ProgramFragment object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__program__raster.html">rs_program_raster</a></td><td class="indexvalue">Opaque handle to a RenderScript ProgramRaster object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__program__store.html">rs_program_store</a></td><td class="indexvalue">Opaque handle to a RenderScript ProgramStore object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__program__vertex.html">rs_program_vertex</a></td><td class="indexvalue">Opaque handle to a RenderScript ProgramVertex object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__sampler.html">rs_sampler</a></td><td class="indexvalue">Opaque handle to a RenderScript sampler object </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__script.html">rs_script</a></td><td class="indexvalue">Opaque handle to a RenderScript script object </td></tr>
   <tr><td class="indexkey"><a class="el" href="structrs__script__call.html">rs_script_call</a></td><td class="indexvalue"></td></tr>
   <tr><td class="indexkey"><a class="el" href="structrs__tm.html">rs_tm</a></td><td class="indexvalue"></td></tr>
-  <tr><td class="indexkey"><a class="el" href="structrs__type.html">rs_type</a></td><td class="indexvalue">Opaque handle to a Renderscript type </td></tr>
+  <tr><td class="indexkey"><a class="el" href="structrs__type.html">rs_type</a></td><td class="indexvalue">Opaque handle to a RenderScript type </td></tr>
 </table>
 </div>
 
diff --git a/docs/html/reference/renderscript/globals.html b/docs/html/reference/renderscript/globals.html
index ffbd052..d149a0d 100644
--- a/docs/html/reference/renderscript/globals.html
+++ b/docs/html/reference/renderscript/globals.html
@@ -28,6 +28,7 @@
       <li><a href="globals_func.html"><span>Functions</span></a></li>
       <li><a href="globals_type.html"><span>Typedefs</span></a></li>
       <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
     </ul>
   </div>
   <div id="navrow4" class="tabs3">
@@ -54,6 +55,9 @@
 <div class="textblock"> </div>
 
 <h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
+<li>abs()
+: <a class="el" href="rs__cl_8rsh.html#a1ed0afedda2068ad1f9ad14ef3449e50">rs_cl.rsh</a>
+</li>
 <li>acos()
 : <a class="el" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">rs_cl.rsh</a>
 </li>
@@ -61,7 +65,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">rs_cl.rsh</a>
 </li>
 <li>acospi()
-: <a class="el" href="rs__cl_8rsh.html#a2c0c7c00815bd480fcda80d1144ac20d">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a2c9092eb07e9df891935e93469e70d4e">rs_cl.rsh</a>
 </li>
 <li>asin()
 : <a class="el" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">rs_cl.rsh</a>
@@ -70,7 +74,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">rs_cl.rsh</a>
 </li>
 <li>asinpi()
-: <a class="el" href="rs__cl_8rsh.html#a679b63e86358fc962cb343eb6263496b">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a812eb4521e65a451161417f9898384f7">rs_cl.rsh</a>
 </li>
 <li>atan()
 : <a class="el" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">rs_cl.rsh</a>
@@ -79,13 +83,13 @@
 : <a class="el" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">rs_cl.rsh</a>
 </li>
 <li>atan2pi()
-: <a class="el" href="rs__cl_8rsh.html#a9aed0a1613c86acf5e4c5ad3290a4745">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a89ec5f6a2f64a0f9e97438fbd41aaace">rs_cl.rsh</a>
 </li>
 <li>atanh()
 : <a class="el" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">rs_cl.rsh</a>
 </li>
 <li>atanpi()
-: <a class="el" href="rs__cl_8rsh.html#a420d4aaea0e53d7172845a21a1e648ea">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a5052e31ce616d35aee25a3a83f6fc117">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -107,7 +111,31 @@
 : <a class="el" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">rs_types.rsh</a>
 </li>
 <li>clamp()
-: <a class="el" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">rs_cl.rsh</a>
+</li>
+<li>clz()
+: <a class="el" href="rs__cl_8rsh.html#a8a0f94dce3caa2a50cbf2d9f4bc674ac">rs_cl.rsh</a>
+</li>
+<li>convert_char2()
+: <a class="el" href="rs__cl_8rsh.html#a67421c4b17df15a1c726d912770e5ca4">rs_cl.rsh</a>
+</li>
+<li>convert_float2()
+: <a class="el" href="rs__cl_8rsh.html#a1ad62d449c1e3548573c2f9c1a5cb13a">rs_cl.rsh</a>
+</li>
+<li>convert_int2()
+: <a class="el" href="rs__cl_8rsh.html#a9d2e4b8f0f25a7ccaed05248edc21f06">rs_cl.rsh</a>
+</li>
+<li>convert_short2()
+: <a class="el" href="rs__cl_8rsh.html#a83e89db1940f3190fbec5bd823a99fc5">rs_cl.rsh</a>
+</li>
+<li>convert_uchar2()
+: <a class="el" href="rs__cl_8rsh.html#a833bb5476683ec5692feaf0cd5dcdd80">rs_cl.rsh</a>
+</li>
+<li>convert_uint2()
+: <a class="el" href="rs__cl_8rsh.html#a01ff256469203ba33ba0f220b54e70d1">rs_cl.rsh</a>
+</li>
+<li>convert_ushort2()
+: <a class="el" href="rs__cl_8rsh.html#a6862ea6ddfba8a59796bc681a544fb4f">rs_cl.rsh</a>
 </li>
 <li>copysign()
 : <a class="el" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">rs_cl.rsh</a>
@@ -119,23 +147,23 @@
 : <a class="el" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">rs_cl.rsh</a>
 </li>
 <li>cospi()
-: <a class="el" href="rs__cl_8rsh.html#a07b12188bd53c6b584274892f6abf425">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a258d2c828fd46eae2867373884d834a9">rs_cl.rsh</a>
 </li>
 <li>cross()
-: <a class="el" href="rs__cl_8rsh.html#a0f7beb26bb4aa30535babd14492a7e90">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#add745d593bc2b23285bd10e52a204e25">rs_cl.rsh</a>
 </li>
 </ul>
 
 
 <h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
 <li>degrees()
-: <a class="el" href="rs__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">rs_cl.rsh</a>
 </li>
 <li>distance()
-: <a class="el" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a412bf215ae838c65079560bbefefaca7">rs_cl.rsh</a>
 </li>
 <li>dot()
-: <a class="el" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">rs_cl.rsh</a>
 </li>
 <li>double2
 : <a class="el" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">rs_types.rsh</a>
@@ -160,7 +188,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">rs_cl.rsh</a>
 </li>
 <li>exp10()
-: <a class="el" href="rs__cl_8rsh.html#a4b51589157c9ce600ea6156be51d8d18">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a0225ff40d79f78260293e776c6a77422">rs_cl.rsh</a>
 </li>
 <li>exp2()
 : <a class="el" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">rs_cl.rsh</a>
@@ -175,6 +203,15 @@
 <li>fabs()
 : <a class="el" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">rs_cl.rsh</a>
 </li>
+<li>fast_distance()
+: <a class="el" href="rs__cl_8rsh.html#a4fcbdb9099e7d653a951cb344ba3c3c9">rs_cl.rsh</a>
+</li>
+<li>fast_length()
+: <a class="el" href="rs__cl_8rsh.html#a7c8f2f987044a360b5f616a80a74a4d5">rs_cl.rsh</a>
+</li>
+<li>fast_normalize()
+: <a class="el" href="rs__cl_8rsh.html#a3878bee2879351f518be68e015d76a35">rs_cl.rsh</a>
+</li>
 <li>fdim()
 : <a class="el" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">rs_cl.rsh</a>
 </li>
@@ -203,7 +240,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">rs_cl.rsh</a>
 </li>
 <li>fract()
-: <a class="el" href="rs__cl_8rsh.html#ac5277212e0df309a0a7c908424f7b14b">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">rs_cl.rsh</a>
 </li>
 <li>frexp()
 : <a class="el" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">rs_cl.rsh</a>
@@ -212,6 +249,15 @@
 
 
 <h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
+<li>half_recip()
+: <a class="el" href="rs__cl_8rsh.html#a49050a8e32c95f60df4eaba9d7dfdca6">rs_cl.rsh</a>
+</li>
+<li>half_rsqrt()
+: <a class="el" href="rs__cl_8rsh.html#a0925ceb22d33dcbb45914350ffa2edea">rs_cl.rsh</a>
+</li>
+<li>half_sqrt()
+: <a class="el" href="rs__cl_8rsh.html#a26e2c17b20ee4c98b78c365d390e4fb8">rs_cl.rsh</a>
+</li>
 <li>hypot()
 : <a class="el" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">rs_cl.rsh</a>
 </li>
@@ -251,7 +297,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">rs_cl.rsh</a>
 </li>
 <li>length()
-: <a class="el" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">rs_cl.rsh</a>
 </li>
 <li>lgamma()
 : <a class="el" href="rs__cl_8rsh.html#a735f4e14e33c50348ef41220f9210bcc">rs_cl.rsh</a>
@@ -266,7 +312,7 @@
 : <a class="el" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">rs_cl.rsh</a>
 </li>
 <li>log2()
-: <a class="el" href="rs__cl_8rsh.html#a2fb571ae932f671ff3e9e97f2d3fabb7">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aab1c4f06daf6f2a50fd73f0c28929213">rs_cl.rsh</a>
 </li>
 <li>logb()
 : <a class="el" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">rs_cl.rsh</a>
@@ -287,8 +333,14 @@
 <li>mad()
 : <a class="el" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">rs_cl.rsh</a>
 </li>
+<li>max()
+: <a class="el" href="rs__cl_8rsh.html#a616bf7a90d8d3c73a48d2c395d9dc4ea">rs_cl.rsh</a>
+</li>
+<li>min()
+: <a class="el" href="rs__cl_8rsh.html#a5f61ca44b3ad4b11365b0c4137a22658">rs_cl.rsh</a>
+</li>
 <li>mix()
-: <a class="el" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">rs_cl.rsh</a>
 </li>
 <li>modf()
 : <a class="el" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">rs_cl.rsh</a>
@@ -297,11 +349,20 @@
 
 
 <h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
+<li>native_exp()
+: <a class="el" href="rs__cl_8rsh.html#a45d8176823a05b891313f3d96decf491">rs_cl.rsh</a>
+</li>
+<li>native_exp10()
+: <a class="el" href="rs__cl_8rsh.html#a601ee3d2bf769f1cdc39a886f7a6c986">rs_cl.rsh</a>
+</li>
+<li>native_exp2()
+: <a class="el" href="rs__cl_8rsh.html#ab354691ecd844549b27ef9202e17f7ac">rs_cl.rsh</a>
+</li>
 <li>nextafter()
 : <a class="el" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">rs_cl.rsh</a>
 </li>
 <li>normalize()
-: <a class="el" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a69c2a56f743593439d5ae5e3ec8e517f">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -311,17 +372,17 @@
 : <a class="el" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">rs_cl.rsh</a>
 </li>
 <li>pown()
-: <a class="el" href="rs__cl_8rsh.html#afd46205452017b741abb2e17fc28557d">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a67d1fe795e092003f687f3cc6d3c407a">rs_cl.rsh</a>
 </li>
 <li>powr()
-: <a class="el" href="rs__cl_8rsh.html#a3ff65421721ec8e6ce8d875a563d005f">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a316c30ba3e6bc11673bfd34bb4746d24">rs_cl.rsh</a>
 </li>
 </ul>
 
 
 <h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
 <li>radians()
-: <a class="el" href="rs__cl_8rsh.html#aaef2526c4d190ba6f7301b4e810917a7">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aceb63a0da6393b8ac2ed229bae6232d6">rs_cl.rsh</a>
 </li>
 <li>remainder()
 : <a class="el" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">rs_cl.rsh</a>
@@ -330,14 +391,77 @@
 : <a class="el" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rs_cl.rsh</a>
 </li>
 <li>rootn()
-: <a class="el" href="rs__cl_8rsh.html#af169e7e1c575b7c24c1834569223077f">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a2776b517528b8185a6bb50753af0f6cf">rs_cl.rsh</a>
 </li>
 <li>round()
 : <a class="el" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">rs_cl.rsh</a>
 </li>
+<li>rs_allocation_cubemap_face
+: <a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_types.rsh</a>
+</li>
+<li>rs_allocation_usage_type
+: <a class="el" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">rs_types.rsh</a>
+</li>
+<li>rs_data_kind
+: <a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_types.rsh</a>
+</li>
+<li>rs_data_type
+: <a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_types.rsh</a>
+</li>
+<li>rs_depth_func
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_ALWAYS
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_EQUAL
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_GEQUAL
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_GREATER
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_INVALID
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_LEQUAL
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_LESS
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a">rs_types.rsh</a>
+</li>
+<li>RS_DEPTH_FUNC_NOTEQUAL
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d">rs_types.rsh</a>
+</li>
 <li>rs_for_each_strategy
 : <a class="el" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_core.rsh</a>
 </li>
+<li>rs_primitive
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_INVALID
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_LINE
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_LINE_STRIP
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_POINT
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_TRIANGLE
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_TRIANGLE_FAN
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01">rs_types.rsh</a>
+</li>
+<li>RS_PRIMITIVE_TRIANGLE_STRIP
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9">rs_types.rsh</a>
+</li>
 <li>rs_quaternion
 : <a class="el" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">rs_types.rsh</a>
 </li>
@@ -347,6 +471,12 @@
 <li>rs_time_t
 : <a class="el" href="rs__time_8rsh.html#ad2b4759a0a6a98bd79b7ad82a4b057d6">rs_time.rsh</a>
 </li>
+<li>rsAllocationCopy1DRange()
+: <a class="el" href="rs__allocation_8rsh.html#a3a1098a3ea3a5106955dd4398b8904e1">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationCopy2DRange()
+: <a class="el" href="rs__allocation_8rsh.html#a7f7e2369b3ed7d7db31729b6db7ba07e">rs_allocation.rsh</a>
+</li>
 <li>rsAllocationGetDimFaces()
 : <a class="el" href="rs__allocation_8rsh.html#ac85f7ed88f38b35482c6d63b56d470fe">rs_allocation.rsh</a>
 </li>
@@ -362,75 +492,93 @@
 <li>rsAllocationGetDimZ()
 : <a class="el" href="rs__allocation_8rsh.html#acd6f1a2b2443e6ea39e6154577645d2c">rs_allocation.rsh</a>
 </li>
+<li>rsAllocationGetElement()
+: <a class="el" href="rs__allocation_8rsh.html#a6a3b6512bc269f6b369bdc54d12a45ff">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationIoReceive()
+: <a class="el" href="rs__allocation_8rsh.html#a05f7391230a92d239fdb619d791162b5">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationIoSend()
+: <a class="el" href="rs__allocation_8rsh.html#afe9ebb2f89c6366c59f5e05ee4849c0a">rs_allocation.rsh</a>
+</li>
+<li>rsAtomicAdd()
+: <a class="el" href="rs__atomic_8rsh.html#ab46665eff81030200f86db9c2181072a">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicAnd()
+: <a class="el" href="rs__atomic_8rsh.html#a7fdf5633662dd5b0898ad5a149e3c8ad">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicCas()
+: <a class="el" href="rs__atomic_8rsh.html#a205d66a8eb29eee8968f886e488b4402">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicDec()
+: <a class="el" href="rs__atomic_8rsh.html#a16a69784a343d7c11bf6bd7fec9686ca">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicInc()
+: <a class="el" href="rs__atomic_8rsh.html#a619e7a489500a650569a76ccd93e105f">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicMax()
+: <a class="el" href="rs__atomic_8rsh.html#a1d49d69d14956152fcde34efe9cdff87">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicMin()
+: <a class="el" href="rs__atomic_8rsh.html#a9f3cddc86f1075ca194a762fb8a3330a">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicOr()
+: <a class="el" href="rs__atomic_8rsh.html#a477f6eb17c4806bb715bfd975b6369cd">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicSub()
+: <a class="el" href="rs__atomic_8rsh.html#a800dced6abbf09716391f35bc488900b">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicXor()
+: <a class="el" href="rs__atomic_8rsh.html#a5590505ea65c53b3bb26fa48a6b9c313">rs_atomic.rsh</a>
+</li>
 <li>rsClamp()
-: <a class="el" href="rs__math_8rsh.html#ad36abebbb36ffc5312fb2ed8baf98d39">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a40eddbf6c2462eada177a581a49bd3c6">rs_math.rsh</a>
 </li>
 <li>rsClearObject()
-: <a class="el" href="rs__object_8rsh.html#aa246aa3c8162ef03e43bc0062671ae29">rs_object.rsh</a>
+: <a class="el" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rs_object.rsh</a>
 </li>
 <li>rsDebug()
-: <a class="el" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rs_debug.rsh</a>
+: <a class="el" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rs_debug.rsh</a>
+</li>
+<li>rsElementGetBytesSize()
+: <a class="el" href="rs__element_8rsh.html#ac54592168af5896d3fba5283af286f98">rs_element.rsh</a>
+</li>
+<li>rsElementGetDataKind()
+: <a class="el" href="rs__element_8rsh.html#af072702a530e158093d69353072da5f9">rs_element.rsh</a>
+</li>
+<li>rsElementGetDataType()
+: <a class="el" href="rs__element_8rsh.html#a9a3569d242be363517ea2354d98cf382">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElement()
+: <a class="el" href="rs__element_8rsh.html#a8c690bce7d32be759fd787740c270c92">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementArraySize()
+: <a class="el" href="rs__element_8rsh.html#a9c3140c18139db451279d9b221808eee">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementCount()
+: <a class="el" href="rs__element_8rsh.html#a2ecab064ea2b720bc3af27b523388f31">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementName()
+: <a class="el" href="rs__element_8rsh.html#a3c1446166c43aa6ba3d5359f6c982f02">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementNameLength()
+: <a class="el" href="rs__element_8rsh.html#a94834eb1d91b50a5df3cbe161c22e37d">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementOffsetBytes()
+: <a class="el" href="rs__element_8rsh.html#a840d53f1e91bb6887b40a4d8983c53ed">rs_element.rsh</a>
+</li>
+<li>rsElementGetVectorSize()
+: <a class="el" href="rs__element_8rsh.html#a727997de25ae43c07dffcfd484928d53">rs_element.rsh</a>
 </li>
 <li>rsExtractFrustumPlanes()
 : <a class="el" href="rs__math_8rsh.html#a191f9c687c56322c18b7d71491602122">rs_math.rsh</a>
 </li>
 <li>rsForEach()
-: <a class="el" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rs_core.rsh</a>
+: <a class="el" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rs_core.rsh</a>
 </li>
 <li>rsFrac()
 : <a class="el" href="rs__math_8rsh.html#ac4f127e78da0849321c7f6db14f9e989">rs_math.rsh</a>
 </li>
-<li>rsgAllocationSyncAll()
-: <a class="el" href="rs__graphics_8rsh.html#a647228d8e15da6ad67a97701d920dcac">rs_graphics.rsh</a>
-</li>
-<li>rsgBindConstant()
-: <a class="el" href="rs__graphics_8rsh.html#a46208900d16287fde91a5d14ebc830dc">rs_graphics.rsh</a>
-</li>
-<li>rsgBindFont()
-: <a class="el" href="rs__graphics_8rsh.html#ae89effef281e92e2940055883ea366d4">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramFragment()
-: <a class="el" href="rs__graphics_8rsh.html#a9f8deb600729a83c39c5bcaba2152b9c">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramRaster()
-: <a class="el" href="rs__graphics_8rsh.html#a391eb5535544f6312c724b910da6ec35">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramStore()
-: <a class="el" href="rs__graphics_8rsh.html#a34dfa6eddd7454fc1865222c5a022315">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramVertex()
-: <a class="el" href="rs__graphics_8rsh.html#a894e26d0d05d3ef99be65ddf98dd901c">rs_graphics.rsh</a>
-</li>
-<li>rsgBindSampler()
-: <a class="el" href="rs__graphics_8rsh.html#a4ade6c5acbf6acaa1c29a1aecc6e87d3">rs_graphics.rsh</a>
-</li>
-<li>rsgBindTexture()
-: <a class="el" href="rs__graphics_8rsh.html#a1694eb5489bd3a444da921dbf16aeeb5">rs_graphics.rsh</a>
-</li>
-<li>rsgClearColor()
-: <a class="el" href="rs__graphics_8rsh.html#a147674fed92745fbb5c64a6300ca3c49">rs_graphics.rsh</a>
-</li>
-<li>rsgClearDepth()
-: <a class="el" href="rs__graphics_8rsh.html#a4bedb06e8facd587e3eacd746fe3e727">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawMesh()
-: <a class="el" href="rs__graphics_8rsh.html#ab2704a6d16e3d7983524d0a8413c1b8a">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawQuad()
-: <a class="el" href="rs__graphics_8rsh.html#ad6953da0349e58547b08b8ce174ed3fc">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawQuadTexCoords()
-: <a class="el" href="rs__graphics_8rsh.html#afb98a59bb9f878f0a09459567c269e64">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawRect()
-: <a class="el" href="rs__graphics_8rsh.html#a80c51849bf12ec6c699c23c3fa3e6208">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawSpriteScreenspace()
-: <a class="el" href="rs__graphics_8rsh.html#a07d15127330fa1dff6c99b0d7d14e65e">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawText()
-: <a class="el" href="rs__graphics_8rsh.html#afaec82492762e62cad1ff53ada479b14">rs_graphics.rsh</a>
-</li>
 <li>rsGetAllocation()
 : <a class="el" href="rs__allocation_8rsh.html#aadad7654929c451be299df125061c9ba">rs_allocation.rsh</a>
 </li>
@@ -438,40 +586,67 @@
 : <a class="el" href="rs__time_8rsh.html#adea2682186fd903752431ad848bd8bf4">rs_time.rsh</a>
 </li>
 <li>rsGetElementAt()
-: <a class="el" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rs_allocation.rsh</a>
+: <a class="el" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rs_allocation.rsh</a>
 </li>
-<li>rsgFontColor()
-: <a class="el" href="rs__graphics_8rsh.html#abda8c344092ed6310c7a8f353a6df876">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_U()
+: <a class="el" href="rs__allocation_8rsh.html#a41f61be02113ee22c039ea51fdedb20e">rs_allocation.rsh</a>
 </li>
-<li>rsgGetHeight()
-: <a class="el" href="rs__graphics_8rsh.html#a7e6565cd5d5e44f442a8bf8ba68f4681">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_V()
+: <a class="el" href="rs__allocation_8rsh.html#af03cadb582fa80bbf7f39177d96df17e">rs_allocation.rsh</a>
 </li>
-<li>rsgGetWidth()
-: <a class="el" href="rs__graphics_8rsh.html#a67f4ed1ca4bba27d5c952ada89cd0717">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_Y()
+: <a class="el" href="rs__allocation_8rsh.html#ad7ffa1aa16511a75b4bc2c05bd0e0a75">rs_allocation.rsh</a>
 </li>
-<li>rsgMeasureText()
-: <a class="el" href="rs__graphics_8rsh.html#a5c599f4ea989f3d0616cbf8e983688c4">rs_graphics.rsh</a>
+<li>rsgMeshGetIndexAllocation()
+: <a class="el" href="rs__mesh_8rsh.html#a05257c9252e7804397d6a6f7549bae5a">rs_mesh.rsh</a>
 </li>
-<li>rsgMeshComputeBoundingBox()
-: <a class="el" href="rs__graphics_8rsh.html#a0978c54902dd1d60180f8dbb0b781105">rs_graphics.rsh</a>
+<li>rsgMeshGetPrimitive()
+: <a class="el" href="rs__mesh_8rsh.html#af467f1c21cc9221071334f8234c29466">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramFragmentConstantColor()
-: <a class="el" href="rs__graphics_8rsh.html#a35ac8c3759e25047e6a458c15520c887">rs_graphics.rsh</a>
+<li>rsgMeshGetPrimitiveCount()
+: <a class="el" href="rs__mesh_8rsh.html#ae0a0178cc02508517013486be4500d7f">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexGetProjectionMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a2b767d209b36ffcd2e0fc0cf6f4c5706">rs_graphics.rsh</a>
+<li>rsgMeshGetVertexAllocation()
+: <a class="el" href="rs__mesh_8rsh.html#a43e1d84147176cb0a1659552fa8da49f">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexLoadModelMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a976b8594cccb4b94d7ce520b44d884e3">rs_graphics.rsh</a>
+<li>rsgMeshGetVertexAllocationCount()
+: <a class="el" href="rs__mesh_8rsh.html#a7578d6d93154ac881715ab511449fab9">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexLoadProjectionMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a83a87d8efa3f26ed3f8fb25e49f29059">rs_graphics.rsh</a>
+<li>rsgProgramRasterGetCullMode()
+: <a class="el" href="rs__program_8rsh.html#a633d6dbdec98ef89c2b70c92ea707502">rs_program.rsh</a>
 </li>
-<li>rsgProgramVertexLoadTextureMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a377b7b394c4bf0881532b1241d4be168">rs_graphics.rsh</a>
+<li>rsgProgramRasterIsPointSpriteEnabled()
+: <a class="el" href="rs__program_8rsh.html#a86aeccd846ed2cd2c9498ab57e2535f3">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetBlendDstFunc()
+: <a class="el" href="rs__program_8rsh.html#a0ad38d595e35712f24c384ef20b69025">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetBlendSrcFunc()
+: <a class="el" href="rs__program_8rsh.html#afb38256c5804cdb9b410419c43ce03ab">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetDepthFunc()
+: <a class="el" href="rs__program_8rsh.html#a6a9c06c54d230f61edc0667a091aac77">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskAlphaEnabled()
+: <a class="el" href="rs__program_8rsh.html#ab038edb7399044a3ea96ebb17d7b6601">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskBlueEnabled()
+: <a class="el" href="rs__program_8rsh.html#a279ad1b4611aca268053337f6719a22c">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskGreenEnabled()
+: <a class="el" href="rs__program_8rsh.html#a1a57f706bc42ce49b545021c8403964c">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskRedEnabled()
+: <a class="el" href="rs__program_8rsh.html#a4a50df1d2495567536dd6f394d38ee5d">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsDepthMaskEnabled()
+: <a class="el" href="rs__program_8rsh.html#afa27fa6103c9e29f5e098e2d99663f0b">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsDitherEnabled()
+: <a class="el" href="rs__program_8rsh.html#abe7c55547a72dd291e0996de050bb749">rs_program.rsh</a>
 </li>
 <li>rsIsObject()
-: <a class="el" href="rs__object_8rsh.html#afa57d9148778b03b270facbdbcb88816">rs_object.rsh</a>
+: <a class="el" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rs_object.rsh</a>
 </li>
 <li>rsIsSphereInFrustum()
 : <a class="el" href="rs__math_8rsh.html#a7bbeaf44838e08e68d5cf3e3d7b0818c">rs_math.rsh</a>
@@ -480,7 +655,7 @@
 : <a class="el" href="rs__time_8rsh.html#a08a8fcadae964f7416aef487da624110">rs_time.rsh</a>
 </li>
 <li>rsMatrixGet()
-: <a class="el" href="rs__matrix_8rsh.html#a90b0548da8dbe1f643bcbac8466e5b72">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a22e983b67d3089c5cb97032e249ca335">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixInverse()
 : <a class="el" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rs_matrix.rsh</a>
@@ -489,16 +664,16 @@
 : <a class="el" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoad()
-: <a class="el" href="rs__matrix_8rsh.html#a06176acb38405937cb94c835a712a3b3">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#ac380c4117e047da494a74f0dad20fab3">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoadFrustum()
 : <a class="el" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoadIdentity()
-: <a class="el" href="rs__matrix_8rsh.html#a0ffd9de971cf10d0a663ff565be8d3cc">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a5b31e83553efa947db2198674d5db043">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoadMultiply()
-: <a class="el" href="rs__matrix_8rsh.html#a79f14c4c0f5ecc1bbd0bf54da8b653ef">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a78872343ea6a5c1a846160ccdc4add52">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoadOrtho()
 : <a class="el" href="rs__matrix_8rsh.html#a4c59884a0e534dbbcdc5655842732d43">rs_matrix.rsh</a>
@@ -516,7 +691,7 @@
 : <a class="el" href="rs__matrix_8rsh.html#a1b521c8a3d1260fa732cbf0a71af0e74">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixMultiply()
-: <a class="el" href="rs__matrix_8rsh.html#ae0b03aeec17ec8b9c5e75f8efb1bdc53">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a88ae2ed203769cb4a7917f84f6c1a2e2">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixRotate()
 : <a class="el" href="rs__matrix_8rsh.html#ad5ed05ca4880397fb29615e3c6798de1">rs_matrix.rsh</a>
@@ -525,19 +700,19 @@
 : <a class="el" href="rs__matrix_8rsh.html#a94cc6b22bd1a6c07a9a1c1d21afb392c">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixSet()
-: <a class="el" href="rs__matrix_8rsh.html#ada106cb8f08e4b23930d7ba1a0ce5609">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#ab69543f85a673f23fbb5f893e5824395">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixTranslate()
 : <a class="el" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixTranspose()
-: <a class="el" href="rs__matrix_8rsh.html#ac52acb31a705f6c68af8bddea0e79969">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a88095c70f1550c760844b3e32e41a31a">rs_matrix.rsh</a>
 </li>
 <li>rsPackColorTo8888()
-: <a class="el" href="rs__math_8rsh.html#a22e0be7e18b317a7453ebad4300934f6">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#ac30a8c020eade2b57fd5966cb7c8665e">rs_math.rsh</a>
 </li>
 <li>rsqrt()
-: <a class="el" href="rs__cl_8rsh.html#a5db00fde9e6bff693a38f3a37e7a1f70">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a8a3992b97cb199b1c8d598996b600988">rs_cl.rsh</a>
 </li>
 <li>rsQuaternionAdd()
 : <a class="el" href="rs__quaternion_8rsh.html#a5e6e493b9917336b0d9118fdd4e91444">rs_quaternion.rsh</a>
@@ -564,19 +739,40 @@
 : <a class="el" href="rs__quaternion_8rsh.html#abb31aad2416044ad5bbf44ee7c838e2a">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionSet()
-: <a class="el" href="rs__quaternion_8rsh.html#a249782133e54f13a8096d1fbe295714d">rs_quaternion.rsh</a>
+: <a class="el" href="rs__quaternion_8rsh.html#a5ff868dbc33e710a666a102fdcc6670a">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionSlerp()
 : <a class="el" href="rs__quaternion_8rsh.html#a7da94a30e287cbb8148771a5cd768dbd">rs_quaternion.rsh</a>
 </li>
 <li>rsRand()
-: <a class="el" href="rs__math_8rsh.html#ad9106e5aae5b1248870f21061f36a1c9">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a84b2e7468314873b3aa02969e310d9e4">rs_math.rsh</a>
+</li>
+<li>rsSample()
+: <a class="el" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rs_allocation.rsh</a>
+</li>
+<li>rsSamplerGetAnisotropy()
+: <a class="el" href="rs__sampler_8rsh.html#ab1e79984609469604cba8e2b76a98844">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetMagnification()
+: <a class="el" href="rs__sampler_8rsh.html#a5bddb73826cd20a79c31f012a4637e83">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetMinification()
+: <a class="el" href="rs__sampler_8rsh.html#acb1bec2c3d1edd752dd60499c8db58a4">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetWrapS()
+: <a class="el" href="rs__sampler_8rsh.html#a68a7ab6724019c6e72fae8eb45aa48dd">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetWrapT()
+: <a class="el" href="rs__sampler_8rsh.html#ab6b25d3b9afa16f418e2dee78ebb4a75">rs_sampler.rsh</a>
 </li>
 <li>rsSendToClient()
 : <a class="el" href="rs__core_8rsh.html#a508003cadad2d37d41e2de7e9226f859">rs_core.rsh</a>
 </li>
 <li>rsSendToClientBlocking()
-: <a class="el" href="rs__core_8rsh.html#afc93b00be08f58512a6ab6a87feb9515">rs_core.rsh</a>
+: <a class="el" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rs_core.rsh</a>
+</li>
+<li>rsSetElementAt()
+: <a class="el" href="rs__allocation_8rsh.html#a351627f335b9a091a5152db7ac9134dc">rs_allocation.rsh</a>
 </li>
 <li>rsSetObject()
 : <a class="el" href="rs__object_8rsh.html#a5132f90b4aaf8d2e35e6ad021fb08175">rs_object.rsh</a>
@@ -585,7 +781,7 @@
 : <a class="el" href="rs__time_8rsh.html#a555f9324acb8c3d0c6f09a1d05478ce2">rs_time.rsh</a>
 </li>
 <li>rsUnpackColor8888()
-: <a class="el" href="rs__math_8rsh.html#a26525a4f5093bd0f13191efe06127f4b">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a48bb0c2e7b1f2b62b2a8970c7d709eca">rs_math.rsh</a>
 </li>
 <li>rsUptimeMillis()
 : <a class="el" href="rs__time_8rsh.html#a3c406e51a769718dd1c760518b9cad44">rs_time.rsh</a>
@@ -607,19 +803,19 @@
 : <a class="el" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">rs_types.rsh</a>
 </li>
 <li>sign()
-: <a class="el" href="rs__cl_8rsh.html#a3e6d477a06dec7070f073eec9d8f420c">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9fe423cc7d4c6d767f8a608d2ee76657">rs_cl.rsh</a>
 </li>
 <li>sin()
 : <a class="el" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">rs_cl.rsh</a>
 </li>
 <li>sincos()
-: <a class="el" href="rs__cl_8rsh.html#a240f7c7c20b432a30dc660b5dd4cd320">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a892c91a30bbc713aa77105d8e9e25881">rs_cl.rsh</a>
 </li>
 <li>sinh()
 : <a class="el" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">rs_cl.rsh</a>
 </li>
 <li>sinpi()
-: <a class="el" href="rs__cl_8rsh.html#a4fe4fef049786e888526d6f37b912b0a">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9ca027af0acf3ff22d91cd9489766976">rs_cl.rsh</a>
 </li>
 <li>size_t
 : <a class="el" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">rs_types.rsh</a>
@@ -631,7 +827,7 @@
 : <a class="el" href="rs__types_8rsh.html#a170745d0d946e79c4c2a056d1d158996">rs_types.rsh</a>
 </li>
 <li>step()
-: <a class="el" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -644,7 +840,7 @@
 : <a class="el" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">rs_cl.rsh</a>
 </li>
 <li>tanpi()
-: <a class="el" href="rs__cl_8rsh.html#ad8bfb083dd3979a305e594a0d6e581c4">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aee96c8910a7d8b0082574813b6b68b9a">rs_cl.rsh</a>
 </li>
 <li>tgamma()
 : <a class="el" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">rs_cl.rsh</a>
diff --git a/docs/html/reference/renderscript/globals_enum.html b/docs/html/reference/renderscript/globals_enum.html
index 7301432..500d6c4 100644
--- a/docs/html/reference/renderscript/globals_enum.html
+++ b/docs/html/reference/renderscript/globals_enum.html
@@ -28,14 +28,33 @@
       <li><a href="globals_func.html"><span>Functions</span></a></li>
       <li><a href="globals_type.html"><span>Typedefs</span></a></li>
       <li class="current"><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
     </ul>
   </div>
 </div>
 <div class="contents">
 &#160;<ul>
+<li>rs_allocation_cubemap_face
+: <a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_types.rsh</a>
+</li>
+<li>rs_allocation_usage_type
+: <a class="el" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">rs_types.rsh</a>
+</li>
+<li>rs_data_kind
+: <a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_types.rsh</a>
+</li>
+<li>rs_data_type
+: <a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_types.rsh</a>
+</li>
+<li>rs_depth_func
+: <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_types.rsh</a>
+</li>
 <li>rs_for_each_strategy
 : <a class="el" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_core.rsh</a>
 </li>
+<li>rs_primitive
+: <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_types.rsh</a>
+</li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/globals_func.html b/docs/html/reference/renderscript/globals_func.html
index c1a622d..bed106a 100644
--- a/docs/html/reference/renderscript/globals_func.html
+++ b/docs/html/reference/renderscript/globals_func.html
@@ -28,6 +28,7 @@
       <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
       <li><a href="globals_type.html"><span>Typedefs</span></a></li>
       <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
     </ul>
   </div>
   <div id="navrow4" class="tabs3">
@@ -53,6 +54,9 @@
 &#160;
 
 <h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
+<li>abs()
+: <a class="el" href="rs__cl_8rsh.html#a1ed0afedda2068ad1f9ad14ef3449e50">rs_cl.rsh</a>
+</li>
 <li>acos()
 : <a class="el" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">rs_cl.rsh</a>
 </li>
@@ -60,7 +64,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">rs_cl.rsh</a>
 </li>
 <li>acospi()
-: <a class="el" href="rs__cl_8rsh.html#a2c0c7c00815bd480fcda80d1144ac20d">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a2c9092eb07e9df891935e93469e70d4e">rs_cl.rsh</a>
 </li>
 <li>asin()
 : <a class="el" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">rs_cl.rsh</a>
@@ -69,7 +73,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">rs_cl.rsh</a>
 </li>
 <li>asinpi()
-: <a class="el" href="rs__cl_8rsh.html#a679b63e86358fc962cb343eb6263496b">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a812eb4521e65a451161417f9898384f7">rs_cl.rsh</a>
 </li>
 <li>atan()
 : <a class="el" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">rs_cl.rsh</a>
@@ -78,13 +82,13 @@
 : <a class="el" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">rs_cl.rsh</a>
 </li>
 <li>atan2pi()
-: <a class="el" href="rs__cl_8rsh.html#a9aed0a1613c86acf5e4c5ad3290a4745">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a89ec5f6a2f64a0f9e97438fbd41aaace">rs_cl.rsh</a>
 </li>
 <li>atanh()
 : <a class="el" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">rs_cl.rsh</a>
 </li>
 <li>atanpi()
-: <a class="el" href="rs__cl_8rsh.html#a420d4aaea0e53d7172845a21a1e648ea">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a5052e31ce616d35aee25a3a83f6fc117">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -97,7 +101,31 @@
 : <a class="el" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">rs_cl.rsh</a>
 </li>
 <li>clamp()
-: <a class="el" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">rs_cl.rsh</a>
+</li>
+<li>clz()
+: <a class="el" href="rs__cl_8rsh.html#a8a0f94dce3caa2a50cbf2d9f4bc674ac">rs_cl.rsh</a>
+</li>
+<li>convert_char2()
+: <a class="el" href="rs__cl_8rsh.html#a67421c4b17df15a1c726d912770e5ca4">rs_cl.rsh</a>
+</li>
+<li>convert_float2()
+: <a class="el" href="rs__cl_8rsh.html#a1ad62d449c1e3548573c2f9c1a5cb13a">rs_cl.rsh</a>
+</li>
+<li>convert_int2()
+: <a class="el" href="rs__cl_8rsh.html#a9d2e4b8f0f25a7ccaed05248edc21f06">rs_cl.rsh</a>
+</li>
+<li>convert_short2()
+: <a class="el" href="rs__cl_8rsh.html#a83e89db1940f3190fbec5bd823a99fc5">rs_cl.rsh</a>
+</li>
+<li>convert_uchar2()
+: <a class="el" href="rs__cl_8rsh.html#a833bb5476683ec5692feaf0cd5dcdd80">rs_cl.rsh</a>
+</li>
+<li>convert_uint2()
+: <a class="el" href="rs__cl_8rsh.html#a01ff256469203ba33ba0f220b54e70d1">rs_cl.rsh</a>
+</li>
+<li>convert_ushort2()
+: <a class="el" href="rs__cl_8rsh.html#a6862ea6ddfba8a59796bc681a544fb4f">rs_cl.rsh</a>
 </li>
 <li>copysign()
 : <a class="el" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">rs_cl.rsh</a>
@@ -109,23 +137,23 @@
 : <a class="el" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">rs_cl.rsh</a>
 </li>
 <li>cospi()
-: <a class="el" href="rs__cl_8rsh.html#a07b12188bd53c6b584274892f6abf425">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a258d2c828fd46eae2867373884d834a9">rs_cl.rsh</a>
 </li>
 <li>cross()
-: <a class="el" href="rs__cl_8rsh.html#a0f7beb26bb4aa30535babd14492a7e90">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#add745d593bc2b23285bd10e52a204e25">rs_cl.rsh</a>
 </li>
 </ul>
 
 
 <h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
 <li>degrees()
-: <a class="el" href="rs__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">rs_cl.rsh</a>
 </li>
 <li>distance()
-: <a class="el" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a412bf215ae838c65079560bbefefaca7">rs_cl.rsh</a>
 </li>
 <li>dot()
-: <a class="el" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -141,7 +169,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">rs_cl.rsh</a>
 </li>
 <li>exp10()
-: <a class="el" href="rs__cl_8rsh.html#a4b51589157c9ce600ea6156be51d8d18">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a0225ff40d79f78260293e776c6a77422">rs_cl.rsh</a>
 </li>
 <li>exp2()
 : <a class="el" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">rs_cl.rsh</a>
@@ -156,6 +184,15 @@
 <li>fabs()
 : <a class="el" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">rs_cl.rsh</a>
 </li>
+<li>fast_distance()
+: <a class="el" href="rs__cl_8rsh.html#a4fcbdb9099e7d653a951cb344ba3c3c9">rs_cl.rsh</a>
+</li>
+<li>fast_length()
+: <a class="el" href="rs__cl_8rsh.html#a7c8f2f987044a360b5f616a80a74a4d5">rs_cl.rsh</a>
+</li>
+<li>fast_normalize()
+: <a class="el" href="rs__cl_8rsh.html#a3878bee2879351f518be68e015d76a35">rs_cl.rsh</a>
+</li>
 <li>fdim()
 : <a class="el" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">rs_cl.rsh</a>
 </li>
@@ -175,7 +212,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">rs_cl.rsh</a>
 </li>
 <li>fract()
-: <a class="el" href="rs__cl_8rsh.html#ac5277212e0df309a0a7c908424f7b14b">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">rs_cl.rsh</a>
 </li>
 <li>frexp()
 : <a class="el" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">rs_cl.rsh</a>
@@ -184,6 +221,15 @@
 
 
 <h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
+<li>half_recip()
+: <a class="el" href="rs__cl_8rsh.html#a49050a8e32c95f60df4eaba9d7dfdca6">rs_cl.rsh</a>
+</li>
+<li>half_rsqrt()
+: <a class="el" href="rs__cl_8rsh.html#a0925ceb22d33dcbb45914350ffa2edea">rs_cl.rsh</a>
+</li>
+<li>half_sqrt()
+: <a class="el" href="rs__cl_8rsh.html#a26e2c17b20ee4c98b78c365d390e4fb8">rs_cl.rsh</a>
+</li>
 <li>hypot()
 : <a class="el" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">rs_cl.rsh</a>
 </li>
@@ -202,7 +248,7 @@
 : <a class="el" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">rs_cl.rsh</a>
 </li>
 <li>length()
-: <a class="el" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">rs_cl.rsh</a>
 </li>
 <li>lgamma()
 : <a class="el" href="rs__cl_8rsh.html#a735f4e14e33c50348ef41220f9210bcc">rs_cl.rsh</a>
@@ -217,7 +263,7 @@
 : <a class="el" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">rs_cl.rsh</a>
 </li>
 <li>log2()
-: <a class="el" href="rs__cl_8rsh.html#a2fb571ae932f671ff3e9e97f2d3fabb7">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aab1c4f06daf6f2a50fd73f0c28929213">rs_cl.rsh</a>
 </li>
 <li>logb()
 : <a class="el" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">rs_cl.rsh</a>
@@ -229,8 +275,14 @@
 <li>mad()
 : <a class="el" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">rs_cl.rsh</a>
 </li>
+<li>max()
+: <a class="el" href="rs__cl_8rsh.html#a616bf7a90d8d3c73a48d2c395d9dc4ea">rs_cl.rsh</a>
+</li>
+<li>min()
+: <a class="el" href="rs__cl_8rsh.html#a5f61ca44b3ad4b11365b0c4137a22658">rs_cl.rsh</a>
+</li>
 <li>mix()
-: <a class="el" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">rs_cl.rsh</a>
 </li>
 <li>modf()
 : <a class="el" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">rs_cl.rsh</a>
@@ -239,11 +291,20 @@
 
 
 <h3><a class="anchor" id="index_n"></a>- n -</h3><ul>
+<li>native_exp()
+: <a class="el" href="rs__cl_8rsh.html#a45d8176823a05b891313f3d96decf491">rs_cl.rsh</a>
+</li>
+<li>native_exp10()
+: <a class="el" href="rs__cl_8rsh.html#a601ee3d2bf769f1cdc39a886f7a6c986">rs_cl.rsh</a>
+</li>
+<li>native_exp2()
+: <a class="el" href="rs__cl_8rsh.html#ab354691ecd844549b27ef9202e17f7ac">rs_cl.rsh</a>
+</li>
 <li>nextafter()
 : <a class="el" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">rs_cl.rsh</a>
 </li>
 <li>normalize()
-: <a class="el" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a69c2a56f743593439d5ae5e3ec8e517f">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -253,17 +314,17 @@
 : <a class="el" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">rs_cl.rsh</a>
 </li>
 <li>pown()
-: <a class="el" href="rs__cl_8rsh.html#afd46205452017b741abb2e17fc28557d">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a67d1fe795e092003f687f3cc6d3c407a">rs_cl.rsh</a>
 </li>
 <li>powr()
-: <a class="el" href="rs__cl_8rsh.html#a3ff65421721ec8e6ce8d875a563d005f">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a316c30ba3e6bc11673bfd34bb4746d24">rs_cl.rsh</a>
 </li>
 </ul>
 
 
 <h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
 <li>radians()
-: <a class="el" href="rs__cl_8rsh.html#aaef2526c4d190ba6f7301b4e810917a7">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aceb63a0da6393b8ac2ed229bae6232d6">rs_cl.rsh</a>
 </li>
 <li>remainder()
 : <a class="el" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">rs_cl.rsh</a>
@@ -272,11 +333,17 @@
 : <a class="el" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rs_cl.rsh</a>
 </li>
 <li>rootn()
-: <a class="el" href="rs__cl_8rsh.html#af169e7e1c575b7c24c1834569223077f">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a2776b517528b8185a6bb50753af0f6cf">rs_cl.rsh</a>
 </li>
 <li>round()
 : <a class="el" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">rs_cl.rsh</a>
 </li>
+<li>rsAllocationCopy1DRange()
+: <a class="el" href="rs__allocation_8rsh.html#a3a1098a3ea3a5106955dd4398b8904e1">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationCopy2DRange()
+: <a class="el" href="rs__allocation_8rsh.html#a7f7e2369b3ed7d7db31729b6db7ba07e">rs_allocation.rsh</a>
+</li>
 <li>rsAllocationGetDimFaces()
 : <a class="el" href="rs__allocation_8rsh.html#ac85f7ed88f38b35482c6d63b56d470fe">rs_allocation.rsh</a>
 </li>
@@ -292,75 +359,93 @@
 <li>rsAllocationGetDimZ()
 : <a class="el" href="rs__allocation_8rsh.html#acd6f1a2b2443e6ea39e6154577645d2c">rs_allocation.rsh</a>
 </li>
+<li>rsAllocationGetElement()
+: <a class="el" href="rs__allocation_8rsh.html#a6a3b6512bc269f6b369bdc54d12a45ff">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationIoReceive()
+: <a class="el" href="rs__allocation_8rsh.html#a05f7391230a92d239fdb619d791162b5">rs_allocation.rsh</a>
+</li>
+<li>rsAllocationIoSend()
+: <a class="el" href="rs__allocation_8rsh.html#afe9ebb2f89c6366c59f5e05ee4849c0a">rs_allocation.rsh</a>
+</li>
+<li>rsAtomicAdd()
+: <a class="el" href="rs__atomic_8rsh.html#ab46665eff81030200f86db9c2181072a">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicAnd()
+: <a class="el" href="rs__atomic_8rsh.html#a7fdf5633662dd5b0898ad5a149e3c8ad">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicCas()
+: <a class="el" href="rs__atomic_8rsh.html#a205d66a8eb29eee8968f886e488b4402">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicDec()
+: <a class="el" href="rs__atomic_8rsh.html#a16a69784a343d7c11bf6bd7fec9686ca">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicInc()
+: <a class="el" href="rs__atomic_8rsh.html#a619e7a489500a650569a76ccd93e105f">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicMax()
+: <a class="el" href="rs__atomic_8rsh.html#a1d49d69d14956152fcde34efe9cdff87">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicMin()
+: <a class="el" href="rs__atomic_8rsh.html#a9f3cddc86f1075ca194a762fb8a3330a">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicOr()
+: <a class="el" href="rs__atomic_8rsh.html#a477f6eb17c4806bb715bfd975b6369cd">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicSub()
+: <a class="el" href="rs__atomic_8rsh.html#a800dced6abbf09716391f35bc488900b">rs_atomic.rsh</a>
+</li>
+<li>rsAtomicXor()
+: <a class="el" href="rs__atomic_8rsh.html#a5590505ea65c53b3bb26fa48a6b9c313">rs_atomic.rsh</a>
+</li>
 <li>rsClamp()
-: <a class="el" href="rs__math_8rsh.html#ae31137028793c4aaf4df839535135837">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rs_math.rsh</a>
 </li>
 <li>rsClearObject()
 : <a class="el" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rs_object.rsh</a>
 </li>
 <li>rsDebug()
-: <a class="el" href="rs__debug_8rsh.html#a6bb20c16c9fcc613158ca8c6f0dd81bd">rs_debug.rsh</a>
+: <a class="el" href="rs__debug_8rsh.html#aa75aa9faf7646ceeafeb19279416e9e8">rs_debug.rsh</a>
+</li>
+<li>rsElementGetBytesSize()
+: <a class="el" href="rs__element_8rsh.html#ac54592168af5896d3fba5283af286f98">rs_element.rsh</a>
+</li>
+<li>rsElementGetDataKind()
+: <a class="el" href="rs__element_8rsh.html#af072702a530e158093d69353072da5f9">rs_element.rsh</a>
+</li>
+<li>rsElementGetDataType()
+: <a class="el" href="rs__element_8rsh.html#a9a3569d242be363517ea2354d98cf382">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElement()
+: <a class="el" href="rs__element_8rsh.html#a8c690bce7d32be759fd787740c270c92">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementArraySize()
+: <a class="el" href="rs__element_8rsh.html#a9c3140c18139db451279d9b221808eee">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementCount()
+: <a class="el" href="rs__element_8rsh.html#a2ecab064ea2b720bc3af27b523388f31">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementName()
+: <a class="el" href="rs__element_8rsh.html#a3c1446166c43aa6ba3d5359f6c982f02">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementNameLength()
+: <a class="el" href="rs__element_8rsh.html#a94834eb1d91b50a5df3cbe161c22e37d">rs_element.rsh</a>
+</li>
+<li>rsElementGetSubElementOffsetBytes()
+: <a class="el" href="rs__element_8rsh.html#a840d53f1e91bb6887b40a4d8983c53ed">rs_element.rsh</a>
+</li>
+<li>rsElementGetVectorSize()
+: <a class="el" href="rs__element_8rsh.html#a727997de25ae43c07dffcfd484928d53">rs_element.rsh</a>
 </li>
 <li>rsExtractFrustumPlanes()
 : <a class="el" href="rs__math_8rsh.html#a191f9c687c56322c18b7d71491602122">rs_math.rsh</a>
 </li>
 <li>rsForEach()
-: <a class="el" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rs_core.rsh</a>
+: <a class="el" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rs_core.rsh</a>
 </li>
 <li>rsFrac()
 : <a class="el" href="rs__math_8rsh.html#ac4f127e78da0849321c7f6db14f9e989">rs_math.rsh</a>
 </li>
-<li>rsgAllocationSyncAll()
-: <a class="el" href="rs__graphics_8rsh.html#a647228d8e15da6ad67a97701d920dcac">rs_graphics.rsh</a>
-</li>
-<li>rsgBindConstant()
-: <a class="el" href="rs__graphics_8rsh.html#a46208900d16287fde91a5d14ebc830dc">rs_graphics.rsh</a>
-</li>
-<li>rsgBindFont()
-: <a class="el" href="rs__graphics_8rsh.html#ae89effef281e92e2940055883ea366d4">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramFragment()
-: <a class="el" href="rs__graphics_8rsh.html#a9f8deb600729a83c39c5bcaba2152b9c">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramRaster()
-: <a class="el" href="rs__graphics_8rsh.html#a391eb5535544f6312c724b910da6ec35">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramStore()
-: <a class="el" href="rs__graphics_8rsh.html#a34dfa6eddd7454fc1865222c5a022315">rs_graphics.rsh</a>
-</li>
-<li>rsgBindProgramVertex()
-: <a class="el" href="rs__graphics_8rsh.html#a894e26d0d05d3ef99be65ddf98dd901c">rs_graphics.rsh</a>
-</li>
-<li>rsgBindSampler()
-: <a class="el" href="rs__graphics_8rsh.html#a4ade6c5acbf6acaa1c29a1aecc6e87d3">rs_graphics.rsh</a>
-</li>
-<li>rsgBindTexture()
-: <a class="el" href="rs__graphics_8rsh.html#a1694eb5489bd3a444da921dbf16aeeb5">rs_graphics.rsh</a>
-</li>
-<li>rsgClearColor()
-: <a class="el" href="rs__graphics_8rsh.html#a147674fed92745fbb5c64a6300ca3c49">rs_graphics.rsh</a>
-</li>
-<li>rsgClearDepth()
-: <a class="el" href="rs__graphics_8rsh.html#a4bedb06e8facd587e3eacd746fe3e727">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawMesh()
-: <a class="el" href="rs__graphics_8rsh.html#a6f8b87c994810908fbe5e01f8f63f9af">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawQuad()
-: <a class="el" href="rs__graphics_8rsh.html#ad6953da0349e58547b08b8ce174ed3fc">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawQuadTexCoords()
-: <a class="el" href="rs__graphics_8rsh.html#afb98a59bb9f878f0a09459567c269e64">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawRect()
-: <a class="el" href="rs__graphics_8rsh.html#a80c51849bf12ec6c699c23c3fa3e6208">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawSpriteScreenspace()
-: <a class="el" href="rs__graphics_8rsh.html#a07d15127330fa1dff6c99b0d7d14e65e">rs_graphics.rsh</a>
-</li>
-<li>rsgDrawText()
-: <a class="el" href="rs__graphics_8rsh.html#afaec82492762e62cad1ff53ada479b14">rs_graphics.rsh</a>
-</li>
 <li>rsGetAllocation()
 : <a class="el" href="rs__allocation_8rsh.html#aadad7654929c451be299df125061c9ba">rs_allocation.rsh</a>
 </li>
@@ -368,40 +453,67 @@
 : <a class="el" href="rs__time_8rsh.html#adea2682186fd903752431ad848bd8bf4">rs_time.rsh</a>
 </li>
 <li>rsGetElementAt()
-: <a class="el" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rs_allocation.rsh</a>
+: <a class="el" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rs_allocation.rsh</a>
 </li>
-<li>rsgFontColor()
-: <a class="el" href="rs__graphics_8rsh.html#abda8c344092ed6310c7a8f353a6df876">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_U()
+: <a class="el" href="rs__allocation_8rsh.html#a41f61be02113ee22c039ea51fdedb20e">rs_allocation.rsh</a>
 </li>
-<li>rsgGetHeight()
-: <a class="el" href="rs__graphics_8rsh.html#a7e6565cd5d5e44f442a8bf8ba68f4681">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_V()
+: <a class="el" href="rs__allocation_8rsh.html#af03cadb582fa80bbf7f39177d96df17e">rs_allocation.rsh</a>
 </li>
-<li>rsgGetWidth()
-: <a class="el" href="rs__graphics_8rsh.html#a67f4ed1ca4bba27d5c952ada89cd0717">rs_graphics.rsh</a>
+<li>rsGetElementAtYuv_uchar_Y()
+: <a class="el" href="rs__allocation_8rsh.html#ad7ffa1aa16511a75b4bc2c05bd0e0a75">rs_allocation.rsh</a>
 </li>
-<li>rsgMeasureText()
-: <a class="el" href="rs__graphics_8rsh.html#a5c599f4ea989f3d0616cbf8e983688c4">rs_graphics.rsh</a>
+<li>rsgMeshGetIndexAllocation()
+: <a class="el" href="rs__mesh_8rsh.html#a05257c9252e7804397d6a6f7549bae5a">rs_mesh.rsh</a>
 </li>
-<li>rsgMeshComputeBoundingBox()
-: <a class="el" href="rs__graphics_8rsh.html#a0978c54902dd1d60180f8dbb0b781105">rs_graphics.rsh</a>
+<li>rsgMeshGetPrimitive()
+: <a class="el" href="rs__mesh_8rsh.html#af467f1c21cc9221071334f8234c29466">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramFragmentConstantColor()
-: <a class="el" href="rs__graphics_8rsh.html#a35ac8c3759e25047e6a458c15520c887">rs_graphics.rsh</a>
+<li>rsgMeshGetPrimitiveCount()
+: <a class="el" href="rs__mesh_8rsh.html#ae0a0178cc02508517013486be4500d7f">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexGetProjectionMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a2b767d209b36ffcd2e0fc0cf6f4c5706">rs_graphics.rsh</a>
+<li>rsgMeshGetVertexAllocation()
+: <a class="el" href="rs__mesh_8rsh.html#a43e1d84147176cb0a1659552fa8da49f">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexLoadModelMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a976b8594cccb4b94d7ce520b44d884e3">rs_graphics.rsh</a>
+<li>rsgMeshGetVertexAllocationCount()
+: <a class="el" href="rs__mesh_8rsh.html#a7578d6d93154ac881715ab511449fab9">rs_mesh.rsh</a>
 </li>
-<li>rsgProgramVertexLoadProjectionMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a83a87d8efa3f26ed3f8fb25e49f29059">rs_graphics.rsh</a>
+<li>rsgProgramRasterGetCullMode()
+: <a class="el" href="rs__program_8rsh.html#a633d6dbdec98ef89c2b70c92ea707502">rs_program.rsh</a>
 </li>
-<li>rsgProgramVertexLoadTextureMatrix()
-: <a class="el" href="rs__graphics_8rsh.html#a377b7b394c4bf0881532b1241d4be168">rs_graphics.rsh</a>
+<li>rsgProgramRasterIsPointSpriteEnabled()
+: <a class="el" href="rs__program_8rsh.html#a86aeccd846ed2cd2c9498ab57e2535f3">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetBlendDstFunc()
+: <a class="el" href="rs__program_8rsh.html#a0ad38d595e35712f24c384ef20b69025">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetBlendSrcFunc()
+: <a class="el" href="rs__program_8rsh.html#afb38256c5804cdb9b410419c43ce03ab">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreGetDepthFunc()
+: <a class="el" href="rs__program_8rsh.html#a6a9c06c54d230f61edc0667a091aac77">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskAlphaEnabled()
+: <a class="el" href="rs__program_8rsh.html#ab038edb7399044a3ea96ebb17d7b6601">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskBlueEnabled()
+: <a class="el" href="rs__program_8rsh.html#a279ad1b4611aca268053337f6719a22c">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskGreenEnabled()
+: <a class="el" href="rs__program_8rsh.html#a1a57f706bc42ce49b545021c8403964c">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsColorMaskRedEnabled()
+: <a class="el" href="rs__program_8rsh.html#a4a50df1d2495567536dd6f394d38ee5d">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsDepthMaskEnabled()
+: <a class="el" href="rs__program_8rsh.html#afa27fa6103c9e29f5e098e2d99663f0b">rs_program.rsh</a>
+</li>
+<li>rsgProgramStoreIsDitherEnabled()
+: <a class="el" href="rs__program_8rsh.html#abe7c55547a72dd291e0996de050bb749">rs_program.rsh</a>
 </li>
 <li>rsIsObject()
-: <a class="el" href="rs__object_8rsh.html#ac1d6da920f12974b3633d25ed078da2d">rs_object.rsh</a>
+: <a class="el" href="rs__object_8rsh.html#a547cd0a8071d895139893f1e10f5c3fd">rs_object.rsh</a>
 </li>
 <li>rsIsSphereInFrustum()
 : <a class="el" href="rs__math_8rsh.html#a7bbeaf44838e08e68d5cf3e3d7b0818c">rs_math.rsh</a>
@@ -410,7 +522,7 @@
 : <a class="el" href="rs__time_8rsh.html#a08a8fcadae964f7416aef487da624110">rs_time.rsh</a>
 </li>
 <li>rsMatrixGet()
-: <a class="el" href="rs__matrix_8rsh.html#af1fb87eb02f166bb85ef10a92333bb49">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#ad485084684991796cffdd8a008557569">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixInverse()
 : <a class="el" href="rs__matrix_8rsh.html#a00b6a334ba5ac94d84850f22ec9f4de5">rs_matrix.rsh</a>
@@ -419,7 +531,7 @@
 : <a class="el" href="rs__matrix_8rsh.html#ac05080d52da2d99a759ef34fa0655e82">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoad()
-: <a class="el" href="rs__matrix_8rsh.html#a06176acb38405937cb94c835a712a3b3">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a5f3697805c794c9c9f2f8cfdde4b9a44">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixLoadFrustum()
 : <a class="el" href="rs__matrix_8rsh.html#ad25760aaf01e95d0055237afab41bbb3">rs_matrix.rsh</a>
@@ -446,7 +558,7 @@
 : <a class="el" href="rs__matrix_8rsh.html#a1b521c8a3d1260fa732cbf0a71af0e74">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixMultiply()
-: <a class="el" href="rs__matrix_8rsh.html#a97953ab2606900a839e5816c619abe66">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#ab1973ad3efa0ab2d53f466dd9fb190bb">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixRotate()
 : <a class="el" href="rs__matrix_8rsh.html#ad5ed05ca4880397fb29615e3c6798de1">rs_matrix.rsh</a>
@@ -455,19 +567,19 @@
 : <a class="el" href="rs__matrix_8rsh.html#a94cc6b22bd1a6c07a9a1c1d21afb392c">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixSet()
-: <a class="el" href="rs__matrix_8rsh.html#ada106cb8f08e4b23930d7ba1a0ce5609">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#ad6ea242218e0f1a031f754df0317e6e7">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixTranslate()
 : <a class="el" href="rs__matrix_8rsh.html#a4df5f9b5bb6044f3c3426f2f58b94405">rs_matrix.rsh</a>
 </li>
 <li>rsMatrixTranspose()
-: <a class="el" href="rs__matrix_8rsh.html#ac52acb31a705f6c68af8bddea0e79969">rs_matrix.rsh</a>
+: <a class="el" href="rs__matrix_8rsh.html#a49164dd4d4e85b212196028b1fd89dc1">rs_matrix.rsh</a>
 </li>
 <li>rsPackColorTo8888()
-: <a class="el" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a1f1107cf778cf1f614edfb5b8ac436a0">rs_math.rsh</a>
 </li>
 <li>rsqrt()
-: <a class="el" href="rs__cl_8rsh.html#a5db00fde9e6bff693a38f3a37e7a1f70">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a8a3992b97cb199b1c8d598996b600988">rs_cl.rsh</a>
 </li>
 <li>rsQuaternionAdd()
 : <a class="el" href="rs__quaternion_8rsh.html#a5e6e493b9917336b0d9118fdd4e91444">rs_quaternion.rsh</a>
@@ -488,19 +600,37 @@
 : <a class="el" href="rs__quaternion_8rsh.html#aa72a43cf3d7b5924de1ddfaa5766db09">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionMultiply()
-: <a class="el" href="rs__quaternion_8rsh.html#a4f3d214912facf72f6a6d57e95aa3c3b">rs_quaternion.rsh</a>
+: <a class="el" href="rs__quaternion_8rsh.html#a8bbbb286a2e2cb71b416c053f44844c3">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionNormalize()
 : <a class="el" href="rs__quaternion_8rsh.html#abb31aad2416044ad5bbf44ee7c838e2a">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionSet()
-: <a class="el" href="rs__quaternion_8rsh.html#a249782133e54f13a8096d1fbe295714d">rs_quaternion.rsh</a>
+: <a class="el" href="rs__quaternion_8rsh.html#a5ff868dbc33e710a666a102fdcc6670a">rs_quaternion.rsh</a>
 </li>
 <li>rsQuaternionSlerp()
 : <a class="el" href="rs__quaternion_8rsh.html#a7da94a30e287cbb8148771a5cd768dbd">rs_quaternion.rsh</a>
 </li>
 <li>rsRand()
-: <a class="el" href="rs__math_8rsh.html#ad9106e5aae5b1248870f21061f36a1c9">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a03e898d810ac44158e7461b2b2b1c356">rs_math.rsh</a>
+</li>
+<li>rsSample()
+: <a class="el" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rs_allocation.rsh</a>
+</li>
+<li>rsSamplerGetAnisotropy()
+: <a class="el" href="rs__sampler_8rsh.html#ab1e79984609469604cba8e2b76a98844">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetMagnification()
+: <a class="el" href="rs__sampler_8rsh.html#a5bddb73826cd20a79c31f012a4637e83">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetMinification()
+: <a class="el" href="rs__sampler_8rsh.html#acb1bec2c3d1edd752dd60499c8db58a4">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetWrapS()
+: <a class="el" href="rs__sampler_8rsh.html#a68a7ab6724019c6e72fae8eb45aa48dd">rs_sampler.rsh</a>
+</li>
+<li>rsSamplerGetWrapT()
+: <a class="el" href="rs__sampler_8rsh.html#ab6b25d3b9afa16f418e2dee78ebb4a75">rs_sampler.rsh</a>
 </li>
 <li>rsSendToClient()
 : <a class="el" href="rs__core_8rsh.html#a91cfbca99f87ef144bea2cdf1e8473ca">rs_core.rsh</a>
@@ -508,6 +638,9 @@
 <li>rsSendToClientBlocking()
 : <a class="el" href="rs__core_8rsh.html#afc93b00be08f58512a6ab6a87feb9515">rs_core.rsh</a>
 </li>
+<li>rsSetElementAt()
+: <a class="el" href="rs__allocation_8rsh.html#a351627f335b9a091a5152db7ac9134dc">rs_allocation.rsh</a>
+</li>
 <li>rsSetObject()
 : <a class="el" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rs_object.rsh</a>
 </li>
@@ -515,7 +648,7 @@
 : <a class="el" href="rs__time_8rsh.html#a555f9324acb8c3d0c6f09a1d05478ce2">rs_time.rsh</a>
 </li>
 <li>rsUnpackColor8888()
-: <a class="el" href="rs__math_8rsh.html#a26525a4f5093bd0f13191efe06127f4b">rs_math.rsh</a>
+: <a class="el" href="rs__math_8rsh.html#a48bb0c2e7b1f2b62b2a8970c7d709eca">rs_math.rsh</a>
 </li>
 <li>rsUptimeMillis()
 : <a class="el" href="rs__time_8rsh.html#a3c406e51a769718dd1c760518b9cad44">rs_time.rsh</a>
@@ -528,25 +661,25 @@
 
 <h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
 <li>sign()
-: <a class="el" href="rs__cl_8rsh.html#a3e6d477a06dec7070f073eec9d8f420c">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9fe423cc7d4c6d767f8a608d2ee76657">rs_cl.rsh</a>
 </li>
 <li>sin()
 : <a class="el" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">rs_cl.rsh</a>
 </li>
 <li>sincos()
-: <a class="el" href="rs__cl_8rsh.html#a240f7c7c20b432a30dc660b5dd4cd320">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a892c91a30bbc713aa77105d8e9e25881">rs_cl.rsh</a>
 </li>
 <li>sinh()
 : <a class="el" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">rs_cl.rsh</a>
 </li>
 <li>sinpi()
-: <a class="el" href="rs__cl_8rsh.html#a4fe4fef049786e888526d6f37b912b0a">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9ca027af0acf3ff22d91cd9489766976">rs_cl.rsh</a>
 </li>
 <li>sqrt()
 : <a class="el" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">rs_cl.rsh</a>
 </li>
 <li>step()
-: <a class="el" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">rs_cl.rsh</a>
 </li>
 </ul>
 
@@ -559,7 +692,7 @@
 : <a class="el" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">rs_cl.rsh</a>
 </li>
 <li>tanpi()
-: <a class="el" href="rs__cl_8rsh.html#ad8bfb083dd3979a305e594a0d6e581c4">rs_cl.rsh</a>
+: <a class="el" href="rs__cl_8rsh.html#aee96c8910a7d8b0082574813b6b68b9a">rs_cl.rsh</a>
 </li>
 <li>tgamma()
 : <a class="el" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">rs_cl.rsh</a>
diff --git a/docs/html/reference/renderscript/globals_type.html b/docs/html/reference/renderscript/globals_type.html
index 238a6c4..1d1ffd7 100644
--- a/docs/html/reference/renderscript/globals_type.html
+++ b/docs/html/reference/renderscript/globals_type.html
@@ -28,6 +28,7 @@
       <li><a href="globals_func.html"><span>Functions</span></a></li>
       <li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
       <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+      <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
     </ul>
   </div>
   <div id="navrow4" class="tabs3">
diff --git a/docs/html/reference/renderscript/index.html b/docs/html/reference/renderscript/index.html
index 212f000..2e3a449 100644
--- a/docs/html/reference/renderscript/index.html
+++ b/docs/html/reference/renderscript/index.html
@@ -24,9 +24,8 @@
   </div>
 </div>
 <div class="contents">
-<div class="textblock"><p>Renderscript is a high-performance runtime that provides graphics rendering and compute operations at the native level. Renderscript code is compiled on devices at runtime to allow platform-independence as well. This reference documentation describes the Renderscript runtime APIs, which you can utilize to write Renderscript code in C99. The Renderscript header files are automatically included for you.</p>
-<p>To use Renderscript, you need to utilize the Renderscript runtime APIs documented here as well as the Android framework APIs for Renderscript. For documentation on the Android framework APIs, see the <a href="http://developer.android.com/reference/android/renderscript/package-summary.html" target="_parent">android.renderscript</a> package reference.</p>
-<p>For more information on how to develop with Renderscript and how the runtime and Android framework APIs interact, see the <a href="http://developer.android.com/guide/topics/renderscript/index.html" target="_parent">Renderscript developer guide</a> and the Renderscript SDK samples. </p>
+<div class="textblock"><p>RenderScript is a high-performance runtime that provides compute operations at the native level. RenderScript code is compiled on devices at runtime to allow platform-independence as well. This reference documentation describes the RenderScript runtime APIs, which you can utilize to write RenderScript code in C99. The RenderScript compute header files are automatically included for you.</p>
+<p>To use RenderScript, you need to utilize the RenderScript runtime APIs documented here as well as the Android framework APIs for RenderScript. For documentation on the Android framework APIs, see the <a href="http://developer.android.com/reference/android/renderscript/package-summary.html" target="_parent">android.renderscript</a> package reference. For more information on how to develop with RenderScript and how the runtime and Android framework APIs interact, see the <a href="http://developer.android.com/guide/topics/renderscript/index.html" target="_parent">RenderScript developer guide</a> and the <a href="http://developer.android.com/resources/samples/RenderScript/index.html" target="_parent">RenderScript samples</a>. </p>
 </div></div>
 
 </body>
diff --git a/docs/html/reference/renderscript/rs__allocation_8rsh.html b/docs/html/reference/renderscript/rs__allocation_8rsh.html
index 9dd06d3..31736a6 100644
--- a/docs/html/reference/renderscript/rs__allocation_8rsh.html
+++ b/docs/html/reference/renderscript/rs__allocation_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_allocation.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,7 +27,7 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_allocation.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
@@ -39,15 +39,202 @@
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#acd6f1a2b2443e6ea39e6154577645d2c">rsAllocationGetDimZ</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#ac42a07c079d6b3c6bb21975170d4e11c">rsAllocationGetDimLOD</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#ac85f7ed88f38b35482c6d63b56d470fe">rsAllocationGetDimFaces</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a7e0a1753a930557f6dc87f25ed3fd23b">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a049ba2f6e6e18d47f2267474b2092822">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a>, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> z)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a3a1098a3ea3a5106955dd4398b8904e1">rsAllocationCopy1DRange</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> dstAlloc, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstOff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> count, <a class="el" href="structrs__allocation.html">rs_allocation</a> srcAlloc, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcOff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a7f7e2369b3ed7d7db31729b6db7ba07e">rsAllocationCopy2DRange</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> dstAlloc, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstXoff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstYoff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip, <a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_allocation_cubemap_face</a> dstFace, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> width, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> height, <a class="el" href="structrs__allocation.html">rs_allocation</a> srcAlloc, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcXoff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcYoff, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip, <a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_allocation_cubemap_face</a> srcFace)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#aea4f2338fb36faf73021ff7179fa5930">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a4256e51301797517cafd5474d7d4b26f">rsGetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> z)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#afe9ebb2f89c6366c59f5e05ee4849c0a">rsAllocationIoSend</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a05f7391230a92d239fdb619d791162b5">rsAllocationIoReceive</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a6a3b6512bc269f6b369bdc54d12a45ff">rsAllocationGetElement</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rsSample</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="structrs__sampler.html">rs_sampler</a> s, float location)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#aa9574fd5f1655f6e74b4872aace618bf">rsSample</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="structrs__sampler.html">rs_sampler</a> s, float location, float lod)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a36ef1e609e360a9a5a5ff5dce13b5100">rsSetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, void *ptr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a351627f335b9a091a5152db7ac9134dc">rsSetElementAt</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, void *ptr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#ad7ffa1aa16511a75b4bc2c05bd0e0a75">rsGetElementAtYuv_uchar_Y</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#a41f61be02113ee22c039ea51fdedb20e">rsGetElementAtYuv_uchar_U</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__allocation_8rsh.html#af03cadb582fa80bbf7f39177d96df17e">rsGetElementAtYuv_uchar_V</a> (<a class="el" href="structrs__allocation.html">rs_allocation</a> a, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Allocation routines. </p>
 
 <p>Definition in file <a class="el" href="rs__allocation_8rsh_source.html">rs_allocation.rsh</a>.</p>
 </div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a3a1098a3ea3a5106955dd4398b8904e1"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationCopy1DRange" ref="a3a1098a3ea3a5106955dd4398b8904e1" args="(rs_allocation dstAlloc, uint32_t dstOff, uint32_t dstMip, uint32_t count, rs_allocation srcAlloc, uint32_t srcOff, uint32_t srcMip)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsAllocationCopy1DRange </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>dstAlloc</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>dstOff</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>dstMip</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>count</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>srcAlloc</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>srcOff</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>srcMip</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Copy part of an allocation from another allocation.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">dstAlloc</td><td>Allocation to copy data into. </td></tr>
+    <tr><td class="paramname">dstOff</td><td>The offset of the first element to be copied in the destination allocation. </td></tr>
+    <tr><td class="paramname">dstMip</td><td>Mip level in the destination allocation. </td></tr>
+    <tr><td class="paramname">count</td><td>The number of elements to be copied. </td></tr>
+    <tr><td class="paramname">srcAlloc</td><td>The source data allocation. </td></tr>
+    <tr><td class="paramname">srcOff</td><td>The offset of the first element in data to be copied in the source allocation. </td></tr>
+    <tr><td class="paramname">srcMip</td><td>Mip level in the source allocation. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a7f7e2369b3ed7d7db31729b6db7ba07e"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationCopy2DRange" ref="a7f7e2369b3ed7d7db31729b6db7ba07e" args="(rs_allocation dstAlloc, uint32_t dstXoff, uint32_t dstYoff, uint32_t dstMip, rs_allocation_cubemap_face dstFace, uint32_t width, uint32_t height, rs_allocation srcAlloc, uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip, rs_allocation_cubemap_face srcFace)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsAllocationCopy2DRange </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>dstAlloc</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>dstXoff</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>dstYoff</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>dstMip</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_allocation_cubemap_face</a>&#160;</td>
+          <td class="paramname"><em>dstFace</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>width</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>height</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>srcAlloc</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>srcXoff</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>srcYoff</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>srcMip</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_allocation_cubemap_face</a>&#160;</td>
+          <td class="paramname"><em>srcFace</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Copy a rectangular region into the allocation from another allocation.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">dstAlloc</td><td>allocation to copy data into. </td></tr>
+    <tr><td class="paramname">dstXoff</td><td>X offset of the region to update in the destination allocation. </td></tr>
+    <tr><td class="paramname">dstYoff</td><td>Y offset of the region to update in the destination allocation. </td></tr>
+    <tr><td class="paramname">dstMip</td><td>Mip level in the destination allocation. </td></tr>
+    <tr><td class="paramname">dstFace</td><td>Cubemap face of the destination allocation, ignored for allocations that aren't cubemaps. </td></tr>
+    <tr><td class="paramname">width</td><td>Width of the incoming region to update. </td></tr>
+    <tr><td class="paramname">height</td><td>Height of the incoming region to update. </td></tr>
+    <tr><td class="paramname">srcAlloc</td><td>The source data allocation. </td></tr>
+    <tr><td class="paramname">srcXoff</td><td>X offset in data of the source allocation. </td></tr>
+    <tr><td class="paramname">srcYoff</td><td>Y offset in data of the source allocation. </td></tr>
+    <tr><td class="paramname">srcMip</td><td>Mip level in the source allocation. </td></tr>
+    <tr><td class="paramname">srcFace</td><td>Cubemap face of the source allocation, ignored for allocations that aren't cubemaps. </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
 <a class="anchor" id="ac85f7ed88f38b35482c6d63b56d470fe"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationGetDimFaces" ref="ac85f7ed88f38b35482c6d63b56d470fe" args="(rs_allocation)" -->
 <div class="memitem">
 <div class="memproto">
@@ -143,6 +330,79 @@
 
 </div>
 </div>
+<a class="anchor" id="a6a3b6512bc269f6b369bdc54d12a45ff"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationGetElement" ref="a6a3b6512bc269f6b369bdc54d12a45ff" args="(rs_allocation a)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structrs__element.html">rs_element</a> rsAllocationGetElement </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get the element object describing the allocation's layout </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>allocation to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>element describing allocation layout </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a05f7391230a92d239fdb619d791162b5"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationIoReceive" ref="a05f7391230a92d239fdb619d791162b5" args="(rs_allocation a)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const void rsAllocationIoReceive </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Receive a new set of contents from the queue. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>allocation to work on </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="afe9ebb2f89c6366c59f5e05ee4849c0a"></a><!-- doxytag: member="rs_allocation.rsh::rsAllocationIoSend" ref="afe9ebb2f89c6366c59f5e05ee4849c0a" args="(rs_allocation a)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const void rsAllocationIoSend </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Send the contents of the Allocation to the queue. </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>allocation to work on </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
 <a class="anchor" id="aadad7654929c451be299df125061c9ba"></a><!-- doxytag: member="rs_allocation.rsh::rsGetAllocation" ref="aadad7654929c451be299df125061c9ba" args="(const void *)" -->
 <div class="memitem">
 <div class="memproto">
@@ -157,11 +417,12 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation. </p>
+<p>Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation.</p>
+<p>This function is deprecated and will be removed in the SDK from a future release. </p>
 
 </div>
 </div>
-<a class="anchor" id="a3fd30b4388748601e025bb3566ce0cbc"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="a3fd30b4388748601e025bb3566ce0cbc" args="(rs_allocation, uint32_t x)" -->
+<a class="anchor" id="a56157b6ddef754b36833ca1f8e66aec2"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="a56157b6ddef754b36833ca1f8e66aec2" args="(rs_allocation a, uint32_t x)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
@@ -169,7 +430,7 @@
           <td class="memname">const void* rsGetElementAt </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
-          <td class="paramname">, </td>
+          <td class="paramname"><em>a</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -189,7 +450,7 @@
 
 </div>
 </div>
-<a class="anchor" id="a7e0a1753a930557f6dc87f25ed3fd23b"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="a7e0a1753a930557f6dc87f25ed3fd23b" args="(rs_allocation, uint32_t x, uint32_t y)" -->
+<a class="anchor" id="aea4f2338fb36faf73021ff7179fa5930"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="aea4f2338fb36faf73021ff7179fa5930" args="(rs_allocation a, uint32_t x, uint32_t y)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
@@ -197,7 +458,7 @@
           <td class="memname">const void* rsGetElementAt </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
-          <td class="paramname">, </td>
+          <td class="paramname"><em>a</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -223,7 +484,7 @@
 
 </div>
 </div>
-<a class="anchor" id="a049ba2f6e6e18d47f2267474b2092822"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="a049ba2f6e6e18d47f2267474b2092822" args="(rs_allocation, uint32_t x, uint32_t y, uint32_t z)" -->
+<a class="anchor" id="a4256e51301797517cafd5474d7d4b26f"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAt" ref="a4256e51301797517cafd5474d7d4b26f" args="(rs_allocation a, uint32_t x, uint32_t y, uint32_t z)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
@@ -231,7 +492,7 @@
           <td class="memname">const void* rsGetElementAt </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
-          <td class="paramname">, </td>
+          <td class="paramname"><em>a</em>, </td>
         </tr>
         <tr>
           <td class="paramkey"></td>
@@ -263,6 +524,294 @@
 
 </div>
 </div>
+<a class="anchor" id="a41f61be02113ee22c039ea51fdedb20e"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAtYuv_uchar_U" ref="a41f61be02113ee22c039ea51fdedb20e" args="(rs_allocation a, uint32_t x, uint32_t y)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsGetElementAtYuv_uchar_U </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</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>x</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>y</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Extract a single element from an allocation.</p>
+<p>Coordinates are in the dimensions of the Y plane </p>
+
+</div>
+</div>
+<a class="anchor" id="af03cadb582fa80bbf7f39177d96df17e"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAtYuv_uchar_V" ref="af03cadb582fa80bbf7f39177d96df17e" args="(rs_allocation a, uint32_t x, uint32_t y)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsGetElementAtYuv_uchar_V </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</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>x</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>y</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Extract a single element from an allocation.</p>
+<p>Coordinates are in the dimensions of the Y plane </p>
+
+</div>
+</div>
+<a class="anchor" id="ad7ffa1aa16511a75b4bc2c05bd0e0a75"></a><!-- doxytag: member="rs_allocation.rsh::rsGetElementAtYuv_uchar_Y" ref="ad7ffa1aa16511a75b4bc2c05bd0e0a75" args="(rs_allocation a, uint32_t x, uint32_t y)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsGetElementAtYuv_uchar_Y </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</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>x</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>y</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Extract a single element from an allocation. </p>
+
+</div>
+</div>
+<a class="anchor" id="a1ed04c0bfab4044b875bb31577b53407"></a><!-- doxytag: member="rs_allocation.rsh::rsSample" ref="a1ed04c0bfab4044b875bb31577b53407" args="(rs_allocation a, rs_sampler s, float location)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsSample </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>location</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Fetch allocation in a way described by the sampler </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>1D allocation to sample from </td></tr>
+    <tr><td class="paramname">s</td><td>sampler state </td></tr>
+    <tr><td class="paramname">location</td><td>to sample from</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>Fetch allocation in a way described by the sampler </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>2D allocation to sample from </td></tr>
+    <tr><td class="paramname">s</td><td>sampler state </td></tr>
+    <tr><td class="paramname">location</td><td>to sample from </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="aa9574fd5f1655f6e74b4872aace618bf"></a><!-- doxytag: member="rs_allocation.rsh::rsSample" ref="aa9574fd5f1655f6e74b4872aace618bf" args="(rs_allocation a, rs_sampler s, float location, float lod)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsSample </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>location</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>lod</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Fetch allocation in a way described by the sampler </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>1D allocation to sample from </td></tr>
+    <tr><td class="paramname">s</td><td>sampler state </td></tr>
+    <tr><td class="paramname">location</td><td>to sample from </td></tr>
+    <tr><td class="paramname">lod</td><td>mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used</td></tr>
+  </table>
+  </dd>
+</dl>
+<p>Fetch allocation in a way described by the sampler </p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">a</td><td>2D allocation to sample from </td></tr>
+    <tr><td class="paramname">s</td><td>sampler state </td></tr>
+    <tr><td class="paramname">location</td><td>to sample from </td></tr>
+    <tr><td class="paramname">lod</td><td>mip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a36ef1e609e360a9a5a5ff5dce13b5100"></a><!-- doxytag: member="rs_allocation.rsh::rsSetElementAt" ref="a36ef1e609e360a9a5a5ff5dce13b5100" args="(rs_allocation a, void *ptr, uint32_t x)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsSetElementAt </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>ptr</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>x</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Set single element of an allocation. </p>
+
+</div>
+</div>
+<a class="anchor" id="a351627f335b9a091a5152db7ac9134dc"></a><!-- doxytag: member="rs_allocation.rsh::rsSetElementAt" ref="a351627f335b9a091a5152db7ac9134dc" args="(rs_allocation a, void *ptr, uint32_t x, uint32_t y)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsSetElementAt </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>a</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">void *&#160;</td>
+          <td class="paramname"><em>ptr</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>x</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>y</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </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>
+
+</div>
+</div>
 </div>
 
 </body>
diff --git a/docs/html/reference/renderscript/rs__allocation_8rsh_source.html b/docs/html/reference/renderscript/rs__allocation_8rsh_source.html
index 3358cff..6d925a8 100644
--- a/docs/html/reference/renderscript/rs__allocation_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__allocation_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_allocation.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.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">rs_allocation.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__allocation_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>
@@ -46,81 +46,221 @@
 <a name="l00023"></a>00023 <span class="preprocessor">#ifndef __RS_ALLOCATION_RSH__</span>
 <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __RS_ALLOCATION_RSH__</span>
 <a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00031"></a>00031 <span class="keyword">extern</span> <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> __attribute__((overloadable))
-<a name="l00032"></a>00032     <a class="code" href="rs__allocation_8rsh.html#aadad7654929c451be299df125061c9ba">rsGetAllocation</a>(const <span class="keywordtype">void</span> *);
-<a name="l00033"></a>00033 
-<a name="l00039"></a>00039 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00040"></a>00040     <a class="code" href="rs__allocation_8rsh.html#a3ca7f505a97d5b7f477bc65b9e77dafb">rsAllocationGetDimX</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a>);
-<a name="l00041"></a>00041 
-<a name="l00047"></a>00047 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00048"></a>00048     <a class="code" href="rs__allocation_8rsh.html#ac889b866b465580eb313e5d2a9fcac3d">rsAllocationGetDimY</a>(rs_allocation);
-<a name="l00049"></a>00049 
-<a name="l00055"></a>00055 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00056"></a>00056     <a class="code" href="rs__allocation_8rsh.html#acd6f1a2b2443e6ea39e6154577645d2c">rsAllocationGetDimZ</a>(rs_allocation);
-<a name="l00057"></a>00057 
-<a name="l00063"></a>00063 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00064"></a>00064     <a class="code" href="rs__allocation_8rsh.html#ac42a07c079d6b3c6bb21975170d4e11c">rsAllocationGetDimLOD</a>(rs_allocation);
-<a name="l00065"></a>00065 
-<a name="l00071"></a>00071 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00072"></a>00072     <a class="code" href="rs__allocation_8rsh.html#ac85f7ed88f38b35482c6d63b56d470fe">rsAllocationGetDimFaces</a>(rs_allocation);
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14))</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span>
-<a name="l00089"></a>00089 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00090"></a>00090     rsAllocationCopy1DRange(rs_allocation dstAlloc,
-<a name="l00091"></a>00091                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstOff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip,
-<a name="l00092"></a>00092                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> count,
-<a name="l00093"></a>00093                             rs_allocation srcAlloc,
-<a name="l00094"></a>00094                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcOff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip);
-<a name="l00095"></a>00095 
-<a name="l00117"></a>00117 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00118"></a>00118     rsAllocationCopy2DRange(rs_allocation dstAlloc,
-<a name="l00119"></a>00119                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstXoff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstYoff,
-<a name="l00120"></a>00120                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip,
-<a name="l00121"></a>00121                             rs_allocation_cubemap_face dstFace,
-<a name="l00122"></a>00122                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> width, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> height,
-<a name="l00123"></a>00123                             rs_allocation srcAlloc,
-<a name="l00124"></a>00124                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcXoff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcYoff,
-<a name="l00125"></a>00125                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip,
-<a name="l00126"></a>00126                             rs_allocation_cubemap_face srcFace);
-<a name="l00127"></a>00127 
-<a name="l00128"></a>00128 <span class="preprocessor">#endif //defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14)</span>
-<a name="l00129"></a>00129 <span class="preprocessor"></span>
-<a name="l00133"></a>00133 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> * __attribute__((overloadable))
-<a name="l00134"></a>00134     <a class="code" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rsGetElementAt</a>(rs_allocation, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x);
-<a name="l00138"></a>00138 extern const <span class="keywordtype">void</span> * __attribute__((overloadable))
-<a name="l00139"></a>00139     <a class="code" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rsGetElementAt</a>(rs_allocation, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
-<a name="l00143"></a>00143 extern const <span class="keywordtype">void</span> * __attribute__((overloadable))
-<a name="l00144"></a>00144     <a class="code" href="rs__allocation_8rsh.html#a3fd30b4388748601e025bb3566ce0cbc">rsGetElementAt</a>(rs_allocation, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> z);
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146 <span class="comment">// New API&#39;s</span>
-<a name="l00147"></a>00147 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
-<a name="l00148"></a>00148 <span class="preprocessor"></span>
-<a name="l00153"></a>00153 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00154"></a>00154     rsAllocationIoSend(rs_allocation a);
-<a name="l00155"></a>00155 
-<a name="l00160"></a>00160 extern const <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00161"></a>00161     rsAllocationIoReceive(rs_allocation a);
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163 
-<a name="l00169"></a>00169 extern <a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> __attribute__((overloadable))
-<a name="l00170"></a>00170     rsAllocationGetElement(rs_allocation a);
-<a name="l00171"></a>00171 
-<a name="l00178"></a>00178 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00179"></a>00179     rsSample(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s, <span class="keywordtype">float</span> location);
-<a name="l00189"></a>00189 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00190"></a>00190     rsSample(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s, <span class="keywordtype">float</span> location, <span class="keywordtype">float</span> lod);
-<a name="l00191"></a>00191 
-<a name="l00198"></a>00198 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00199"></a>00199     rsSample(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> location);
-<a name="l00200"></a>00200 
-<a name="l00210"></a>00210 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
-<a name="l00211"></a>00211     rsSample(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> location, <span class="keywordtype">float</span> lod);
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span>
-<a name="l00215"></a>00215 <span class="preprocessor">#endif</span>
+<a name="l00034"></a>00034 <span class="keyword">extern</span> <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> __attribute__((overloadable))
+<a name="l00035"></a>00035     <a class="code" href="rs__allocation_8rsh.html#aadad7654929c451be299df125061c9ba">rsGetAllocation</a>(const <span class="keywordtype">void</span> *);
+<a name="l00036"></a>00036 
+<a name="l00042"></a>00042 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
+<a name="l00043"></a>00043     <a class="code" href="rs__allocation_8rsh.html#a3ca7f505a97d5b7f477bc65b9e77dafb">rsAllocationGetDimX</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a>);
+<a name="l00044"></a>00044 
+<a name="l00050"></a>00050 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
+<a name="l00051"></a>00051     <a class="code" href="rs__allocation_8rsh.html#ac889b866b465580eb313e5d2a9fcac3d">rsAllocationGetDimY</a>(rs_allocation);
+<a name="l00052"></a>00052 
+<a name="l00058"></a>00058 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
+<a name="l00059"></a>00059     <a class="code" href="rs__allocation_8rsh.html#acd6f1a2b2443e6ea39e6154577645d2c">rsAllocationGetDimZ</a>(rs_allocation);
+<a name="l00060"></a>00060 
+<a name="l00066"></a>00066 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
+<a name="l00067"></a>00067     <a class="code" href="rs__allocation_8rsh.html#ac42a07c079d6b3c6bb21975170d4e11c">rsAllocationGetDimLOD</a>(rs_allocation);
+<a name="l00068"></a>00068 
+<a name="l00074"></a>00074 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
+<a name="l00075"></a>00075     <a class="code" href="rs__allocation_8rsh.html#ac85f7ed88f38b35482c6d63b56d470fe">rsAllocationGetDimFaces</a>(rs_allocation);
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14))</span>
+<a name="l00078"></a>00078 <span class="preprocessor"></span>
+<a name="l00092"></a>00092 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00093"></a>00093     <a class="code" href="rs__allocation_8rsh.html#a3a1098a3ea3a5106955dd4398b8904e1">rsAllocationCopy1DRange</a>(rs_allocation dstAlloc,
+<a name="l00094"></a>00094                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstOff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip,
+<a name="l00095"></a>00095                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> count,
+<a name="l00096"></a>00096                             rs_allocation srcAlloc,
+<a name="l00097"></a>00097                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcOff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip);
+<a name="l00098"></a>00098 
+<a name="l00120"></a>00120 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00121"></a>00121     <a class="code" href="rs__allocation_8rsh.html#a7f7e2369b3ed7d7db31729b6db7ba07e">rsAllocationCopy2DRange</a>(rs_allocation dstAlloc,
+<a name="l00122"></a>00122                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstXoff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstYoff,
+<a name="l00123"></a>00123                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> dstMip,
+<a name="l00124"></a>00124                             <a class="code" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229" title="Enum for selecting cube map faces.">rs_allocation_cubemap_face</a> dstFace,
+<a name="l00125"></a>00125                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> width, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> height,
+<a name="l00126"></a>00126                             rs_allocation srcAlloc,
+<a name="l00127"></a>00127                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcXoff, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcYoff,
+<a name="l00128"></a>00128                             <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> srcMip,
+<a name="l00129"></a>00129                             <a class="code" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229" title="Enum for selecting cube map faces.">rs_allocation_cubemap_face</a> srcFace);
+<a name="l00130"></a>00130 
+<a name="l00131"></a>00131 <span class="preprocessor">#endif //defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14)</span>
+<a name="l00132"></a>00132 <span class="preprocessor"></span>
+<a name="l00136"></a>00136 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> * __attribute__((overloadable))
+<a name="l00137"></a>00137     <a class="code" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rsGetElementAt</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x);
+<a name="l00141"></a>00141 extern const <span class="keywordtype">void</span> * __attribute__((overloadable))
+<a name="l00142"></a>00142     <a class="code" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rsGetElementAt</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
+<a name="l00146"></a>00146 extern const <span class="keywordtype">void</span> * __attribute__((overloadable))
+<a name="l00147"></a>00147     <a class="code" href="rs__allocation_8rsh.html#a56157b6ddef754b36833ca1f8e66aec2">rsGetElementAt</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> z);
+<a name="l00148"></a>00148 
+<a name="l00149"></a>00149 
+<a name="l00150"></a>00150 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 18))</span>
+<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">    #define GET_ELEMENT_AT(T) \</span>
+<a name="l00152"></a>00152 <span class="preprocessor">    extern T __attribute__((overloadable)) \</span>
+<a name="l00153"></a>00153 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x); \</span>
+<a name="l00154"></a>00154 <span class="preprocessor">    extern T __attribute__((overloadable)) \</span>
+<a name="l00155"></a>00155 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y);  \</span>
+<a name="l00156"></a>00156 <span class="preprocessor">    extern T __attribute__((overloadable)) \</span>
+<a name="l00157"></a>00157 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);</span>
+<a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">    #define GET_ELEMENT_AT(T) \</span>
+<a name="l00160"></a>00160 <span class="preprocessor">    static inline T __attribute__((overloadable)) \</span>
+<a name="l00161"></a>00161 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x) {  \</span>
+<a name="l00162"></a>00162 <span class="preprocessor">        return ((T *)rsGetElementAt(a, x))[0]; \</span>
+<a name="l00163"></a>00163 <span class="preprocessor">    } \</span>
+<a name="l00164"></a>00164 <span class="preprocessor">    static inline T __attribute__((overloadable)) \</span>
+<a name="l00165"></a>00165 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y) {  \</span>
+<a name="l00166"></a>00166 <span class="preprocessor">        return ((T *)rsGetElementAt(a, x, y))[0]; \</span>
+<a name="l00167"></a>00167 <span class="preprocessor">    } \</span>
+<a name="l00168"></a>00168 <span class="preprocessor">    static inline T __attribute__((overloadable)) \</span>
+<a name="l00169"></a>00169 <span class="preprocessor">            rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z) {  \</span>
+<a name="l00170"></a>00170 <span class="preprocessor">        return ((T *)rsGetElementAt(a, x, y, z))[0]; \</span>
+<a name="l00171"></a>00171 <span class="preprocessor">    }</span>
+<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00173"></a>00173 <span class="preprocessor"></span>
+<a name="l00174"></a>00174 GET_ELEMENT_AT(<span class="keywordtype">char</span>)
+<a name="l00175"></a>00175 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a>)
+<a name="l00176"></a>00176 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">char3</a>)
+<a name="l00177"></a>00177 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">char4</a>)
+<a name="l00178"></a>00178 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>)
+<a name="l00179"></a>00179 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>)
+<a name="l00180"></a>00180 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">uchar3</a>)
+<a name="l00181"></a>00181 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>)
+<a name="l00182"></a>00182 GET_ELEMENT_AT(<span class="keywordtype">short</span>)
+<a name="l00183"></a>00183 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a>)
+<a name="l00184"></a>00184 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">short3</a>)
+<a name="l00185"></a>00185 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">short4</a>)
+<a name="l00186"></a>00186 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>)
+<a name="l00187"></a>00187 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>)
+<a name="l00188"></a>00188 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">ushort3</a>)
+<a name="l00189"></a>00189 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">ushort4</a>)
+<a name="l00190"></a>00190 GET_ELEMENT_AT(<span class="keywordtype">int</span>)
+<a name="l00191"></a>00191 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a>)
+<a name="l00192"></a>00192 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">int3</a>)
+<a name="l00193"></a>00193 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">int4</a>)
+<a name="l00194"></a>00194 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>)
+<a name="l00195"></a>00195 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a>)
+<a name="l00196"></a>00196 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">uint3</a>)
+<a name="l00197"></a>00197 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">uint4</a>)
+<a name="l00198"></a>00198 GET_ELEMENT_AT(<span class="keywordtype">long</span>)
+<a name="l00199"></a>00199 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a>)
+<a name="l00200"></a>00200 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a>)
+<a name="l00201"></a>00201 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a>)
+<a name="l00202"></a>00202 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a>)
+<a name="l00203"></a>00203 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a>)
+<a name="l00204"></a>00204 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">ulong3</a>)
+<a name="l00205"></a>00205 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">ulong4</a>)
+<a name="l00206"></a>00206 GET_ELEMENT_AT(<span class="keywordtype">float</span>)
+<a name="l00207"></a>00207 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>)
+<a name="l00208"></a>00208 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>)
+<a name="l00209"></a>00209 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>)
+<a name="l00210"></a>00210 GET_ELEMENT_AT(<span class="keywordtype">double</span>)
+<a name="l00211"></a>00211 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">double2</a>)
+<a name="l00212"></a>00212 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">double3</a>)
+<a name="l00213"></a>00213 GET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">double4</a>)
+<a name="l00214"></a>00214 
+<a name="l00215"></a>00215 <span class="preprocessor">#undef GET_ELEMENT_AT</span>
 <a name="l00216"></a>00216 <span class="preprocessor"></span>
+<a name="l00217"></a>00217 <span class="comment">// Jelly Bean</span>
+<a name="l00218"></a>00218 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
+<a name="l00219"></a>00219 <span class="preprocessor"></span>
+<a name="l00224"></a>00224 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00225"></a>00225     <a class="code" href="rs__allocation_8rsh.html#afe9ebb2f89c6366c59f5e05ee4849c0a">rsAllocationIoSend</a>(rs_allocation a);
+<a name="l00226"></a>00226 
+<a name="l00231"></a>00231 extern const <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00232"></a>00232     <a class="code" href="rs__allocation_8rsh.html#a05f7391230a92d239fdb619d791162b5">rsAllocationIoReceive</a>(rs_allocation a);
+<a name="l00233"></a>00233 
+<a name="l00234"></a>00234 
+<a name="l00240"></a>00240 extern <a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> __attribute__((overloadable))
+<a name="l00241"></a>00241     <a class="code" href="rs__allocation_8rsh.html#a6a3b6512bc269f6b369bdc54d12a45ff">rsAllocationGetElement</a>(rs_allocation a);
+<a name="l00242"></a>00242 
+<a name="l00249"></a>00249 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00250"></a>00250     <a class="code" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rsSample</a>(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s, <span class="keywordtype">float</span> location);
+<a name="l00260"></a>00260 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00261"></a>00261     <a class="code" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rsSample</a>(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s, <span class="keywordtype">float</span> location, <span class="keywordtype">float</span> lod);
+<a name="l00262"></a>00262 
+<a name="l00269"></a>00269 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00270"></a>00270     <a class="code" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rsSample</a>(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> location);
+<a name="l00271"></a>00271 
+<a name="l00281"></a>00281 extern const <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable))
+<a name="l00282"></a>00282     <a class="code" href="rs__allocation_8rsh.html#a1ed04c0bfab4044b875bb31577b53407">rsSample</a>(rs_allocation a, <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> location, <span class="keywordtype">float</span> lod);
+<a name="l00283"></a>00283 
+<a name="l00284"></a>00284 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
+<a name="l00285"></a>00285 <span class="preprocessor"></span>
+<a name="l00286"></a>00286 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 18))</span>
+<a name="l00287"></a>00287 <span class="preprocessor"></span>
+<a name="l00291"></a>00291 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00292"></a>00292     <a class="code" href="rs__allocation_8rsh.html#a36ef1e609e360a9a5a5ff5dce13b5100">rsSetElementAt</a>(rs_allocation a, <span class="keywordtype">void</span>* ptr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x);
+<a name="l00293"></a>00293 
+<a name="l00297"></a>00297 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00298"></a>00298     <a class="code" href="rs__allocation_8rsh.html#a36ef1e609e360a9a5a5ff5dce13b5100">rsSetElementAt</a>(rs_allocation a, <span class="keywordtype">void</span>* ptr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
+<a name="l00299"></a>00299 
+<a name="l00300"></a>00300 <span class="preprocessor">#define SET_ELEMENT_AT(T)                                               \</span>
+<a name="l00301"></a>00301 <span class="preprocessor">    extern void __attribute__((overloadable))                           \</span>
+<a name="l00302"></a>00302 <span class="preprocessor">    rsSetElementAt_##T(rs_allocation a, T val, uint32_t x);             \</span>
+<a name="l00303"></a>00303 <span class="preprocessor">    extern void __attribute__((overloadable))                           \</span>
+<a name="l00304"></a>00304 <span class="preprocessor">    rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y); \</span>
+<a name="l00305"></a>00305 <span class="preprocessor">    extern void __attribute__((overloadable))                           \</span>
+<a name="l00306"></a>00306 <span class="preprocessor">    rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y, uint32_t z);</span>
+<a name="l00307"></a>00307 <span class="preprocessor"></span>
+<a name="l00308"></a>00308 
+<a name="l00309"></a>00309 SET_ELEMENT_AT(<span class="keywordtype">char</span>)
+<a name="l00310"></a>00310 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a>)
+<a name="l00311"></a>00311 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">char3</a>)
+<a name="l00312"></a>00312 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">char4</a>)
+<a name="l00313"></a>00313 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>)
+<a name="l00314"></a>00314 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>)
+<a name="l00315"></a>00315 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">uchar3</a>)
+<a name="l00316"></a>00316 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>)
+<a name="l00317"></a>00317 SET_ELEMENT_AT(<span class="keywordtype">short</span>)
+<a name="l00318"></a>00318 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a>)
+<a name="l00319"></a>00319 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">short3</a>)
+<a name="l00320"></a>00320 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">short4</a>)
+<a name="l00321"></a>00321 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>)
+<a name="l00322"></a>00322 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>)
+<a name="l00323"></a>00323 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">ushort3</a>)
+<a name="l00324"></a>00324 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">ushort4</a>)
+<a name="l00325"></a>00325 SET_ELEMENT_AT(<span class="keywordtype">int</span>)
+<a name="l00326"></a>00326 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a>)
+<a name="l00327"></a>00327 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">int3</a>)
+<a name="l00328"></a>00328 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">int4</a>)
+<a name="l00329"></a>00329 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>)
+<a name="l00330"></a>00330 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a>)
+<a name="l00331"></a>00331 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">uint3</a>)
+<a name="l00332"></a>00332 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">uint4</a>)
+<a name="l00333"></a>00333 SET_ELEMENT_AT(<span class="keywordtype">long</span>)
+<a name="l00334"></a>00334 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a>)
+<a name="l00335"></a>00335 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a>)
+<a name="l00336"></a>00336 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a>)
+<a name="l00337"></a>00337 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a>)
+<a name="l00338"></a>00338 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a>)
+<a name="l00339"></a>00339 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">ulong3</a>)
+<a name="l00340"></a>00340 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">ulong4</a>)
+<a name="l00341"></a>00341 SET_ELEMENT_AT(<span class="keywordtype">float</span>)
+<a name="l00342"></a>00342 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>)
+<a name="l00343"></a>00343 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>)
+<a name="l00344"></a>00344 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>)
+<a name="l00345"></a>00345 SET_ELEMENT_AT(<span class="keywordtype">double</span>)
+<a name="l00346"></a>00346 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">double2</a>)
+<a name="l00347"></a>00347 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">double3</a>)
+<a name="l00348"></a>00348 SET_ELEMENT_AT(<a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">double4</a>)
+<a name="l00349"></a>00349 
+<a name="l00350"></a>00350 <span class="preprocessor">#undef SET_ELEMENT_AT</span>
+<a name="l00351"></a>00351 <span class="preprocessor"></span>
+<a name="l00352"></a>00352 
+<a name="l00356"></a>00356 <span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> __attribute__((overloadable))
+<a name="l00357"></a>00357     <a class="code" href="rs__allocation_8rsh.html#ad7ffa1aa16511a75b4bc2c05bd0e0a75">rsGetElementAtYuv_uchar_Y</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
+<a name="l00358"></a>00358 
+<a name="l00364"></a>00364 extern const <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> __attribute__((overloadable))
+<a name="l00365"></a>00365     <a class="code" href="rs__allocation_8rsh.html#a41f61be02113ee22c039ea51fdedb20e">rsGetElementAtYuv_uchar_U</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
+<a name="l00366"></a>00366 
+<a name="l00372"></a>00372 extern const <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> __attribute__((overloadable))
+<a name="l00373"></a>00373     <a class="code" href="rs__allocation_8rsh.html#af03cadb582fa80bbf7f39177d96df17e">rsGetElementAtYuv_uchar_V</a>(rs_allocation a, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> x, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> y);
+<a name="l00374"></a>00374 
+<a name="l00375"></a>00375 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 18))</span>
+<a name="l00376"></a>00376 <span class="preprocessor"></span>
+<a name="l00377"></a>00377 <span class="preprocessor">#endif</span>
+<a name="l00378"></a>00378 <span class="preprocessor"></span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/rs__atomic_8rsh.html b/docs/html/reference/renderscript/rs__atomic_8rsh.html
index bb33fc30..94c16ef 100644
--- a/docs/html/reference/renderscript/rs__atomic_8rsh.html
+++ b/docs/html/reference/renderscript/rs__atomic_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_atomic.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,15 +24,734 @@
   </div>
 </div>
 <div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_atomic.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.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"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a619e7a489500a650569a76ccd93e105f">rsAtomicInc</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a9c7a2b449852ba9d3297747ec3ca06e3">rsAtomicInc</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a16a69784a343d7c11bf6bd7fec9686ca">rsAtomicDec</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a77902e5015557fa7336a7926ebdccdae">rsAtomicDec</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#ab46665eff81030200f86db9c2181072a">rsAtomicAdd</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#ab206947a5a724f02cb1ab36dd7df82d7">rsAtomicAdd</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a800dced6abbf09716391f35bc488900b">rsAtomicSub</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#ae5770ea0b22cb47e517b3391763c14a5">rsAtomicSub</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a7fdf5633662dd5b0898ad5a149e3c8ad">rsAtomicAnd</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a9d4e93fa4b55b49c75d4d1bd7708cf41">rsAtomicAnd</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a477f6eb17c4806bb715bfd975b6369cd">rsAtomicOr</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a611cde98a711ba690e1c07ddb502ce97">rsAtomicOr</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a5590505ea65c53b3bb26fa48a6b9c313">rsAtomicXor</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#ab9fe2263cd7814fc5292c6af81ed69eb">rsAtomicXor</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a9f3cddc86f1075ca194a762fb8a3330a">rsAtomicMin</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a8de83596fd23f119ab8620a8dad223b1">rsAtomicMin</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a1d49d69d14956152fcde34efe9cdff87">rsAtomicMax</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a6d4cb5118131a8f1e73b704c093401aa">rsAtomicMax</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#a205d66a8eb29eee8968f886e488b4402">rsAtomicCas</a> (volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> compareValue, <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> newValue)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__atomic_8rsh.html#aa46bb0a2933a93bed2858585a088b173">rsAtomicCas</a> (volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *addr, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> compareValue, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> newValue)</td></tr>
+</table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Atomic routines. </p>
 
 <p>Definition in file <a class="el" href="rs__atomic_8rsh_source.html">rs_atomic.rsh</a>.</p>
-</div></div>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="ab46665eff81030200f86db9c2181072a"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicAdd" ref="ab46665eff81030200f86db9c2181072a" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicAdd </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic add a value to the value at addr. addr[0] += value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to add to the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab206947a5a724f02cb1ab36dd7df82d7"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicAdd" ref="ab206947a5a724f02cb1ab36dd7df82d7" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicAdd </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic add a value to the value at addr. addr[0] += value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to add to the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a7fdf5633662dd5b0898ad5a149e3c8ad"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicAnd" ref="a7fdf5633662dd5b0898ad5a149e3c8ad" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicAnd </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise and a value from the value at addr. addr[0] &amp;= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to and with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9d4e93fa4b55b49c75d4d1bd7708cf41"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicAnd" ref="a9d4e93fa4b55b49c75d4d1bd7708cf41" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicAnd </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise and a value from the value at addr. addr[0] &amp;= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to and with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a205d66a8eb29eee8968f886e488b4402"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicCas" ref="a205d66a8eb29eee8968f886e488b4402" args="(volatile int32_t *addr, int32_t compareValue, int32_t newValue)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicCas </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>compareValue</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>newValue</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Compare-and-set operation with a full memory barrier.</p>
+<p>If the value at addr matches compareValue then newValue is written.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>The address to compare and replace if the compare passes. </td></tr>
+    <tr><td class="paramname">compareValue</td><td>The value to test addr[0] against. </td></tr>
+    <tr><td class="paramname">newValue</td><td>The value to write if the test passes.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="aa46bb0a2933a93bed2858585a088b173"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicCas" ref="aa46bb0a2933a93bed2858585a088b173" args="(volatile uint32_t *addr, uint32_t compareValue, uint32_t newValue)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicCas </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>compareValue</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>newValue</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Compare-and-set operation with a full memory barrier.</p>
+<p>If the value at addr matches compareValue then newValue is written.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>The address to compare and replace if the compare passes. </td></tr>
+    <tr><td class="paramname">compareValue</td><td>The value to test addr[0] against. </td></tr>
+    <tr><td class="paramname">newValue</td><td>The value to write if the test passes.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a16a69784a343d7c11bf6bd7fec9686ca"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicDec" ref="a16a69784a343d7c11bf6bd7fec9686ca" args="(volatile int32_t *addr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicDec </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to decrement</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a77902e5015557fa7336a7926ebdccdae"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicDec" ref="a77902e5015557fa7336a7926ebdccdae" args="(volatile uint32_t *addr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicDec </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic subtract one from the value at addr. Equal to rsAtomicSub(addr, 1)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to decrement</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a619e7a489500a650569a76ccd93e105f"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicInc" ref="a619e7a489500a650569a76ccd93e105f" args="(volatile int32_t *addr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicInc </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to increment</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9c7a2b449852ba9d3297747ec3ca06e3"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicInc" ref="a9c7a2b449852ba9d3297747ec3ca06e3" args="(volatile uint32_t *addr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicInc </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic add one to the value at addr. Equal to rsAtomicAdd(addr, 1)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to increment</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a1d49d69d14956152fcde34efe9cdff87"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicMax" ref="a1d49d69d14956152fcde34efe9cdff87" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicMax </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Set the value at addr to the max of addr and value addr[0] = rsMax(addr[0], value)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>comparison value</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a6d4cb5118131a8f1e73b704c093401aa"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicMax" ref="a6d4cb5118131a8f1e73b704c093401aa" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicMax </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Set the value at addr to the max of addr and value addr[0] = rsMin(addr[0], value)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>comparison value</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9f3cddc86f1075ca194a762fb8a3330a"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicMin" ref="a9f3cddc86f1075ca194a762fb8a3330a" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicMin </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>comparison value</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a8de83596fd23f119ab8620a8dad223b1"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicMin" ref="a8de83596fd23f119ab8620a8dad223b1" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicMin </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Set the value at addr to the min of addr and value addr[0] = rsMin(addr[0], value)</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>comparison value</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a477f6eb17c4806bb715bfd975b6369cd"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicOr" ref="a477f6eb17c4806bb715bfd975b6369cd" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicOr </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise or a value from the value at addr. addr[0] |= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to or with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a611cde98a711ba690e1c07ddb502ce97"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicOr" ref="a611cde98a711ba690e1c07ddb502ce97" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicOr </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise or a value from the value at addr. addr[0] |= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to or with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a800dced6abbf09716391f35bc488900b"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicSub" ref="a800dced6abbf09716391f35bc488900b" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicSub </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Subtract a value from the value at addr. addr[0] -= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to subtract from the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ae5770ea0b22cb47e517b3391763c14a5"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicSub" ref="ae5770ea0b22cb47e517b3391763c14a5" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicSub </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Subtract a value from the value at addr. addr[0] -= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to subtract from the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5590505ea65c53b3bb26fa48a6b9c313"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicXor" ref="a5590505ea65c53b3bb26fa48a6b9c313" args="(volatile uint32_t *addr, uint32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsAtomicXor </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</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>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise xor a value from the value at addr. addr[0] ^= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to xor with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab9fe2263cd7814fc5292c6af81ed69eb"></a><!-- doxytag: member="rs_atomic.rsh::rsAtomicXor" ref="ab9fe2263cd7814fc5292c6af81ed69eb" args="(volatile int32_t *addr, int32_t value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> rsAtomicXor </td>
+          <td>(</td>
+          <td class="paramtype">volatile <a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> *&#160;</td>
+          <td class="paramname"><em>addr</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>&#160;</td>
+          <td class="paramname"><em>value</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Atomic Bitwise xor a value from the value at addr. addr[0] ^= value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">addr</td><td>Address of value to modify </td></tr>
+    <tr><td class="paramname">value</td><td>Amount to xor with the value at addr</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>old value </dd></dl>
+
+</div>
+</div>
+</div>
 
 </body>
 </html>
diff --git a/docs/html/reference/renderscript/rs__atomic_8rsh_source.html b/docs/html/reference/renderscript/rs__atomic_8rsh_source.html
index 63d1a68..2136df4 100644
--- a/docs/html/reference/renderscript/rs__atomic_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__atomic_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_atomic.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.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">rs_atomic.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_atomic.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__atomic_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>
@@ -49,55 +49,55 @@
 <a name="l00026"></a>00026 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14))</span>
 <a name="l00027"></a>00027 <span class="preprocessor"></span>
 <a name="l00036"></a>00036 <span class="keyword">extern</span> <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00037"></a>00037     rsAtomicInc(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr);
+<a name="l00037"></a>00037     <a class="code" href="rs__atomic_8rsh.html#a619e7a489500a650569a76ccd93e105f">rsAtomicInc</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr);
 <a name="l00046"></a>00046 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00047"></a>00047     rsAtomicInc(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr);
+<a name="l00047"></a>00047     <a class="code" href="rs__atomic_8rsh.html#a619e7a489500a650569a76ccd93e105f">rsAtomicInc</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr);
 <a name="l00048"></a>00048 
 <a name="l00056"></a>00056 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00057"></a>00057     rsAtomicDec(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr);
+<a name="l00057"></a>00057     <a class="code" href="rs__atomic_8rsh.html#a16a69784a343d7c11bf6bd7fec9686ca">rsAtomicDec</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr);
 <a name="l00065"></a>00065 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00066"></a>00066     rsAtomicDec(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr);
+<a name="l00066"></a>00066     <a class="code" href="rs__atomic_8rsh.html#a16a69784a343d7c11bf6bd7fec9686ca">rsAtomicDec</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr);
 <a name="l00067"></a>00067 
 <a name="l00076"></a>00076 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00077"></a>00077     rsAtomicAdd(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00077"></a>00077     <a class="code" href="rs__atomic_8rsh.html#ab46665eff81030200f86db9c2181072a">rsAtomicAdd</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00086"></a>00086 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00087"></a>00087     rsAtomicAdd(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00087"></a>00087     <a class="code" href="rs__atomic_8rsh.html#ab46665eff81030200f86db9c2181072a">rsAtomicAdd</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00088"></a>00088 
 <a name="l00097"></a>00097 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00098"></a>00098     rsAtomicSub(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00098"></a>00098     <a class="code" href="rs__atomic_8rsh.html#a800dced6abbf09716391f35bc488900b">rsAtomicSub</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00107"></a>00107 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00108"></a>00108     rsAtomicSub(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00108"></a>00108     <a class="code" href="rs__atomic_8rsh.html#a800dced6abbf09716391f35bc488900b">rsAtomicSub</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00109"></a>00109 
 <a name="l00118"></a>00118 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00119"></a>00119     rsAtomicAnd(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00119"></a>00119     <a class="code" href="rs__atomic_8rsh.html#a7fdf5633662dd5b0898ad5a149e3c8ad">rsAtomicAnd</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00128"></a>00128 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00129"></a>00129     rsAtomicAnd(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00129"></a>00129     <a class="code" href="rs__atomic_8rsh.html#a7fdf5633662dd5b0898ad5a149e3c8ad">rsAtomicAnd</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00130"></a>00130 
 <a name="l00139"></a>00139 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00140"></a>00140     rsAtomicOr(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00140"></a>00140     <a class="code" href="rs__atomic_8rsh.html#a477f6eb17c4806bb715bfd975b6369cd">rsAtomicOr</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00149"></a>00149 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00150"></a>00150     rsAtomicOr(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00150"></a>00150     <a class="code" href="rs__atomic_8rsh.html#a477f6eb17c4806bb715bfd975b6369cd">rsAtomicOr</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00151"></a>00151 
 <a name="l00160"></a>00160 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00161"></a>00161     rsAtomicXor(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00161"></a>00161     <a class="code" href="rs__atomic_8rsh.html#a5590505ea65c53b3bb26fa48a6b9c313">rsAtomicXor</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00170"></a>00170 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00171"></a>00171     rsAtomicXor(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00171"></a>00171     <a class="code" href="rs__atomic_8rsh.html#a5590505ea65c53b3bb26fa48a6b9c313">rsAtomicXor</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00172"></a>00172 
 <a name="l00182"></a>00182 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00183"></a>00183     rsAtomicMin(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00183"></a>00183     <a class="code" href="rs__atomic_8rsh.html#a9f3cddc86f1075ca194a762fb8a3330a">rsAtomicMin</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00193"></a>00193 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00194"></a>00194     rsAtomicMin(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00194"></a>00194     <a class="code" href="rs__atomic_8rsh.html#a9f3cddc86f1075ca194a762fb8a3330a">rsAtomicMin</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00195"></a>00195 
 <a name="l00205"></a>00205 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00206"></a>00206     rsAtomicMax(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
+<a name="l00206"></a>00206     <a class="code" href="rs__atomic_8rsh.html#a1d49d69d14956152fcde34efe9cdff87">rsAtomicMax</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> value);
 <a name="l00216"></a>00216 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00217"></a>00217     rsAtomicMax(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
+<a name="l00217"></a>00217     <a class="code" href="rs__atomic_8rsh.html#a1d49d69d14956152fcde34efe9cdff87">rsAtomicMax</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> value);
 <a name="l00218"></a>00218 
 <a name="l00230"></a>00230 extern <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> __attribute__((overloadable))
-<a name="l00231"></a>00231     rsAtomicCas(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> compareValue, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> newValue);
+<a name="l00231"></a>00231     <a class="code" href="rs__atomic_8rsh.html#a205d66a8eb29eee8968f886e488b4402">rsAtomicCas</a>(volatile <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> compareValue, <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> newValue);
 <a name="l00232"></a>00232 
 <a name="l00244"></a>00244 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00245"></a>00245     rsAtomicCas(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> compareValue, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> newValue);
+<a name="l00245"></a>00245     <a class="code" href="rs__atomic_8rsh.html#a205d66a8eb29eee8968f886e488b4402">rsAtomicCas</a>(volatile <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>* addr, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> compareValue, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> newValue);
 <a name="l00246"></a>00246 
 <a name="l00247"></a>00247 <span class="preprocessor">#endif //defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14)</span>
 <a name="l00248"></a>00248 <span class="preprocessor"></span>
diff --git a/docs/html/reference/renderscript/rs__cl_8rsh.html b/docs/html/reference/renderscript/rs__cl_8rsh.html
index 999fe0d..2a781b6 100644
--- a/docs/html/reference/renderscript/rs__cl_8rsh.html
+++ b/docs/html/reference/renderscript/rs__cl_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_cl.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,35 +27,42 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_cl.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.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"><a class="el" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a67421c4b17df15a1c726d912770e5ca4">convert_char2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a833bb5476683ec5692feaf0cd5dcdd80">convert_uchar2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a83e89db1940f3190fbec5bd823a99fc5">convert_short2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a6862ea6ddfba8a59796bc681a544fb4f">convert_ushort2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a9d2e4b8f0f25a7ccaed05248edc21f06">convert_int2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a01ff256469203ba33ba0f220b54e70d1">convert_uint2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</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__cl_8rsh.html#a1ad62d449c1e3548573c2f9c1a5cb13a">convert_float2</a> (<a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> v)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">acos</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">acosh</a> (float)</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__cl_8rsh.html#a2c0c7c00815bd480fcda80d1144ac20d">acospi</a> (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__cl_8rsh.html#a2c9092eb07e9df891935e93469e70d4e">acospi</a> (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__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">asin</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">asinh</a> (float)</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__cl_8rsh.html#a679b63e86358fc962cb343eb6263496b">asinpi</a> (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__cl_8rsh.html#a812eb4521e65a451161417f9898384f7">asinpi</a> (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__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">atan</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">atan2</a> (float y, float x)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">atanh</a> (float)</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__cl_8rsh.html#a420d4aaea0e53d7172845a21a1e648ea">atanpi</a> (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__cl_8rsh.html#a9aed0a1613c86acf5e4c5ad3290a4745">atan2pi</a> (float y, float x)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a5052e31ce616d35aee25a3a83f6fc117">atanpi</a> (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__cl_8rsh.html#a89ec5f6a2f64a0f9e97438fbd41aaace">atan2pi</a> (float y, float x)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ae9d1787b55c2587478a24d96573225df">cbrt</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">ceil</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">copysign</a> (float x, float y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a8eec7aeb4b0c46b06cbcd1a3ac3e6f05">cos</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">cosh</a> (float)</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__cl_8rsh.html#a07b12188bd53c6b584274892f6abf425">cospi</a> (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__cl_8rsh.html#a258d2c828fd46eae2867373884d834a9">cospi</a> (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__cl_8rsh.html#a2e24dc8594e758b64c340153f67a533c">erfc</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a139f102df651c25c26dd35d549173f57">erf</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">exp</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">exp2</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">pow</a> (float x, float y)</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__cl_8rsh.html#a4b51589157c9ce600ea6156be51d8d18">exp10</a> (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__cl_8rsh.html#a0225ff40d79f78260293e776c6a77422">exp10</a> (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__cl_8rsh.html#a7996044b67be921a5e58e2fe76af66e2">expm1</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">fabs</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">fdim</a> (float, float)</td></tr>
@@ -64,7 +71,8 @@
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a60f2072d8a746e7fe05cd46dea0fefcc">fmax</a> (float x, float y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a1fd9d57c6c992866bf5161be2cf4c447">fmin</a> (float x, float y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">fmod</a> (float x, float y)</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__cl_8rsh.html#ac5277212e0df309a0a7c908424f7b14b">fract</a> (float v, float *iptr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a> (float v, float *iptr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a84b546baf72a871a5ba688d434d6ce2b">fract</a> (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__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">frexp</a> (float v, int *iptr)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">hypot</a> (float x, float y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aad9a8beba52acb77b1efeba432e6cc2c">ilogb</a> (float)</td></tr>
@@ -73,46 +81,78 @@
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a735f4e14e33c50348ef41220f9210bcc">lgamma</a> (float x, int *y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a3ff85f5f4b206ecf9ec9d128d7d18a08">log</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#af5c1bdba2a13aa2e2b0722287f6a919f">log10</a> (float)</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__cl_8rsh.html#a2fb571ae932f671ff3e9e97f2d3fabb7">log2</a> (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__cl_8rsh.html#aab1c4f06daf6f2a50fd73f0c28929213">log2</a> (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__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">log1p</a> (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__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">logb</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">mad</a> (float a, float b, float c)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">modf</a> (float x, float *iret)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">nextafter</a> (float x, float y)</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__cl_8rsh.html#afd46205452017b741abb2e17fc28557d">pown</a> (float v, int p)</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__cl_8rsh.html#a3ff65421721ec8e6ce8d875a563d005f">powr</a> (float v, float p)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a67d1fe795e092003f687f3cc6d3c407a">pown</a> (float v, int p)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a316c30ba3e6bc11673bfd34bb4746d24">powr</a> (float v, float p)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">remainder</a> (float x, float y)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rint</a> (float)</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__cl_8rsh.html#af169e7e1c575b7c24c1834569223077f">rootn</a> (float v, int n)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a2776b517528b8185a6bb50753af0f6cf">rootn</a> (float v, int n)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">round</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">sqrt</a> (float)</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__cl_8rsh.html#a5db00fde9e6bff693a38f3a37e7a1f70">rsqrt</a> (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__cl_8rsh.html#a8a3992b97cb199b1c8d598996b600988">rsqrt</a> (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__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">sin</a> (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__cl_8rsh.html#a240f7c7c20b432a30dc660b5dd4cd320">sincos</a> (float v, float *cosptr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a892c91a30bbc713aa77105d8e9e25881">sincos</a> (float v, float *cosptr)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">sinh</a> (float)</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__cl_8rsh.html#a4fe4fef049786e888526d6f37b912b0a">sinpi</a> (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__cl_8rsh.html#a9ca027af0acf3ff22d91cd9489766976">sinpi</a> (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__cl_8rsh.html#af12e245af8ff9bb72b5000e7c26cd8fe">tan</a> (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__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">tanh</a> (float)</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__cl_8rsh.html#ad8bfb083dd3979a305e594a0d6e581c4">tanpi</a> (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__cl_8rsh.html#aee96c8910a7d8b0082574813b6b68b9a">tanpi</a> (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__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">tgamma</a> (float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#ad1a7c65693231219db1babeae1c41f15">trunc</a> (float)</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__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a> (float amount, float low, float high)</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__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">degrees</a> (float radians)</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__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a> (float start, float stop, float amount)</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__cl_8rsh.html#aaef2526c4d190ba6f7301b4e810917a7">radians</a> (float degrees)</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__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a> (float edge, 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__cl_8rsh.html#a3e6d477a06dec7070f073eec9d8f420c">sign</a> (float v)</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__cl_8rsh.html#a0f7beb26bb4aa30535babd14492a7e90">cross</a> (<a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> lhs, <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rhs)</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__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a> (float lhs, float rhs)</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__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a> (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__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">distance</a> (float lhs, float rhs)</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__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">normalize</a> (float v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a1ed0afedda2068ad1f9ad14ef3449e50">abs</a> (char v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a8a0f94dce3caa2a50cbf2d9f4bc674ac">clz</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a5f61ca44b3ad4b11365b0c4137a22658">min</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v1, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a616bf7a90d8d3c73a48d2c395d9dc4ea">max</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v1, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v2)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">clamp</a> (float amount, float low, float high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">degrees</a> (float radians)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">mix</a> (float start, float stop, float amount)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aceb63a0da6393b8ac2ed229bae6232d6">radians</a> (float degrees)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">step</a> (float edge, 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__cl_8rsh.html#a9fe423cc7d4c6d767f8a608d2ee76657">sign</a> (float v)</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__cl_8rsh.html#add745d593bc2b23285bd10e52a204e25">cross</a> (<a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> lhs, <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rhs)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a> (float lhs, float rhs)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a> (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__cl_8rsh.html#a412bf215ae838c65079560bbefefaca7">distance</a> (float lhs, float rhs)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a69c2a56f743593439d5ae5e3ec8e517f">normalize</a> (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__cl_8rsh.html#a49050a8e32c95f60df4eaba9d7dfdca6">half_recip</a> (float)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a26e2c17b20ee4c98b78c365d390e4fb8">half_sqrt</a> (float)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a0925ceb22d33dcbb45914350ffa2edea">half_rsqrt</a> (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__cl_8rsh.html#a7c8f2f987044a360b5f616a80a74a4d5">fast_length</a> (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__cl_8rsh.html#a4fcbdb9099e7d653a951cb344ba3c3c9">fast_distance</a> (float lhs, float rhs)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__cl_8rsh.html#a3878bee2879351f518be68e015d76a35">fast_normalize</a> (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__cl_8rsh.html#ab354691ecd844549b27ef9202e17f7ac">native_exp2</a> (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__cl_8rsh.html#a45d8176823a05b891313f3d96decf491">native_exp</a> (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__cl_8rsh.html#a601ee3d2bf769f1cdc39a886f7a6c986">native_exp10</a> (float v)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Basic math functions. </p>
 
 <p>Definition in file <a class="el" href="rs__cl_8rsh_source.html">rs_cl.rsh</a>.</p>
 </div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a1ed0afedda2068ad1f9ad14ef3449e50"></a><!-- doxytag: member="rs_cl.rsh::abs" ref="a1ed0afedda2068ad1f9ad14ef3449e50" args="(char v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> abs </td>
+          <td>(</td>
+          <td class="paramtype">char&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the absolute value of a value.</p>
+<p>Supports 1,2,3,4 components of char, short, int. </p>
+
+</div>
+</div>
 <a class="anchor" id="a07648648c7f857cfd1479821d4389751"></a><!-- doxytag: member="rs_cl.rsh::acos" ref="a07648648c7f857cfd1479821d4389751" args="(float)" -->
 <div class="memitem">
 <div class="memproto">
@@ -151,12 +191,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a2c0c7c00815bd480fcda80d1144ac20d"></a><!-- doxytag: member="rs_cl.rsh::acospi" ref="a2c0c7c00815bd480fcda80d1144ac20d" args="(float v)" -->
+<a class="anchor" id="a2c9092eb07e9df891935e93469e70d4e"></a><!-- doxytag: member="rs_cl.rsh::acospi" ref="a2c9092eb07e9df891935e93469e70d4e" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float acospi </td>
+          <td class="memname">float acospi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -208,12 +248,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a679b63e86358fc962cb343eb6263496b"></a><!-- doxytag: member="rs_cl.rsh::asinpi" ref="a679b63e86358fc962cb343eb6263496b" args="(float v)" -->
+<a class="anchor" id="a812eb4521e65a451161417f9898384f7"></a><!-- doxytag: member="rs_cl.rsh::asinpi" ref="a812eb4521e65a451161417f9898384f7" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float asinpi </td>
+          <td class="memname">float asinpi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -282,12 +322,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a9aed0a1613c86acf5e4c5ad3290a4745"></a><!-- doxytag: member="rs_cl.rsh::atan2pi" ref="a9aed0a1613c86acf5e4c5ad3290a4745" args="(float y, float x)" -->
+<a class="anchor" id="a89ec5f6a2f64a0f9e97438fbd41aaace"></a><!-- doxytag: member="rs_cl.rsh::atan2pi" ref="a89ec5f6a2f64a0f9e97438fbd41aaace" args="(float y, float x)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float atan2pi </td>
+          <td class="memname">float atan2pi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>y</em>, </td>
@@ -337,12 +377,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a420d4aaea0e53d7172845a21a1e648ea"></a><!-- doxytag: member="rs_cl.rsh::atanpi" ref="a420d4aaea0e53d7172845a21a1e648ea" args="(float v)" -->
+<a class="anchor" id="a5052e31ce616d35aee25a3a83f6fc117"></a><!-- doxytag: member="rs_cl.rsh::atanpi" ref="a5052e31ce616d35aee25a3a83f6fc117" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float atanpi </td>
+          <td class="memname">float atanpi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -394,12 +434,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ad4dab580aba6cf15539b407b9163dfde"></a><!-- doxytag: member="rs_cl.rsh::clamp" ref="ad4dab580aba6cf15539b407b9163dfde" args="(float amount, float low, float high)" -->
+<a class="anchor" id="afae5eac13e35acd0f47d7e3c601e16ed"></a><!-- doxytag: member="rs_cl.rsh::clamp" ref="afae5eac13e35acd0f47d7e3c601e16ed" args="(float amount, float low, float high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> clamp </td>
+          <td class="memname">float clamp </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -424,9 +464,7 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Return the minimum of two values.</p>
-<p>Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. Return the maximum of two values.</p>
-<p>Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. Clamp a value to a specified high and low bound.</p>
+<p>Clamp a value to a specified high and low bound.</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
     <tr><td class="paramname">amount</td><td>value to be clamped. Supports 1,2,3,4 components </td></tr>
@@ -438,6 +476,158 @@
 
 </div>
 </div>
+<a class="anchor" id="a8a0f94dce3caa2a50cbf2d9f4bc674ac"></a><!-- doxytag: member="rs_cl.rsh::clz" ref="a8a0f94dce3caa2a50cbf2d9f4bc674ac" args="(uchar v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> clz </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the number of leading 0-bits in a value.</p>
+<p>Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int. </p>
+
+</div>
+</div>
+<a class="anchor" id="a67421c4b17df15a1c726d912770e5ca4"></a><!-- doxytag: member="rs_cl.rsh::convert_char2" ref="a67421c4b17df15a1c726d912770e5ca4" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a> convert_char2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to char.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a1ad62d449c1e3548573c2f9c1a5cb13a"></a><!-- doxytag: member="rs_cl.rsh::convert_float2" ref="a1ad62d449c1e3548573c2f9c1a5cb13a" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> convert_float2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to float.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a9d2e4b8f0f25a7ccaed05248edc21f06"></a><!-- doxytag: member="rs_cl.rsh::convert_int2" ref="a9d2e4b8f0f25a7ccaed05248edc21f06" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a> convert_int2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to int.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a83e89db1940f3190fbec5bd823a99fc5"></a><!-- doxytag: member="rs_cl.rsh::convert_short2" ref="a83e89db1940f3190fbec5bd823a99fc5" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a> convert_short2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to short.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a833bb5476683ec5692feaf0cd5dcdd80"></a><!-- doxytag: member="rs_cl.rsh::convert_uchar2" ref="a833bb5476683ec5692feaf0cd5dcdd80" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> convert_uchar2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to unsigned char.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a01ff256469203ba33ba0f220b54e70d1"></a><!-- doxytag: member="rs_cl.rsh::convert_uint2" ref="a01ff256469203ba33ba0f220b54e70d1" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a> convert_uint2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to unsigned int.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a6862ea6ddfba8a59796bc681a544fb4f"></a><!-- doxytag: member="rs_cl.rsh::convert_ushort2" ref="a6862ea6ddfba8a59796bc681a544fb4f" args="(uchar2 v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a> convert_ushort2 </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Convert to unsigned short.</p>
+<p>Supports 2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
 <a class="anchor" id="a29f2602d95aa7b3950e2b77b3e268f7e"></a><!-- doxytag: member="rs_cl.rsh::copysign" ref="a29f2602d95aa7b3950e2b77b3e268f7e" args="(float x, float y)" -->
 <div class="memitem">
 <div class="memproto">
@@ -512,12 +702,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a07b12188bd53c6b584274892f6abf425"></a><!-- doxytag: member="rs_cl.rsh::cospi" ref="a07b12188bd53c6b584274892f6abf425" args="(float v)" -->
+<a class="anchor" id="a258d2c828fd46eae2867373884d834a9"></a><!-- doxytag: member="rs_cl.rsh::cospi" ref="a258d2c828fd46eae2867373884d834a9" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float cospi </td>
+          <td class="memname">float cospi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -531,12 +721,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a0f7beb26bb4aa30535babd14492a7e90"></a><!-- doxytag: member="rs_cl.rsh::cross" ref="a0f7beb26bb4aa30535babd14492a7e90" args="(float3 lhs, float3 rhs)" -->
+<a class="anchor" id="add745d593bc2b23285bd10e52a204e25"></a><!-- doxytag: member="rs_cl.rsh::cross" ref="add745d593bc2b23285bd10e52a204e25" args="(float3 lhs, float3 rhs)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> cross </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> cross </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>&#160;</td>
           <td class="paramname"><em>lhs</em>, </td>
@@ -560,12 +750,12 @@
 
 </div>
 </div>
-<a class="anchor" id="adc1b551193e66d8037daa1721df4d29c"></a><!-- doxytag: member="rs_cl.rsh::degrees" ref="adc1b551193e66d8037daa1721df4d29c" args="(float radians)" -->
+<a class="anchor" id="a0276b63d6905fa802032f1490a24515b"></a><!-- doxytag: member="rs_cl.rsh::degrees" ref="a0276b63d6905fa802032f1490a24515b" args="(float radians)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float degrees </td>
+          <td class="memname">float degrees </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>radians</em></td><td>)</td>
@@ -579,12 +769,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a4488863373be92e113e9d24aa3d21e76"></a><!-- doxytag: member="rs_cl.rsh::distance" ref="a4488863373be92e113e9d24aa3d21e76" args="(float lhs, float rhs)" -->
+<a class="anchor" id="a412bf215ae838c65079560bbefefaca7"></a><!-- doxytag: member="rs_cl.rsh::distance" ref="a412bf215ae838c65079560bbefefaca7" args="(float lhs, float rhs)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float distance </td>
+          <td class="memname">float distance </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>lhs</em>, </td>
@@ -608,12 +798,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a70544acaca578035a849eef67d62c449"></a><!-- doxytag: member="rs_cl.rsh::dot" ref="a70544acaca578035a849eef67d62c449" args="(float lhs, float rhs)" -->
+<a class="anchor" id="aa26d85eac3067e9769b33b6914b180f2"></a><!-- doxytag: member="rs_cl.rsh::dot" ref="aa26d85eac3067e9769b33b6914b180f2" args="(float lhs, float rhs)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float dot </td>
+          <td class="memname">float dot </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>lhs</em>, </td>
@@ -694,12 +884,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a4b51589157c9ce600ea6156be51d8d18"></a><!-- doxytag: member="rs_cl.rsh::exp10" ref="a4b51589157c9ce600ea6156be51d8d18" args="(float v)" -->
+<a class="anchor" id="a0225ff40d79f78260293e776c6a77422"></a><!-- doxytag: member="rs_cl.rsh::exp10" ref="a0225ff40d79f78260293e776c6a77422" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float exp10 </td>
+          <td class="memname">float exp10 </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -770,6 +960,73 @@
 
 </div>
 </div>
+<a class="anchor" id="a4fcbdb9099e7d653a951cb344ba3c3c9"></a><!-- doxytag: member="rs_cl.rsh::fast_distance" ref="a4fcbdb9099e7d653a951cb344ba3c3c9" args="(float lhs, float rhs)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float fast_distance </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>lhs</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>rhs</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Compute the approximate distance between two points.</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="a7c8f2f987044a360b5f616a80a74a4d5"></a><!-- doxytag: member="rs_cl.rsh::fast_length" ref="a7c8f2f987044a360b5f616a80a74a4d5" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float fast_length </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Compute the approximate length of a vector.</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="a3878bee2879351f518be68e015d76a35"></a><!-- doxytag: member="rs_cl.rsh::fast_normalize" ref="a3878bee2879351f518be68e015d76a35" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float fast_normalize </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Approximately normalize a vector.</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
 <a class="anchor" id="ae7a7bac0f4e244594078f87b42c8716a"></a><!-- doxytag: member="rs_cl.rsh::fdim" ref="ae7a7bac0f4e244594078f87b42c8716a" args="(float, float)" -->
 <div class="memitem">
 <div class="memproto">
@@ -953,12 +1210,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ac5277212e0df309a0a7c908424f7b14b"></a><!-- doxytag: member="rs_cl.rsh::fract" ref="ac5277212e0df309a0a7c908424f7b14b" args="(float v, float *iptr)" -->
+<a class="anchor" id="a9374786a1bbe3d2dd886cfad642bfec6"></a><!-- doxytag: member="rs_cl.rsh::fract" ref="a9374786a1bbe3d2dd886cfad642bfec6" args="(float v, float *iptr)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float fract </td>
+          <td class="memname">float fract </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em>, </td>
@@ -987,6 +1244,27 @@
 
 </div>
 </div>
+<a class="anchor" id="a84b546baf72a871a5ba688d434d6ce2b"></a><!-- doxytag: member="rs_cl.rsh::fract" ref="a84b546baf72a871a5ba688d434d6ce2b" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">static <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> fract </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td><code> [inline, static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return fractional part of v</p>
+<p>Supports float, float2, float3, float4. </p>
+
+<p>Definition at line <a class="el" href="rs__cl_8rsh_source.html#l00485">485</a> of file <a class="el" href="rs__cl_8rsh_source.html">rs_cl.rsh</a>.</p>
+
+</div>
+</div>
 <a class="anchor" id="a778635fffed3cee8ab0800482ba53a30"></a><!-- doxytag: member="rs_cl.rsh::frexp" ref="a778635fffed3cee8ab0800482ba53a30" args="(float v, int *iptr)" -->
 <div class="memitem">
 <div class="memproto">
@@ -1022,6 +1300,63 @@
 
 </div>
 </div>
+<a class="anchor" id="a49050a8e32c95f60df4eaba9d7dfdca6"></a><!-- doxytag: member="rs_cl.rsh::half_recip" ref="a49050a8e32c95f60df4eaba9d7dfdca6" args="(float)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float half_recip </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the approximate reciprocal of a value.</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="a0925ceb22d33dcbb45914350ffa2edea"></a><!-- doxytag: member="rs_cl.rsh::half_rsqrt" ref="a0925ceb22d33dcbb45914350ffa2edea" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float half_rsqrt </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the approximate value of (1 / sqrt(value)).</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="a26e2c17b20ee4c98b78c365d390e4fb8"></a><!-- doxytag: member="rs_cl.rsh::half_sqrt" ref="a26e2c17b20ee4c98b78c365d390e4fb8" args="(float)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float half_sqrt </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the approximate square root of a value.</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
 <a class="anchor" id="a147f38d6e41f45de9b5e7c6f3dcac010"></a><!-- doxytag: member="rs_cl.rsh::hypot" ref="a147f38d6e41f45de9b5e7c6f3dcac010" args="(float x, float y)" -->
 <div class="memitem">
 <div class="memproto">
@@ -1105,12 +1440,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a1a222b7879342279e1e0070d6afd9e18"></a><!-- doxytag: member="rs_cl.rsh::length" ref="a1a222b7879342279e1e0070d6afd9e18" args="(float v)" -->
+<a class="anchor" id="a902d4d2fab31ba8f9631b1f681e99baa"></a><!-- doxytag: member="rs_cl.rsh::length" ref="a902d4d2fab31ba8f9631b1f681e99baa" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float length </td>
+          <td class="memname">float length </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1235,12 +1570,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a2fb571ae932f671ff3e9e97f2d3fabb7"></a><!-- doxytag: member="rs_cl.rsh::log2" ref="a2fb571ae932f671ff3e9e97f2d3fabb7" args="(float v)" -->
+<a class="anchor" id="aab1c4f06daf6f2a50fd73f0c28929213"></a><!-- doxytag: member="rs_cl.rsh::log2" ref="aab1c4f06daf6f2a50fd73f0c28929213" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float log2 </td>
+          <td class="memname">float log2 </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1308,12 +1643,70 @@
 
 </div>
 </div>
-<a class="anchor" id="af4c76d51368c8e330cb59ea5a0a2310e"></a><!-- doxytag: member="rs_cl.rsh::mix" ref="af4c76d51368c8e330cb59ea5a0a2310e" args="(float start, float stop, float amount)" -->
+<a class="anchor" id="a616bf7a90d8d3c73a48d2c395d9dc4ea"></a><!-- doxytag: member="rs_cl.rsh::max" ref="a616bf7a90d8d3c73a48d2c395d9dc4ea" args="(uchar v1, uchar v2)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> mix </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> max </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
+          <td class="paramname"><em>v1</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
+          <td class="paramname"><em>v2</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the maximum of two values.</p>
+<p>Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a5f61ca44b3ad4b11365b0c4137a22658"></a><!-- doxytag: member="rs_cl.rsh::min" ref="a5f61ca44b3ad4b11365b0c4137a22658" args="(uchar v1, uchar v2)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> min </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
+          <td class="paramname"><em>v1</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
+          <td class="paramname"><em>v2</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Return the minimum of two values.</p>
+<p>Supports 1,2,3,4 components of uchar, char, ushort, short, uint, int, float. </p>
+
+</div>
+</div>
+<a class="anchor" id="a254612a612ff7539b01a1478e03d8697"></a><!-- doxytag: member="rs_cl.rsh::mix" ref="a254612a612ff7539b01a1478e03d8697" args="(float start, float stop, float amount)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float mix </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>start</em>, </td>
@@ -1367,7 +1760,7 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Return the integral and fractional components of a number Supports 1,2,3,4 components</p>
+<p>Return the integral and fractional components of a number. Supports 1,2,3,4 components</p>
 <dl><dt><b>Parameters:</b></dt><dd>
   <table class="params">
     <tr><td class="paramname">x</td><td>Source value </td></tr>
@@ -1379,6 +1772,63 @@
 
 </div>
 </div>
+<a class="anchor" id="a45d8176823a05b891313f3d96decf491"></a><!-- doxytag: member="rs_cl.rsh::native_exp" ref="a45d8176823a05b891313f3d96decf491" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float native_exp </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Fast approximate exp valid for inputs -86.f to 86.f Max 8192 ulps of error</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="a601ee3d2bf769f1cdc39a886f7a6c986"></a><!-- doxytag: member="rs_cl.rsh::native_exp10" ref="a601ee3d2bf769f1cdc39a886f7a6c986" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float native_exp10 </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Fast approximate exp10 valid for inputs -37.f to 37.f Max 8192 ulps of error</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
+<a class="anchor" id="ab354691ecd844549b27ef9202e17f7ac"></a><!-- doxytag: member="rs_cl.rsh::native_exp2" ref="ab354691ecd844549b27ef9202e17f7ac" args="(float v)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float native_exp2 </td>
+          <td>(</td>
+          <td class="paramtype">float&#160;</td>
+          <td class="paramname"><em>v</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Fast approximate exp2 valid for inputs -125.f to 125.f Max 8192 ulps of error</p>
+<p>Supports 1,2,3,4 components </p>
+
+</div>
+</div>
 <a class="anchor" id="adb11df05fb9985595af0a7bd882bdeac"></a><!-- doxytag: member="rs_cl.rsh::nextafter" ref="adb11df05fb9985595af0a7bd882bdeac" args="(float x, float y)" -->
 <div class="memitem">
 <div class="memproto">
@@ -1408,12 +1858,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a373e03e92a1b7f3fdea5ca4ca159d2a8"></a><!-- doxytag: member="rs_cl.rsh::normalize" ref="a373e03e92a1b7f3fdea5ca4ca159d2a8" args="(float v)" -->
+<a class="anchor" id="a69c2a56f743593439d5ae5e3ec8e517f"></a><!-- doxytag: member="rs_cl.rsh::normalize" ref="a69c2a56f743593439d5ae5e3ec8e517f" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> normalize </td>
+          <td class="memname">float normalize </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1456,12 +1906,12 @@
 
 </div>
 </div>
-<a class="anchor" id="afd46205452017b741abb2e17fc28557d"></a><!-- doxytag: member="rs_cl.rsh::pown" ref="afd46205452017b741abb2e17fc28557d" args="(float v, int p)" -->
+<a class="anchor" id="a67d1fe795e092003f687f3cc6d3c407a"></a><!-- doxytag: member="rs_cl.rsh::pown" ref="a67d1fe795e092003f687f3cc6d3c407a" args="(float v, int p)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float pown </td>
+          <td class="memname">float pown </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em>, </td>
@@ -1485,12 +1935,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a3ff65421721ec8e6ce8d875a563d005f"></a><!-- doxytag: member="rs_cl.rsh::powr" ref="a3ff65421721ec8e6ce8d875a563d005f" args="(float v, float p)" -->
+<a class="anchor" id="a316c30ba3e6bc11673bfd34bb4746d24"></a><!-- doxytag: member="rs_cl.rsh::powr" ref="a316c30ba3e6bc11673bfd34bb4746d24" args="(float v, float p)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float powr </td>
+          <td class="memname">float powr </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em>, </td>
@@ -1520,12 +1970,12 @@
 
 </div>
 </div>
-<a class="anchor" id="aaef2526c4d190ba6f7301b4e810917a7"></a><!-- doxytag: member="rs_cl.rsh::radians" ref="aaef2526c4d190ba6f7301b4e810917a7" args="(float degrees)" -->
+<a class="anchor" id="aceb63a0da6393b8ac2ed229bae6232d6"></a><!-- doxytag: member="rs_cl.rsh::radians" ref="aceb63a0da6393b8ac2ed229bae6232d6" args="(float degrees)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float radians </td>
+          <td class="memname">float radians </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>degrees</em></td><td>)</td>
@@ -1587,12 +2037,12 @@
 
 </div>
 </div>
-<a class="anchor" id="af169e7e1c575b7c24c1834569223077f"></a><!-- doxytag: member="rs_cl.rsh::rootn" ref="af169e7e1c575b7c24c1834569223077f" args="(float v, int n)" -->
+<a class="anchor" id="a2776b517528b8185a6bb50753af0f6cf"></a><!-- doxytag: member="rs_cl.rsh::rootn" ref="a2776b517528b8185a6bb50753af0f6cf" args="(float v, int n)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float rootn </td>
+          <td class="memname">float rootn </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em>, </td>
@@ -1635,12 +2085,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a5db00fde9e6bff693a38f3a37e7a1f70"></a><!-- doxytag: member="rs_cl.rsh::rsqrt" ref="a5db00fde9e6bff693a38f3a37e7a1f70" args="(float v)" -->
+<a class="anchor" id="a8a3992b97cb199b1c8d598996b600988"></a><!-- doxytag: member="rs_cl.rsh::rsqrt" ref="a8a3992b97cb199b1c8d598996b600988" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float rsqrt </td>
+          <td class="memname">float rsqrt </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1650,21 +2100,16 @@
 </div>
 <div class="memdoc">
 <p>Return (1 / sqrt(value)).</p>
-<dl><dt><b>Parameters:</b></dt><dd>
-  <table class="params">
-    <tr><td class="paramname">v</td><td>The incoming value in radians Supports 1,2,3,4 components </td></tr>
-  </table>
-  </dd>
-</dl>
+<p>Supports 1,2,3,4 components </p>
 
 </div>
 </div>
-<a class="anchor" id="a3e6d477a06dec7070f073eec9d8f420c"></a><!-- doxytag: member="rs_cl.rsh::sign" ref="a3e6d477a06dec7070f073eec9d8f420c" args="(float v)" -->
+<a class="anchor" id="a9fe423cc7d4c6d767f8a608d2ee76657"></a><!-- doxytag: member="rs_cl.rsh::sign" ref="a9fe423cc7d4c6d767f8a608d2ee76657" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float sign </td>
+          <td class="memname">float sign </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1673,6 +2118,7 @@
       </table>
 </div>
 <div class="memdoc">
+<p>Return the sign of a value.</p>
 <p>if (v &lt; 0) return -1.f; else if (v &gt; 0) return 1.f; else return 0.f;</p>
 <p>Supports 1,2,3,4 components </p>
 
@@ -1702,12 +2148,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a240f7c7c20b432a30dc660b5dd4cd320"></a><!-- doxytag: member="rs_cl.rsh::sincos" ref="a240f7c7c20b432a30dc660b5dd4cd320" args="(float v, float *cosptr)" -->
+<a class="anchor" id="a892c91a30bbc713aa77105d8e9e25881"></a><!-- doxytag: member="rs_cl.rsh::sincos" ref="a892c91a30bbc713aa77105d8e9e25881" args="(float v, float *cosptr)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float sincos </td>
+          <td class="memname">float sincos </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em>, </td>
@@ -1758,12 +2204,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a4fe4fef049786e888526d6f37b912b0a"></a><!-- doxytag: member="rs_cl.rsh::sinpi" ref="a4fe4fef049786e888526d6f37b912b0a" args="(float v)" -->
+<a class="anchor" id="a9ca027af0acf3ff22d91cd9489766976"></a><!-- doxytag: member="rs_cl.rsh::sinpi" ref="a9ca027af0acf3ff22d91cd9489766976" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float sinpi </td>
+          <td class="memname">float sinpi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
@@ -1796,12 +2242,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a4f7ba6882099d16853d0415982121900"></a><!-- doxytag: member="rs_cl.rsh::step" ref="a4f7ba6882099d16853d0415982121900" args="(float edge, float v)" -->
+<a class="anchor" id="a9f40337dfee48d1881b87b35aa8133dd"></a><!-- doxytag: member="rs_cl.rsh::step" ref="a9f40337dfee48d1881b87b35aa8133dd" args="(float edge, float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> step </td>
+          <td class="memname">float step </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>edge</em>, </td>
@@ -1875,12 +2321,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ad8bfb083dd3979a305e594a0d6e581c4"></a><!-- doxytag: member="rs_cl.rsh::tanpi" ref="ad8bfb083dd3979a305e594a0d6e581c4" args="(float v)" -->
+<a class="anchor" id="aee96c8910a7d8b0082574813b6b68b9a"></a><!-- doxytag: member="rs_cl.rsh::tanpi" ref="aee96c8910a7d8b0082574813b6b68b9a" args="(float v)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float tanpi </td>
+          <td class="memname">float tanpi </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>v</em></td><td>)</td>
diff --git a/docs/html/reference/renderscript/rs__cl_8rsh_source.html b/docs/html/reference/renderscript/rs__cl_8rsh_source.html
index 8cc3cb7..ae5f70e 100644
--- a/docs/html/reference/renderscript/rs__cl_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__cl_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_cl.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh Source File</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,11 +24,11 @@
   </div>
 <div class="header">
   <div class="headertitle">
-<div class="title">rs_cl.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_cl.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__cl_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>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2011 The Android Open Source Project</span>
+<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2011-2012 The Android Open Source Project</span>
 <a name="l00003"></a>00003 <span class="comment"> *</span>
 <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
 <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
@@ -48,11 +48,11 @@
 <a name="l00025"></a>00025 <span class="preprocessor"></span>
 <a name="l00026"></a>00026 <span class="comment">// Conversions</span>
 <a name="l00027"></a>00027 <span class="preprocessor">#define CVT_FUNC_2(typeout, typein)                             \</span>
-<a name="l00028"></a>00028 <span class="preprocessor">_RS_RUNTIME typeout##2 __attribute__((overloadable))             \</span>
+<a name="l00028"></a>00028 <span class="preprocessor">_RS_RUNTIME typeout##2 __attribute__((overloadable))            \</span>
 <a name="l00029"></a>00029 <span class="preprocessor">        convert_##typeout##2(typein##2 v);                      \</span>
-<a name="l00030"></a>00030 <span class="preprocessor">_RS_RUNTIME typeout##3 __attribute__((overloadable))             \</span>
+<a name="l00030"></a>00030 <span class="preprocessor">_RS_RUNTIME typeout##3 __attribute__((overloadable))            \</span>
 <a name="l00031"></a>00031 <span class="preprocessor">        convert_##typeout##3(typein##3 v);                      \</span>
-<a name="l00032"></a>00032 <span class="preprocessor">_RS_RUNTIME typeout##4 __attribute__((overloadable))             \</span>
+<a name="l00032"></a>00032 <span class="preprocessor">_RS_RUNTIME typeout##4 __attribute__((overloadable))            \</span>
 <a name="l00033"></a>00033 <span class="preprocessor">        convert_##typeout##4(typein##4 v);</span>
 <a name="l00034"></a>00034 <span class="preprocessor"></span>
 <a name="l00035"></a>00035 
@@ -64,410 +64,537 @@
 <a name="l00041"></a>00041 <span class="preprocessor">                        CVT_FUNC_2(type, int)       \</span>
 <a name="l00042"></a>00042 <span class="preprocessor">                        CVT_FUNC_2(type, float)</span>
 <a name="l00043"></a>00043 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 CVT_FUNC(<span class="keywordtype">char</span>)
-<a name="l00045"></a>00045 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>)
-<a name="l00046"></a>00046 CVT_FUNC(<span class="keywordtype">short</span>)
-<a name="l00047"></a>00047 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>)
-<a name="l00048"></a>00048 CVT_FUNC(<span class="keywordtype">int</span>)
-<a name="l00049"></a>00049 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>)
-<a name="l00050"></a>00050 CVT_FUNC(<span class="keywordtype">float</span>)
+<a name="l00049"></a>00049 CVT_FUNC(<span class="keywordtype">char</span>)
+<a name="l00050"></a>00050 
 <a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="comment">// Float ops, 6.11.2</span>
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054 <span class="preprocessor">#define FN_FUNC_FN(fnc)                                         \</span>
-<a name="l00055"></a>00055 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v);  \</span>
-<a name="l00056"></a>00056 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v);  \</span>
-<a name="l00057"></a>00057 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v);</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span>
-<a name="l00059"></a>00059 <span class="preprocessor">#define IN_FUNC_FN(fnc)                                         \</span>
-<a name="l00060"></a>00060 <span class="preprocessor">_RS_RUNTIME int2 __attribute__((overloadable)) fnc(float2 v);    \</span>
-<a name="l00061"></a>00061 <span class="preprocessor">_RS_RUNTIME int3 __attribute__((overloadable)) fnc(float3 v);    \</span>
-<a name="l00062"></a>00062 <span class="preprocessor">_RS_RUNTIME int4 __attribute__((overloadable)) fnc(float4 v);</span>
-<a name="l00063"></a>00063 <span class="preprocessor"></span>
-<a name="l00064"></a>00064 <span class="preprocessor">#define FN_FUNC_FN_FN(fnc)                                                  \</span>
-<a name="l00065"></a>00065 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float2 v2);  \</span>
-<a name="l00066"></a>00066 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float3 v2);  \</span>
-<a name="l00067"></a>00067 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float4 v2);</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>
-<a name="l00069"></a>00069 <span class="preprocessor">#define FN_FUNC_FN_F(fnc)                                                   \</span>
-<a name="l00070"></a>00070 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float v2);   \</span>
-<a name="l00071"></a>00071 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float v2);   \</span>
-<a name="l00072"></a>00072 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float v2);</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span>
-<a name="l00074"></a>00074 <span class="preprocessor">#define FN_FUNC_FN_IN(fnc)                                                  \</span>
-<a name="l00075"></a>00075 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 v2);    \</span>
-<a name="l00076"></a>00076 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 v2);    \</span>
-<a name="l00077"></a>00077 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 v2);    \</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_I(fnc)                                                   \</span>
-<a name="l00080"></a>00080 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int v2);     \</span>
-<a name="l00081"></a>00081 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int v2);     \</span>
-<a name="l00082"></a>00082 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int v2);</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span>
-<a name="l00084"></a>00084 <span class="preprocessor">#define FN_FUNC_FN_PFN(fnc)                     \</span>
-<a name="l00085"></a>00085 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) \</span>
-<a name="l00086"></a>00086 <span class="preprocessor">        fnc(float2 v1, float2 *v2);             \</span>
-<a name="l00087"></a>00087 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) \</span>
-<a name="l00088"></a>00088 <span class="preprocessor">        fnc(float3 v1, float3 *v2);             \</span>
-<a name="l00089"></a>00089 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) \</span>
-<a name="l00090"></a>00090 <span class="preprocessor">        fnc(float4 v1, float4 *v2);</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span>
-<a name="l00092"></a>00092 <span class="preprocessor">#define FN_FUNC_FN_PIN(fnc)                                                 \</span>
-<a name="l00093"></a>00093 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 *v2);   \</span>
-<a name="l00094"></a>00094 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 *v2);   \</span>
-<a name="l00095"></a>00095 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 *v2);</span>
+<a name="l00056"></a>00056 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>)
+<a name="l00057"></a>00057 
+<a name="l00063"></a>00063 CVT_FUNC(<span class="keywordtype">short</span>)
+<a name="l00064"></a>00064 
+<a name="l00070"></a>00070 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>)
+<a name="l00071"></a>00071 
+<a name="l00077"></a>00077 CVT_FUNC(<span class="keywordtype">int</span>)
+<a name="l00078"></a>00078 
+<a name="l00084"></a>00084 CVT_FUNC(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>)
+<a name="l00085"></a>00085 
+<a name="l00091"></a>00091 CVT_FUNC(<span class="keywordtype">float</span>)
+<a name="l00092"></a>00092 
+<a name="l00093"></a>00093 <span class="comment">// Float ops, 6.11.2</span>
+<a name="l00094"></a>00094 
+<a name="l00095"></a>00095 <span class="preprocessor">#ifdef DOXYGEN</span>
 <a name="l00096"></a>00096 <span class="preprocessor"></span>
-<a name="l00097"></a>00097 <span class="preprocessor">#define FN_FUNC_FN_FN_FN(fnc)                   \</span>
-<a name="l00098"></a>00098 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) \</span>
-<a name="l00099"></a>00099 <span class="preprocessor">        fnc(float2 v1, float2 v2, float2 v3);   \</span>
-<a name="l00100"></a>00100 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) \</span>
-<a name="l00101"></a>00101 <span class="preprocessor">        fnc(float3 v1, float3 v2, float3 v3);   \</span>
-<a name="l00102"></a>00102 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) \</span>
-<a name="l00103"></a>00103 <span class="preprocessor">        fnc(float4 v1, float4 v2, float4 v3);</span>
-<a name="l00104"></a>00104 <span class="preprocessor"></span>
-<a name="l00105"></a>00105 <span class="preprocessor">#define FN_FUNC_FN_FN_PIN(fnc)                  \</span>
-<a name="l00106"></a>00106 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) \</span>
-<a name="l00107"></a>00107 <span class="preprocessor">        fnc(float2 v1, float2 v2, int2 *v3);    \</span>
-<a name="l00108"></a>00108 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) \</span>
-<a name="l00109"></a>00109 <span class="preprocessor">        fnc(float3 v1, float3 v2, int3 *v3);    \</span>
-<a name="l00110"></a>00110 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) \</span>
-<a name="l00111"></a>00111 <span class="preprocessor">        fnc(float4 v1, float4 v2, int4 *v3);</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span>
-<a name="l00113"></a>00113 
-<a name="l00119"></a>00119 <span class="keyword">extern</span> <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">acos</a>(<span class="keywordtype">float</span>);
-<a name="l00120"></a>00120 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">acos</a>)
-<a name="l00121"></a>00121 
-<a name="l00127"></a>00127 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">acosh</a>(<span class="keywordtype">float</span>);
-<a name="l00128"></a>00128 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">acosh</a>)
-<a name="l00129"></a>00129 
-<a name="l00135"></a>00135 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2c0c7c00815bd480fcda80d1144ac20d">acospi</a>(<span class="keywordtype">float</span> v);
-<a name="l00136"></a>00136 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a2c0c7c00815bd480fcda80d1144ac20d">acospi</a>)
-<a name="l00137"></a>00137 
-<a name="l00143"></a>00143 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">asin</a>(<span class="keywordtype">float</span>);
-<a name="l00144"></a>00144 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">asin</a>)
-<a name="l00145"></a>00145 
-<a name="l00151"></a>00151 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">asinh</a>(<span class="keywordtype">float</span>);
-<a name="l00152"></a>00152 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">asinh</a>)
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154 
-<a name="l00160"></a>00160 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a679b63e86358fc962cb343eb6263496b">asinpi</a>(<span class="keywordtype">float</span> v);
-<a name="l00161"></a>00161 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a679b63e86358fc962cb343eb6263496b">asinpi</a>)
-<a name="l00162"></a>00162 
-<a name="l00168"></a>00168 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">atan</a>(<span class="keywordtype">float</span>);
-<a name="l00169"></a>00169 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">atan</a>)
-<a name="l00170"></a>00170 
-<a name="l00180"></a>00180 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">atan2</a>(<span class="keywordtype">float</span> y, <span class="keywordtype">float</span> x);
-<a name="l00181"></a>00181 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">atan2</a>)
-<a name="l00182"></a>00182 
-<a name="l00188"></a>00188 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">atanh</a>(<span class="keywordtype">float</span>);
-<a name="l00189"></a>00189 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">atanh</a>)
-<a name="l00190"></a>00190 
-<a name="l00196"></a>00196 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a420d4aaea0e53d7172845a21a1e648ea">atanpi</a>(<span class="keywordtype">float</span> v);
-<a name="l00197"></a>00197 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a420d4aaea0e53d7172845a21a1e648ea">atanpi</a>)
-<a name="l00198"></a>00198 
-<a name="l00208"></a>00208 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9aed0a1613c86acf5e4c5ad3290a4745">atan2pi</a>(<span class="keywordtype">float</span> y, <span class="keywordtype">float</span> x);
-<a name="l00209"></a>00209 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a9aed0a1613c86acf5e4c5ad3290a4745">atan2pi</a>)
-<a name="l00210"></a>00210 
-<a name="l00211"></a>00211 
-<a name="l00217"></a>00217 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae9d1787b55c2587478a24d96573225df">cbrt</a>(<span class="keywordtype">float</span>);
-<a name="l00218"></a>00218 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae9d1787b55c2587478a24d96573225df">cbrt</a>)
-<a name="l00219"></a>00219 
-<a name="l00225"></a>00225 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">ceil</a>(<span class="keywordtype">float</span>);
-<a name="l00226"></a>00226 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">ceil</a>)
-<a name="l00227"></a>00227 
-<a name="l00237"></a>00237 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">copysign</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00238"></a>00238 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">copysign</a>)
-<a name="l00239"></a>00239 
-<a name="l00245"></a>00245 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a8eec7aeb4b0c46b06cbcd1a3ac3e6f05">cos</a>(<span class="keywordtype">float</span>);
-<a name="l00246"></a>00246 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a8eec7aeb4b0c46b06cbcd1a3ac3e6f05">cos</a>)
-<a name="l00247"></a>00247 
-<a name="l00253"></a>00253 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">cosh</a>(<span class="keywordtype">float</span>);
-<a name="l00254"></a>00254 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">cosh</a>)
-<a name="l00255"></a>00255 
-<a name="l00261"></a>00261 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a07b12188bd53c6b584274892f6abf425">cospi</a>(<span class="keywordtype">float</span> v);
-<a name="l00262"></a>00262 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a07b12188bd53c6b584274892f6abf425">cospi</a>)
-<a name="l00263"></a>00263 
-<a name="l00269"></a>00269 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2e24dc8594e758b64c340153f67a533c">erfc</a>(<span class="keywordtype">float</span>);
-<a name="l00270"></a>00270 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a2e24dc8594e758b64c340153f67a533c">erfc</a>)
-<a name="l00271"></a>00271 
-<a name="l00277"></a>00277 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a139f102df651c25c26dd35d549173f57">erf</a>(<span class="keywordtype">float</span>);
-<a name="l00278"></a>00278 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a139f102df651c25c26dd35d549173f57">erf</a>)
-<a name="l00279"></a>00279 
-<a name="l00285"></a>00285 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">exp</a>(<span class="keywordtype">float</span>);
-<a name="l00286"></a>00286 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">exp</a>)
-<a name="l00287"></a>00287 
-<a name="l00293"></a>00293 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">exp2</a>(<span class="keywordtype">float</span>);
-<a name="l00294"></a>00294 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">exp2</a>)
-<a name="l00295"></a>00295 
-<a name="l00302"></a>00302 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">pow</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00303"></a>00303 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">pow</a>)
-<a name="l00304"></a>00304 
-<a name="l00310"></a>00310 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4b51589157c9ce600ea6156be51d8d18">exp10</a>(<span class="keywordtype">float</span> v);
-<a name="l00311"></a>00311 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a4b51589157c9ce600ea6156be51d8d18">exp10</a>)
-<a name="l00312"></a>00312 
-<a name="l00318"></a>00318 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a7996044b67be921a5e58e2fe76af66e2">expm1</a>(<span class="keywordtype">float</span>);
-<a name="l00319"></a>00319 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a7996044b67be921a5e58e2fe76af66e2">expm1</a>)
-<a name="l00320"></a>00320 
-<a name="l00326"></a>00326 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">fabs</a>(<span class="keywordtype">float</span>);
-<a name="l00327"></a>00327 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">fabs</a>)
-<a name="l00328"></a>00328 
-<a name="l00335"></a>00335 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">fdim</a>(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
-<a name="l00336"></a>00336 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">fdim</a>)
-<a name="l00337"></a>00337 
-<a name="l00343"></a>00343 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aae2da38a7246378dff8014ec407a30c3">floor</a>(<span class="keywordtype">float</span>);
-<a name="l00344"></a>00344 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aae2da38a7246378dff8014ec407a30c3">floor</a>)
-<a name="l00345"></a>00345 
-<a name="l00351"></a>00351 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ac42909daec463fe449743e70baf8360d">fma</a>(<span class="keywordtype">float</span> a, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> c);
-<a name="l00352"></a>00352 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#ac42909daec463fe449743e70baf8360d">fma</a>)
-<a name="l00353"></a>00353 
-<a name="l00361"></a>00361 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a60f2072d8a746e7fe05cd46dea0fefcc">fmax</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00362"></a>00362 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a60f2072d8a746e7fe05cd46dea0fefcc">fmax</a>);
-<a name="l00363"></a>00363 FN_FUNC_FN_F(fmax);
-<a name="l00364"></a>00364 
-<a name="l00371"></a>00371 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1fd9d57c6c992866bf5161be2cf4c447">fmin</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00372"></a>00372 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a1fd9d57c6c992866bf5161be2cf4c447">fmin</a>);
-<a name="l00373"></a>00373 FN_FUNC_FN_F(fmin);
-<a name="l00374"></a>00374 
-<a name="l00380"></a>00380 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">fmod</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00381"></a>00381 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">fmod</a>)
-<a name="l00382"></a>00382 
+<a name="l00097"></a>00097 <span class="preprocessor">#define FN_FUNC_FN(fnc)</span>
+<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define F_FUNC_FN(fnc)</span>
+<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define IN_FUNC_FN(fnc)</span>
+<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_FN(fnc)</span>
+<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define F_FUNC_FN_FN(fnc)</span>
+<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_F(fnc)</span>
+<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_IN(fnc)</span>
+<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_I(fnc)</span>
+<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_PFN(fnc)</span>
+<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_PIN(fnc)</span>
+<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_FN_FN(fnc)</span>
+<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_FN_F(fnc)</span>
+<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_F_F(fnc)</span>
+<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_FN_PIN(fnc)</span>
+<a name="l00111"></a>00111 <span class="preprocessor"></span>
+<a name="l00112"></a>00112 <span class="preprocessor">#else</span>
+<a name="l00113"></a>00113 <span class="preprocessor"></span>
+<a name="l00114"></a>00114 <span class="preprocessor">#define FN_FUNC_FN(fnc)                                         \</span>
+<a name="l00115"></a>00115 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v); \</span>
+<a name="l00116"></a>00116 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v); \</span>
+<a name="l00117"></a>00117 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v);</span>
+<a name="l00118"></a>00118 <span class="preprocessor"></span>
+<a name="l00119"></a>00119 <span class="preprocessor">#define F_FUNC_FN(fnc)                                          \</span>
+<a name="l00120"></a>00120 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float2 v);  \</span>
+<a name="l00121"></a>00121 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float3 v);  \</span>
+<a name="l00122"></a>00122 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float4 v);</span>
+<a name="l00123"></a>00123 <span class="preprocessor"></span>
+<a name="l00124"></a>00124 <span class="preprocessor">#define IN_FUNC_FN(fnc)                                         \</span>
+<a name="l00125"></a>00125 <span class="preprocessor">_RS_RUNTIME int2 __attribute__((overloadable)) fnc(float2 v);   \</span>
+<a name="l00126"></a>00126 <span class="preprocessor">_RS_RUNTIME int3 __attribute__((overloadable)) fnc(float3 v);   \</span>
+<a name="l00127"></a>00127 <span class="preprocessor">_RS_RUNTIME int4 __attribute__((overloadable)) fnc(float4 v);</span>
+<a name="l00128"></a>00128 <span class="preprocessor"></span>
+<a name="l00129"></a>00129 <span class="preprocessor">#define FN_FUNC_FN_FN(fnc)                                                  \</span>
+<a name="l00130"></a>00130 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float2 v2); \</span>
+<a name="l00131"></a>00131 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float3 v2); \</span>
+<a name="l00132"></a>00132 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float4 v2);</span>
+<a name="l00133"></a>00133 <span class="preprocessor"></span>
+<a name="l00134"></a>00134 <span class="preprocessor">#define F_FUNC_FN_FN(fnc)                                                   \</span>
+<a name="l00135"></a>00135 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float2 v1, float2 v2);  \</span>
+<a name="l00136"></a>00136 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float3 v1, float3 v2);  \</span>
+<a name="l00137"></a>00137 <span class="preprocessor">_RS_RUNTIME float __attribute__((overloadable)) fnc(float4 v1, float4 v2);</span>
+<a name="l00138"></a>00138 <span class="preprocessor"></span>
+<a name="l00139"></a>00139 <span class="preprocessor">#define FN_FUNC_FN_F(fnc)                                                   \</span>
+<a name="l00140"></a>00140 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, float v2);  \</span>
+<a name="l00141"></a>00141 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, float v2);  \</span>
+<a name="l00142"></a>00142 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, float v2);</span>
+<a name="l00143"></a>00143 <span class="preprocessor"></span>
+<a name="l00144"></a>00144 <span class="preprocessor">#define FN_FUNC_FN_IN(fnc)                                                  \</span>
+<a name="l00145"></a>00145 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 v2);   \</span>
+<a name="l00146"></a>00146 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 v2);   \</span>
+<a name="l00147"></a>00147 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 v2);   \</span>
+<a name="l00148"></a>00148 <span class="preprocessor"></span>
+<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="preprocessor">#define FN_FUNC_FN_I(fnc)                                                   \</span>
+<a name="l00150"></a>00150 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int v2);    \</span>
+<a name="l00151"></a>00151 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int v2);    \</span>
+<a name="l00152"></a>00152 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int v2);</span>
+<a name="l00153"></a>00153 <span class="preprocessor"></span>
+<a name="l00154"></a>00154 <span class="preprocessor">#define FN_FUNC_FN_PFN(fnc)                         \</span>
+<a name="l00155"></a>00155 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable))    \</span>
+<a name="l00156"></a>00156 <span class="preprocessor">        fnc(float2 v1, float2 *v2);                 \</span>
+<a name="l00157"></a>00157 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable))    \</span>
+<a name="l00158"></a>00158 <span class="preprocessor">        fnc(float3 v1, float3 *v2);                 \</span>
+<a name="l00159"></a>00159 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable))    \</span>
+<a name="l00160"></a>00160 <span class="preprocessor">        fnc(float4 v1, float4 *v2);</span>
+<a name="l00161"></a>00161 <span class="preprocessor"></span>
+<a name="l00162"></a>00162 <span class="preprocessor">#define FN_FUNC_FN_PIN(fnc)                                                 \</span>
+<a name="l00163"></a>00163 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable)) fnc(float2 v1, int2 *v2);  \</span>
+<a name="l00164"></a>00164 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable)) fnc(float3 v1, int3 *v2);  \</span>
+<a name="l00165"></a>00165 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable)) fnc(float4 v1, int4 *v2);</span>
+<a name="l00166"></a>00166 <span class="preprocessor"></span>
+<a name="l00167"></a>00167 <span class="preprocessor">#define FN_FUNC_FN_FN_FN(fnc)                       \</span>
+<a name="l00168"></a>00168 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable))    \</span>
+<a name="l00169"></a>00169 <span class="preprocessor">        fnc(float2 v1, float2 v2, float2 v3);       \</span>
+<a name="l00170"></a>00170 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable))    \</span>
+<a name="l00171"></a>00171 <span class="preprocessor">        fnc(float3 v1, float3 v2, float3 v3);       \</span>
+<a name="l00172"></a>00172 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable))    \</span>
+<a name="l00173"></a>00173 <span class="preprocessor">        fnc(float4 v1, float4 v2, float4 v3);</span>
+<a name="l00174"></a>00174 <span class="preprocessor"></span>
+<a name="l00175"></a>00175 <span class="preprocessor">#define FN_FUNC_FN_FN_F(fnc)                        \</span>
+<a name="l00176"></a>00176 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable))    \</span>
+<a name="l00177"></a>00177 <span class="preprocessor">        fnc(float2 v1, float2 v2, float v3);        \</span>
+<a name="l00178"></a>00178 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable))    \</span>
+<a name="l00179"></a>00179 <span class="preprocessor">        fnc(float3 v1, float3 v2, float v3);        \</span>
+<a name="l00180"></a>00180 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable))    \</span>
+<a name="l00181"></a>00181 <span class="preprocessor">        fnc(float4 v1, float4 v2, float v3);</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>
+<a name="l00183"></a>00183 <span class="preprocessor">#define FN_FUNC_FN_F_F(fnc)                         \</span>
+<a name="l00184"></a>00184 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable))    \</span>
+<a name="l00185"></a>00185 <span class="preprocessor">        fnc(float2 v1, float v2, float v3);         \</span>
+<a name="l00186"></a>00186 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable))    \</span>
+<a name="l00187"></a>00187 <span class="preprocessor">        fnc(float3 v1, float v2, float v3);         \</span>
+<a name="l00188"></a>00188 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable))    \</span>
+<a name="l00189"></a>00189 <span class="preprocessor">        fnc(float4 v1, float v2, float v3);</span>
+<a name="l00190"></a>00190 <span class="preprocessor"></span>
+<a name="l00191"></a>00191 <span class="preprocessor">#define FN_FUNC_FN_FN_PIN(fnc)                      \</span>
+<a name="l00192"></a>00192 <span class="preprocessor">_RS_RUNTIME float2 __attribute__((overloadable))    \</span>
+<a name="l00193"></a>00193 <span class="preprocessor">        fnc(float2 v1, float2 v2, int2 *v3);        \</span>
+<a name="l00194"></a>00194 <span class="preprocessor">_RS_RUNTIME float3 __attribute__((overloadable))    \</span>
+<a name="l00195"></a>00195 <span class="preprocessor">        fnc(float3 v1, float3 v2, int3 *v3);        \</span>
+<a name="l00196"></a>00196 <span class="preprocessor">_RS_RUNTIME float4 __attribute__((overloadable))    \</span>
+<a name="l00197"></a>00197 <span class="preprocessor">        fnc(float4 v1, float4 v2, int4 *v3);</span>
+<a name="l00198"></a>00198 <span class="preprocessor"></span>
+<a name="l00199"></a>00199 <span class="preprocessor">#endif  // DOXYGEN</span>
+<a name="l00200"></a>00200 <span class="preprocessor"></span>
+<a name="l00201"></a>00201 
+<a name="l00207"></a>00207 <span class="keyword">extern</span> <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">acos</a>(<span class="keywordtype">float</span>);
+<a name="l00208"></a>00208 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a07648648c7f857cfd1479821d4389751">acos</a>)
+<a name="l00209"></a>00209 
+<a name="l00215"></a>00215 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">acosh</a>(<span class="keywordtype">float</span>);
+<a name="l00216"></a>00216 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a6575106413ec72448439ef67f1309424">acosh</a>)
+<a name="l00217"></a>00217 
+<a name="l00223"></a>00223 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2c9092eb07e9df891935e93469e70d4e">acospi</a>(<span class="keywordtype">float</span> v);
+<a name="l00224"></a>00224 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a2c9092eb07e9df891935e93469e70d4e">acospi</a>)
+<a name="l00225"></a>00225 
+<a name="l00231"></a>00231 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">asin</a>(<span class="keywordtype">float</span>);
+<a name="l00232"></a>00232 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a78b9d0583bd0699e2eac30d2a136817a">asin</a>)
+<a name="l00233"></a>00233 
+<a name="l00239"></a>00239 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">asinh</a>(<span class="keywordtype">float</span>);
+<a name="l00240"></a>00240 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a4e3fe465ed5541af53192c59c80af1a0">asinh</a>)
+<a name="l00241"></a>00241 
+<a name="l00242"></a>00242 
+<a name="l00248"></a>00248 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a812eb4521e65a451161417f9898384f7">asinpi</a>(<span class="keywordtype">float</span> v);
+<a name="l00249"></a>00249 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a812eb4521e65a451161417f9898384f7">asinpi</a>)
+<a name="l00250"></a>00250 
+<a name="l00256"></a>00256 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">atan</a>(<span class="keywordtype">float</span>);
+<a name="l00257"></a>00257 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ab790c3a7df8fcbeab77f6c0e3b4dcada">atan</a>)
+<a name="l00258"></a>00258 
+<a name="l00268"></a>00268 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">atan2</a>(<span class="keywordtype">float</span> y, <span class="keywordtype">float</span> x);
+<a name="l00269"></a>00269 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#aaf4b636b09041878e1542054c73d81e9">atan2</a>)
+<a name="l00270"></a>00270 
+<a name="l00276"></a>00276 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">atanh</a>(<span class="keywordtype">float</span>);
+<a name="l00277"></a>00277 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a83bdf415cc561ff6237a124273d9fb0d">atanh</a>)
+<a name="l00278"></a>00278 
+<a name="l00284"></a>00284 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a5052e31ce616d35aee25a3a83f6fc117">atanpi</a>(<span class="keywordtype">float</span> v);
+<a name="l00285"></a>00285 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a5052e31ce616d35aee25a3a83f6fc117">atanpi</a>)
+<a name="l00286"></a>00286 
+<a name="l00296"></a>00296 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a89ec5f6a2f64a0f9e97438fbd41aaace">atan2pi</a>(<span class="keywordtype">float</span> y, <span class="keywordtype">float</span> x);
+<a name="l00297"></a>00297 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a89ec5f6a2f64a0f9e97438fbd41aaace">atan2pi</a>)
+<a name="l00298"></a>00298 
+<a name="l00299"></a>00299 
+<a name="l00305"></a>00305 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae9d1787b55c2587478a24d96573225df">cbrt</a>(<span class="keywordtype">float</span>);
+<a name="l00306"></a>00306 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae9d1787b55c2587478a24d96573225df">cbrt</a>)
+<a name="l00307"></a>00307 
+<a name="l00313"></a>00313 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">ceil</a>(<span class="keywordtype">float</span>);
+<a name="l00314"></a>00314 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aa8fc6daff743a1b635ccbf9af83fe4e4">ceil</a>)
+<a name="l00315"></a>00315 
+<a name="l00325"></a>00325 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">copysign</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00326"></a>00326 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a29f2602d95aa7b3950e2b77b3e268f7e">copysign</a>)
+<a name="l00327"></a>00327 
+<a name="l00333"></a>00333 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a8eec7aeb4b0c46b06cbcd1a3ac3e6f05">cos</a>(<span class="keywordtype">float</span>);
+<a name="l00334"></a>00334 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a8eec7aeb4b0c46b06cbcd1a3ac3e6f05">cos</a>)
+<a name="l00335"></a>00335 
+<a name="l00341"></a>00341 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">cosh</a>(<span class="keywordtype">float</span>);
+<a name="l00342"></a>00342 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ac8d88d83182afd591401eaed101d9670">cosh</a>)
+<a name="l00343"></a>00343 
+<a name="l00349"></a>00349 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a258d2c828fd46eae2867373884d834a9">cospi</a>(<span class="keywordtype">float</span> v);
+<a name="l00350"></a>00350 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a258d2c828fd46eae2867373884d834a9">cospi</a>)
+<a name="l00351"></a>00351 
+<a name="l00357"></a>00357 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2e24dc8594e758b64c340153f67a533c">erfc</a>(<span class="keywordtype">float</span>);
+<a name="l00358"></a>00358 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a2e24dc8594e758b64c340153f67a533c">erfc</a>)
+<a name="l00359"></a>00359 
+<a name="l00365"></a>00365 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a139f102df651c25c26dd35d549173f57">erf</a>(<span class="keywordtype">float</span>);
+<a name="l00366"></a>00366 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a139f102df651c25c26dd35d549173f57">erf</a>)
+<a name="l00367"></a>00367 
+<a name="l00373"></a>00373 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">exp</a>(<span class="keywordtype">float</span>);
+<a name="l00374"></a>00374 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a6d9aac64c2686961ca8f30e3c34fef36">exp</a>)
+<a name="l00375"></a>00375 
+<a name="l00381"></a>00381 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">exp2</a>(<span class="keywordtype">float</span>);
+<a name="l00382"></a>00382 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a39bca19ee2b1aa95144e58eb4a1e4f88">exp2</a>)
 <a name="l00383"></a>00383 
-<a name="l00390"></a>00390 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ac5277212e0df309a0a7c908424f7b14b">fract</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> *iptr);
-<a name="l00391"></a>00391 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#ac5277212e0df309a0a7c908424f7b14b">fract</a>)
+<a name="l00390"></a>00390 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">pow</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00391"></a>00391 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a9243de1d67fcc847a89f95748d664b19">pow</a>)
 <a name="l00392"></a>00392 
-<a name="l00399"></a>00399 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">frexp</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> *iptr);
-<a name="l00400"></a>00400 FN_FUNC_FN_PIN(<a class="code" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">frexp</a>)
-<a name="l00401"></a>00401 
-<a name="l00407"></a>00407 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">hypot</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00408"></a>00408 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">hypot</a>)
-<a name="l00409"></a>00409 
-<a name="l00415"></a>00415 extern <span class="keywordtype">int</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aad9a8beba52acb77b1efeba432e6cc2c">ilogb</a>(<span class="keywordtype">float</span>);
-<a name="l00416"></a>00416 IN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aad9a8beba52acb77b1efeba432e6cc2c">ilogb</a>)
-<a name="l00417"></a>00417 
-<a name="l00424"></a>00424 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">int</span> y);
-<a name="l00425"></a>00425 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>)
-<a name="l00426"></a>00426 FN_FUNC_FN_I(<a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>)
-<a name="l00427"></a>00427 
-<a name="l00433"></a>00433 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>(<span class="keywordtype">float</span>);
-<a name="l00434"></a>00434 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>)
-<a name="l00435"></a>00435 
-<a name="l00442"></a>00442 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">int</span>* y);
-<a name="l00443"></a>00443 FN_FUNC_FN_PIN(<a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>)
-<a name="l00444"></a>00444 
-<a name="l00450"></a>00450 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff85f5f4b206ecf9ec9d128d7d18a08">log</a>(<span class="keywordtype">float</span>);
-<a name="l00451"></a>00451 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3ff85f5f4b206ecf9ec9d128d7d18a08">log</a>)
+<a name="l00398"></a>00398 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a0225ff40d79f78260293e776c6a77422">exp10</a>(<span class="keywordtype">float</span> v);
+<a name="l00399"></a>00399 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a0225ff40d79f78260293e776c6a77422">exp10</a>)
+<a name="l00400"></a>00400 
+<a name="l00406"></a>00406 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a7996044b67be921a5e58e2fe76af66e2">expm1</a>(<span class="keywordtype">float</span>);
+<a name="l00407"></a>00407 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a7996044b67be921a5e58e2fe76af66e2">expm1</a>)
+<a name="l00408"></a>00408 
+<a name="l00414"></a>00414 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">fabs</a>(<span class="keywordtype">float</span>);
+<a name="l00415"></a>00415 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ad6e897f1acae252ec0901e3b122992ea">fabs</a>)
+<a name="l00416"></a>00416 
+<a name="l00423"></a>00423 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">fdim</a>(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
+<a name="l00424"></a>00424 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#ae7a7bac0f4e244594078f87b42c8716a">fdim</a>)
+<a name="l00425"></a>00425 
+<a name="l00431"></a>00431 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aae2da38a7246378dff8014ec407a30c3">floor</a>(<span class="keywordtype">float</span>);
+<a name="l00432"></a>00432 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aae2da38a7246378dff8014ec407a30c3">floor</a>)
+<a name="l00433"></a>00433 
+<a name="l00439"></a>00439 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ac42909daec463fe449743e70baf8360d">fma</a>(<span class="keywordtype">float</span> a, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> c);
+<a name="l00440"></a>00440 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#ac42909daec463fe449743e70baf8360d">fma</a>)
+<a name="l00441"></a>00441 
+<a name="l00449"></a>00449 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a60f2072d8a746e7fe05cd46dea0fefcc">fmax</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00450"></a>00450 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a60f2072d8a746e7fe05cd46dea0fefcc">fmax</a>);
+<a name="l00451"></a>00451 FN_FUNC_FN_F(fmax);
 <a name="l00452"></a>00452 
-<a name="l00458"></a>00458 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af5c1bdba2a13aa2e2b0722287f6a919f">log10</a>(<span class="keywordtype">float</span>);
-<a name="l00459"></a>00459 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#af5c1bdba2a13aa2e2b0722287f6a919f">log10</a>)
-<a name="l00460"></a>00460 
-<a name="l00466"></a>00466 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2fb571ae932f671ff3e9e97f2d3fabb7">log2</a>(<span class="keywordtype">float</span> v);
-<a name="l00467"></a>00467 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a2fb571ae932f671ff3e9e97f2d3fabb7">log2</a>)
-<a name="l00468"></a>00468 
-<a name="l00474"></a>00474 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">log1p</a>(<span class="keywordtype">float</span> v);
-<a name="l00475"></a>00475 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">log1p</a>)
-<a name="l00476"></a>00476 
-<a name="l00482"></a>00482 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">logb</a>(<span class="keywordtype">float</span>);
-<a name="l00483"></a>00483 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">logb</a>)
-<a name="l00484"></a>00484 
-<a name="l00490"></a>00490 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">mad</a>(<span class="keywordtype">float</span> a, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> c);
-<a name="l00491"></a>00491 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">mad</a>)
-<a name="l00492"></a>00492 
-<a name="l00501"></a>00501 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">modf</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> *iret);
-<a name="l00502"></a>00502 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">modf</a>);
-<a name="l00503"></a>00503 
-<a name="l00504"></a>00504 extern <span class="keywordtype">float</span> __attribute__((overloadable)) nan(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>);
-<a name="l00505"></a>00505 
-<a name="l00511"></a>00511 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">nextafter</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00512"></a>00512 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">nextafter</a>)
+<a name="l00459"></a>00459 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1fd9d57c6c992866bf5161be2cf4c447">fmin</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00460"></a>00460 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a1fd9d57c6c992866bf5161be2cf4c447">fmin</a>);
+<a name="l00461"></a>00461 FN_FUNC_FN_F(fmin);
+<a name="l00462"></a>00462 
+<a name="l00468"></a>00468 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">fmod</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00469"></a>00469 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a31d5e179730ae44e1dbc74c1535f392e">fmod</a>)
+<a name="l00470"></a>00470 
+<a name="l00477"></a>00477 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> *iptr);
+<a name="l00478"></a>00478 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>)
+<a name="l00479"></a>00479 
+<a name="l00485"></a><a class="code" href="rs__cl_8rsh.html#a84b546baf72a871a5ba688d434d6ce2b">00485</a> static inline <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(<span class="keywordtype">float</span> v) {
+<a name="l00486"></a>00486     <span class="keywordtype">float</span> unused;
+<a name="l00487"></a>00487     <span class="keywordflow">return</span> <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(v, &amp;unused);
+<a name="l00488"></a>00488 }
+<a name="l00489"></a>00489 
+<a name="l00490"></a>00490 <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> v) {
+<a name="l00491"></a>00491     <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> unused;
+<a name="l00492"></a>00492     <span class="keywordflow">return</span> <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(v, &amp;unused);
+<a name="l00493"></a>00493 }
+<a name="l00494"></a>00494 
+<a name="l00495"></a>00495 <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> v) {
+<a name="l00496"></a>00496     <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> unused;
+<a name="l00497"></a>00497     <span class="keywordflow">return</span> <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(v, &amp;unused);
+<a name="l00498"></a>00498 }
+<a name="l00499"></a>00499 
+<a name="l00500"></a>00500 <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> v) {
+<a name="l00501"></a>00501     <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> unused;
+<a name="l00502"></a>00502     <span class="keywordflow">return</span> <a class="code" href="rs__cl_8rsh.html#a9374786a1bbe3d2dd886cfad642bfec6">fract</a>(v, &amp;unused);
+<a name="l00503"></a>00503 }
+<a name="l00504"></a>00504 
+<a name="l00511"></a>00511 <span class="keyword">extern</span> <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">frexp</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> *iptr);
+<a name="l00512"></a>00512 FN_FUNC_FN_PIN(<a class="code" href="rs__cl_8rsh.html#a778635fffed3cee8ab0800482ba53a30">frexp</a>)
 <a name="l00513"></a>00513 
-<a name="l00519"></a>00519 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#afd46205452017b741abb2e17fc28557d">pown</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> p);
-<a name="l00520"></a>00520 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#afd46205452017b741abb2e17fc28557d">pown</a>)
+<a name="l00519"></a>00519 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">hypot</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00520"></a>00520 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a147f38d6e41f45de9b5e7c6f3dcac010">hypot</a>)
 <a name="l00521"></a>00521 
-<a name="l00528"></a>00528 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff65421721ec8e6ce8d875a563d005f">powr</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> p);
-<a name="l00529"></a>00529 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a3ff65421721ec8e6ce8d875a563d005f">powr</a>)
-<a name="l00530"></a>00530 
-<a name="l00536"></a>00536 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">remainder</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
-<a name="l00537"></a>00537 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">remainder</a>)
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539 <span class="comment">// document once we know the precision of bionic</span>
-<a name="l00540"></a>00540 extern <span class="keywordtype">float</span> __attribute__((overloadable)) remquo(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">int</span> *);
-<a name="l00541"></a>00541 FN_FUNC_FN_FN_PIN(remquo)
-<a name="l00542"></a>00542 
-<a name="l00548"></a>00548 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rint</a>(<span class="keywordtype">float</span>);
-<a name="l00549"></a>00549 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rint</a>)
-<a name="l00550"></a>00550 
-<a name="l00556"></a>00556 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af169e7e1c575b7c24c1834569223077f">rootn</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> n);
-<a name="l00557"></a>00557 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#af169e7e1c575b7c24c1834569223077f">rootn</a>)
-<a name="l00558"></a>00558 
-<a name="l00564"></a>00564 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">round</a>(<span class="keywordtype">float</span>);
-<a name="l00565"></a>00565 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">round</a>)
-<a name="l00566"></a>00566 
-<a name="l00572"></a>00572 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">sqrt</a>(<span class="keywordtype">float</span>);
-<a name="l00573"></a>00573 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">sqrt</a>)
-<a name="l00574"></a>00574 
-<a name="l00581"></a>00581 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a5db00fde9e6bff693a38f3a37e7a1f70">rsqrt</a>(<span class="keywordtype">float</span> v);
-<a name="l00582"></a>00582 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a5db00fde9e6bff693a38f3a37e7a1f70">rsqrt</a>)
-<a name="l00583"></a>00583 
-<a name="l00590"></a>00590 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">sin</a>(<span class="keywordtype">float</span> v);
-<a name="l00591"></a>00591 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">sin</a>)
-<a name="l00592"></a>00592 
-<a name="l00602"></a>00602 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a240f7c7c20b432a30dc660b5dd4cd320">sincos</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> *cosptr);
-<a name="l00603"></a>00603 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#a240f7c7c20b432a30dc660b5dd4cd320">sincos</a>);
+<a name="l00527"></a>00527 extern <span class="keywordtype">int</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aad9a8beba52acb77b1efeba432e6cc2c">ilogb</a>(<span class="keywordtype">float</span>);
+<a name="l00528"></a>00528 IN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aad9a8beba52acb77b1efeba432e6cc2c">ilogb</a>)
+<a name="l00529"></a>00529 
+<a name="l00536"></a>00536 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">int</span> y);
+<a name="l00537"></a>00537 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>)
+<a name="l00538"></a>00538 FN_FUNC_FN_I(<a class="code" href="rs__cl_8rsh.html#a013bc1dcda984cbc608e123ed38491e6">ldexp</a>)
+<a name="l00539"></a>00539 
+<a name="l00545"></a>00545 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>(<span class="keywordtype">float</span>);
+<a name="l00546"></a>00546 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>)
+<a name="l00547"></a>00547 
+<a name="l00554"></a>00554 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">int</span>* y);
+<a name="l00555"></a>00555 FN_FUNC_FN_PIN(<a class="code" href="rs__cl_8rsh.html#a3ff36f9b21927d6b4b58616e48fddcb4">lgamma</a>)
+<a name="l00556"></a>00556 
+<a name="l00562"></a>00562 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3ff85f5f4b206ecf9ec9d128d7d18a08">log</a>(<span class="keywordtype">float</span>);
+<a name="l00563"></a>00563 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3ff85f5f4b206ecf9ec9d128d7d18a08">log</a>)
+<a name="l00564"></a>00564 
+<a name="l00570"></a>00570 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af5c1bdba2a13aa2e2b0722287f6a919f">log10</a>(<span class="keywordtype">float</span>);
+<a name="l00571"></a>00571 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#af5c1bdba2a13aa2e2b0722287f6a919f">log10</a>)
+<a name="l00572"></a>00572 
+<a name="l00578"></a>00578 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aab1c4f06daf6f2a50fd73f0c28929213">log2</a>(<span class="keywordtype">float</span> v);
+<a name="l00579"></a>00579 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aab1c4f06daf6f2a50fd73f0c28929213">log2</a>)
+<a name="l00580"></a>00580 
+<a name="l00586"></a>00586 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">log1p</a>(<span class="keywordtype">float</span> v);
+<a name="l00587"></a>00587 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae10541ede49062ef7f977712c4878c1f">log1p</a>)
+<a name="l00588"></a>00588 
+<a name="l00594"></a>00594 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">logb</a>(<span class="keywordtype">float</span>);
+<a name="l00595"></a>00595 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a28742d6ce2f20a61f16ecc08ed499871">logb</a>)
+<a name="l00596"></a>00596 
+<a name="l00602"></a>00602 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">mad</a>(<span class="keywordtype">float</span> a, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> c);
+<a name="l00603"></a>00603 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#a4f9086698f1eb466ba2dccf7e331cdc3">mad</a>)
 <a name="l00604"></a>00604 
-<a name="l00610"></a>00610 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">sinh</a>(<span class="keywordtype">float</span>);
-<a name="l00611"></a>00611 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">sinh</a>)
-<a name="l00612"></a>00612 
-<a name="l00618"></a>00618 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4fe4fef049786e888526d6f37b912b0a">sinpi</a>(<span class="keywordtype">float</span> v);
-<a name="l00619"></a>00619 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a4fe4fef049786e888526d6f37b912b0a">sinpi</a>)
-<a name="l00620"></a>00620 
-<a name="l00627"></a>00627 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af12e245af8ff9bb72b5000e7c26cd8fe">tan</a>(<span class="keywordtype">float</span> v);
-<a name="l00628"></a>00628 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#af12e245af8ff9bb72b5000e7c26cd8fe">tan</a>)
-<a name="l00629"></a>00629 
-<a name="l00636"></a>00636 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">tanh</a>(<span class="keywordtype">float</span>);
-<a name="l00637"></a>00637 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">tanh</a>)
-<a name="l00638"></a>00638 
-<a name="l00644"></a>00644 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad8bfb083dd3979a305e594a0d6e581c4">tanpi</a>(<span class="keywordtype">float</span> v);
-<a name="l00645"></a>00645 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ad8bfb083dd3979a305e594a0d6e581c4">tanpi</a>)
-<a name="l00646"></a>00646 
-<a name="l00652"></a>00652 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">tgamma</a>(<span class="keywordtype">float</span>);
-<a name="l00653"></a>00653 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">tgamma</a>)
+<a name="l00613"></a>00613 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">modf</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> *iret);
+<a name="l00614"></a>00614 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#a841633bcdcaeb6a514d9c6460f0adf2d">modf</a>);
+<a name="l00615"></a>00615 
+<a name="l00616"></a>00616 extern <span class="keywordtype">float</span> __attribute__((overloadable)) nan(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>);
+<a name="l00617"></a>00617 
+<a name="l00623"></a>00623 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">nextafter</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00624"></a>00624 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#adb11df05fb9985595af0a7bd882bdeac">nextafter</a>)
+<a name="l00625"></a>00625 
+<a name="l00631"></a>00631 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a67d1fe795e092003f687f3cc6d3c407a">pown</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> p);
+<a name="l00632"></a>00632 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#a67d1fe795e092003f687f3cc6d3c407a">pown</a>)
+<a name="l00633"></a>00633 
+<a name="l00640"></a>00640 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a316c30ba3e6bc11673bfd34bb4746d24">powr</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> p);
+<a name="l00641"></a>00641 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a316c30ba3e6bc11673bfd34bb4746d24">powr</a>)
+<a name="l00642"></a>00642 
+<a name="l00648"></a>00648 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">remainder</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);
+<a name="l00649"></a>00649 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a5188ac0e3af95b0956c6abeafb74fda9">remainder</a>)
+<a name="l00650"></a>00650 
+<a name="l00651"></a>00651 <span class="comment">// document once we know the precision of bionic</span>
+<a name="l00652"></a>00652 extern <span class="keywordtype">float</span> __attribute__((overloadable)) remquo(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">int</span> *);
+<a name="l00653"></a>00653 FN_FUNC_FN_FN_PIN(remquo)
 <a name="l00654"></a>00654 
-<a name="l00660"></a>00660 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad1a7c65693231219db1babeae1c41f15">trunc</a>(<span class="keywordtype">float</span>);
-<a name="l00661"></a>00661 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ad1a7c65693231219db1babeae1c41f15">trunc</a>)
+<a name="l00660"></a>00660 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rint</a>(<span class="keywordtype">float</span>);
+<a name="l00661"></a>00661 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#adb0ffe344ae56ca7fc9083c1f2943e55">rint</a>)
 <a name="l00662"></a>00662 
-<a name="l00663"></a>00663 
-<a name="l00664"></a>00664 <span class="preprocessor">#define XN_FUNC_YN(typeout, fnc, typein)                                \</span>
-<a name="l00665"></a>00665 <span class="preprocessor">extern typeout __attribute__((overloadable)) fnc(typein);               \</span>
-<a name="l00666"></a>00666 <span class="preprocessor">_RS_RUNTIME typeout##2 __attribute__((overloadable)) fnc(typein##2 v);   \</span>
-<a name="l00667"></a>00667 <span class="preprocessor">_RS_RUNTIME typeout##3 __attribute__((overloadable)) fnc(typein##3 v);   \</span>
-<a name="l00668"></a>00668 <span class="preprocessor">_RS_RUNTIME typeout##4 __attribute__((overloadable)) fnc(typein##4 v);</span>
-<a name="l00669"></a>00669 <span class="preprocessor"></span>
-<a name="l00670"></a>00670 <span class="preprocessor">#define UIN_FUNC_IN(fnc)          \</span>
-<a name="l00671"></a>00671 <span class="preprocessor">XN_FUNC_YN(uchar, fnc, char)      \</span>
-<a name="l00672"></a>00672 <span class="preprocessor">XN_FUNC_YN(ushort, fnc, short)    \</span>
-<a name="l00673"></a>00673 <span class="preprocessor">XN_FUNC_YN(uint, fnc, int)</span>
-<a name="l00674"></a>00674 <span class="preprocessor"></span>
-<a name="l00675"></a>00675 <span class="preprocessor">#define IN_FUNC_IN(fnc)           \</span>
-<a name="l00676"></a>00676 <span class="preprocessor">XN_FUNC_YN(uchar, fnc, uchar)     \</span>
-<a name="l00677"></a>00677 <span class="preprocessor">XN_FUNC_YN(char, fnc, char)       \</span>
-<a name="l00678"></a>00678 <span class="preprocessor">XN_FUNC_YN(ushort, fnc, ushort)   \</span>
-<a name="l00679"></a>00679 <span class="preprocessor">XN_FUNC_YN(short, fnc, short)     \</span>
-<a name="l00680"></a>00680 <span class="preprocessor">XN_FUNC_YN(uint, fnc, uint)       \</span>
-<a name="l00681"></a>00681 <span class="preprocessor">XN_FUNC_YN(int, fnc, int)</span>
-<a name="l00682"></a>00682 <span class="preprocessor"></span>
-<a name="l00683"></a>00683 
-<a name="l00684"></a>00684 <span class="preprocessor">#define XN_FUNC_XN_XN_BODY(type, fnc, body)         \</span>
-<a name="l00685"></a>00685 <span class="preprocessor">_RS_RUNTIME type __attribute__((overloadable))       \</span>
-<a name="l00686"></a>00686 <span class="preprocessor">        fnc(type v1, type v2);                      \</span>
-<a name="l00687"></a>00687 <span class="preprocessor">_RS_RUNTIME type##2 __attribute__((overloadable))    \</span>
-<a name="l00688"></a>00688 <span class="preprocessor">        fnc(type##2 v1, type##2 v2);                \</span>
-<a name="l00689"></a>00689 <span class="preprocessor">_RS_RUNTIME type##3 __attribute__((overloadable))    \</span>
-<a name="l00690"></a>00690 <span class="preprocessor">        fnc(type##3 v1, type##3 v2);                \</span>
-<a name="l00691"></a>00691 <span class="preprocessor">_RS_RUNTIME type##4 __attribute__((overloadable))    \</span>
-<a name="l00692"></a>00692 <span class="preprocessor">        fnc(type##4 v1, type##4 v2);</span>
-<a name="l00693"></a>00693 <span class="preprocessor"></span>
-<a name="l00694"></a>00694 <span class="preprocessor">#define IN_FUNC_IN_IN_BODY(fnc, body) \</span>
-<a name="l00695"></a>00695 <span class="preprocessor">XN_FUNC_XN_XN_BODY(uchar, fnc, body)  \</span>
-<a name="l00696"></a>00696 <span class="preprocessor">XN_FUNC_XN_XN_BODY(char, fnc, body)   \</span>
-<a name="l00697"></a>00697 <span class="preprocessor">XN_FUNC_XN_XN_BODY(ushort, fnc, body) \</span>
-<a name="l00698"></a>00698 <span class="preprocessor">XN_FUNC_XN_XN_BODY(short, fnc, body)  \</span>
-<a name="l00699"></a>00699 <span class="preprocessor">XN_FUNC_XN_XN_BODY(uint, fnc, body)   \</span>
-<a name="l00700"></a>00700 <span class="preprocessor">XN_FUNC_XN_XN_BODY(int, fnc, body)    \</span>
-<a name="l00701"></a>00701 <span class="preprocessor">XN_FUNC_XN_XN_BODY(float, fnc, body)</span>
-<a name="l00702"></a>00702 <span class="preprocessor"></span>
-<a name="l00703"></a>00703 UIN_FUNC_IN(abs)
-<a name="l00704"></a>00704 IN_FUNC_IN(clz)
-<a name="l00705"></a>00705 
-<a name="l00711"></a>00711 IN_FUNC_IN_IN_BODY(min, (v1 &lt; v2 ? v1 : v2))
-<a name="l00712"></a>00712 FN_FUNC_FN_F(min)
-<a name="l00713"></a>00713 
-<a name="l00719"></a>00719 IN_FUNC_IN_IN_BODY(max, (v1 &gt; v2 ? v1 : v2))
-<a name="l00720"></a>00720 FN_FUNC_FN_F(max)
-<a name="l00721"></a>00721 
-<a name="l00729"></a>00729 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<span class="keywordtype">float</span> amount, <span class="keywordtype">float</span> low, <span class="keywordtype">float</span> high);
-<a name="l00730"></a>00730 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> amount, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> low, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> high);
-<a name="l00731"></a>00731 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> amount, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> low, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> high);
-<a name="l00732"></a>00732 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> amount, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> low, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> high);
-<a name="l00733"></a>00733 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> amount, <span class="keywordtype">float</span> low, <span class="keywordtype">float</span> high);
-<a name="l00734"></a>00734 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> amount, <span class="keywordtype">float</span> low, <span class="keywordtype">float</span> high);
-<a name="l00735"></a>00735 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad4dab580aba6cf15539b407b9163dfde">clamp</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> amount, <span class="keywordtype">float</span> low, <span class="keywordtype">float</span> high);
-<a name="l00736"></a>00736 
-<a name="l00742"></a>00742 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">degrees</a>(<span class="keywordtype">float</span> <a class="code" href="rs__cl_8rsh.html#aaef2526c4d190ba6f7301b4e810917a7">radians</a>);
-<a name="l00743"></a>00743 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">degrees</a>)
-<a name="l00744"></a>00744 
-<a name="l00750"></a>00750 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<span class="keywordtype">float</span> start, <span class="keywordtype">float</span> stop, <span class="keywordtype">float</span> amount);
-<a name="l00751"></a>00751 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> start, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> stop, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> amount);
-<a name="l00752"></a>00752 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> start, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> stop, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> amount);
-<a name="l00753"></a>00753 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> start, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> stop, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> amount);
-<a name="l00754"></a>00754 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> start, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> stop, <span class="keywordtype">float</span> amount);
-<a name="l00755"></a>00755 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> start, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> stop, <span class="keywordtype">float</span> amount);
-<a name="l00756"></a>00756 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af4c76d51368c8e330cb59ea5a0a2310e">mix</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> start, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> stop, <span class="keywordtype">float</span> amount);
+<a name="l00668"></a>00668 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a2776b517528b8185a6bb50753af0f6cf">rootn</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">int</span> n);
+<a name="l00669"></a>00669 FN_FUNC_FN_IN(<a class="code" href="rs__cl_8rsh.html#a2776b517528b8185a6bb50753af0f6cf">rootn</a>)
+<a name="l00670"></a>00670 
+<a name="l00676"></a>00676 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">round</a>(<span class="keywordtype">float</span>);
+<a name="l00677"></a>00677 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aff4846ab5b947550814d5414a2c3626f">round</a>)
+<a name="l00678"></a>00678 
+<a name="l00684"></a>00684 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">sqrt</a>(<span class="keywordtype">float</span>);
+<a name="l00685"></a>00685 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a92da0faef80c4d8f66e954c8c169a729">sqrt</a>)
+<a name="l00686"></a>00686 
+<a name="l00692"></a>00692 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a8a3992b97cb199b1c8d598996b600988">rsqrt</a>(<span class="keywordtype">float</span> v);
+<a name="l00693"></a>00693 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a8a3992b97cb199b1c8d598996b600988">rsqrt</a>)
+<a name="l00694"></a>00694 
+<a name="l00701"></a>00701 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">sin</a>(<span class="keywordtype">float</span> v);
+<a name="l00702"></a>00702 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a8c8cd526b44eb55aede77cf659f24306">sin</a>)
+<a name="l00703"></a>00703 
+<a name="l00713"></a>00713 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a892c91a30bbc713aa77105d8e9e25881">sincos</a>(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> *cosptr);
+<a name="l00714"></a>00714 FN_FUNC_FN_PFN(<a class="code" href="rs__cl_8rsh.html#a892c91a30bbc713aa77105d8e9e25881">sincos</a>);
+<a name="l00715"></a>00715 
+<a name="l00721"></a>00721 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">sinh</a>(<span class="keywordtype">float</span>);
+<a name="l00722"></a>00722 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ae686e0cc567f7ee2b0a84706aa486e4a">sinh</a>)
+<a name="l00723"></a>00723 
+<a name="l00729"></a>00729 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9ca027af0acf3ff22d91cd9489766976">sinpi</a>(<span class="keywordtype">float</span> v);
+<a name="l00730"></a>00730 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a9ca027af0acf3ff22d91cd9489766976">sinpi</a>)
+<a name="l00731"></a>00731 
+<a name="l00738"></a>00738 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#af12e245af8ff9bb72b5000e7c26cd8fe">tan</a>(<span class="keywordtype">float</span> v);
+<a name="l00739"></a>00739 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#af12e245af8ff9bb72b5000e7c26cd8fe">tan</a>)
+<a name="l00740"></a>00740 
+<a name="l00747"></a>00747 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">tanh</a>(<span class="keywordtype">float</span>);
+<a name="l00748"></a>00748 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#abc36e89ddb87ea78451d1c5921ddbd8d">tanh</a>)
+<a name="l00749"></a>00749 
+<a name="l00755"></a>00755 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aee96c8910a7d8b0082574813b6b68b9a">tanpi</a>(<span class="keywordtype">float</span> v);
+<a name="l00756"></a>00756 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#aee96c8910a7d8b0082574813b6b68b9a">tanpi</a>)
 <a name="l00757"></a>00757 
-<a name="l00763"></a>00763 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) radians(<span class="keywordtype">float</span> <a class="code" href="rs__cl_8rsh.html#adc1b551193e66d8037daa1721df4d29c">degrees</a>);
-<a name="l00764"></a>00764 FN_FUNC_FN(radians)
+<a name="l00763"></a>00763 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">tgamma</a>(<span class="keywordtype">float</span>);
+<a name="l00764"></a>00764 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ab9f4cbfd2470420ee302f28cf3de6dd0">tgamma</a>)
 <a name="l00765"></a>00765 
-<a name="l00774"></a>00774 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<span class="keywordtype">float</span> edge, <span class="keywordtype">float</span> v);
-<a name="l00775"></a>00775 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> edge, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> v);
-<a name="l00776"></a>00776 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> edge, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> v);
-<a name="l00777"></a>00777 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> edge, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> v);
-<a name="l00778"></a>00778 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> edge, <span class="keywordtype">float</span> v);
-<a name="l00779"></a>00779 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> edge, <span class="keywordtype">float</span> v);
-<a name="l00780"></a>00780 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4f7ba6882099d16853d0415982121900">step</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> edge, <span class="keywordtype">float</span> v);
-<a name="l00781"></a>00781 
-<a name="l00782"></a>00782 <span class="comment">// not implemented</span>
-<a name="l00783"></a>00783 extern <span class="keywordtype">float</span> __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
-<a name="l00784"></a>00784 extern <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>, float2, float2);
-<a name="l00785"></a>00785 extern <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>, float3, float3);
-<a name="l00786"></a>00786 extern <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>, float4, float4);
-<a name="l00787"></a>00787 extern float2 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float2);
-<a name="l00788"></a>00788 extern float3 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float3);
-<a name="l00789"></a>00789 extern float4 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float4);
-<a name="l00790"></a>00790 
-<a name="l00798"></a>00798 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3e6d477a06dec7070f073eec9d8f420c">sign</a>(<span class="keywordtype">float</span> v);
-<a name="l00799"></a>00799 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3e6d477a06dec7070f073eec9d8f420c">sign</a>)
-<a name="l00800"></a>00800 
-<a name="l00806"></a>00806 _RS_RUNTIME float3 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a0f7beb26bb4aa30535babd14492a7e90">cross</a>(float3 lhs, float3 rhs);
-<a name="l00807"></a>00807 _RS_RUNTIME float4 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a0f7beb26bb4aa30535babd14492a7e90">cross</a>(float4 lhs, float4 rhs);
-<a name="l00808"></a>00808 
-<a name="l00814"></a>00814 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(<span class="keywordtype">float</span> lhs, <span class="keywordtype">float</span> rhs);
-<a name="l00815"></a>00815 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(float2 lhs, float2 rhs);
-<a name="l00816"></a>00816 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(float3 lhs, float3 rhs);
-<a name="l00817"></a>00817 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(float4 lhs, float4 rhs);
-<a name="l00818"></a>00818 
-<a name="l00824"></a>00824 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(<span class="keywordtype">float</span> v);
-<a name="l00825"></a>00825 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(float2 v);
-<a name="l00826"></a>00826 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(float3 v);
-<a name="l00827"></a>00827 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(float4 v);
-<a name="l00828"></a>00828 
-<a name="l00834"></a>00834 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">distance</a>(<span class="keywordtype">float</span> lhs, <span class="keywordtype">float</span> rhs);
-<a name="l00835"></a>00835 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">distance</a>(float2 lhs, float2 rhs);
-<a name="l00836"></a>00836 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">distance</a>(float3 lhs, float3 rhs);
-<a name="l00837"></a>00837 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4488863373be92e113e9d24aa3d21e76">distance</a>(float4 lhs, float4 rhs);
-<a name="l00838"></a>00838 
-<a name="l00844"></a>00844 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">normalize</a>(<span class="keywordtype">float</span> v);
-<a name="l00845"></a>00845 _RS_RUNTIME float2 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">normalize</a>(float2 v);
-<a name="l00846"></a>00846 _RS_RUNTIME float3 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">normalize</a>(float3 v);
-<a name="l00847"></a>00847 _RS_RUNTIME float4 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a373e03e92a1b7f3fdea5ca4ca159d2a8">normalize</a>(float4 v);
-<a name="l00848"></a>00848 
-<a name="l00849"></a>00849 <span class="preprocessor">#undef CVT_FUNC</span>
-<a name="l00850"></a>00850 <span class="preprocessor"></span><span class="preprocessor">#undef CVT_FUNC_2</span>
-<a name="l00851"></a>00851 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN</span>
-<a name="l00852"></a>00852 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_FN</span>
-<a name="l00853"></a>00853 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN</span>
-<a name="l00854"></a>00854 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_F</span>
-<a name="l00855"></a>00855 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_IN</span>
-<a name="l00856"></a>00856 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_I</span>
-<a name="l00857"></a>00857 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_PFN</span>
-<a name="l00858"></a>00858 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_PIN</span>
-<a name="l00859"></a>00859 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN_FN</span>
-<a name="l00860"></a>00860 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN_PIN</span>
-<a name="l00861"></a>00861 <span class="preprocessor"></span><span class="preprocessor">#undef XN_FUNC_YN</span>
-<a name="l00862"></a>00862 <span class="preprocessor"></span><span class="preprocessor">#undef UIN_FUNC_IN</span>
-<a name="l00863"></a>00863 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_IN</span>
-<a name="l00864"></a>00864 <span class="preprocessor"></span><span class="preprocessor">#undef XN_FUNC_XN_XN_BODY</span>
-<a name="l00865"></a>00865 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_IN_IN_BODY</span>
-<a name="l00866"></a>00866 <span class="preprocessor"></span>
-<a name="l00867"></a>00867 <span class="preprocessor">#endif</span>
+<a name="l00771"></a>00771 extern <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ad1a7c65693231219db1babeae1c41f15">trunc</a>(<span class="keywordtype">float</span>);
+<a name="l00772"></a>00772 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ad1a7c65693231219db1babeae1c41f15">trunc</a>)
+<a name="l00773"></a>00773 
+<a name="l00774"></a>00774 <span class="preprocessor">#ifdef DOXYGEN</span>
+<a name="l00775"></a>00775 <span class="preprocessor"></span>
+<a name="l00776"></a>00776 <span class="preprocessor">#define XN_FUNC_YN(typeout, fnc, typein)                                \</span>
+<a name="l00777"></a>00777 <span class="preprocessor">extern typeout __attribute__((overloadable)) fnc(typein v);</span>
+<a name="l00778"></a>00778 <span class="preprocessor"></span>
+<a name="l00779"></a>00779 <span class="preprocessor">#define XN_FUNC_XN_XN_BODY(type, fnc, body)         \</span>
+<a name="l00780"></a>00780 <span class="preprocessor">_RS_RUNTIME type __attribute__((overloadable))      \</span>
+<a name="l00781"></a>00781 <span class="preprocessor">        fnc(type v1, type v2);</span>
+<a name="l00782"></a>00782 <span class="preprocessor"></span>
+<a name="l00783"></a>00783 <span class="preprocessor">#else</span>
+<a name="l00784"></a>00784 <span class="preprocessor"></span>
+<a name="l00785"></a>00785 <span class="preprocessor">#define XN_FUNC_YN(typeout, fnc, typein)                                \</span>
+<a name="l00786"></a>00786 <span class="preprocessor">extern typeout __attribute__((overloadable)) fnc(typein v);             \</span>
+<a name="l00787"></a>00787 <span class="preprocessor">_RS_RUNTIME typeout##2 __attribute__((overloadable)) fnc(typein##2 v);  \</span>
+<a name="l00788"></a>00788 <span class="preprocessor">_RS_RUNTIME typeout##3 __attribute__((overloadable)) fnc(typein##3 v);  \</span>
+<a name="l00789"></a>00789 <span class="preprocessor">_RS_RUNTIME typeout##4 __attribute__((overloadable)) fnc(typein##4 v);</span>
+<a name="l00790"></a>00790 <span class="preprocessor"></span>
+<a name="l00791"></a>00791 <span class="preprocessor">#define XN_FUNC_XN_XN_BODY(type, fnc, body)         \</span>
+<a name="l00792"></a>00792 <span class="preprocessor">_RS_RUNTIME type __attribute__((overloadable))      \</span>
+<a name="l00793"></a>00793 <span class="preprocessor">        fnc(type v1, type v2);                      \</span>
+<a name="l00794"></a>00794 <span class="preprocessor">_RS_RUNTIME type##2 __attribute__((overloadable))   \</span>
+<a name="l00795"></a>00795 <span class="preprocessor">        fnc(type##2 v1, type##2 v2);                \</span>
+<a name="l00796"></a>00796 <span class="preprocessor">_RS_RUNTIME type##3 __attribute__((overloadable))   \</span>
+<a name="l00797"></a>00797 <span class="preprocessor">        fnc(type##3 v1, type##3 v2);                \</span>
+<a name="l00798"></a>00798 <span class="preprocessor">_RS_RUNTIME type##4 __attribute__((overloadable))   \</span>
+<a name="l00799"></a>00799 <span class="preprocessor">        fnc(type##4 v1, type##4 v2);</span>
+<a name="l00800"></a>00800 <span class="preprocessor"></span>
+<a name="l00801"></a>00801 <span class="preprocessor">#endif  // DOXYGEN</span>
+<a name="l00802"></a>00802 <span class="preprocessor"></span>
+<a name="l00803"></a>00803 <span class="preprocessor">#define UIN_FUNC_IN(fnc)          \</span>
+<a name="l00804"></a>00804 <span class="preprocessor">XN_FUNC_YN(uchar, fnc, char)      \</span>
+<a name="l00805"></a>00805 <span class="preprocessor">XN_FUNC_YN(ushort, fnc, short)    \</span>
+<a name="l00806"></a>00806 <span class="preprocessor">XN_FUNC_YN(uint, fnc, int)</span>
+<a name="l00807"></a>00807 <span class="preprocessor"></span>
+<a name="l00808"></a>00808 <span class="preprocessor">#define IN_FUNC_IN(fnc)           \</span>
+<a name="l00809"></a>00809 <span class="preprocessor">XN_FUNC_YN(uchar, fnc, uchar)     \</span>
+<a name="l00810"></a>00810 <span class="preprocessor">XN_FUNC_YN(char, fnc, char)       \</span>
+<a name="l00811"></a>00811 <span class="preprocessor">XN_FUNC_YN(ushort, fnc, ushort)   \</span>
+<a name="l00812"></a>00812 <span class="preprocessor">XN_FUNC_YN(short, fnc, short)     \</span>
+<a name="l00813"></a>00813 <span class="preprocessor">XN_FUNC_YN(uint, fnc, uint)       \</span>
+<a name="l00814"></a>00814 <span class="preprocessor">XN_FUNC_YN(int, fnc, int)</span>
+<a name="l00815"></a>00815 <span class="preprocessor"></span>
+<a name="l00816"></a>00816 <span class="preprocessor">#define IN_FUNC_IN_IN_BODY(fnc, body)   \</span>
+<a name="l00817"></a>00817 <span class="preprocessor">XN_FUNC_XN_XN_BODY(uchar, fnc, body)    \</span>
+<a name="l00818"></a>00818 <span class="preprocessor">XN_FUNC_XN_XN_BODY(char, fnc, body)     \</span>
+<a name="l00819"></a>00819 <span class="preprocessor">XN_FUNC_XN_XN_BODY(ushort, fnc, body)   \</span>
+<a name="l00820"></a>00820 <span class="preprocessor">XN_FUNC_XN_XN_BODY(short, fnc, body)    \</span>
+<a name="l00821"></a>00821 <span class="preprocessor">XN_FUNC_XN_XN_BODY(uint, fnc, body)     \</span>
+<a name="l00822"></a>00822 <span class="preprocessor">XN_FUNC_XN_XN_BODY(int, fnc, body)      \</span>
+<a name="l00823"></a>00823 <span class="preprocessor">XN_FUNC_XN_XN_BODY(float, fnc, body)</span>
+<a name="l00824"></a>00824 <span class="preprocessor"></span>
+<a name="l00831"></a>00831 UIN_FUNC_IN(<a class="code" href="rs__cl_8rsh.html#a1ed0afedda2068ad1f9ad14ef3449e50">abs</a>)
+<a name="l00832"></a>00832 
+<a name="l00833"></a>00833 
+<a name="l00838"></a>00838 IN_FUNC_IN(<a class="code" href="rs__cl_8rsh.html#a8a0f94dce3caa2a50cbf2d9f4bc674ac">clz</a>)
+<a name="l00839"></a>00839 
+<a name="l00845"></a>00845 IN_FUNC_IN_IN_BODY(<a class="code" href="rs__cl_8rsh.html#a5f61ca44b3ad4b11365b0c4137a22658">min</a>, (v1 &lt; v2 ? v1 : v2))
+<a name="l00846"></a>00846 FN_FUNC_FN_F(min)
+<a name="l00847"></a>00847 
+<a name="l00853"></a>00853 IN_FUNC_IN_IN_BODY(<a class="code" href="rs__cl_8rsh.html#a616bf7a90d8d3c73a48d2c395d9dc4ea">max</a>, (v1 &gt; v2 ? v1 : v2))
+<a name="l00854"></a>00854 FN_FUNC_FN_F(max)
+<a name="l00855"></a>00855 
+<a name="l00863"></a>00863 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">clamp</a>(<span class="keywordtype">float</span> amount, <span class="keywordtype">float</span> low, <span class="keywordtype">float</span> high);
+<a name="l00864"></a>00864 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">clamp</a>)
+<a name="l00865"></a>00865 FN_FUNC_FN_F_F(<a class="code" href="rs__cl_8rsh.html#afae5eac13e35acd0f47d7e3c601e16ed">clamp</a>)
+<a name="l00866"></a>00866 
+<a name="l00872"></a>00872 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">degrees</a>(<span class="keywordtype">float</span> <a class="code" href="rs__cl_8rsh.html#aceb63a0da6393b8ac2ed229bae6232d6">radians</a>);
+<a name="l00873"></a>00873 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">degrees</a>)
+<a name="l00874"></a>00874 
+<a name="l00880"></a>00880 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">mix</a>(<span class="keywordtype">float</span> start, <span class="keywordtype">float</span> stop, <span class="keywordtype">float</span> amount);
+<a name="l00881"></a>00881 FN_FUNC_FN_FN_FN(<a class="code" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">mix</a>)
+<a name="l00882"></a>00882 FN_FUNC_FN_FN_F(<a class="code" href="rs__cl_8rsh.html#a254612a612ff7539b01a1478e03d8697">mix</a>)
+<a name="l00883"></a>00883 
+<a name="l00889"></a>00889 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) radians(<span class="keywordtype">float</span> <a class="code" href="rs__cl_8rsh.html#a0276b63d6905fa802032f1490a24515b">degrees</a>);
+<a name="l00890"></a>00890 FN_FUNC_FN(radians)
+<a name="l00891"></a>00891 
+<a name="l00900"></a>00900 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">step</a>(<span class="keywordtype">float</span> edge, <span class="keywordtype">float</span> v);
+<a name="l00901"></a>00901 FN_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">step</a>)
+<a name="l00902"></a>00902 FN_FUNC_FN_F(<a class="code" href="rs__cl_8rsh.html#a9f40337dfee48d1881b87b35aa8133dd">step</a>)
+<a name="l00903"></a>00903 
+<a name="l00904"></a>00904 <span class="comment">// not implemented</span>
+<a name="l00905"></a>00905 extern <span class="keywordtype">float</span> __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
+<a name="l00906"></a>00906 extern <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>, float2, float2);
+<a name="l00907"></a>00907 extern <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>, float3, float3);
+<a name="l00908"></a>00908 extern <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) smoothstep(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>, float4, float4);
+<a name="l00909"></a>00909 extern float2 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float2);
+<a name="l00910"></a>00910 extern float3 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float3);
+<a name="l00911"></a>00911 extern float4 __attribute__((overloadable)) smoothstep(<span class="keywordtype">float</span>, <span class="keywordtype">float</span>, float4);
+<a name="l00912"></a>00912 
+<a name="l00922"></a>00922 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a9fe423cc7d4c6d767f8a608d2ee76657">sign</a>(<span class="keywordtype">float</span> v);
+<a name="l00923"></a>00923 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a9fe423cc7d4c6d767f8a608d2ee76657">sign</a>)
+<a name="l00924"></a>00924 
+<a name="l00930"></a>00930 _RS_RUNTIME float3 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#add745d593bc2b23285bd10e52a204e25">cross</a>(float3 lhs, float3 rhs);
+<a name="l00931"></a>00931 _RS_RUNTIME float4 __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#add745d593bc2b23285bd10e52a204e25">cross</a>(float4 lhs, float4 rhs);
+<a name="l00932"></a>00932 
+<a name="l00938"></a>00938 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(<span class="keywordtype">float</span> lhs, <span class="keywordtype">float</span> rhs);
+<a name="l00939"></a>00939 F_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>)
+<a name="l00940"></a>00940 
+<a name="l00946"></a>00946 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(<span class="keywordtype">float</span> v);
+<a name="l00947"></a>00947 F_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>)
+<a name="l00948"></a>00948 
+<a name="l00954"></a>00954 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a412bf215ae838c65079560bbefefaca7">distance</a>(<span class="keywordtype">float</span> lhs, <span class="keywordtype">float</span> rhs);
+<a name="l00955"></a>00955 F_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a412bf215ae838c65079560bbefefaca7">distance</a>)
+<a name="l00956"></a>00956 
+<a name="l00962"></a>00962 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a69c2a56f743593439d5ae5e3ec8e517f">normalize</a>(<span class="keywordtype">float</span> v);
+<a name="l00963"></a>00963 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a69c2a56f743593439d5ae5e3ec8e517f">normalize</a>)
+<a name="l00964"></a>00964 
+<a name="l00965"></a>00965 
+<a name="l00966"></a>00966 <span class="comment">// New approx API functions</span>
+<a name="l00967"></a>00967 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 17))</span>
+<a name="l00968"></a>00968 <span class="preprocessor"></span>
+<a name="l00974"></a>00974 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a49050a8e32c95f60df4eaba9d7dfdca6">half_recip</a>(<span class="keywordtype">float</span>);
+<a name="l00975"></a>00975 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a49050a8e32c95f60df4eaba9d7dfdca6">half_recip</a>)
+<a name="l00976"></a>00976 
+<a name="l00982"></a>00982 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a26e2c17b20ee4c98b78c365d390e4fb8">half_sqrt</a>(<span class="keywordtype">float</span>);
+<a name="l00983"></a>00983 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a26e2c17b20ee4c98b78c365d390e4fb8">half_sqrt</a>)
+<a name="l00984"></a>00984 
+<a name="l00990"></a>00990 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a0925ceb22d33dcbb45914350ffa2edea">half_rsqrt</a>(<span class="keywordtype">float</span> v);
+<a name="l00991"></a>00991 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a0925ceb22d33dcbb45914350ffa2edea">half_rsqrt</a>)
+<a name="l00992"></a>00992 
+<a name="l00998"></a>00998 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a7c8f2f987044a360b5f616a80a74a4d5">fast_length</a>(<span class="keywordtype">float</span> v);
+<a name="l00999"></a>00999 F_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a7c8f2f987044a360b5f616a80a74a4d5">fast_length</a>)
+<a name="l01000"></a>01000 
+<a name="l01006"></a>01006 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a4fcbdb9099e7d653a951cb344ba3c3c9">fast_distance</a>(<span class="keywordtype">float</span> lhs, <span class="keywordtype">float</span> rhs);
+<a name="l01007"></a>01007 F_FUNC_FN_FN(<a class="code" href="rs__cl_8rsh.html#a4fcbdb9099e7d653a951cb344ba3c3c9">fast_distance</a>)
+<a name="l01008"></a>01008 
+<a name="l01014"></a>01014 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a3878bee2879351f518be68e015d76a35">fast_normalize</a>(<span class="keywordtype">float</span> v);
+<a name="l01015"></a>01015 F_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a3878bee2879351f518be68e015d76a35">fast_normalize</a>)
+<a name="l01016"></a>01016 
+<a name="l01017"></a>01017 <span class="preprocessor">#endif  // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 17))</span>
+<a name="l01018"></a>01018 <span class="preprocessor"></span>
+<a name="l01019"></a>01019 
+<a name="l01020"></a>01020 
+<a name="l01021"></a>01021 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 18))</span>
+<a name="l01022"></a>01022 <span class="preprocessor"></span><span class="comment">// Fast native math functions.</span>
+<a name="l01023"></a>01023 
+<a name="l01024"></a>01024 
+<a name="l01032"></a>01032 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#ab354691ecd844549b27ef9202e17f7ac">native_exp2</a>(<span class="keywordtype">float</span> v);
+<a name="l01033"></a>01033 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#ab354691ecd844549b27ef9202e17f7ac">native_exp2</a>)
+<a name="l01034"></a>01034 
+<a name="l01042"></a>01042 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a45d8176823a05b891313f3d96decf491">native_exp</a>(<span class="keywordtype">float</span> v);
+<a name="l01043"></a>01043 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a45d8176823a05b891313f3d96decf491">native_exp</a>)
+<a name="l01044"></a>01044 
+<a name="l01052"></a>01052 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) <a class="code" href="rs__cl_8rsh.html#a601ee3d2bf769f1cdc39a886f7a6c986">native_exp10</a>(<span class="keywordtype">float</span> v);
+<a name="l01053"></a>01053 FN_FUNC_FN(<a class="code" href="rs__cl_8rsh.html#a601ee3d2bf769f1cdc39a886f7a6c986">native_exp10</a>)
+<a name="l01054"></a>01054 
+<a name="l01055"></a>01055 
+<a name="l01056"></a>01056 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) native_log2(<span class="keywordtype">float</span> v);
+<a name="l01057"></a>01057 FN_FUNC_FN(native_log2)
+<a name="l01058"></a>01058 
+<a name="l01059"></a>01059 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) native_log(<span class="keywordtype">float</span> v);
+<a name="l01060"></a>01060 FN_FUNC_FN(native_log)
+<a name="l01061"></a>01061 
+<a name="l01062"></a>01062 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) native_log10(<span class="keywordtype">float</span> v);
+<a name="l01063"></a>01063 FN_FUNC_FN(native_log10)
+<a name="l01064"></a>01064 
+<a name="l01065"></a>01065 
+<a name="l01066"></a>01066 _RS_RUNTIME <span class="keywordtype">float</span> __attribute__((overloadable)) native_powr(<span class="keywordtype">float</span> v, <span class="keywordtype">float</span> y);
+<a name="l01067"></a>01067 FN_FUNC_FN_FN(native_powr)
+<a name="l01068"></a>01068 
+<a name="l01069"></a>01069 
+<a name="l01070"></a>01070 <span class="preprocessor">#endif  // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 18))</span>
+<a name="l01071"></a>01071 <span class="preprocessor"></span>
+<a name="l01072"></a>01072 
+<a name="l01073"></a>01073 <span class="preprocessor">#undef CVT_FUNC</span>
+<a name="l01074"></a>01074 <span class="preprocessor"></span><span class="preprocessor">#undef CVT_FUNC_2</span>
+<a name="l01075"></a>01075 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN</span>
+<a name="l01076"></a>01076 <span class="preprocessor"></span><span class="preprocessor">#undef F_FUNC_FN</span>
+<a name="l01077"></a>01077 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_FN</span>
+<a name="l01078"></a>01078 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN</span>
+<a name="l01079"></a>01079 <span class="preprocessor"></span><span class="preprocessor">#undef F_FUNC_FN_FN</span>
+<a name="l01080"></a>01080 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_F</span>
+<a name="l01081"></a>01081 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_IN</span>
+<a name="l01082"></a>01082 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_I</span>
+<a name="l01083"></a>01083 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_PFN</span>
+<a name="l01084"></a>01084 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_PIN</span>
+<a name="l01085"></a>01085 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN_FN</span>
+<a name="l01086"></a>01086 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN_F</span>
+<a name="l01087"></a>01087 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_F_F</span>
+<a name="l01088"></a>01088 <span class="preprocessor"></span><span class="preprocessor">#undef FN_FUNC_FN_FN_PIN</span>
+<a name="l01089"></a>01089 <span class="preprocessor"></span><span class="preprocessor">#undef XN_FUNC_YN</span>
+<a name="l01090"></a>01090 <span class="preprocessor"></span><span class="preprocessor">#undef UIN_FUNC_IN</span>
+<a name="l01091"></a>01091 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_IN</span>
+<a name="l01092"></a>01092 <span class="preprocessor"></span><span class="preprocessor">#undef XN_FUNC_XN_XN_BODY</span>
+<a name="l01093"></a>01093 <span class="preprocessor"></span><span class="preprocessor">#undef IN_FUNC_IN_IN_BODY</span>
+<a name="l01094"></a>01094 <span class="preprocessor"></span>
+<a name="l01095"></a>01095 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/rs__core_8rsh.html b/docs/html/reference/renderscript/rs__core_8rsh.html
index 6212598..132488d 100644
--- a/docs/html/reference/renderscript/rs__core_8rsh.html
+++ b/docs/html/reference/renderscript/rs__core_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_core.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -30,7 +30,7 @@
 <a href="#enum-members">Enumerations</a> &#124;
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_core.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <div class="textblock"><code>#include &quot;<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>&quot;</code><br/>
@@ -61,11 +61,13 @@
 <tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a508003cadad2d37d41e2de7e9226f859">rsSendToClient</a> (int cmdID, const void *data, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rsSendToClientBlocking</a> (int cmdID)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#afc93b00be08f58512a6ab6a87feb9515">rsSendToClientBlocking</a> (int cmdID, const void *data, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a> (<a class="el" href="structrs__script.html">rs_script</a> script, <a class="el" href="structrs__allocation.html">rs_allocation</a> input, <a class="el" href="structrs__allocation.html">rs_allocation</a> output, const void *usrData, const <a class="el" href="rs__core_8rsh.html#ae8756b32e23445f287960b9d0ffb449c">rs_script_call_t</a> *sc)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#ae62dc9d507e0e62c064217c71cc94101">rsForEach</a> (<a class="el" href="structrs__script.html">rs_script</a> script, <a class="el" href="structrs__allocation.html">rs_allocation</a> input, <a class="el" href="structrs__allocation.html">rs_allocation</a> output, const void *usrData)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a> (<a class="el" href="structrs__script.html">rs_script</a> script, <a class="el" href="structrs__allocation.html">rs_allocation</a> input, <a class="el" href="structrs__allocation.html">rs_allocation</a> output, const void *usrData, <a class="el" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a> usrDataLen, const <a class="el" href="rs__core_8rsh.html#ae8756b32e23445f287960b9d0ffb449c">rs_script_call_t</a> *)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a38c803ed805dd1362442977eae70c41d">rsForEach</a> (<a class="el" href="structrs__script.html">rs_script</a> script, <a class="el" href="structrs__allocation.html">rs_allocation</a> input, <a class="el" href="structrs__allocation.html">rs_allocation</a> output, const void *usrData, <a class="el" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a> usrDataLen)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__core_8rsh.html#a6c541fa49b6fb9b528c2a147eaf764da">rsForEach</a> (<a class="el" href="structrs__script.html">rs_script</a> script, <a class="el" href="structrs__allocation.html">rs_allocation</a> input, <a class="el" href="structrs__allocation.html">rs_allocation</a> output)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock">
+<div class="textblock"><p>todo-jsams </p>
+
 <p>Definition in file <a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a>.</p>
 </div><hr/><h2>Typedef Documentation</h2>
 <a class="anchor" id="ae8756b32e23445f287960b9d0ffb449c"></a><!-- doxytag: member="rs_core.rsh::rs_script_call_t" ref="ae8756b32e23445f287960b9d0ffb449c" args="" -->
@@ -96,12 +98,12 @@
 <p>Launch order hint for rsForEach calls. This provides a hint to the system to determine in which order the root function of the target is called with each cell of the allocation.</p>
 <p>This is a hint and implementations may not obey the order. </p>
 
-<p>Definition at line <a class="el" href="rs__core_8rsh_source.html#l00092">92</a> of file <a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__core_8rsh_source.html#l00096">96</a> of file <a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a>.</p>
 
 </div>
 </div>
 <hr/><h2>Function Documentation</h2>
-<a class="anchor" id="a95ebbf7a8923193df144649c066daae6"></a><!-- doxytag: member="rs_core.rsh::rsForEach" ref="a95ebbf7a8923193df144649c066daae6" args="(rs_script script, rs_allocation input, rs_allocation output, const void *usrData, const rs_script_call_t *sc)" -->
+<a class="anchor" id="a64271d266928b06ebd82ec90b756eb23"></a><!-- doxytag: member="rs_core.rsh::rsForEach" ref="a64271d266928b06ebd82ec90b756eb23" args="(rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen, const rs_script_call_t *)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
@@ -132,8 +134,14 @@
         <tr>
           <td class="paramkey"></td>
           <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a>&#160;</td>
+          <td class="paramname"><em>usrDataLen</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
           <td class="paramtype">const <a class="el" href="rs__core_8rsh.html#ae8756b32e23445f287960b9d0ffb449c">rs_script_call_t</a> *&#160;</td>
-          <td class="paramname"><em>sc</em>&#160;</td>
+          <td class="paramname">&#160;</td>
         </tr>
         <tr>
           <td></td>
@@ -150,6 +158,12 @@
     <tr><td class="paramname">input</td><td>The allocation to source data from </td></tr>
     <tr><td class="paramname">output</td><td>the allocation to write date into </td></tr>
     <tr><td class="paramname">usrData</td><td>The user definied params to pass to the root script. May be NULL. </td></tr>
+    <tr><td class="paramname">sc</td><td>Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. Make a script to script call to launch work. One of the input or output is required to be a valid object. The input and output must be of the same dimensions. API 14+</td></tr>
+    <tr><td class="paramname">script</td><td>The target script to call </td></tr>
+    <tr><td class="paramname">input</td><td>The allocation to source data from </td></tr>
+    <tr><td class="paramname">output</td><td>the allocation to write date into </td></tr>
+    <tr><td class="paramname">usrData</td><td>The user definied params to pass to the root script. May be NULL. </td></tr>
+    <tr><td class="paramname">usrDataLen</td><td>The size of the userData structure. This will be used to perform a shallow copy of the data if necessary. </td></tr>
     <tr><td class="paramname">sc</td><td>Extra control infomation used to select a sub-region of the allocation to be processed or suggest a walking strategy. May be NULL. </td></tr>
   </table>
   </dd>
@@ -157,7 +171,7 @@
 
 </div>
 </div>
-<a class="anchor" id="ae62dc9d507e0e62c064217c71cc94101"></a><!-- doxytag: member="rs_core.rsh::rsForEach" ref="ae62dc9d507e0e62c064217c71cc94101" args="(rs_script script, rs_allocation input, rs_allocation output, const void *usrData)" -->
+<a class="anchor" id="a38c803ed805dd1362442977eae70c41d"></a><!-- doxytag: member="rs_core.rsh::rsForEach" ref="a38c803ed805dd1362442977eae70c41d" args="(rs_script script, rs_allocation input, rs_allocation output, const void *usrData, size_t usrDataLen)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
@@ -183,7 +197,47 @@
           <td class="paramkey"></td>
           <td></td>
           <td class="paramtype">const void *&#160;</td>
-          <td class="paramname"><em>usrData</em>&#160;</td>
+          <td class="paramname"><em>usrData</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a>&#160;</td>
+          <td class="paramname"><em>usrDataLen</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </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>
+
+</div>
+</div>
+<a class="anchor" id="a6c541fa49b6fb9b528c2a147eaf764da"></a><!-- doxytag: member="rs_core.rsh::rsForEach" ref="a6c541fa49b6fb9b528c2a147eaf764da" args="(rs_script script, rs_allocation input, rs_allocation output)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsForEach </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__script.html">rs_script</a>&#160;</td>
+          <td class="paramname"><em>script</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>input</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td>
+          <td class="paramname"><em>output</em>&#160;</td>
         </tr>
         <tr>
           <td></td>
diff --git a/docs/html/reference/renderscript/rs__core_8rsh_source.html b/docs/html/reference/renderscript/rs__core_8rsh_source.html
index 888a8b4..ddc870d 100644
--- a/docs/html/reference/renderscript/rs__core_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__core_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_core.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.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">rs_core.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_core.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__core_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,81 +43,81 @@
 <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="l00042"></a>00042 <span class="preprocessor">#ifndef __RS_CORE_RSH__</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define __RS_CORE_RSH__</span>
-<a name="l00044"></a>00044 <span class="preprocessor"></span>
-<a name="l00045"></a>00045 <span class="preprocessor">#define _RS_RUNTIME extern</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span>
-<a name="l00047"></a>00047 <span class="preprocessor">#include &quot;<a class="code" href="rs__types_8rsh.html">rs_types.rsh</a>&quot;</span>
-<a name="l00048"></a>00048 <span class="preprocessor">#include &quot;<a class="code" href="rs__allocation_8rsh.html" title="Allocation routines.">rs_allocation.rsh</a>&quot;</span>
-<a name="l00049"></a>00049 <span class="preprocessor">#include &quot;<a class="code" href="rs__atomic_8rsh.html" title="Atomic routines.">rs_atomic.rsh</a>&quot;</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include &quot;<a class="code" href="rs__cl_8rsh.html" title="Basic math functions.">rs_cl.rsh</a>&quot;</span>
-<a name="l00051"></a>00051 <span class="preprocessor">#include &quot;<a class="code" href="rs__debug_8rsh.html" title="Utility debugging routines.">rs_debug.rsh</a>&quot;</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#include &quot;<a class="code" href="rs__element_8rsh.html" title="Element routines.">rs_element.rsh</a>&quot;</span>
-<a name="l00053"></a>00053 <span class="preprocessor">#include &quot;<a class="code" href="rs__math_8rsh.html">rs_math.rsh</a>&quot;</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#include &quot;<a class="code" href="rs__matrix_8rsh.html" title="Matrix routines.">rs_matrix.rsh</a>&quot;</span>
-<a name="l00055"></a>00055 <span class="preprocessor">#include &quot;<a class="code" href="rs__object_8rsh.html" title="Object routines.">rs_object.rsh</a>&quot;</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#include &quot;<a class="code" href="rs__quaternion_8rsh.html" title="Quaternion routines.">rs_quaternion.rsh</a>&quot;</span>
-<a name="l00057"></a>00057 <span class="preprocessor">#include &quot;<a class="code" href="rs__sampler_8rsh.html" title="Sampler routines.">rs_sampler.rsh</a>&quot;</span>
-<a name="l00058"></a>00058 <span class="preprocessor">#include &quot;<a class="code" href="rs__time_8rsh.html" title="Renderscript time routines.">rs_time.rsh</a>&quot;</span>
-<a name="l00059"></a>00059 
-<a name="l00065"></a>00065 <span class="keyword">extern</span> <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00066"></a>00066     <a class="code" href="rs__core_8rsh.html#a91cfbca99f87ef144bea2cdf1e8473ca">rsSendToClient</a>(<span class="keywordtype">int</span> cmdID);
-<a name="l00070"></a>00070 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00071"></a>00071     <a class="code" href="rs__core_8rsh.html#a91cfbca99f87ef144bea2cdf1e8473ca">rsSendToClient</a>(<span class="keywordtype">int</span> cmdID, const <span class="keywordtype">void</span> *data, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len);
-<a name="l00076"></a>00076 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00077"></a>00077     <a class="code" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rsSendToClientBlocking</a>(<span class="keywordtype">int</span> cmdID);
-<a name="l00081"></a>00081 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00082"></a>00082     <a class="code" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rsSendToClientBlocking</a>(<span class="keywordtype">int</span> cmdID, const <span class="keywordtype">void</span> *data, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len);
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084 
-<a name="l00092"></a><a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">00092</a> enum <a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_for_each_strategy</a> {
-<a name="l00093"></a>00093     RS_FOR_EACH_STRATEGY_SERIAL,
-<a name="l00094"></a>00094     RS_FOR_EACH_STRATEGY_DONT_CARE,
-<a name="l00095"></a>00095     RS_FOR_EACH_STRATEGY_DST_LINEAR,
-<a name="l00096"></a>00096     RS_FOR_EACH_STRATEGY_TILE_SMALL,
-<a name="l00097"></a>00097     RS_FOR_EACH_STRATEGY_TILE_MEDIUM,
-<a name="l00098"></a>00098     RS_FOR_EACH_STRATEGY_TILE_LARGE
-<a name="l00099"></a>00099 };
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101 
-<a name="l00106"></a><a class="code" href="structrs__script__call.html">00106</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrs__script__call.html">rs_script_call</a> {
-<a name="l00107"></a>00107     <span class="keyword">enum</span> <a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_for_each_strategy</a> strategy;
-<a name="l00108"></a>00108     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> xStart;
-<a name="l00109"></a>00109     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> xEnd;
-<a name="l00110"></a>00110     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> yStart;
-<a name="l00111"></a>00111     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> yEnd;
-<a name="l00112"></a>00112     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> zStart;
-<a name="l00113"></a>00113     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> zEnd;
-<a name="l00114"></a>00114     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> arrayStart;
-<a name="l00115"></a>00115     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> arrayEnd;
-<a name="l00116"></a>00116 } <a class="code" href="rs__core_8rsh.html#ae8756b32e23445f287960b9d0ffb449c">rs_script_call_t</a>;
-<a name="l00117"></a>00117 
-<a name="l00134"></a>00134 <span class="preprocessor">#if !defined(RS_VERSION) || (RS_VERSION &lt; 14)</span>
-<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00136"></a>00136     <a class="code" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> input,
-<a name="l00137"></a>00137               <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> output, const <span class="keywordtype">void</span> * usrData,
-<a name="l00138"></a>00138               const <a class="code" href="structrs__script__call.html">rs_script_call_t</a> *sc);
-<a name="l00142"></a>00142 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00143"></a>00143     <a class="code" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> input,
-<a name="l00144"></a>00144               <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> output, const <span class="keywordtype">void</span> * usrData);
-<a name="l00145"></a>00145 <span class="preprocessor">#else</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span>
-<a name="l00165"></a>00165 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00166"></a>00166     <a class="code" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> output,
-<a name="l00167"></a>00167               const <span class="keywordtype">void</span> * usrData, <span class="keywordtype">size_t</span> usrDataLen, const <a class="code" href="structrs__script__call.html">rs_script_call_t</a> *);
-<a name="l00171"></a>00171 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00172"></a>00172     <a class="code" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> output,
-<a name="l00173"></a>00173               const <span class="keywordtype">void</span> * usrData, <span class="keywordtype">size_t</span> usrDataLen);
-<a name="l00177"></a>00177 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00178"></a>00178     <a class="code" href="rs__core_8rsh.html#a95ebbf7a8923193df144649c066daae6">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> output);
-<a name="l00179"></a>00179 <span class="preprocessor">#endif</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span>
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182 
-<a name="l00183"></a>00183 <span class="preprocessor">#undef _RS_RUNTIME</span>
+<a name="l00046"></a>00046 <span class="preprocessor">#ifndef __RS_CORE_RSH__</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define __RS_CORE_RSH__</span>
+<a name="l00048"></a>00048 <span class="preprocessor"></span>
+<a name="l00049"></a>00049 <span class="preprocessor">#define _RS_RUNTIME extern</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span>
+<a name="l00051"></a>00051 <span class="preprocessor">#include &quot;<a class="code" href="rs__types_8rsh.html">rs_types.rsh</a>&quot;</span>
+<a name="l00052"></a>00052 <span class="preprocessor">#include &quot;<a class="code" href="rs__allocation_8rsh.html" title="Allocation routines.">rs_allocation.rsh</a>&quot;</span>
+<a name="l00053"></a>00053 <span class="preprocessor">#include &quot;<a class="code" href="rs__atomic_8rsh.html" title="Atomic routines.">rs_atomic.rsh</a>&quot;</span>
+<a name="l00054"></a>00054 <span class="preprocessor">#include &quot;<a class="code" href="rs__cl_8rsh.html" title="Basic math functions.">rs_cl.rsh</a>&quot;</span>
+<a name="l00055"></a>00055 <span class="preprocessor">#include &quot;<a class="code" href="rs__debug_8rsh.html" title="Utility debugging routines.">rs_debug.rsh</a>&quot;</span>
+<a name="l00056"></a>00056 <span class="preprocessor">#include &quot;<a class="code" href="rs__element_8rsh.html" title="Element routines.">rs_element.rsh</a>&quot;</span>
+<a name="l00057"></a>00057 <span class="preprocessor">#include &quot;<a class="code" href="rs__math_8rsh.html">rs_math.rsh</a>&quot;</span>
+<a name="l00058"></a>00058 <span class="preprocessor">#include &quot;<a class="code" href="rs__matrix_8rsh.html" title="Matrix routines.">rs_matrix.rsh</a>&quot;</span>
+<a name="l00059"></a>00059 <span class="preprocessor">#include &quot;<a class="code" href="rs__object_8rsh.html" title="Object routines.">rs_object.rsh</a>&quot;</span>
+<a name="l00060"></a>00060 <span class="preprocessor">#include &quot;<a class="code" href="rs__quaternion_8rsh.html" title="Quaternion routines.">rs_quaternion.rsh</a>&quot;</span>
+<a name="l00061"></a>00061 <span class="preprocessor">#include &quot;<a class="code" href="rs__sampler_8rsh.html" title="Sampler routines.">rs_sampler.rsh</a>&quot;</span>
+<a name="l00062"></a>00062 <span class="preprocessor">#include &quot;<a class="code" href="rs__time_8rsh.html" title="RenderScript time routines.">rs_time.rsh</a>&quot;</span>
+<a name="l00063"></a>00063 
+<a name="l00069"></a>00069 <span class="keyword">extern</span> <span class="keywordtype">bool</span> __attribute__((overloadable))
+<a name="l00070"></a>00070     <a class="code" href="rs__core_8rsh.html#a91cfbca99f87ef144bea2cdf1e8473ca">rsSendToClient</a>(<span class="keywordtype">int</span> cmdID);
+<a name="l00074"></a>00074 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
+<a name="l00075"></a>00075     <a class="code" href="rs__core_8rsh.html#a91cfbca99f87ef144bea2cdf1e8473ca">rsSendToClient</a>(<span class="keywordtype">int</span> cmdID, const <span class="keywordtype">void</span> *data, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len);
+<a name="l00080"></a>00080 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00081"></a>00081     <a class="code" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rsSendToClientBlocking</a>(<span class="keywordtype">int</span> cmdID);
+<a name="l00085"></a>00085 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00086"></a>00086     <a class="code" href="rs__core_8rsh.html#a6e4ff6388e8c6978ed17447214f2a2e2">rsSendToClientBlocking</a>(<span class="keywordtype">int</span> cmdID, const <span class="keywordtype">void</span> *data, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> len);
+<a name="l00087"></a>00087 
+<a name="l00088"></a>00088 
+<a name="l00096"></a><a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">00096</a> enum <a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_for_each_strategy</a> {
+<a name="l00097"></a>00097     RS_FOR_EACH_STRATEGY_SERIAL = 0,
+<a name="l00098"></a>00098     RS_FOR_EACH_STRATEGY_DONT_CARE = 1,
+<a name="l00099"></a>00099     RS_FOR_EACH_STRATEGY_DST_LINEAR = 2,
+<a name="l00100"></a>00100     RS_FOR_EACH_STRATEGY_TILE_SMALL= 3,
+<a name="l00101"></a>00101     RS_FOR_EACH_STRATEGY_TILE_MEDIUM = 4,
+<a name="l00102"></a>00102     RS_FOR_EACH_STRATEGY_TILE_LARGE = 5
+<a name="l00103"></a>00103 };
+<a name="l00104"></a>00104 
+<a name="l00105"></a>00105 
+<a name="l00110"></a><a class="code" href="structrs__script__call.html">00110</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structrs__script__call.html">rs_script_call</a> {
+<a name="l00111"></a>00111     <span class="keyword">enum</span> <a class="code" href="rs__core_8rsh.html#ae1755c901e8acb42510ad10b4e104746">rs_for_each_strategy</a> strategy;
+<a name="l00112"></a>00112     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> xStart;
+<a name="l00113"></a>00113     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> xEnd;
+<a name="l00114"></a>00114     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> yStart;
+<a name="l00115"></a>00115     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> yEnd;
+<a name="l00116"></a>00116     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> zStart;
+<a name="l00117"></a>00117     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> zEnd;
+<a name="l00118"></a>00118     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> arrayStart;
+<a name="l00119"></a>00119     <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> arrayEnd;
+<a name="l00120"></a>00120 } <a class="code" href="rs__core_8rsh.html#ae8756b32e23445f287960b9d0ffb449c">rs_script_call_t</a>;
+<a name="l00121"></a>00121 
+<a name="l00138"></a>00138 <span class="preprocessor">#if !defined(RS_VERSION) || (RS_VERSION &lt; 14)</span>
+<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00140"></a>00140     <a class="code" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> input,
+<a name="l00141"></a>00141               <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> output, const <span class="keywordtype">void</span> * usrData,
+<a name="l00142"></a>00142               const <a class="code" href="structrs__script__call.html">rs_script_call_t</a> *sc);
+<a name="l00146"></a>00146 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00147"></a>00147     <a class="code" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> input,
+<a name="l00148"></a>00148               <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> output, const <span class="keywordtype">void</span> * usrData);
+<a name="l00149"></a>00149 <span class="preprocessor">#else</span>
+<a name="l00150"></a>00150 <span class="preprocessor"></span>
+<a name="l00169"></a>00169 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00170"></a>00170     <a class="code" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> output,
+<a name="l00171"></a>00171               const <span class="keywordtype">void</span> * usrData, <span class="keywordtype">size_t</span> usrDataLen, const <a class="code" href="structrs__script__call.html">rs_script_call_t</a> *);
+<a name="l00175"></a>00175 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00176"></a>00176     <a class="code" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> output,
+<a name="l00177"></a>00177               const <span class="keywordtype">void</span> * usrData, <span class="keywordtype">size_t</span> usrDataLen);
+<a name="l00181"></a>00181 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00182"></a>00182     <a class="code" href="rs__core_8rsh.html#a64271d266928b06ebd82ec90b756eb23">rsForEach</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> script, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> input, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> output);
+<a name="l00183"></a>00183 <span class="preprocessor">#endif</span>
 <a name="l00184"></a>00184 <span class="preprocessor"></span>
-<a name="l00185"></a>00185 <span class="preprocessor">#endif</span>
+<a name="l00185"></a>00185 
+<a name="l00186"></a>00186 
+<a name="l00187"></a>00187 <span class="preprocessor">#undef _RS_RUNTIME</span>
+<a name="l00188"></a>00188 <span class="preprocessor"></span>
+<a name="l00189"></a>00189 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/rs__debug_8rsh.html b/docs/html/reference/renderscript/rs__debug_8rsh.html
index 7259cf2..cb7eb65 100644
--- a/docs/html/reference/renderscript/rs__debug_8rsh.html
+++ b/docs/html/reference/renderscript/rs__debug_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_debug.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,13 +27,13 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_debug.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.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__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a> (const char *, float)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a> (const char *, float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#aebd4d3e687a397db1a817ca6d46aed29">rsDebug</a> (const char *, float, float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#ab1731408774f01186aff59b89c47fe32">rsDebug</a> (const char *, float, float, float)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#a6bb20c16c9fcc613158ca8c6f0dd81bd">rsDebug</a> (const char *, float, float, float, float)</td></tr>
@@ -46,6 +46,13 @@
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#aa75aa9faf7646ceeafeb19279416e9e8">rsDebug</a> (const char *, long)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#aa371f42b8d323a1a20d56461011fc664">rsDebug</a> (const char *, unsigned long)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#ab5a58069a9d914e413f52b0f9bd62a00">rsDebug</a> (const char *, const void *)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#aa8b0824fa7ebb7568475aa9fe59db2a7">rsDebug</a> (const char *, char)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#ae15778f8dce1f1afb184223aa2ea16d7">rsDebug</a> (const char *, unsigned char)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#a9ae73c92436ef2ebb3aa003dfe32b47e">rsDebug</a> (const char *, <a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#ad2ac07fa7f59cd1ec4c3e411a726e3bf">rsDebug</a> (const char *, short)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#a914fe650bcd59de44d33fc4b72d6d494">rsDebug</a> (const char *, <a class="el" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#a52c6ade9360a550eb25c044ea2380f4b">rsDebug</a> (const char *, <a class="el" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a>)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__debug_8rsh.html#ad723b521df57125a4165812004f107c4">rsDebug</a> (const char *, <a class="el" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a>)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Utility debugging routines. </p>
@@ -53,12 +60,12 @@
 
 <p>Definition in file <a class="el" href="rs__debug_8rsh_source.html">rs_debug.rsh</a>.</p>
 </div><hr/><h2>Function Documentation</h2>
-<a class="anchor" id="a9a86fd617111dee78b3179a293afb66c"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="a9a86fd617111dee78b3179a293afb66c" args="(const char *, float)" -->
+<a class="anchor" id="aff35df661796c13fa9e616d1d387df0d"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="aff35df661796c13fa9e616d1d387df0d" args="(const char *, float)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME void rsDebug </td>
+          <td class="memname">void rsDebug </td>
           <td>(</td>
           <td class="paramtype">const char *&#160;</td>
           <td class="paramname">, </td>
@@ -453,6 +460,202 @@
 
 </div>
 </div>
+<a class="anchor" id="aa8b0824fa7ebb7568475aa9fe59db2a7"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="aa8b0824fa7ebb7568475aa9fe59db2a7" args="(const char *, char)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="ae15778f8dce1f1afb184223aa2ea16d7"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="ae15778f8dce1f1afb184223aa2ea16d7" args="(const char *, unsigned char)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">unsigned&#160;</td>
+          <td class="paramname"><em>char</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="a9ae73c92436ef2ebb3aa003dfe32b47e"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="a9ae73c92436ef2ebb3aa003dfe32b47e" args="(const char *, uchar2)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="ad2ac07fa7f59cd1ec4c3e411a726e3bf"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="ad2ac07fa7f59cd1ec4c3e411a726e3bf" args="(const char *, short)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">short&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="a914fe650bcd59de44d33fc4b72d6d494"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="a914fe650bcd59de44d33fc4b72d6d494" args="(const char *, ushort2)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="a52c6ade9360a550eb25c044ea2380f4b"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="a52c6ade9360a550eb25c044ea2380f4b" args="(const char *, long2)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a>&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
+<a class="anchor" id="ad723b521df57125a4165812004f107c4"></a><!-- doxytag: member="rs_debug.rsh::rsDebug" ref="ad723b521df57125a4165812004f107c4" args="(const char *, ulong2)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void rsDebug </td>
+          <td>(</td>
+          <td class="paramtype">const char *&#160;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a>&#160;</td>
+          <td class="paramname">&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Debug function. Prints a string and value to the log. </p>
+
+</div>
+</div>
 </div>
 
 </body>
diff --git a/docs/html/reference/renderscript/rs__debug_8rsh_source.html b/docs/html/reference/renderscript/rs__debug_8rsh_source.html
index b1589aa..cd5895d 100644
--- a/docs/html/reference/renderscript/rs__debug_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__debug_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_debug.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.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">rs_debug.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_debug.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__debug_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>
@@ -47,46 +47,107 @@
 <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define __RS_DEBUG_RSH__</span>
 <a name="l00028"></a>00028 <span class="preprocessor"></span>
 <a name="l00029"></a>00029 
-<a name="l00030"></a>00030 
-<a name="l00034"></a>00034 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00035"></a>00035     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>);
-<a name="l00039"></a>00039 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00040"></a>00040     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
-<a name="l00044"></a>00044 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00045"></a>00045     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
-<a name="l00049"></a>00049 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00050"></a>00050     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
-<a name="l00054"></a>00054 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00055"></a>00055     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">double</span>);
-<a name="l00059"></a>00059 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00060"></a>00060     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *);
-<a name="l00064"></a>00064 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00065"></a>00065     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *);
-<a name="l00069"></a>00069 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00070"></a>00070     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *);
-<a name="l00074"></a>00074 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00075"></a>00075     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>);
-<a name="l00079"></a>00079 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00080"></a>00080     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>);
-<a name="l00084"></a>00084 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00085"></a>00085     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">long</span>);
-<a name="l00089"></a>00089 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00090"></a>00090     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
-<a name="l00094"></a>00094 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00095"></a>00095     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">long</span> <span class="keywordtype">long</span>);
-<a name="l00099"></a>00099 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00100"></a>00100     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span>);
-<a name="l00104"></a>00104 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00105"></a>00105     <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *, const <span class="keywordtype">void</span> *);
-<a name="l00106"></a>00106 <span class="preprocessor">#define RS_DEBUG(a) rsDebug(#a, a)</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span>
-<a name="l00109"></a>00109 
-<a name="l00113"></a>00113 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *s, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> v);
-<a name="l00117"></a>00117 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *s, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> v);
-<a name="l00121"></a>00121 _RS_RUNTIME <span class="keywordtype">void</span> __attribute__((overloadable)) <a class="code" href="rs__debug_8rsh.html#a9a86fd617111dee78b3179a293afb66c">rsDebug</a>(const <span class="keywordtype">char</span> *s, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> v);
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123 <span class="preprocessor">#endif</span>
+<a name="l00033"></a>00033 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00034"></a>00034     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>);
+<a name="l00038"></a>00038 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00039"></a>00039     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
+<a name="l00043"></a>00043 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00044"></a>00044     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
+<a name="l00048"></a>00048 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00049"></a>00049     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>, <span class="keywordtype">float</span>);
+<a name="l00053"></a>00053 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00054"></a>00054     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a>);
+<a name="l00058"></a>00058 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00059"></a>00059     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>);
+<a name="l00063"></a>00063 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00064"></a>00064     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>);
+<a name="l00068"></a>00068 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00069"></a>00069     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">double</span>);
+<a name="l00073"></a>00073 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00074"></a>00074     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a> *);
+<a name="l00078"></a>00078 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00079"></a>00079     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a> *);
+<a name="l00083"></a>00083 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00084"></a>00084     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, const <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a> *);
+<a name="l00088"></a>00088 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00089"></a>00089     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>);
+<a name="l00093"></a>00093 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00094"></a>00094     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>);
+<a name="l00098"></a>00098 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00099"></a>00099     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">long</span>);
+<a name="l00103"></a>00103 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00104"></a>00104     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>);
+<a name="l00108"></a>00108 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00109"></a>00109     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">long</span> <span class="keywordtype">long</span>);
+<a name="l00113"></a>00113 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00114"></a>00114     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span>);
+<a name="l00118"></a>00118 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00119"></a>00119     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, const <span class="keywordtype">void</span> *);
+<a name="l00120"></a>00120 
+<a name="l00121"></a>00121 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 17))</span>
+<a name="l00122"></a>00122 <span class="preprocessor"></span>
+<a name="l00125"></a>00125 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00126"></a>00126     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">char</span>);
+<a name="l00130"></a>00130 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00131"></a>00131     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a>);
+<a name="l00135"></a>00135 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00136"></a>00136     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">char3</a>);
+<a name="l00140"></a>00140 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00141"></a>00141     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">char4</a>);
+<a name="l00145"></a>00145 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00146"></a>00146     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>);
+<a name="l00150"></a>00150 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00151"></a>00151     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a>);
+<a name="l00155"></a>00155 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00156"></a>00156     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">uchar3</a>);
+<a name="l00160"></a>00160 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00161"></a>00161     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>);
+<a name="l00165"></a>00165 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00166"></a>00166     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">short</span>);
+<a name="l00170"></a>00170 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00171"></a>00171     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a>);
+<a name="l00175"></a>00175 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00176"></a>00176     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">short3</a>);
+<a name="l00180"></a>00180 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00181"></a>00181     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">short4</a>);
+<a name="l00185"></a>00185 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00186"></a>00186     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>);
+<a name="l00190"></a>00190 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00191"></a>00191     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a>);
+<a name="l00195"></a>00195 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00196"></a>00196     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">ushort3</a>);
+<a name="l00200"></a>00200 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00201"></a>00201     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">ushort4</a>);
+<a name="l00205"></a>00205 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00206"></a>00206     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a>);
+<a name="l00210"></a>00210 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00211"></a>00211     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">int3</a>);
+<a name="l00215"></a>00215 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00216"></a>00216     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">int4</a>);
+<a name="l00220"></a>00220 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00221"></a>00221     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a>);
+<a name="l00225"></a>00225 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00226"></a>00226     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">uint3</a>);
+<a name="l00230"></a>00230 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00231"></a>00231     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">uint4</a>);
+<a name="l00235"></a>00235 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00236"></a>00236     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a>);
+<a name="l00240"></a>00240 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00241"></a>00241     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a>);
+<a name="l00245"></a>00245 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00246"></a>00246     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a>);
+<a name="l00250"></a>00250 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00251"></a>00251     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a>);
+<a name="l00255"></a>00255 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00256"></a>00256     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">ulong3</a>);
+<a name="l00260"></a>00260 extern <span class="keywordtype">void</span> __attribute__((overloadable))
+<a name="l00261"></a>00261     <a class="code" href="rs__debug_8rsh.html#aff35df661796c13fa9e616d1d387df0d">rsDebug</a>(const <span class="keywordtype">char</span> *, <a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">ulong4</a>);
+<a name="l00262"></a>00262 <span class="preprocessor">#endif  // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 17))</span>
+<a name="l00263"></a>00263 <span class="preprocessor"></span>
+<a name="l00264"></a>00264 <span class="preprocessor">#define RS_DEBUG(a) rsDebug(#a, a)</span>
+<a name="l00265"></a>00265 <span class="preprocessor"></span><span class="preprocessor">#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)</span>
+<a name="l00266"></a>00266 <span class="preprocessor"></span>
+<a name="l00267"></a>00267 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/rs__element_8rsh.html b/docs/html/reference/renderscript/rs__element_8rsh.html
index 5f23ae9..201f71c 100644
--- a/docs/html/reference/renderscript/rs__element_8rsh.html
+++ b/docs/html/reference/renderscript/rs__element_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_element.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,15 +24,351 @@
   </div>
 </div>
 <div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_element.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.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"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a2ecab064ea2b720bc3af27b523388f31">rsElementGetSubElementCount</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a8c690bce7d32be759fd787740c270c92">rsElementGetSubElement</a> (<a class="el" href="structrs__element.html">rs_element</a>, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a94834eb1d91b50a5df3cbe161c22e37d">rsElementGetSubElementNameLength</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a3c1446166c43aa6ba3d5359f6c982f02">rsElementGetSubElementName</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index, char *name, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> nameLength)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a9c3140c18139db451279d9b221808eee">rsElementGetSubElementArraySize</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a840d53f1e91bb6887b40a4d8983c53ed">rsElementGetSubElementOffsetBytes</a> (<a class="el" href="structrs__element.html">rs_element</a> e, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#ac54592168af5896d3fba5283af286f98">rsElementGetBytesSize</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a9a3569d242be363517ea2354d98cf382">rsElementGetDataType</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#af072702a530e158093d69353072da5f9">rsElementGetDataKind</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__element_8rsh.html#a727997de25ae43c07dffcfd484928d53">rsElementGetVectorSize</a> (<a class="el" href="structrs__element.html">rs_element</a> e)</td></tr>
+</table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Element routines. </p>
 
 <p>Definition in file <a class="el" href="rs__element_8rsh_source.html">rs_element.rsh</a>.</p>
-</div></div>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="ac54592168af5896d3fba5283af286f98"></a><!-- doxytag: member="rs_element.rsh::rsElementGetBytesSize" ref="ac54592168af5896d3fba5283af286f98" args="(rs_element e)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetBytesSize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the size of element in bytes</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>total size of the element in bytes </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="af072702a530e158093d69353072da5f9"></a><!-- doxytag: member="rs_element.rsh::rsElementGetDataKind" ref="af072702a530e158093d69353072da5f9" args="(rs_element e)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a> rsElementGetDataKind </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the element's data kind</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>element's data size </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9a3569d242be363517ea2354d98cf382"></a><!-- doxytag: member="rs_element.rsh::rsElementGetDataType" ref="a9a3569d242be363517ea2354d98cf382" args="(rs_element e)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a> rsElementGetDataType </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the element's data type</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>element's data type </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a8c690bce7d32be759fd787740c270c92"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElement" ref="a8c690bce7d32be759fd787740c270c92" args="(rs_element, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structrs__element.html">rs_element</a> rsElementGetSubElement </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname">, </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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>For complex elements, this function will return the sub-element at index</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the sub-element to return </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>sub-element in this element at given index </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a9c3140c18139db451279d9b221808eee"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementArraySize" ref="a9c3140c18139db451279d9b221808eee" args="(rs_element e, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementArraySize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>For complex elements, some sub-elements could be statically sized arrays. This function will return the array size for sub-element at index</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>array size of sub-element in this element at given index </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a2ecab064ea2b720bc3af27b523388f31"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementCount" ref="a2ecab064ea2b720bc3af27b523388f31" args="(rs_element e)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementCount </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Elements could be simple, such as an int or a float, or a structure with multiple sub elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>number of sub-elements in this element </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a3c1446166c43aa6ba3d5359f6c982f02"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementName" ref="a3c1446166c43aa6ba3d5359f6c982f02" args="(rs_element e, uint32_t index, char *name, uint32_t nameLength)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementName </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</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>index</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">char *&#160;</td>
+          <td class="paramname"><em>name</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>nameLength</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>For complex elements, this function will return the sub-element name at index</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
+    <tr><td class="paramname">name</td><td>array to store the name into </td></tr>
+    <tr><td class="paramname">nameLength</td><td>length of the provided name array </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>number of characters actually written, excluding the null terminator </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a94834eb1d91b50a5df3cbe161c22e37d"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementNameLength" ref="a94834eb1d91b50a5df3cbe161c22e37d" args="(rs_element e, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementNameLength </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>For complex elements, this function will return the length of sub-element name at index</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the sub-element to return </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>length of the sub-element name including the null terminator (size of buffer needed to write the name) </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a840d53f1e91bb6887b40a4d8983c53ed"></a><!-- doxytag: member="rs_element.rsh::rsElementGetSubElementOffsetBytes" ref="a840d53f1e91bb6887b40a4d8983c53ed" args="(rs_element e, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetSubElementOffsetBytes </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>This function specifies the location of a sub-element within the element</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the sub-element </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>offset in bytes of sub-element in this element at given index </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a727997de25ae43c07dffcfd484928d53"></a><!-- doxytag: member="rs_element.rsh::rsElementGetVectorSize" ref="a727997de25ae43c07dffcfd484928d53" args="(rs_element e)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsElementGetVectorSize </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__element.html">rs_element</a>&#160;</td>
+          <td class="paramname"><em>e</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the element's vector size</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">e</td><td>element to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>length of the element vector (for float2, float3, etc.) </dd></dl>
+
+</div>
+</div>
+</div>
 
 </body>
 </html>
diff --git a/docs/html/reference/renderscript/rs__element_8rsh_source.html b/docs/html/reference/renderscript/rs__element_8rsh_source.html
index 47ebb4d0..1d2601e 100644
--- a/docs/html/reference/renderscript/rs__element_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__element_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_element.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.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">rs_element.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_element.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__element_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>
@@ -50,34 +50,34 @@
 <a name="l00027"></a>00027 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00028"></a>00028 <span class="preprocessor"></span>
 <a name="l00038"></a>00038 <span class="keyword">extern</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00039"></a>00039     rsElementGetSubElementCount(<a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> e);
+<a name="l00039"></a>00039     <a class="code" href="rs__element_8rsh.html#a2ecab064ea2b720bc3af27b523388f31">rsElementGetSubElementCount</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> e);
 <a name="l00040"></a>00040 
-<a name="l00049"></a>00049 extern <a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> __attribute__((overloadable))
-<a name="l00050"></a>00050     rsElementGetSubElement(<a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a>, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00049"></a>00049 extern <a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> __attribute__((overloadable))
+<a name="l00050"></a>00050     <a class="code" href="rs__element_8rsh.html#a8c690bce7d32be759fd787740c270c92">rsElementGetSubElement</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a>, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00051"></a>00051 
 <a name="l00061"></a>00061 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00062"></a>00062     rsElementGetSubElementNameLength(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00062"></a>00062     <a class="code" href="rs__element_8rsh.html#a94834eb1d91b50a5df3cbe161c22e37d">rsElementGetSubElementNameLength</a>(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00063"></a>00063 
 <a name="l00075"></a>00075 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00076"></a>00076     rsElementGetSubElementName(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index, <span class="keywordtype">char</span> *name, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> nameLength);
+<a name="l00076"></a>00076     <a class="code" href="rs__element_8rsh.html#a3c1446166c43aa6ba3d5359f6c982f02">rsElementGetSubElementName</a>(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index, <span class="keywordtype">char</span> *name, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> nameLength);
 <a name="l00077"></a>00077 
 <a name="l00088"></a>00088 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00089"></a>00089     rsElementGetSubElementArraySize(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00089"></a>00089     <a class="code" href="rs__element_8rsh.html#a9c3140c18139db451279d9b221808eee">rsElementGetSubElementArraySize</a>(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00090"></a>00090 
 <a name="l00100"></a>00100 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00101"></a>00101     rsElementGetSubElementOffsetBytes(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00101"></a>00101     <a class="code" href="rs__element_8rsh.html#a840d53f1e91bb6887b40a4d8983c53ed">rsElementGetSubElementOffsetBytes</a>(rs_element e, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00102"></a>00102 
 <a name="l00109"></a>00109 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00110"></a>00110     rsElementGetBytesSize(rs_element e);
+<a name="l00110"></a>00110     <a class="code" href="rs__element_8rsh.html#ac54592168af5896d3fba5283af286f98">rsElementGetBytesSize</a>(rs_element e);
 <a name="l00111"></a>00111 
-<a name="l00118"></a>00118 extern rs_data_type __attribute__((overloadable))
-<a name="l00119"></a>00119     rsElementGetDataType(rs_element e);
+<a name="l00118"></a>00118 extern <a class="code" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647" title="Enumeration for possible element data types.">rs_data_type</a> __attribute__((overloadable))
+<a name="l00119"></a>00119     <a class="code" href="rs__element_8rsh.html#a9a3569d242be363517ea2354d98cf382">rsElementGetDataType</a>(rs_element e);
 <a name="l00120"></a>00120 
-<a name="l00127"></a>00127 extern rs_data_kind __attribute__((overloadable))
-<a name="l00128"></a>00128     rsElementGetDataKind(rs_element e);
+<a name="l00127"></a>00127 extern <a class="code" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a" title="Enumeration for possible element data kind.">rs_data_kind</a> __attribute__((overloadable))
+<a name="l00128"></a>00128     <a class="code" href="rs__element_8rsh.html#af072702a530e158093d69353072da5f9">rsElementGetDataKind</a>(rs_element e);
 <a name="l00129"></a>00129 
 <a name="l00137"></a>00137 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00138"></a>00138     rsElementGetVectorSize(rs_element e);
+<a name="l00138"></a>00138     <a class="code" href="rs__element_8rsh.html#a727997de25ae43c07dffcfd484928d53">rsElementGetVectorSize</a>(rs_element e);
 <a name="l00139"></a>00139 
 <a name="l00140"></a>00140 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00141"></a>00141 <span class="preprocessor"></span>
diff --git a/docs/html/reference/renderscript/rs__math_8rsh.html b/docs/html/reference/renderscript/rs__math_8rsh.html
index 96d5e8f..7379f54 100644
--- a/docs/html/reference/renderscript/rs__math_8rsh.html
+++ b/docs/html/reference/renderscript/rs__math_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_math.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,7 +27,7 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_math.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
@@ -38,30 +38,30 @@
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a03e898d810ac44158e7461b2b2b1c356">rsRand</a> (float max_value)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a84b2e7468314873b3aa02969e310d9e4">rsRand</a> (float min_value, float max_value)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ac4f127e78da0849321c7f6db14f9e989">rsFrac</a> (float)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> amount, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> low, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> high)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ad36abebbb36ffc5312fb2ed8baf98d39">rsClamp</a> (int amount, int low, int high)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a1f9e5f628fc42e8215e9dcf89ebc6897">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> amount, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> low, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> high)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a7b8cb9e970171f866b75d333abf68d89">rsClamp</a> (short amount, short low, short high)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a08fe0a967cc59f2ad831115557c86c50">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> amount, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> low, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> high)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ae31137028793c4aaf4df839535135837">rsClamp</a> (char amount, char low, char high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> amount, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> low, <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ad5732b8b1f1d0d53d605a7dc6908dc85">rsClamp</a> (int amount, int low, int high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#af5e17f571b13c3391d860eac172be1c6">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> amount, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> low, <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a40eddbf6c2462eada177a581a49bd3c6">rsClamp</a> (short amount, short low, short high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a2845f16757fe9eb7204bfb6f94d7fcc6">rsClamp</a> (<a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> amount, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> low, <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> high)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a33122202f10764687e2d3ab1a8c27062">rsClamp</a> (char amount, char low, char high)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">static __inline__ void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a191f9c687c56322c18b7d71491602122">rsExtractFrustumPlanes</a> (const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *viewProj, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *left, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *right, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *top, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *bottom, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *near, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *far)</td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">static __inline__ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a7bbeaf44838e08e68d5cf3e3d7b0818c">rsIsSphereInFrustum</a> (<a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *sphere, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *left, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *right, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *top, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *bottom, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *near, <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *far)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rsPackColorTo8888</a> (float r, float g, float b)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a84d08e07ec8421c51ee8bd57d5b8b33e">rsPackColorTo8888</a> (float r, float g, float b, float a)</td></tr>
-<tr><td class="memItemLeft" align="right" valign="top">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a22e0be7e18b317a7453ebad4300934f6">rsPackColorTo8888</a> (<a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> color)</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__math_8rsh.html#a26525a4f5093bd0f13191efe06127f4b">rsUnpackColor8888</a> (<a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> c)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a> (float r, float g, float b)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#a1f1107cf778cf1f614edfb5b8ac436a0">rsPackColorTo8888</a> (float r, float g, float b, float a)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__math_8rsh.html#ac30a8c020eade2b57fd5966cb7c8665e">rsPackColorTo8888</a> (<a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> color)</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__math_8rsh.html#a48bb0c2e7b1f2b62b2a8970c7d709eca">rsUnpackColor8888</a> (<a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> c)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>todo-jsams </p>
 
 <p>Definition in file <a class="el" href="rs__math_8rsh_source.html">rs_math.rsh</a>.</p>
 </div><hr/><h2>Function Documentation</h2>
-<a class="anchor" id="ad40f2fb8f416e2ab7d2879de3b3d885e"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="ad40f2fb8f416e2ab7d2879de3b3d885e" args="(uint amount, uint low, uint high)" -->
+<a class="anchor" id="a5de277f7518a61646c3d74f3a0b9e893"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a5de277f7518a61646c3d74f3a0b9e893" args="(uint amount, uint low, uint high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> rsClamp </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> rsClamp </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -98,12 +98,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ad36abebbb36ffc5312fb2ed8baf98d39"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="ad36abebbb36ffc5312fb2ed8baf98d39" args="(int amount, int low, int high)" -->
+<a class="anchor" id="ad5732b8b1f1d0d53d605a7dc6908dc85"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="ad5732b8b1f1d0d53d605a7dc6908dc85" args="(int amount, int low, int high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME int rsClamp </td>
+          <td class="memname">int rsClamp </td>
           <td>(</td>
           <td class="paramtype">int&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -132,12 +132,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a1f9e5f628fc42e8215e9dcf89ebc6897"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a1f9e5f628fc42e8215e9dcf89ebc6897" args="(ushort amount, ushort low, ushort high)" -->
+<a class="anchor" id="af5e17f571b13c3391d860eac172be1c6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="af5e17f571b13c3391d860eac172be1c6" args="(ushort amount, ushort low, ushort high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> rsClamp </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> rsClamp </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -166,12 +166,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a7b8cb9e970171f866b75d333abf68d89"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a7b8cb9e970171f866b75d333abf68d89" args="(short amount, short low, short high)" -->
+<a class="anchor" id="a40eddbf6c2462eada177a581a49bd3c6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a40eddbf6c2462eada177a581a49bd3c6" args="(short amount, short low, short high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME short rsClamp </td>
+          <td class="memname">short rsClamp </td>
           <td>(</td>
           <td class="paramtype">short&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -200,12 +200,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a08fe0a967cc59f2ad831115557c86c50"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a08fe0a967cc59f2ad831115557c86c50" args="(uchar amount, uchar low, uchar high)" -->
+<a class="anchor" id="a2845f16757fe9eb7204bfb6f94d7fcc6"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a2845f16757fe9eb7204bfb6f94d7fcc6" args="(uchar amount, uchar low, uchar high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsClamp </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> rsClamp </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -234,12 +234,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ae31137028793c4aaf4df839535135837"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="ae31137028793c4aaf4df839535135837" args="(char amount, char low, char high)" -->
+<a class="anchor" id="a33122202f10764687e2d3ab1a8c27062"></a><!-- doxytag: member="rs_math.rsh::rsClamp" ref="a33122202f10764687e2d3ab1a8c27062" args="(char amount, char low, char high)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME char rsClamp </td>
+          <td class="memname">char rsClamp </td>
           <td>(</td>
           <td class="paramtype">char&#160;</td>
           <td class="paramname"><em>amount</em>, </td>
@@ -430,12 +430,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a628c8d13e3fe41fc860ad937184e4dcd"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a628c8d13e3fe41fc860ad937184e4dcd" args="(float r, float g, float b)" -->
+<a class="anchor" id="a5e20d326a6e2532d19a493b01f948c17"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a5e20d326a6e2532d19a493b01f948c17" args="(float r, float g, float b)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>r</em>, </td>
@@ -473,12 +473,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a84d08e07ec8421c51ee8bd57d5b8b33e"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a84d08e07ec8421c51ee8bd57d5b8b33e" args="(float r, float g, float b, float a)" -->
+<a class="anchor" id="a1f1107cf778cf1f614edfb5b8ac436a0"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a1f1107cf778cf1f614edfb5b8ac436a0" args="(float r, float g, float b, float a)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
           <td>(</td>
           <td class="paramtype">float&#160;</td>
           <td class="paramname"><em>r</em>, </td>
@@ -523,12 +523,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a22e0be7e18b317a7453ebad4300934f6"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="a22e0be7e18b317a7453ebad4300934f6" args="(float3 color)" -->
+<a class="anchor" id="ac30a8c020eade2b57fd5966cb7c8665e"></a><!-- doxytag: member="rs_math.rsh::rsPackColorTo8888" ref="ac30a8c020eade2b57fd5966cb7c8665e" args="(float3 color)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> rsPackColorTo8888 </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a>&#160;</td>
           <td class="paramname"><em>color</em></td><td>)</td>
@@ -648,12 +648,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a26525a4f5093bd0f13191efe06127f4b"></a><!-- doxytag: member="rs_math.rsh::rsUnpackColor8888" ref="a26525a4f5093bd0f13191efe06127f4b" args="(uchar4 c)" -->
+<a class="anchor" id="a48bb0c2e7b1f2b62b2a8970c7d709eca"></a><!-- doxytag: member="rs_math.rsh::rsUnpackColor8888" ref="a48bb0c2e7b1f2b62b2a8970c7d709eca" args="(uchar4 c)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsUnpackColor8888 </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsUnpackColor8888 </td>
           <td>(</td>
           <td class="paramtype"><a class="el" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a>&#160;</td>
           <td class="paramname"><em>c</em></td><td>)</td>
diff --git a/docs/html/reference/renderscript/rs__math_8rsh_source.html b/docs/html/reference/renderscript/rs__math_8rsh_source.html
index eb4ddac..513ce48 100644
--- a/docs/html/reference/renderscript/rs__math_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__math_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_math.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.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">rs_math.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_math.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__math_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>
@@ -62,13 +62,13 @@
 <a name="l00055"></a>00055 
 <a name="l00057"></a>00057 <span class="comment">// int ops</span>
 <a name="l00059"></a>00059 <span class="comment"></span>
-<a name="l00067"></a>00067 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> amount, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> low, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> high);
+<a name="l00067"></a>00067 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> amount, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> low, <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> high);
 <a name="l00068"></a>00068 
-<a name="l00072"></a>00072 _RS_RUNTIME <span class="keywordtype">int</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<span class="keywordtype">int</span> amount, <span class="keywordtype">int</span> low, <span class="keywordtype">int</span> high);
-<a name="l00076"></a>00076 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> amount, <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> low, <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> high);
-<a name="l00080"></a>00080 _RS_RUNTIME <span class="keywordtype">short</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<span class="keywordtype">short</span> amount, <span class="keywordtype">short</span> low, <span class="keywordtype">short</span> high);
-<a name="l00084"></a>00084 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> amount, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> low, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> high);
-<a name="l00088"></a>00088 _RS_RUNTIME <span class="keywordtype">char</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#ad40f2fb8f416e2ab7d2879de3b3d885e">rsClamp</a>(<span class="keywordtype">char</span> amount, <span class="keywordtype">char</span> low, <span class="keywordtype">char</span> high);
+<a name="l00072"></a>00072 _RS_RUNTIME <span class="keywordtype">int</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<span class="keywordtype">int</span> amount, <span class="keywordtype">int</span> low, <span class="keywordtype">int</span> high);
+<a name="l00076"></a>00076 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> amount, <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> low, <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> high);
+<a name="l00080"></a>00080 _RS_RUNTIME <span class="keywordtype">short</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<span class="keywordtype">short</span> amount, <span class="keywordtype">short</span> low, <span class="keywordtype">short</span> high);
+<a name="l00084"></a>00084 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> amount, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> low, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> high);
+<a name="l00088"></a>00088 _RS_RUNTIME <span class="keywordtype">char</span> __attribute__((overloadable, always_inline)) <a class="code" href="rs__math_8rsh.html#a5de277f7518a61646c3d74f3a0b9e893">rsClamp</a>(<span class="keywordtype">char</span> amount, <span class="keywordtype">char</span> low, <span class="keywordtype">char</span> high);
 <a name="l00089"></a>00089 
 <a name="l00090"></a>00090 
 <a name="l00101"></a>00101 __inline__ static <span class="keywordtype">void</span> __attribute__((overloadable, always_inline))
@@ -107,17 +107,17 @@
 <a name="l00134"></a>00134     far-&gt;z = viewProj-&gt;m[11] - viewProj-&gt;m[10];
 <a name="l00135"></a>00135     far-&gt;w = viewProj-&gt;m[15] - viewProj-&gt;m[14];
 <a name="l00136"></a>00136 
-<a name="l00137"></a>00137     <span class="keywordtype">float</span> len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(left-&gt;xyz);
+<a name="l00137"></a>00137     <span class="keywordtype">float</span> len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(left-&gt;xyz);
 <a name="l00138"></a>00138     *left /= len;
-<a name="l00139"></a>00139     len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(right-&gt;xyz);
+<a name="l00139"></a>00139     len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(right-&gt;xyz);
 <a name="l00140"></a>00140     *right /= len;
-<a name="l00141"></a>00141     len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(top-&gt;xyz);
+<a name="l00141"></a>00141     len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(top-&gt;xyz);
 <a name="l00142"></a>00142     *top /= len;
-<a name="l00143"></a>00143     len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(bottom-&gt;xyz);
+<a name="l00143"></a>00143     len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(bottom-&gt;xyz);
 <a name="l00144"></a>00144     *bottom /= len;
-<a name="l00145"></a>00145     len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(near-&gt;xyz);
+<a name="l00145"></a>00145     len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(near-&gt;xyz);
 <a name="l00146"></a>00146     *near /= len;
-<a name="l00147"></a>00147     len = <a class="code" href="rs__cl_8rsh.html#a1a222b7879342279e1e0070d6afd9e18">length</a>(far-&gt;xyz);
+<a name="l00147"></a>00147     len = <a class="code" href="rs__cl_8rsh.html#a902d4d2fab31ba8f9631b1f681e99baa">length</a>(far-&gt;xyz);
 <a name="l00148"></a>00148     *far /= len;
 <a name="l00149"></a>00149 }
 <a name="l00150"></a>00150 
@@ -127,27 +127,27 @@
 <a name="l00164"></a>00164                       <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *top, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *bottom,
 <a name="l00165"></a>00165                       <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *near, <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> *far) {
 <a name="l00166"></a>00166 
-<a name="l00167"></a>00167     <span class="keywordtype">float</span> distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(left-&gt;xyz, sphere-&gt;xyz) + left-&gt;w;
+<a name="l00167"></a>00167     <span class="keywordtype">float</span> distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(left-&gt;xyz, sphere-&gt;xyz) + left-&gt;w;
 <a name="l00168"></a>00168     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00169"></a>00169         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00170"></a>00170     }
-<a name="l00171"></a>00171     distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(right-&gt;xyz, sphere-&gt;xyz) + right-&gt;w;
+<a name="l00171"></a>00171     distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(right-&gt;xyz, sphere-&gt;xyz) + right-&gt;w;
 <a name="l00172"></a>00172     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00173"></a>00173         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00174"></a>00174     }
-<a name="l00175"></a>00175     distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(top-&gt;xyz, sphere-&gt;xyz) + top-&gt;w;
+<a name="l00175"></a>00175     distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(top-&gt;xyz, sphere-&gt;xyz) + top-&gt;w;
 <a name="l00176"></a>00176     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00177"></a>00177         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00178"></a>00178     }
-<a name="l00179"></a>00179     distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(bottom-&gt;xyz, sphere-&gt;xyz) + bottom-&gt;w;
+<a name="l00179"></a>00179     distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(bottom-&gt;xyz, sphere-&gt;xyz) + bottom-&gt;w;
 <a name="l00180"></a>00180     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00181"></a>00181         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00182"></a>00182     }
-<a name="l00183"></a>00183     distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(near-&gt;xyz, sphere-&gt;xyz) + near-&gt;w;
+<a name="l00183"></a>00183     distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(near-&gt;xyz, sphere-&gt;xyz) + near-&gt;w;
 <a name="l00184"></a>00184     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00185"></a>00185         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00186"></a>00186     }
-<a name="l00187"></a>00187     distToCenter = <a class="code" href="rs__cl_8rsh.html#a70544acaca578035a849eef67d62c449">dot</a>(far-&gt;xyz, sphere-&gt;xyz) + far-&gt;w;
+<a name="l00187"></a>00187     distToCenter = <a class="code" href="rs__cl_8rsh.html#aa26d85eac3067e9769b33b6914b180f2">dot</a>(far-&gt;xyz, sphere-&gt;xyz) + far-&gt;w;
 <a name="l00188"></a>00188     <span class="keywordflow">if</span> (distToCenter &lt; -sphere-&gt;w) {
 <a name="l00189"></a>00189         <span class="keywordflow">return</span> <span class="keyword">false</span>;
 <a name="l00190"></a>00190     }
@@ -155,18 +155,21 @@
 <a name="l00192"></a>00192 }
 <a name="l00193"></a>00193 
 <a name="l00194"></a>00194 
-<a name="l00205"></a>00205 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rsPackColorTo8888</a>(<span class="keywordtype">float</span> r, <span class="keywordtype">float</span> g, <span class="keywordtype">float</span> b);
+<a name="l00205"></a>00205 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a>(<span class="keywordtype">float</span> r, <span class="keywordtype">float</span> g, <span class="keywordtype">float</span> b);
 <a name="l00206"></a>00206 
-<a name="l00217"></a>00217 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rsPackColorTo8888</a>(<span class="keywordtype">float</span> r, <span class="keywordtype">float</span> g, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> a);
+<a name="l00217"></a>00217 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a>(<span class="keywordtype">float</span> r, <span class="keywordtype">float</span> g, <span class="keywordtype">float</span> b, <span class="keywordtype">float</span> a);
 <a name="l00218"></a>00218 
-<a name="l00227"></a>00227 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rsPackColorTo8888</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> color);
+<a name="l00227"></a>00227 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a>(<a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> color);
 <a name="l00228"></a>00228 
-<a name="l00236"></a>00236 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a628c8d13e3fe41fc860ad937184e4dcd">rsPackColorTo8888</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> color);
+<a name="l00236"></a>00236 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) <a class="code" href="rs__math_8rsh.html#a5e20d326a6e2532d19a493b01f948c17">rsPackColorTo8888</a>(<a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> color);
 <a name="l00237"></a>00237 
-<a name="l00245"></a>00245 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> <a class="code" href="rs__math_8rsh.html#a26525a4f5093bd0f13191efe06127f4b">rsUnpackColor8888</a>(<a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> c);
+<a name="l00245"></a>00245 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> <a class="code" href="rs__math_8rsh.html#a48bb0c2e7b1f2b62b2a8970c7d709eca">rsUnpackColor8888</a>(<a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> c);
 <a name="l00246"></a>00246 
-<a name="l00247"></a>00247 
-<a name="l00248"></a>00248 <span class="preprocessor">#endif</span>
+<a name="l00247"></a>00247 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((overloadable)) rsYuvToRGBA_uchar4(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> y, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> u, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v);
+<a name="l00248"></a>00248 _RS_RUNTIME <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((overloadable)) rsYuvToRGBA_float4(<a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> y, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> u, <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> v);
+<a name="l00249"></a>00249 
+<a name="l00250"></a>00250 
+<a name="l00251"></a>00251 <span class="preprocessor">#endif</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh.html b/docs/html/reference/renderscript/rs__matrix_8rsh.html
index 583a92a..69cc373 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>rs_matrix.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/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">rs_matrix.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/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">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a68e320f7fa2cc5a5b4759e3ab679ee10">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">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#ada106cb8f08e4b23930d7ba1a0ce5609">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">_RS_RUNTIME void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a086c4f1cd21500f8e332226af4f62001">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">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#af1fb87eb02f166bb85ef10a92333bb49">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">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a90b0548da8dbe1f643bcbac8466e5b72">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">_RS_RUNTIME float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__matrix_8rsh.html#a22a46174a3c72452c9f6c33403aeae19">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">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">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">_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"><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">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>
@@ -79,12 +79,12 @@
 
 <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="af1fb87eb02f166bb85ef10a92333bb49"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="af1fb87eb02f166bb85ef10a92333bb49" args="(const rs_matrix4x4 *m, uint32_t row, uint32_t col)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
+          <td class="memname">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>
@@ -122,12 +122,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a90b0548da8dbe1f643bcbac8466e5b72"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="a90b0548da8dbe1f643bcbac8466e5b72" args="(const rs_matrix3x3 *m, uint32_t row, uint32_t col)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
+          <td class="memname">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>
@@ -156,12 +156,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a22a46174a3c72452c9f6c33403aeae19"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixGet" ref="a22a46174a3c72452c9f6c33403aeae19" args="(const rs_matrix2x2 *m, uint32_t row, uint32_t col)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME float rsMatrixGet </td>
+          <td class="memname">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>
@@ -1085,14 +1085,14 @@
 
 </div>
 </div>
-<a class="anchor" id="a47b6abbf32ffaf77bb13d96c3f05779f"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a47b6abbf32ffaf77bb13d96c3f05779f" args="(rs_matrix4x4 *m, float4 in)" -->
+<a class="anchor" id="a2f11c3d7cc34ddce90ba785b93af8da2"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a2f11c3d7cc34ddce90ba785b93af8da2" args="(const rs_matrix4x4 *m, float4 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsMatrixMultiply </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
+          <td class="paramtype">const <a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1109,19 +1109,19 @@
       </table>
 </div>
 <div class="memdoc">
-<p>Multiply a vector by a matrix and return the result vector. API version 10-13</p>
+<p>Multiply a vector by a matrix and return the result vector. API version 14+</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="a716bc2d29b80eb25388aba3ba8845aef"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a716bc2d29b80eb25388aba3ba8845aef" args="(rs_matrix3x3 *m, float3 in)" -->
+<a class="anchor" id="a88ae2ed203769cb4a7917f84f6c1a2e2"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a88ae2ed203769cb4a7917f84f6c1a2e2" args="(const rs_matrix3x3 *m, float3 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rsMatrixMultiply </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
+          <td class="paramtype">const <a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1142,14 +1142,14 @@
 
 </div>
 </div>
-<a class="anchor" id="a4d9a8bb7c3f5d67b14fa349bdd531d13"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a4d9a8bb7c3f5d67b14fa349bdd531d13" args="(rs_matrix2x2 *m, float2 in)" -->
+<a class="anchor" id="a8d81a7143d5d45f60f7e91f955579bab"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixMultiply" ref="a8d81a7143d5d45f60f7e91f955579bab" args="(const rs_matrix2x2 *m, float2 in)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME <a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> rsMatrixMultiply </td>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> rsMatrixMultiply </td>
           <td>(</td>
-          <td class="paramtype"><a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
+          <td class="paramtype">const <a class="el" href="structrs__matrix2x2.html">rs_matrix2x2</a> *&#160;</td>
           <td class="paramname"><em>m</em>, </td>
         </tr>
         <tr>
@@ -1275,12 +1275,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a68e320f7fa2cc5a5b4759e3ab679ee10"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="a68e320f7fa2cc5a5b4759e3ab679ee10" args="(rs_matrix4x4 *m, uint32_t row, uint32_t col, float v)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
+          <td class="memname">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>
@@ -1325,12 +1325,12 @@
 
 </div>
 </div>
-<a class="anchor" id="ada106cb8f08e4b23930d7ba1a0ce5609"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="ada106cb8f08e4b23930d7ba1a0ce5609" args="(rs_matrix3x3 *m, uint32_t row, uint32_t col, float v)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
+          <td class="memname">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>
@@ -1365,12 +1365,12 @@
 
 </div>
 </div>
-<a class="anchor" id="a086c4f1cd21500f8e332226af4f62001"></a><!-- doxytag: member="rs_matrix.rsh::rsMatrixSet" ref="a086c4f1cd21500f8e332226af4f62001" args="(rs_matrix2x2 *m, uint32_t row, uint32_t col, float v)" -->
+<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)" -->
 <div class="memitem">
 <div class="memproto">
       <table class="memname">
         <tr>
-          <td class="memname">_RS_RUNTIME void rsMatrixSet </td>
+          <td class="memname">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>
diff --git a/docs/html/reference/renderscript/rs__matrix_8rsh_source.html b/docs/html/reference/renderscript/rs__matrix_8rsh_source.html
index be83c9b..c1aaeb2 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>rs_matrix.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/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">rs_matrix.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/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>
@@ -47,18 +47,18 @@
 <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#a68e320f7fa2cc5a5b4759e3ab679ee10">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="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#a68e320f7fa2cc5a5b4759e3ab679ee10">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="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#a68e320f7fa2cc5a5b4759e3ab679ee10">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="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#af1fb87eb02f166bb85ef10a92333bb49">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="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#af1fb87eb02f166bb85ef10a92333bb49">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="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#af1fb87eb02f166bb85ef10a92333bb49">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="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);
diff --git a/docs/html/reference/renderscript/rs__mesh_8rsh.html b/docs/html/reference/renderscript/rs__mesh_8rsh.html
index 81ac93e..82824adc 100644
--- a/docs/html/reference/renderscript/rs__mesh_8rsh.html
+++ b/docs/html/reference/renderscript/rs__mesh_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_mesh.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,15 +24,185 @@
   </div>
 </div>
 <div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_mesh.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.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"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__mesh_8rsh.html#a7578d6d93154ac881715ab511449fab9">rsgMeshGetVertexAllocationCount</a> (<a class="el" href="structrs__mesh.html">rs_mesh</a> m)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__mesh_8rsh.html#ae0a0178cc02508517013486be4500d7f">rsgMeshGetPrimitiveCount</a> (<a class="el" href="structrs__mesh.html">rs_mesh</a> m)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__mesh_8rsh.html#a43e1d84147176cb0a1659552fa8da49f">rsgMeshGetVertexAllocation</a> (<a class="el" href="structrs__mesh.html">rs_mesh</a> m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structrs__allocation.html">rs_allocation</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__mesh_8rsh.html#a05257c9252e7804397d6a6f7549bae5a">rsgMeshGetIndexAllocation</a> (<a class="el" href="structrs__mesh.html">rs_mesh</a> m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__mesh_8rsh.html#af467f1c21cc9221071334f8234c29466">rsgMeshGetPrimitive</a> (<a class="el" href="structrs__mesh.html">rs_mesh</a> m, <a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index)</td></tr>
+</table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Mesh routines. </p>
 
 <p>Definition in file <a class="el" href="rs__mesh_8rsh_source.html">rs_mesh.rsh</a>.</p>
-</div></div>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a05257c9252e7804397d6a6f7549bae5a"></a><!-- doxytag: member="rs_mesh.rsh::rsgMeshGetIndexAllocation" ref="a05257c9252e7804397d6a6f7549bae5a" args="(rs_mesh m, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structrs__allocation.html">rs_allocation</a> rsgMeshGetIndexAllocation </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__mesh.html">rs_mesh</a>&#160;</td>
+          <td class="paramname"><em>m</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns an allocation containing index data or a null allocation if only the primitive is specified</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>mesh to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the index allocation </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>allocation containing index data </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="af467f1c21cc9221071334f8234c29466"></a><!-- doxytag: member="rs_mesh.rsh::rsgMeshGetPrimitive" ref="af467f1c21cc9221071334f8234c29466" args="(rs_mesh m, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a> rsgMeshGetPrimitive </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__mesh.html">rs_mesh</a>&#160;</td>
+          <td class="paramname"><em>m</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the primitive describing how a part of the mesh is rendered</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>mesh to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the primitive </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>primitive describing how the mesh is rendered </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ae0a0178cc02508517013486be4500d7f"></a><!-- doxytag: member="rs_mesh.rsh::rsgMeshGetPrimitiveCount" ref="ae0a0178cc02508517013486be4500d7f" args="(rs_mesh m)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsgMeshGetPrimitiveCount </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__mesh.html">rs_mesh</a>&#160;</td>
+          <td class="paramname"><em>m</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Meshes could have multiple index sets, this function returns the number.</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>mesh to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a43e1d84147176cb0a1659552fa8da49f"></a><!-- doxytag: member="rs_mesh.rsh::rsgMeshGetVertexAllocation" ref="a43e1d84147176cb0a1659552fa8da49f" args="(rs_mesh m, uint32_t index)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="structrs__allocation.html">rs_allocation</a> rsgMeshGetVertexAllocation </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__mesh.html">rs_mesh</a>&#160;</td>
+          <td class="paramname"><em>m</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>index</em>&#160;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns an allocation that is part of the mesh and contains vertex data, e.g. positions, normals, texcoords</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>mesh to get data from </td></tr>
+    <tr><td class="paramname">index</td><td>index of the vertex allocation </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>allocation containing vertex data </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a7578d6d93154ac881715ab511449fab9"></a><!-- doxytag: member="rs_mesh.rsh::rsgMeshGetVertexAllocationCount" ref="a7578d6d93154ac881715ab511449fab9" args="(rs_mesh m)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> rsgMeshGetVertexAllocationCount </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__mesh.html">rs_mesh</a>&#160;</td>
+          <td class="paramname"><em>m</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Returns the number of allocations in the mesh that contain vertex data</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">m</td><td>mesh to get data from </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>number of allocations in the mesh that contain vertex data </dd></dl>
+
+</div>
+</div>
+</div>
 
 </body>
 </html>
diff --git a/docs/html/reference/renderscript/rs__mesh_8rsh_source.html b/docs/html/reference/renderscript/rs__mesh_8rsh_source.html
index e344b47..f9416c8 100644
--- a/docs/html/reference/renderscript/rs__mesh_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__mesh_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_mesh.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.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">rs_mesh.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_mesh.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__mesh_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>
@@ -50,19 +50,19 @@
 <a name="l00027"></a>00027 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00028"></a>00028 <span class="preprocessor"></span>
 <a name="l00037"></a>00037 <span class="keyword">extern</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00038"></a>00038     rsgMeshGetVertexAllocationCount(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> m);
+<a name="l00038"></a>00038     <a class="code" href="rs__mesh_8rsh.html#a7578d6d93154ac881715ab511449fab9">rsgMeshGetVertexAllocationCount</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> m);
 <a name="l00039"></a>00039 
 <a name="l00049"></a>00049 extern <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> __attribute__((overloadable))
-<a name="l00050"></a>00050     rsgMeshGetPrimitiveCount(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> m);
+<a name="l00050"></a>00050     <a class="code" href="rs__mesh_8rsh.html#ae0a0178cc02508517013486be4500d7f">rsgMeshGetPrimitiveCount</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> m);
 <a name="l00051"></a>00051 
-<a name="l00060"></a>00060 extern <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> __attribute__((overloadable))
-<a name="l00061"></a>00061     rsgMeshGetVertexAllocation(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00060"></a>00060 extern <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> __attribute__((overloadable))
+<a name="l00061"></a>00061     <a class="code" href="rs__mesh_8rsh.html#a43e1d84147176cb0a1659552fa8da49f">rsgMeshGetVertexAllocation</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00062"></a>00062 
-<a name="l00071"></a>00071 extern <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> __attribute__((overloadable))
-<a name="l00072"></a>00072     rsgMeshGetIndexAllocation(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00071"></a>00071 extern <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> __attribute__((overloadable))
+<a name="l00072"></a>00072     <a class="code" href="rs__mesh_8rsh.html#a05257c9252e7804397d6a6f7549bae5a">rsgMeshGetIndexAllocation</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00073"></a>00073 
-<a name="l00082"></a>00082 extern rs_primitive __attribute__((overloadable))
-<a name="l00083"></a>00083     rsgMeshGetPrimitive(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
+<a name="l00082"></a>00082 extern <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a> __attribute__((overloadable))
+<a name="l00083"></a>00083     <a class="code" href="rs__mesh_8rsh.html#af467f1c21cc9221071334f8234c29466">rsgMeshGetPrimitive</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> m, <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> index);
 <a name="l00084"></a>00084 
 <a name="l00085"></a>00085 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00086"></a>00086 <span class="preprocessor"></span>
diff --git a/docs/html/reference/renderscript/rs__object_8rsh.html b/docs/html/reference/renderscript/rs__object_8rsh.html
index 9ac7bb8..6ace343 100644
--- a/docs/html/reference/renderscript/rs__object_8rsh.html
+++ b/docs/html/reference/renderscript/rs__object_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_object.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,7 +27,7 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_object.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
diff --git a/docs/html/reference/renderscript/rs__object_8rsh_source.html b/docs/html/reference/renderscript/rs__object_8rsh_source.html
index e55769b..9cd43b4 100644
--- a/docs/html/reference/renderscript/rs__object_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__object_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_object.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.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">rs_object.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_object.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__object_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>
@@ -48,81 +48,81 @@
 <a name="l00025"></a>00025 <span class="preprocessor"></span>
 <a name="l00026"></a>00026 
 <a name="l00033"></a>00033 <span class="keyword">extern</span> <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00034"></a>00034     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> *dst, <a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> src);
+<a name="l00034"></a>00034     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> *dst, <a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> src);
 <a name="l00038"></a>00038 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00039"></a>00039     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a Renderscript type.">rs_type</a> *dst, <a class="code" href="structrs__type.html" title="Opaque handle to a Renderscript type.">rs_type</a> src);
+<a name="l00039"></a>00039     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a RenderScript type.">rs_type</a> *dst, <a class="code" href="structrs__type.html" title="Opaque handle to a RenderScript type.">rs_type</a> src);
 <a name="l00043"></a>00043 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00044"></a>00044     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> *dst, <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> src);
+<a name="l00044"></a>00044     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> *dst, <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> src);
 <a name="l00048"></a>00048 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00049"></a>00049     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> *dst, <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> src);
+<a name="l00049"></a>00049     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> *dst, <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> src);
 <a name="l00053"></a>00053 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00054"></a>00054     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> *dst, <a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> src);
+<a name="l00054"></a>00054     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> *dst, <a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> src);
 <a name="l00058"></a>00058 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00059"></a>00059     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a Renderscript Path object.">rs_path</a> *dst, <a class="code" href="structrs__path.html" title="Opaque handle to a Renderscript Path object.">rs_path</a> src);
+<a name="l00059"></a>00059     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a RenderScript Path object.">rs_path</a> *dst, <a class="code" href="structrs__path.html" title="Opaque handle to a RenderScript Path object.">rs_path</a> src);
 <a name="l00063"></a>00063 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00064"></a>00064     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> *dst, <a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> src);
+<a name="l00064"></a>00064     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> *dst, <a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> src);
 <a name="l00068"></a>00068 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00069"></a>00069     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a Renderscript ProgramFragment object.">rs_program_fragment</a> *dst, <a class="code" href="structrs__program__fragment.html" title="Opaque handle to a Renderscript ProgramFragment object.">rs_program_fragment</a> src);
+<a name="l00069"></a>00069     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a RenderScript ProgramFragment object.">rs_program_fragment</a> *dst, <a class="code" href="structrs__program__fragment.html" title="Opaque handle to a RenderScript ProgramFragment object.">rs_program_fragment</a> src);
 <a name="l00073"></a>00073 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00074"></a>00074     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a Renderscript ProgramVertex object.">rs_program_vertex</a> *dst, <a class="code" href="structrs__program__vertex.html" title="Opaque handle to a Renderscript ProgramVertex object.">rs_program_vertex</a> src);
+<a name="l00074"></a>00074     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a RenderScript ProgramVertex object.">rs_program_vertex</a> *dst, <a class="code" href="structrs__program__vertex.html" title="Opaque handle to a RenderScript ProgramVertex object.">rs_program_vertex</a> src);
 <a name="l00078"></a>00078 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00079"></a>00079     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a> *dst, <a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a> src);
+<a name="l00079"></a>00079     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a> *dst, <a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a> src);
 <a name="l00083"></a>00083 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00084"></a>00084     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> *dst, <a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> src);
+<a name="l00084"></a>00084     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> *dst, <a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> src);
 <a name="l00088"></a>00088 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00089"></a>00089     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a Renderscript font object.">rs_font</a> *dst, <a class="code" href="structrs__font.html" title="Opaque handle to a Renderscript font object.">rs_font</a> src);
+<a name="l00089"></a>00089     <a class="code" href="rs__object_8rsh.html#af6983a1578621ce283acc07f876cda62">rsSetObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a RenderScript font object.">rs_font</a> *dst, <a class="code" href="structrs__font.html" title="Opaque handle to a RenderScript font object.">rs_font</a> src);
 <a name="l00090"></a>00090 
 <a name="l00096"></a>00096 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00097"></a>00097     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a> *dst);
+<a name="l00097"></a>00097     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a> *dst);
 <a name="l00101"></a>00101 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00102"></a>00102     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a Renderscript type.">rs_type</a> *dst);
+<a name="l00102"></a>00102     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a RenderScript type.">rs_type</a> *dst);
 <a name="l00106"></a>00106 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00107"></a>00107     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a> *dst);
+<a name="l00107"></a>00107     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a> *dst);
 <a name="l00111"></a>00111 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00112"></a>00112     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> *dst);
+<a name="l00112"></a>00112     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> *dst);
 <a name="l00116"></a>00116 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00117"></a>00117     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a> *dst);
+<a name="l00117"></a>00117     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a> *dst);
 <a name="l00121"></a>00121 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00122"></a>00122     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a Renderscript Path object.">rs_path</a> *dst);
+<a name="l00122"></a>00122     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a RenderScript Path object.">rs_path</a> *dst);
 <a name="l00126"></a>00126 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00127"></a>00127     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a> *dst);
+<a name="l00127"></a>00127     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a> *dst);
 <a name="l00131"></a>00131 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00132"></a>00132     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a Renderscript ProgramFragment object.">rs_program_fragment</a> *dst);
+<a name="l00132"></a>00132     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a RenderScript ProgramFragment object.">rs_program_fragment</a> *dst);
 <a name="l00136"></a>00136 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00137"></a>00137     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a Renderscript ProgramVertex object.">rs_program_vertex</a> *dst);
+<a name="l00137"></a>00137     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a RenderScript ProgramVertex object.">rs_program_vertex</a> *dst);
 <a name="l00141"></a>00141 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00142"></a>00142     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a> *dst);
+<a name="l00142"></a>00142     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a> *dst);
 <a name="l00146"></a>00146 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00147"></a>00147     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> *dst);
+<a name="l00147"></a>00147     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> *dst);
 <a name="l00151"></a>00151 extern <span class="keywordtype">void</span> __attribute__((overloadable))
-<a name="l00152"></a>00152     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a Renderscript font object.">rs_font</a> *dst);
+<a name="l00152"></a>00152     <a class="code" href="rs__object_8rsh.html#aab5f47dc11b9044b3d02c4ed818fe6e7">rsClearObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a RenderScript font object.">rs_font</a> *dst);
 <a name="l00153"></a>00153 
 <a name="l00154"></a>00154 
 <a name="l00155"></a>00155 
 <a name="l00162"></a>00162 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00163"></a>00163     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a>);
+<a name="l00163"></a>00163     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a>);
 <a name="l00167"></a>00167 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00168"></a>00168     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a Renderscript type.">rs_type</a>);
+<a name="l00168"></a>00168     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__type.html" title="Opaque handle to a RenderScript type.">rs_type</a>);
 <a name="l00172"></a>00172 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00173"></a>00173     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a>);
+<a name="l00173"></a>00173     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a>);
 <a name="l00177"></a>00177 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00178"></a>00178     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a>);
+<a name="l00178"></a>00178     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a>);
 <a name="l00182"></a>00182 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00183"></a>00183     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a>);
+<a name="l00183"></a>00183     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a>);
 <a name="l00187"></a>00187 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00188"></a>00188     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a Renderscript Path object.">rs_path</a>);
+<a name="l00188"></a>00188     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__path.html" title="Opaque handle to a RenderScript Path object.">rs_path</a>);
 <a name="l00192"></a>00192 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00193"></a>00193     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a>);
+<a name="l00193"></a>00193     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a>);
 <a name="l00197"></a>00197 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00198"></a>00198     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a Renderscript ProgramFragment object.">rs_program_fragment</a>);
+<a name="l00198"></a>00198     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__fragment.html" title="Opaque handle to a RenderScript ProgramFragment object.">rs_program_fragment</a>);
 <a name="l00202"></a>00202 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00203"></a>00203     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a Renderscript ProgramVertex object.">rs_program_vertex</a>);
+<a name="l00203"></a>00203     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__vertex.html" title="Opaque handle to a RenderScript ProgramVertex object.">rs_program_vertex</a>);
 <a name="l00207"></a>00207 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00208"></a>00208     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a>);
+<a name="l00208"></a>00208     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a>);
 <a name="l00212"></a>00212 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00213"></a>00213     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a>);
+<a name="l00213"></a>00213     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a>);
 <a name="l00217"></a>00217 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00218"></a>00218     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a Renderscript font object.">rs_font</a>);
+<a name="l00218"></a>00218     <a class="code" href="rs__object_8rsh.html#a81f862730b961bd93ac132c24cbc0f82">rsIsObject</a>(<a class="code" href="structrs__font.html" title="Opaque handle to a RenderScript font object.">rs_font</a>);
 <a name="l00219"></a>00219 
 <a name="l00220"></a>00220 <span class="preprocessor">#endif</span>
 </pre></div></div>
diff --git a/docs/html/reference/renderscript/rs__program_8rsh.html b/docs/html/reference/renderscript/rs__program_8rsh.html
index f64cc7b..99883830 100644
--- a/docs/html/reference/renderscript/rs__program_8rsh.html
+++ b/docs/html/reference/renderscript/rs__program_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_program.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,15 +24,297 @@
   </div>
 </div>
 <div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_program.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.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"><a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a6a9c06c54d230f61edc0667a091aac77">rsgProgramStoreGetDepthFunc</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#afa27fa6103c9e29f5e098e2d99663f0b">rsgProgramStoreIsDepthMaskEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a4a50df1d2495567536dd6f394d38ee5d">rsgProgramStoreIsColorMaskRedEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a1a57f706bc42ce49b545021c8403964c">rsgProgramStoreIsColorMaskGreenEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a279ad1b4611aca268053337f6719a22c">rsgProgramStoreIsColorMaskBlueEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#ab038edb7399044a3ea96ebb17d7b6601">rsgProgramStoreIsColorMaskAlphaEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_blend_src_func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#afb38256c5804cdb9b410419c43ce03ab">rsgProgramStoreGetBlendSrcFunc</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_blend_dst_func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a0ad38d595e35712f24c384ef20b69025">rsgProgramStoreGetBlendDstFunc</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#abe7c55547a72dd291e0996de050bb749">rsgProgramStoreIsDitherEnabled</a> (<a class="el" href="structrs__program__store.html">rs_program_store</a> ps)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a86aeccd846ed2cd2c9498ab57e2535f3">rsgProgramRasterIsPointSpriteEnabled</a> (<a class="el" href="structrs__program__raster.html">rs_program_raster</a> pr)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_cull_mode&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__program_8rsh.html#a633d6dbdec98ef89c2b70c92ea707502">rsgProgramRasterGetCullMode</a> (<a class="el" href="structrs__program__raster.html">rs_program_raster</a> pr)</td></tr>
+</table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Program object routines. </p>
 
 <p>Definition in file <a class="el" href="rs__program_8rsh_source.html">rs_program.rsh</a>.</p>
-</div></div>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="a633d6dbdec98ef89c2b70c92ea707502"></a><!-- doxytag: member="rs_program.rsh::rsgProgramRasterGetCullMode" ref="a633d6dbdec98ef89c2b70c92ea707502" args="(rs_program_raster pr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_cull_mode rsgProgramRasterGetCullMode </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__raster.html">rs_program_raster</a>&#160;</td>
+          <td class="paramname"><em>pr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program raster cull mode</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pr</td><td>program raster to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a86aeccd846ed2cd2c9498ab57e2535f3"></a><!-- doxytag: member="rs_program.rsh::rsgProgramRasterIsPointSpriteEnabled" ref="a86aeccd846ed2cd2c9498ab57e2535f3" args="(rs_program_raster pr)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramRasterIsPointSpriteEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__raster.html">rs_program_raster</a>&#160;</td>
+          <td class="paramname"><em>pr</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program raster point sprite state</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">pr</td><td>program raster to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a0ad38d595e35712f24c384ef20b69025"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreGetBlendDstFunc" ref="a0ad38d595e35712f24c384ef20b69025" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_blend_dst_func rsgProgramStoreGetBlendDstFunc </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store blend destination function</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="afb38256c5804cdb9b410419c43ce03ab"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreGetBlendSrcFunc" ref="afb38256c5804cdb9b410419c43ce03ab" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_blend_src_func rsgProgramStoreGetBlendSrcFunc </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store blend source function</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a6a9c06c54d230f61edc0667a091aac77"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreGetDepthFunc" ref="a6a9c06c54d230f61edc0667a091aac77" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a> rsgProgramStoreGetDepthFunc </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store depth function</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="ab038edb7399044a3ea96ebb17d7b6601"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsColorMaskAlphaEnabled" ref="ab038edb7399044a3ea96ebb17d7b6601" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsColorMaskAlphaEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store alpha component color mask</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a279ad1b4611aca268053337f6719a22c"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsColorMaskBlueEnabled" ref="a279ad1b4611aca268053337f6719a22c" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsColorMaskBlueEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store blur component color mask</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a1a57f706bc42ce49b545021c8403964c"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsColorMaskGreenEnabled" ref="a1a57f706bc42ce49b545021c8403964c" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsColorMaskGreenEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store green component color mask</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="a4a50df1d2495567536dd6f394d38ee5d"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsColorMaskRedEnabled" ref="a4a50df1d2495567536dd6f394d38ee5d" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsColorMaskRedEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store red component color mask</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="afa27fa6103c9e29f5e098e2d99663f0b"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsDepthMaskEnabled" ref="afa27fa6103c9e29f5e098e2d99663f0b" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsDepthMaskEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store depth mask</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+<a class="anchor" id="abe7c55547a72dd291e0996de050bb749"></a><!-- doxytag: member="rs_program.rsh::rsgProgramStoreIsDitherEnabled" ref="abe7c55547a72dd291e0996de050bb749" args="(rs_program_store ps)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool rsgProgramStoreIsDitherEnabled </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__program__store.html">rs_program_store</a>&#160;</td>
+          <td class="paramname"><em>ps</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get program store dither state</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">ps</td><td>program store to query </td></tr>
+  </table>
+  </dd>
+</dl>
+
+</div>
+</div>
+</div>
 
 </body>
 </html>
diff --git a/docs/html/reference/renderscript/rs__program_8rsh_source.html b/docs/html/reference/renderscript/rs__program_8rsh_source.html
index dc901b3..ed326b1 100644
--- a/docs/html/reference/renderscript/rs__program_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__program_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_program.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.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">rs_program.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_program.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__program_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>
@@ -48,37 +48,37 @@
 <a name="l00025"></a>00025 <span class="preprocessor"></span>
 <a name="l00026"></a>00026 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00027"></a>00027 <span class="preprocessor"></span>
-<a name="l00033"></a>00033 <span class="keyword">extern</span> rs_depth_func __attribute__((overloadable))
-<a name="l00034"></a>00034     rsgProgramStoreGetDepthFunc(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00033"></a>00033 <span class="keyword">extern</span> <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a> __attribute__((overloadable))
+<a name="l00034"></a>00034     <a class="code" href="rs__program_8rsh.html#a6a9c06c54d230f61edc0667a091aac77">rsgProgramStoreGetDepthFunc</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00035"></a>00035 
 <a name="l00041"></a>00041 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00042"></a>00042     rsgProgramStoreIsDepthMaskEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00042"></a>00042     <a class="code" href="rs__program_8rsh.html#afa27fa6103c9e29f5e098e2d99663f0b">rsgProgramStoreIsDepthMaskEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00048"></a>00048 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00049"></a>00049     rsgProgramStoreIsColorMaskRedEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00049"></a>00049     <a class="code" href="rs__program_8rsh.html#a4a50df1d2495567536dd6f394d38ee5d">rsgProgramStoreIsColorMaskRedEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00050"></a>00050 
 <a name="l00056"></a>00056 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00057"></a>00057     rsgProgramStoreIsColorMaskGreenEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00057"></a>00057     <a class="code" href="rs__program_8rsh.html#a1a57f706bc42ce49b545021c8403964c">rsgProgramStoreIsColorMaskGreenEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00058"></a>00058 
 <a name="l00064"></a>00064 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00065"></a>00065     rsgProgramStoreIsColorMaskBlueEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00065"></a>00065     <a class="code" href="rs__program_8rsh.html#a279ad1b4611aca268053337f6719a22c">rsgProgramStoreIsColorMaskBlueEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00066"></a>00066 
 <a name="l00072"></a>00072 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00073"></a>00073     rsgProgramStoreIsColorMaskAlphaEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00073"></a>00073     <a class="code" href="rs__program_8rsh.html#ab038edb7399044a3ea96ebb17d7b6601">rsgProgramStoreIsColorMaskAlphaEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00074"></a>00074 
 <a name="l00080"></a>00080 extern rs_blend_src_func __attribute__((overloadable))
-<a name="l00081"></a>00081         rsgProgramStoreGetBlendSrcFunc(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00081"></a>00081         <a class="code" href="rs__program_8rsh.html#afb38256c5804cdb9b410419c43ce03ab">rsgProgramStoreGetBlendSrcFunc</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00082"></a>00082 
 <a name="l00088"></a>00088 extern rs_blend_dst_func __attribute__((overloadable))
-<a name="l00089"></a>00089     rsgProgramStoreGetBlendDstFunc(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00089"></a>00089     <a class="code" href="rs__program_8rsh.html#a0ad38d595e35712f24c384ef20b69025">rsgProgramStoreGetBlendDstFunc</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00090"></a>00090 
 <a name="l00096"></a>00096 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00097"></a>00097     rsgProgramStoreIsDitherEnabled(<a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a> ps);
+<a name="l00097"></a>00097     <a class="code" href="rs__program_8rsh.html#abe7c55547a72dd291e0996de050bb749">rsgProgramStoreIsDitherEnabled</a>(<a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a> ps);
 <a name="l00098"></a>00098 
 <a name="l00104"></a>00104 extern <span class="keywordtype">bool</span> __attribute__((overloadable))
-<a name="l00105"></a>00105     rsgProgramRasterIsPointSpriteEnabled(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a> pr);
+<a name="l00105"></a>00105     <a class="code" href="rs__program_8rsh.html#a86aeccd846ed2cd2c9498ab57e2535f3">rsgProgramRasterIsPointSpriteEnabled</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a> pr);
 <a name="l00106"></a>00106 
 <a name="l00112"></a>00112 extern rs_cull_mode __attribute__((overloadable))
-<a name="l00113"></a>00113     rsgProgramRasterGetCullMode(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a> pr);
+<a name="l00113"></a>00113     <a class="code" href="rs__program_8rsh.html#a633d6dbdec98ef89c2b70c92ea707502">rsgProgramRasterGetCullMode</a>(<a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a> pr);
 <a name="l00114"></a>00114 
 <a name="l00115"></a>00115 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00116"></a>00116 <span class="preprocessor"></span>
diff --git a/docs/html/reference/renderscript/rs__quaternion_8rsh.html b/docs/html/reference/renderscript/rs__quaternion_8rsh.html
index 389b792..ce94e04 100644
--- a/docs/html/reference/renderscript/rs__quaternion_8rsh.html
+++ b/docs/html/reference/renderscript/rs__quaternion_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_quaternion.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -27,7 +27,7 @@
   <div class="summary">
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_quaternion.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
diff --git a/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html b/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html
index 93e4e5d..d286018 100644
--- a/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__quaternion_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_quaternion.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.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">rs_quaternion.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_quaternion.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__quaternion_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>
diff --git a/docs/html/reference/renderscript/rs__sampler_8rsh.html b/docs/html/reference/renderscript/rs__sampler_8rsh.html
index f45dd28..6393ade 100644
--- a/docs/html/reference/renderscript/rs__sampler_8rsh.html
+++ b/docs/html/reference/renderscript/rs__sampler_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_sampler.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,15 +24,152 @@
   </div>
 </div>
 <div class="header">
+  <div class="summary">
+<a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_sampler.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.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">rs_sampler_value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__sampler_8rsh.html#acb1bec2c3d1edd752dd60499c8db58a4">rsSamplerGetMinification</a> (<a class="el" href="structrs__sampler.html">rs_sampler</a> s)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_sampler_value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__sampler_8rsh.html#a5bddb73826cd20a79c31f012a4637e83">rsSamplerGetMagnification</a> (<a class="el" href="structrs__sampler.html">rs_sampler</a> s)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_sampler_value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__sampler_8rsh.html#a68a7ab6724019c6e72fae8eb45aa48dd">rsSamplerGetWrapS</a> (<a class="el" href="structrs__sampler.html">rs_sampler</a> s)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">rs_sampler_value&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__sampler_8rsh.html#ab6b25d3b9afa16f418e2dee78ebb4a75">rsSamplerGetWrapT</a> (<a class="el" href="structrs__sampler.html">rs_sampler</a> s)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__sampler_8rsh.html#ab1e79984609469604cba8e2b76a98844">rsSamplerGetAnisotropy</a> (<a class="el" href="structrs__sampler.html">rs_sampler</a> s)</td></tr>
+</table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Sampler routines. </p>
 
 <p>Definition in file <a class="el" href="rs__sampler_8rsh_source.html">rs_sampler.rsh</a>.</p>
-</div></div>
+</div><hr/><h2>Function Documentation</h2>
+<a class="anchor" id="ab1e79984609469604cba8e2b76a98844"></a><!-- doxytag: member="rs_sampler.rsh::rsSamplerGetAnisotropy" ref="ab1e79984609469604cba8e2b76a98844" args="(rs_sampler s)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">float rsSamplerGetAnisotropy </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get sampler anisotropy</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>sampler to query </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>anisotropy </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a5bddb73826cd20a79c31f012a4637e83"></a><!-- doxytag: member="rs_sampler.rsh::rsSamplerGetMagnification" ref="a5bddb73826cd20a79c31f012a4637e83" args="(rs_sampler s)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_sampler_value rsSamplerGetMagnification </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get sampler magnification value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>sampler to query </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>magnification value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="acb1bec2c3d1edd752dd60499c8db58a4"></a><!-- doxytag: member="rs_sampler.rsh::rsSamplerGetMinification" ref="acb1bec2c3d1edd752dd60499c8db58a4" args="(rs_sampler s)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_sampler_value rsSamplerGetMinification </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get sampler minification value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>sampler to query </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>minification value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="a68a7ab6724019c6e72fae8eb45aa48dd"></a><!-- doxytag: member="rs_sampler.rsh::rsSamplerGetWrapS" ref="a68a7ab6724019c6e72fae8eb45aa48dd" args="(rs_sampler s)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_sampler_value rsSamplerGetWrapS </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get sampler wrap S value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>sampler to query </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>wrap S value </dd></dl>
+
+</div>
+</div>
+<a class="anchor" id="ab6b25d3b9afa16f418e2dee78ebb4a75"></a><!-- doxytag: member="rs_sampler.rsh::rsSamplerGetWrapT" ref="ab6b25d3b9afa16f418e2dee78ebb4a75" args="(rs_sampler s)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">rs_sampler_value rsSamplerGetWrapT </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="structrs__sampler.html">rs_sampler</a>&#160;</td>
+          <td class="paramname"><em>s</em></td><td>)</td>
+          <td></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Get sampler wrap T value</p>
+<dl><dt><b>Parameters:</b></dt><dd>
+  <table class="params">
+    <tr><td class="paramname">s</td><td>sampler to query </td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>wrap T value </dd></dl>
+
+</div>
+</div>
+</div>
 
 </body>
 </html>
diff --git a/docs/html/reference/renderscript/rs__sampler_8rsh_source.html b/docs/html/reference/renderscript/rs__sampler_8rsh_source.html
index 30fb9c0..82a7cfa 100644
--- a/docs/html/reference/renderscript/rs__sampler_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__sampler_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_sampler.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.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">rs_sampler.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_sampler.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__sampler_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>
@@ -50,19 +50,19 @@
 <a name="l00027"></a>00027 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00028"></a>00028 <span class="preprocessor"></span>
 <a name="l00035"></a>00035 <span class="keyword">extern</span> rs_sampler_value __attribute__((overloadable))
-<a name="l00036"></a>00036     rsSamplerGetMinification(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s);
+<a name="l00036"></a>00036     <a class="code" href="rs__sampler_8rsh.html#acb1bec2c3d1edd752dd60499c8db58a4">rsSamplerGetMinification</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s);
 <a name="l00037"></a>00037 
 <a name="l00044"></a>00044 extern rs_sampler_value __attribute__((overloadable))
-<a name="l00045"></a>00045     rsSamplerGetMagnification(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s);
+<a name="l00045"></a>00045     <a class="code" href="rs__sampler_8rsh.html#a5bddb73826cd20a79c31f012a4637e83">rsSamplerGetMagnification</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s);
 <a name="l00046"></a>00046 
 <a name="l00053"></a>00053 extern rs_sampler_value __attribute__((overloadable))
-<a name="l00054"></a>00054     rsSamplerGetWrapS(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s);
+<a name="l00054"></a>00054     <a class="code" href="rs__sampler_8rsh.html#a68a7ab6724019c6e72fae8eb45aa48dd">rsSamplerGetWrapS</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s);
 <a name="l00055"></a>00055 
 <a name="l00062"></a>00062 extern rs_sampler_value __attribute__((overloadable))
-<a name="l00063"></a>00063     rsSamplerGetWrapT(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s);
+<a name="l00063"></a>00063     <a class="code" href="rs__sampler_8rsh.html#ab6b25d3b9afa16f418e2dee78ebb4a75">rsSamplerGetWrapT</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s);
 <a name="l00064"></a>00064 
 <a name="l00071"></a>00071 extern <span class="keywordtype">float</span> __attribute__((overloadable))
-<a name="l00072"></a>00072     rsSamplerGetAnisotropy(<a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a> s);
+<a name="l00072"></a>00072     <a class="code" href="rs__sampler_8rsh.html#ab1e79984609469604cba8e2b76a98844">rsSamplerGetAnisotropy</a>(<a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a> s);
 <a name="l00073"></a>00073 
 <a name="l00074"></a>00074 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
 <a name="l00075"></a>00075 <span class="preprocessor"></span>
diff --git a/docs/html/reference/renderscript/rs__time_8rsh.html b/docs/html/reference/renderscript/rs__time_8rsh.html
index a3e63d0..8be550a 100644
--- a/docs/html/reference/renderscript/rs__time_8rsh.html
+++ b/docs/html/reference/renderscript/rs__time_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_time.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -29,7 +29,7 @@
 <a href="#typedef-members">Typedefs</a> &#124;
 <a href="#func-members">Functions</a>  </div>
   <div class="headertitle">
-<div class="title">rs_time.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <table class="memberdecls">
@@ -48,8 +48,8 @@
 <tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__time_8rsh.html#adea2682186fd903752431ad848bd8bf4">rsGetDt</a> (void)</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Renderscript time routines. </p>
-<p>This file contains Renderscript functions relating to time and date manipulation. </p>
+<div class="textblock"><p>RenderScript time routines. </p>
+<p>This file contains RenderScript functions relating to time and date manipulation. </p>
 
 <p>Definition in file <a class="el" href="rs__time_8rsh_source.html">rs_time.rsh</a>.</p>
 </div><hr/><h2>Typedef Documentation</h2>
diff --git a/docs/html/reference/renderscript/rs__time_8rsh_source.html b/docs/html/reference/renderscript/rs__time_8rsh_source.html
index 208924a..482fd77 100644
--- a/docs/html/reference/renderscript/rs__time_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__time_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_time.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.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">rs_time.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_time.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__time_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>
diff --git a/docs/html/reference/renderscript/rs__types_8rsh.html b/docs/html/reference/renderscript/rs__types_8rsh.html
index c3caa6f..cbaa750 100644
--- a/docs/html/reference/renderscript/rs__types_8rsh.html
+++ b/docs/html/reference/renderscript/rs__types_8rsh.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_types.rsh File Reference</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -26,9 +26,10 @@
 <div class="header">
   <div class="summary">
 <a href="#nested-classes">Data Structures</a> &#124;
-<a href="#typedef-members">Typedefs</a>  </div>
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a>  </div>
   <div class="headertitle">
-<div class="title">rs_types.rsh File Reference</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh File Reference</div>  </div>
 </div>
 <div class="contents">
 <div class="textblock"><code>#include &quot;stdbool.h&quot;</code><br/>
@@ -36,29 +37,29 @@
 <tr><td colspan="2"><h2><a name="nested-classes"></a>
 Data Structures</h2></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__element.html">rs_element</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript element.  <a href="structrs__element.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript element.  <a href="structrs__element.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__type.html">rs_type</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript type.  <a href="structrs__type.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript type.  <a href="structrs__type.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__allocation.html">rs_allocation</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript allocation.  <a href="structrs__allocation.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript allocation.  <a href="structrs__allocation.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__sampler.html">rs_sampler</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript sampler object.  <a href="structrs__sampler.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript sampler object.  <a href="structrs__sampler.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__script.html">rs_script</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript script object.  <a href="structrs__script.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript script object.  <a href="structrs__script.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__mesh.html">rs_mesh</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript mesh object.  <a href="structrs__mesh.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript mesh object.  <a href="structrs__mesh.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__path.html">rs_path</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript Path object.  <a href="structrs__path.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript Path object.  <a href="structrs__path.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__program__fragment.html">rs_program_fragment</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript ProgramFragment object.  <a href="structrs__program__fragment.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript ProgramFragment object.  <a href="structrs__program__fragment.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__program__vertex.html">rs_program_vertex</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript ProgramVertex object.  <a href="structrs__program__vertex.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript ProgramVertex object.  <a href="structrs__program__vertex.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__program__raster.html">rs_program_raster</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript ProgramRaster object.  <a href="structrs__program__raster.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript ProgramRaster object.  <a href="structrs__program__raster.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__program__store.html">rs_program_store</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript ProgramStore object.  <a href="structrs__program__store.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript ProgramStore object.  <a href="structrs__program__store.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__font.html">rs_font</a></td></tr>
-<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a Renderscript font object.  <a href="structrs__font.html#details">More...</a><br/></td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque handle to a RenderScript font object.  <a href="structrs__font.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__matrix4x4.html">rs_matrix4x4</a></td></tr>
 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">4x4 float matrix  <a href="structrs__matrix4x4.html#details">More...</a><br/></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrs__matrix3x3.html">rs_matrix3x3</a></td></tr>
@@ -112,9 +113,42 @@
 <tr><td class="memItemLeft" align="right" valign="top">typedef long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">typedef long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a></td></tr>
 <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">rs_quaternion</a></td></tr>
+<tr><td colspan="2"><h2><a name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">rs_allocation_cubemap_face</a> </td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enum for selecting cube map faces. <br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">rs_allocation_usage_type</a> </td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Bitfield to specify the usage types for an allocation.  <a href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">More...</a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a> { <br/>
+&#160;&#160;<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158">RS_PRIMITIVE_POINT</a> =  0, 
+<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf">RS_PRIMITIVE_LINE</a> =  1, 
+<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da">RS_PRIMITIVE_LINE_STRIP</a> =  2, 
+<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79">RS_PRIMITIVE_TRIANGLE</a> =  3, 
+<br/>
+&#160;&#160;<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9">RS_PRIMITIVE_TRIANGLE_STRIP</a> =  4, 
+<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01">RS_PRIMITIVE_TRIANGLE_FAN</a> =  5, 
+<a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d">RS_PRIMITIVE_INVALID</a> =  100
+<br/>
+ }</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a> </td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration for possible element data types.  <a href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">More...</a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a> </td></tr>
+<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration for possible element data kind.  <a href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">More...</a><br/></td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a> { <br/>
+&#160;&#160;<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a">RS_DEPTH_FUNC_ALWAYS</a> =  0, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a">RS_DEPTH_FUNC_LESS</a> =  1, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f">RS_DEPTH_FUNC_LEQUAL</a> =  2, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d">RS_DEPTH_FUNC_GREATER</a> =  3, 
+<br/>
+&#160;&#160;<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d">RS_DEPTH_FUNC_GEQUAL</a> =  4, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21">RS_DEPTH_FUNC_EQUAL</a> =  5, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d">RS_DEPTH_FUNC_NOTEQUAL</a> =  6, 
+<a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3">RS_DEPTH_FUNC_INVALID</a> =  100
+<br/>
+ }</td></tr>
 </table>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Define the standard Renderscript types</p>
+<div class="textblock"><p>Define the standard RenderScript types</p>
 <p>Integers 8 bit: char, int8_t 16 bit: short, int16_t 32 bit: int, in32_t 64 bit: long, long long, int64_t</p>
 <p>Unsigned Integers 8 bit: uchar, uint8_t 16 bit: ushort, uint16_t 32 bit: uint, uint32_t 64 bit: ulong, uint64_t</p>
 <p>Floating point 32 bit: float 64 bit: double</p>
@@ -134,7 +168,7 @@
 <div class="memdoc">
 <p>Vector version of the basic char type. Provides two char fields packed into a single 16 bit field with 16 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00279">279</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00292">292</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -150,7 +184,7 @@
 <div class="memdoc">
 <p>Vector version of the basic char type. Provides three char fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00284">284</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00297">297</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -166,7 +200,7 @@
 <div class="memdoc">
 <p>Vector version of the basic char type. Provides four char fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00289">289</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00302">302</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -182,7 +216,7 @@
 <div class="memdoc">
 <p>Vector version of the basic double type. Provides two double fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00199">199</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00212">212</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -198,7 +232,7 @@
 <div class="memdoc">
 <p>Vector version of the basic double type. Provides three double fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00204">204</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00217">217</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -214,7 +248,7 @@
 <div class="memdoc">
 <p>Vector version of the basic double type. Provides four double fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00209">209</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00222">222</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -230,7 +264,7 @@
 <div class="memdoc">
 <p>Vector version of the basic float type. Provides two float fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00182">182</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00195">195</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -246,7 +280,7 @@
 <div class="memdoc">
 <p>Vector version of the basic float type. Provides three float fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00187">187</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00200">200</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -262,7 +296,7 @@
 <div class="memdoc">
 <p>Vector version of the basic float type. Provides four float fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00193">193</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00206">206</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -278,7 +312,7 @@
 <div class="memdoc">
 <p>16 bit integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00054">54</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00067">67</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -294,7 +328,7 @@
 <div class="memdoc">
 <p>Vector version of the basic int type. Provides two int fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00311">311</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00324">324</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -310,7 +344,7 @@
 <div class="memdoc">
 <p>Vector version of the basic int type. Provides three int fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00316">316</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00329">329</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -326,7 +360,7 @@
 <div class="memdoc">
 <p>32 bit integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00058">58</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00071">71</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -342,7 +376,7 @@
 <div class="memdoc">
 <p>Vector version of the basic int type. Provides two four fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00321">321</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00334">334</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -358,7 +392,7 @@
 <div class="memdoc">
 <p>64 bit integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00062">62</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00075">75</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -374,7 +408,7 @@
 <div class="memdoc">
 <p>8 bit integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00050">50</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00063">63</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -390,7 +424,7 @@
 <div class="memdoc">
 <p>Vector version of the basic long type. Provides two long fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00327">327</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00340">340</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -406,7 +440,7 @@
 <div class="memdoc">
 <p>Vector version of the basic long type. Provides three long fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00332">332</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00345">345</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -422,7 +456,7 @@
 <div class="memdoc">
 <p>Vector version of the basic long type. Provides four long fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00337">337</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00350">350</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -438,7 +472,7 @@
 <div class="memdoc">
 <p>quaternion type for use with the quaternion functions </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00370">370</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00383">383</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -454,7 +488,7 @@
 <div class="memdoc">
 <p>Vector version of the basic short type. Provides two short fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00295">295</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00308">308</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -470,7 +504,7 @@
 <div class="memdoc">
 <p>Vector version of the basic short type. Provides three short fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00300">300</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00313">313</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -486,7 +520,7 @@
 <div class="memdoc">
 <p>Vector version of the basic short type. Provides four short fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00305">305</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00318">318</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -502,7 +536,7 @@
 <div class="memdoc">
 <p>Typedef for unsigned int </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00098">98</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00111">111</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -518,7 +552,7 @@
 <div class="memdoc">
 <p>Typedef for int (use for 32-bit integers) </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00102">102</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00115">115</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -534,7 +568,7 @@
 <div class="memdoc">
 <p>8 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00082">82</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00095">95</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -550,7 +584,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uchar type. Provides two uchar fields packed into a single 16 bit field with 16 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00215">215</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00228">228</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -566,7 +600,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uchar type. Provides three uchar fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00220">220</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00233">233</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -582,7 +616,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uchar type. Provides four uchar fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00225">225</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00238">238</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -598,7 +632,7 @@
 <div class="memdoc">
 <p>32 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00090">90</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00103">103</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -614,7 +648,7 @@
 <div class="memdoc">
 <p>16 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00070">70</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00083">83</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -630,7 +664,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uint type. Provides two uint fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00247">247</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00260">260</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -646,7 +680,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uint type. Provides three uint fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00252">252</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00265">265</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -662,7 +696,7 @@
 <div class="memdoc">
 <p>32 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00074">74</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00087">87</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -678,7 +712,7 @@
 <div class="memdoc">
 <p>Vector version of the basic uint type. Provides four uint fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00257">257</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00270">270</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -694,7 +728,7 @@
 <div class="memdoc">
 <p>64 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00078">78</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00091">91</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -710,7 +744,7 @@
 <div class="memdoc">
 <p>8 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00066">66</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00079">79</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -726,7 +760,7 @@
 <div class="memdoc">
 <p>Typedef for unsigned long (use for 64-bit unsigned integers) </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00094">94</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00107">107</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -742,7 +776,7 @@
 <div class="memdoc">
 <p>Vector version of the basic ulong type. Provides two ulong fields packed into a single 128 bit field with 128 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00263">263</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00276">276</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -758,7 +792,7 @@
 <div class="memdoc">
 <p>Vector version of the basic ulong type. Provides three ulong fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00268">268</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00281">281</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -774,7 +808,7 @@
 <div class="memdoc">
 <p>Vector version of the basic ulong type. Provides four ulong fields packed into a single 256 bit field with 256 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00273">273</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00286">286</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -790,7 +824,7 @@
 <div class="memdoc">
 <p>16 bit unsigned integer type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00086">86</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00099">99</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -806,7 +840,7 @@
 <div class="memdoc">
 <p>Vector version of the basic ushort type. Provides two ushort fields packed into a single 32 bit field with 32 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00231">231</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00244">244</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -822,7 +856,7 @@
 <div class="memdoc">
 <p>Vector version of the basic ushort type. Provides three ushort fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00236">236</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00249">249</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
@@ -838,7 +872,148 @@
 <div class="memdoc">
 <p>Vector version of the basic ushort type. Provides four ushort fields packed into a single 64 bit field with 64 bit alignment. </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00241">241</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00254">254</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+
+</div>
+</div>
+<hr/><h2>Enumeration Type Documentation</h2>
+<a class="anchor" id="af8c988b9715d55b6e41e0ee1925fb171"></a><!-- doxytag: member="rs_types.rsh::rs_allocation_usage_type" ref="af8c988b9715d55b6e41e0ee1925fb171" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">rs_allocation_usage_type</a></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>Bitfield to specify the usage types for an allocation. </p>
+<p>These values are ORed together to specify which usages or memory spaces are relevant to an allocation or an operation on an allocation. </p>
+
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00408">408</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a1692d177c4a3fe1544bd91172056581a"></a><!-- doxytag: member="rs_types.rsh::rs_data_kind" ref="a1692d177c4a3fe1544bd91172056581a" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">rs_data_kind</a></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>Enumeration for possible element data kind. </p>
+<p>The special interpretation of the data if required. This is primarly useful for graphical data. USER indicates no special interpretation is expected. PIXEL is used in conjunction with the standard data types for representing texture formats. </p>
+
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00524">524</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="ae7551db5705f864fde49c13660aff647"></a><!-- doxytag: member="rs_types.rsh::rs_data_type" ref="ae7551db5705f864fde49c13660aff647" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">rs_data_type</a></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>Enumeration for possible element data types. </p>
+<p>DataType represents the basic type information for a basic element. The naming convention follows. For numeric types it is FLOAT, SIGNED, or UNSIGNED followed by the _BITS where BITS is the size of the data. BOOLEAN is a true / false (1,0) represented in an 8 bit container. The UNSIGNED variants with multiple bit definitions are for packed graphical data formats and represent vectors with per vector member sizes which are treated as a single unit for packing and alignment purposes.</p>
+<p>MATRIX the three matrix types contain FLOAT_32 elements and are treated as 32 bits for alignment purposes.</p>
+<p>RS_* objects. 32 bit opaque handles. </p>
+
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00478">478</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bf"></a><!-- doxytag: member="rs_types.rsh::rs_depth_func" ref="a03e91ad8ebfc283ba20f7443dea4a4bf" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a"></a><!-- doxytag: member="RS_DEPTH_FUNC_ALWAYS" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a" args="" -->RS_DEPTH_FUNC_ALWAYS</em>&nbsp;</td><td>
+<p>Always drawn </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a"></a><!-- doxytag: member="RS_DEPTH_FUNC_LESS" ref="a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a" args="" -->RS_DEPTH_FUNC_LESS</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is less than that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f"></a><!-- doxytag: member="RS_DEPTH_FUNC_LEQUAL" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f" args="" -->RS_DEPTH_FUNC_LEQUAL</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is less or equal to that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d"></a><!-- doxytag: member="RS_DEPTH_FUNC_GREATER" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d" args="" -->RS_DEPTH_FUNC_GREATER</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is greater than that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d"></a><!-- doxytag: member="RS_DEPTH_FUNC_GEQUAL" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d" args="" -->RS_DEPTH_FUNC_GEQUAL</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is greater or equal to that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21"></a><!-- doxytag: member="RS_DEPTH_FUNC_EQUAL" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21" args="" -->RS_DEPTH_FUNC_EQUAL</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is equal to that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d"></a><!-- doxytag: member="RS_DEPTH_FUNC_NOTEQUAL" ref="a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d" args="" -->RS_DEPTH_FUNC_NOTEQUAL</em>&nbsp;</td><td>
+<p>Drawn if the incoming depth value is not equal to that in the depth buffer </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3"></a><!-- doxytag: member="RS_DEPTH_FUNC_INVALID" ref="a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3" args="" -->RS_DEPTH_FUNC_INVALID</em>&nbsp;</td><td>
+<p>Invalid depth function </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00538">538</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+
+</div>
+</div>
+<a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951"></a><!-- doxytag: member="rs_types.rsh::rs_primitive" ref="aaaa4ecd4a284cf9cccc6e06407229951" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+<p>Describes the way mesh vertex data is interpreted when rendering </p>
+<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158"></a><!-- doxytag: member="RS_PRIMITIVE_POINT" ref="aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158" args="" -->RS_PRIMITIVE_POINT</em>&nbsp;</td><td>
+<p>Vertex data will be rendered as a series of points </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf"></a><!-- doxytag: member="RS_PRIMITIVE_LINE" ref="aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf" args="" -->RS_PRIMITIVE_LINE</em>&nbsp;</td><td>
+<p>Vertex pairs will be rendered as lines </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da"></a><!-- doxytag: member="RS_PRIMITIVE_LINE_STRIP" ref="aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da" args="" -->RS_PRIMITIVE_LINE_STRIP</em>&nbsp;</td><td>
+<p>Vertex data will be rendered as a connected line strip </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79"></a><!-- doxytag: member="RS_PRIMITIVE_TRIANGLE" ref="aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79" args="" -->RS_PRIMITIVE_TRIANGLE</em>&nbsp;</td><td>
+<p>Vertices will be rendered as individual triangles </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9"></a><!-- doxytag: member="RS_PRIMITIVE_TRIANGLE_STRIP" ref="aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9" args="" -->RS_PRIMITIVE_TRIANGLE_STRIP</em>&nbsp;</td><td>
+<p>Vertices will be rendered as a connected triangle strip defined by the first three vertices with each additional triangle defined by a new vertex </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01"></a><!-- doxytag: member="RS_PRIMITIVE_TRIANGLE_FAN" ref="aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01" args="" -->RS_PRIMITIVE_TRIANGLE_FAN</em>&nbsp;</td><td>
+<p>Vertices will be rendered as a sequence of triangles that all share first vertex as the origin </p>
+</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d"></a><!-- doxytag: member="RS_PRIMITIVE_INVALID" ref="aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d" args="" -->RS_PRIMITIVE_INVALID</em>&nbsp;</td><td>
+<p>Invalid primitive </p>
+</td></tr>
+</table>
+</dd>
+</dl>
+
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00425">425</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 
 </div>
 </div>
diff --git a/docs/html/reference/renderscript/rs__types_8rsh_source.html b/docs/html/reference/renderscript/rs__types_8rsh_source.html
index 641a753..f580306 100644
--- a/docs/html/reference/renderscript/rs__types_8rsh_source.html
+++ b/docs/html/reference/renderscript/rs__types_8rsh_source.html
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 
-<title>rs_types.rsh Source File</title>
+<title>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh Source File</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 
@@ -24,11 +24,11 @@
   </div>
 <div class="header">
   <div class="headertitle">
-<div class="title">rs_types.rsh</div>  </div>
+<div class="title">/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_types.rsh</div>  </div>
 </div>
 <div class="contents">
 <a href="rs__types_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>
-<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2011 The Android Open Source Project</span>
+<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2013 The Android Open Source Project</span>
 <a name="l00003"></a>00003 <span class="comment"> *</span>
 <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
 <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
@@ -46,238 +46,253 @@
 <a name="l00041"></a>00041 <span class="preprocessor">#ifndef __RS_TYPES_RSH__</span>
 <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define __RS_TYPES_RSH__</span>
 <a name="l00043"></a>00043 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 <span class="preprocessor">#define M_PI        3.14159265358979323846264338327950288f   </span><span class="comment">/* pi */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#include &quot;stdbool.h&quot;</span>
-<a name="l00050"></a><a class="code" href="rs__types_8rsh.html#ad566f6541e98b74246db1a3a3a85ad49">00050</a> <span class="keyword">typedef</span> <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#ad566f6541e98b74246db1a3a3a85ad49">int8_t</a>;
-<a name="l00054"></a><a class="code" href="rs__types_8rsh.html#aa343fa3b3d06292b959ffdd4c4703b06">00054</a> <span class="keyword">typedef</span> <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#aa343fa3b3d06292b959ffdd4c4703b06">int16_t</a>;
-<a name="l00058"></a><a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">00058</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>;
-<a name="l00062"></a><a class="code" href="rs__types_8rsh.html#a996e72f71b11a5bb8b3b7b6936b1516d">00062</a> <span class="keyword">typedef</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#a996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a>;
-<a name="l00066"></a><a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">00066</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>;
-<a name="l00070"></a><a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">00070</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">uint16_t</a>;
-<a name="l00074"></a><a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">00074</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>;
-<a name="l00078"></a><a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">00078</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>;
-<a name="l00082"></a><a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">00082</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>;
-<a name="l00086"></a><a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">00086</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>;
-<a name="l00090"></a><a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">00090</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>;
-<a name="l00094"></a><a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">00094</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a>;
-<a name="l00098"></a><a class="code" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">00098</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> <a class="code" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a>;
-<a name="l00102"></a><a class="code" href="rs__types_8rsh.html#a170745d0d946e79c4c2a056d1d158996">00102</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> <a class="code" href="rs__types_8rsh.html#a170745d0d946e79c4c2a056d1d158996">ssize_t</a>;
-<a name="l00103"></a>00103 
-<a name="l00109"></a><a class="code" href="structrs__element.html">00109</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__element.html" title="Opaque handle to a Renderscript element.">rs_element</a>;
-<a name="l00115"></a><a class="code" href="structrs__type.html">00115</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__type.html" title="Opaque handle to a Renderscript type.">rs_type</a>;
-<a name="l00121"></a><a class="code" href="structrs__allocation.html">00121</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__allocation.html" title="Opaque handle to a Renderscript allocation.">rs_allocation</a>;
-<a name="l00127"></a><a class="code" href="structrs__sampler.html">00127</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__sampler.html" title="Opaque handle to a Renderscript sampler object.">rs_sampler</a>;
-<a name="l00133"></a><a class="code" href="structrs__script.html">00133</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__script.html" title="Opaque handle to a Renderscript script object.">rs_script</a>;
-<a name="l00139"></a><a class="code" href="structrs__mesh.html">00139</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__mesh.html" title="Opaque handle to a Renderscript mesh object.">rs_mesh</a>;
-<a name="l00145"></a><a class="code" href="structrs__path.html">00145</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__path.html" title="Opaque handle to a Renderscript Path object.">rs_path</a>;
-<a name="l00151"></a><a class="code" href="structrs__program__fragment.html">00151</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__fragment.html" title="Opaque handle to a Renderscript ProgramFragment object.">rs_program_fragment</a>;
-<a name="l00157"></a><a class="code" href="structrs__program__vertex.html">00157</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__vertex.html" title="Opaque handle to a Renderscript ProgramVertex object.">rs_program_vertex</a>;
-<a name="l00163"></a><a class="code" href="structrs__program__raster.html">00163</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__raster.html" title="Opaque handle to a Renderscript ProgramRaster object.">rs_program_raster</a>;
-<a name="l00169"></a><a class="code" href="structrs__program__store.html">00169</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__store.html" title="Opaque handle to a Renderscript ProgramStore object.">rs_program_store</a>;
-<a name="l00175"></a><a class="code" href="structrs__font.html">00175</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__font.html" title="Opaque handle to a Renderscript font object.">rs_font</a>;
-<a name="l00176"></a>00176 
-<a name="l00182"></a><a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">00182</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((ext_vector_type(2)));
-<a name="l00187"></a><a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">00187</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((ext_vector_type(3)));
-<a name="l00193"></a><a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">00193</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((ext_vector_type(4)));
-<a name="l00194"></a>00194 
-<a name="l00199"></a><a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">00199</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">double2</a> __attribute__((ext_vector_type(2)));
-<a name="l00204"></a><a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">00204</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">double3</a> __attribute__((ext_vector_type(3)));
-<a name="l00209"></a><a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">00209</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">double4</a> __attribute__((ext_vector_type(4)));
-<a name="l00210"></a>00210 
-<a name="l00215"></a><a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">00215</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> __attribute__((ext_vector_type(2)));
-<a name="l00220"></a><a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">00220</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">uchar3</a> __attribute__((ext_vector_type(3)));
-<a name="l00225"></a><a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">00225</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((ext_vector_type(4)));
-<a name="l00226"></a>00226 
-<a name="l00231"></a><a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">00231</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a> __attribute__((ext_vector_type(2)));
-<a name="l00236"></a><a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">00236</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">ushort3</a> __attribute__((ext_vector_type(3)));
-<a name="l00241"></a><a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">00241</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">ushort4</a> __attribute__((ext_vector_type(4)));
-<a name="l00242"></a>00242 
-<a name="l00247"></a><a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">00247</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a> __attribute__((ext_vector_type(2)));
-<a name="l00252"></a><a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">00252</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">uint3</a> __attribute__((ext_vector_type(3)));
-<a name="l00257"></a><a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">00257</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">uint4</a> __attribute__((ext_vector_type(4)));
-<a name="l00258"></a>00258 
-<a name="l00263"></a><a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">00263</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a> __attribute__((ext_vector_type(2)));
-<a name="l00268"></a><a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">00268</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">ulong3</a> __attribute__((ext_vector_type(3)));
-<a name="l00273"></a><a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">00273</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">ulong4</a> __attribute__((ext_vector_type(4)));
-<a name="l00274"></a>00274 
-<a name="l00279"></a><a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">00279</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a> __attribute__((ext_vector_type(2)));
-<a name="l00284"></a><a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">00284</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">char3</a> __attribute__((ext_vector_type(3)));
-<a name="l00289"></a><a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">00289</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">char4</a> __attribute__((ext_vector_type(4)));
-<a name="l00290"></a>00290 
-<a name="l00295"></a><a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">00295</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a> __attribute__((ext_vector_type(2)));
-<a name="l00300"></a><a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">00300</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">short3</a> __attribute__((ext_vector_type(3)));
-<a name="l00305"></a><a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">00305</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">short4</a> __attribute__((ext_vector_type(4)));
-<a name="l00306"></a>00306 
-<a name="l00311"></a><a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">00311</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a> __attribute__((ext_vector_type(2)));
-<a name="l00316"></a><a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">00316</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">int3</a> __attribute__((ext_vector_type(3)));
-<a name="l00321"></a><a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">00321</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">int4</a> __attribute__((ext_vector_type(4)));
-<a name="l00322"></a>00322 
-<a name="l00327"></a><a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">00327</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a> __attribute__((ext_vector_type(2)));
-<a name="l00332"></a><a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">00332</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a> __attribute__((ext_vector_type(3)));
-<a name="l00337"></a><a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">00337</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a> __attribute__((ext_vector_type(4)));
-<a name="l00338"></a>00338 
-<a name="l00345"></a><a class="code" href="structrs__matrix4x4.html">00345</a> typedef struct {
-<a name="l00346"></a>00346     <span class="keywordtype">float</span> m[16];
-<a name="l00347"></a>00347 } <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a>;
-<a name="l00354"></a><a class="code" href="structrs__matrix3x3.html">00354</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00355"></a>00355     <span class="keywordtype">float</span> m[9];
-<a name="l00356"></a>00356 } <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a>;
-<a name="l00363"></a><a class="code" href="structrs__matrix2x2.html">00363</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00364"></a>00364     <span class="keywordtype">float</span> m[4];
-<a name="l00365"></a>00365 } <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a>;
-<a name="l00366"></a>00366 
-<a name="l00370"></a><a class="code" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">00370</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> <a class="code" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">rs_quaternion</a>;
-<a name="l00371"></a>00371 
-<a name="l00372"></a>00372 <span class="preprocessor">#define RS_PACKED __attribute__((packed, aligned(4)))</span>
-<a name="l00373"></a>00373 <span class="preprocessor"></span><span class="preprocessor">#define NULL ((void *)0)</span>
-<a name="l00374"></a>00374 <span class="preprocessor"></span>
-<a name="l00375"></a>00375 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14))</span>
-<a name="l00376"></a>00376 <span class="preprocessor"></span>
-<a name="l00380"></a>00380 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00381"></a>00381     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0,
-<a name="l00382"></a>00382     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1,
-<a name="l00383"></a>00383     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2,
-<a name="l00384"></a>00384     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3,
-<a name="l00385"></a>00385     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4,
-<a name="l00386"></a>00386     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5
-<a name="l00387"></a>00387 } rs_allocation_cubemap_face;
-<a name="l00388"></a>00388 
-<a name="l00395"></a>00395 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00396"></a>00396     RS_ALLOCATION_USAGE_SCRIPT = 0x0001,
-<a name="l00397"></a>00397     RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002,
-<a name="l00398"></a>00398     RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004,
-<a name="l00399"></a>00399     RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008,
-<a name="l00400"></a>00400     RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010
-<a name="l00401"></a>00401 } rs_allocation_usage_type;
-<a name="l00402"></a>00402 
-<a name="l00403"></a>00403 <span class="preprocessor">#endif //defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14)</span>
-<a name="l00404"></a>00404 <span class="preprocessor"></span>
-<a name="l00405"></a>00405 <span class="comment">// New API&#39;s</span>
-<a name="l00406"></a>00406 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
-<a name="l00407"></a>00407 <span class="preprocessor"></span>
-<a name="l00412"></a>00412 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00416"></a>00416     RS_PRIMITIVE_POINT              = 0,
-<a name="l00420"></a>00420     RS_PRIMITIVE_LINE               = 1,
-<a name="l00424"></a>00424     RS_PRIMITIVE_LINE_STRIP         = 2,
-<a name="l00428"></a>00428     RS_PRIMITIVE_TRIANGLE           = 3,
-<a name="l00434"></a>00434     RS_PRIMITIVE_TRIANGLE_STRIP     = 4,
-<a name="l00439"></a>00439     RS_PRIMITIVE_TRIANGLE_FAN       = 5,
-<a name="l00440"></a>00440 
-<a name="l00444"></a>00444     RS_PRIMITIVE_INVALID            = 100,
-<a name="l00445"></a>00445 } rs_primitive;
-<a name="l00446"></a>00446 
-<a name="l00465"></a>00465 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00466"></a>00466     RS_TYPE_NONE             = 0,
-<a name="l00467"></a>00467     RS_TYPE_FLOAT_32         = 2,
-<a name="l00468"></a>00468     RS_TYPE_FLOAT_64         = 3,
-<a name="l00469"></a>00469     RS_TYPE_SIGNED_8         = 4,
-<a name="l00470"></a>00470     RS_TYPE_SIGNED_16        = 5,
-<a name="l00471"></a>00471     RS_TYPE_SIGNED_32        = 6,
-<a name="l00472"></a>00472     RS_TYPE_SIGNED_64        = 7,
-<a name="l00473"></a>00473     RS_TYPE_UNSIGNED_8       = 8,
-<a name="l00474"></a>00474     RS_TYPE_UNSIGNED_16      = 9,
-<a name="l00475"></a>00475     RS_TYPE_UNSIGNED_32      = 10,
-<a name="l00476"></a>00476     RS_TYPE_UNSIGNED_64      = 11,
-<a name="l00477"></a>00477 
-<a name="l00478"></a>00478     RS_TYPE_BOOLEAN          = 12,
-<a name="l00479"></a>00479 
-<a name="l00480"></a>00480     RS_TYPE_UNSIGNED_5_6_5   = 13,
-<a name="l00481"></a>00481     RS_TYPE_UNSIGNED_5_5_5_1 = 14,
-<a name="l00482"></a>00482     RS_TYPE_UNSIGNED_4_4_4_4 = 15,
-<a name="l00483"></a>00483 
-<a name="l00484"></a>00484     RS_TYPE_MATRIX_4X4       = 16,
-<a name="l00485"></a>00485     RS_TYPE_MATRIX_3X3       = 17,
-<a name="l00486"></a>00486     RS_TYPE_MATRIX_2X2       = 18,
-<a name="l00487"></a>00487 
-<a name="l00488"></a>00488     RS_TYPE_ELEMENT          = 1000,
-<a name="l00489"></a>00489     RS_TYPE_TYPE             = 1001,
-<a name="l00490"></a>00490     RS_TYPE_ALLOCATION       = 1002,
-<a name="l00491"></a>00491     RS_TYPE_SAMPLER          = 1003,
-<a name="l00492"></a>00492     RS_TYPE_SCRIPT           = 1004,
-<a name="l00493"></a>00493     RS_TYPE_MESH             = 1005,
-<a name="l00494"></a>00494     RS_TYPE_PROGRAM_FRAGMENT = 1006,
-<a name="l00495"></a>00495     RS_TYPE_PROGRAM_VERTEX   = 1007,
-<a name="l00496"></a>00496     RS_TYPE_PROGRAM_RASTER   = 1008,
-<a name="l00497"></a>00497     RS_TYPE_PROGRAM_STORE    = 1009,
-<a name="l00498"></a>00498     RS_TYPE_FONT             = 1010,
-<a name="l00499"></a>00499 
-<a name="l00500"></a>00500     RS_TYPE_INVALID          = 10000,
-<a name="l00501"></a>00501 } rs_data_type;
-<a name="l00502"></a>00502 
-<a name="l00511"></a>00511 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00512"></a>00512     RS_KIND_USER         = 0,
-<a name="l00513"></a>00513 
-<a name="l00514"></a>00514     RS_KIND_PIXEL_L      = 7,
-<a name="l00515"></a>00515     RS_KIND_PIXEL_A      = 8,
-<a name="l00516"></a>00516     RS_KIND_PIXEL_LA     = 9,
-<a name="l00517"></a>00517     RS_KIND_PIXEL_RGB    = 10,
-<a name="l00518"></a>00518     RS_KIND_PIXEL_RGBA   = 11,
-<a name="l00519"></a>00519     RS_KIND_PIXEL_DEPTH  = 12,
-<a name="l00520"></a>00520 
-<a name="l00521"></a>00521     RS_KIND_INVALID      = 100,
-<a name="l00522"></a>00522 } rs_data_kind;
-<a name="l00523"></a>00523 
-<a name="l00524"></a>00524 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00528"></a>00528     RS_DEPTH_FUNC_ALWAYS        = 0,
-<a name="l00533"></a>00533     RS_DEPTH_FUNC_LESS          = 1,
-<a name="l00538"></a>00538     RS_DEPTH_FUNC_LEQUAL        = 2,
-<a name="l00543"></a>00543     RS_DEPTH_FUNC_GREATER       = 3,
-<a name="l00548"></a>00548     RS_DEPTH_FUNC_GEQUAL        = 4,
-<a name="l00553"></a>00553     RS_DEPTH_FUNC_EQUAL         = 5,
-<a name="l00558"></a>00558     RS_DEPTH_FUNC_NOTEQUAL      = 6,
-<a name="l00562"></a>00562     RS_DEPTH_FUNC_INVALID       = 100,
-<a name="l00563"></a>00563 } rs_depth_func;
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00566"></a>00566     RS_BLEND_SRC_ZERO                   = 0,
-<a name="l00567"></a>00567     RS_BLEND_SRC_ONE                    = 1,
-<a name="l00568"></a>00568     RS_BLEND_SRC_DST_COLOR              = 2,
-<a name="l00569"></a>00569     RS_BLEND_SRC_ONE_MINUS_DST_COLOR    = 3,
-<a name="l00570"></a>00570     RS_BLEND_SRC_SRC_ALPHA              = 4,
-<a name="l00571"></a>00571     RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA    = 5,
-<a name="l00572"></a>00572     RS_BLEND_SRC_DST_ALPHA              = 6,
-<a name="l00573"></a>00573     RS_BLEND_SRC_ONE_MINUS_DST_ALPHA    = 7,
-<a name="l00574"></a>00574     RS_BLEND_SRC_SRC_ALPHA_SATURATE     = 8,
-<a name="l00575"></a>00575 
-<a name="l00576"></a>00576     RS_BLEND_SRC_INVALID                = 100,
-<a name="l00577"></a>00577 } rs_blend_src_func;
+<a name="l00044"></a>00044 <span class="comment">/* Constants */</span>
+<a name="l00045"></a>00045 <span class="preprocessor">#define M_E         2.718281828459045235360287471352662498f     </span><span class="comment">/* e */</span>
+<a name="l00046"></a>00046 <span class="preprocessor">#define M_LOG2E     1.442695040888963407359924681001892137f     </span><span class="comment">/* log_2 e */</span>
+<a name="l00047"></a>00047 <span class="preprocessor">#define M_LOG10E    0.434294481903251827651128918916605082f     </span><span class="comment">/* log_10 e */</span>
+<a name="l00048"></a>00048 <span class="preprocessor">#define M_LN2       0.693147180559945309417232121458176568f     </span><span class="comment">/* log_e 2 */</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#define M_LN10      2.302585092994045684017991454684364208f     </span><span class="comment">/* log_e 10 */</span>
+<a name="l00050"></a>00050 <span class="preprocessor">#define M_PI        3.141592653589793238462643383279502884f     </span><span class="comment">/* pi */</span>
+<a name="l00051"></a>00051 <span class="preprocessor">#define M_PI_2      1.570796326794896619231321691639751442f     </span><span class="comment">/* pi/2 */</span>
+<a name="l00052"></a>00052 <span class="preprocessor">#define M_PI_4      0.785398163397448309615660845819875721f     </span><span class="comment">/* pi/4 */</span>
+<a name="l00053"></a>00053 <span class="preprocessor">#define M_1_PI      0.318309886183790671537767526745028724f     </span><span class="comment">/* 1/pi */</span>
+<a name="l00054"></a>00054 <span class="preprocessor">#define M_2_PIl     0.636619772367581343075535053490057448f     </span><span class="comment">/* 2/pi */</span>
+<a name="l00055"></a>00055 <span class="preprocessor">#define M_2_SQRTPI  1.128379167095512573896158903121545172f     </span><span class="comment">/* 2/sqrt(pi) */</span>
+<a name="l00056"></a>00056 <span class="preprocessor">#define M_SQRT2     1.414213562373095048801688724209698079f     </span><span class="comment">/* sqrt(2) */</span>
+<a name="l00057"></a>00057 <span class="preprocessor">#define M_SQRT1_2   0.707106781186547524400844362104849039f     </span><span class="comment">/* 1/sqrt(2) */</span>
+<a name="l00058"></a>00058 
+<a name="l00059"></a>00059 <span class="preprocessor">#include &quot;stdbool.h&quot;</span>
+<a name="l00063"></a><a class="code" href="rs__types_8rsh.html#ad566f6541e98b74246db1a3a3a85ad49">00063</a> <span class="keyword">typedef</span> <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#ad566f6541e98b74246db1a3a3a85ad49">int8_t</a>;
+<a name="l00067"></a><a class="code" href="rs__types_8rsh.html#aa343fa3b3d06292b959ffdd4c4703b06">00067</a> <span class="keyword">typedef</span> <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#aa343fa3b3d06292b959ffdd4c4703b06">int16_t</a>;
+<a name="l00071"></a><a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">00071</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a>;
+<a name="l00075"></a><a class="code" href="rs__types_8rsh.html#a996e72f71b11a5bb8b3b7b6936b1516d">00075</a> <span class="keyword">typedef</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#a996e72f71b11a5bb8b3b7b6936b1516d">int64_t</a>;
+<a name="l00079"></a><a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">00079</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>;
+<a name="l00083"></a><a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">00083</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">uint16_t</a>;
+<a name="l00087"></a><a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">00087</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a>;
+<a name="l00091"></a><a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">00091</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>;
+<a name="l00095"></a><a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">00095</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a>;
+<a name="l00099"></a><a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">00099</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a273cf69d639a59973b6019625df33e30">uint16_t</a> <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a>;
+<a name="l00103"></a><a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">00103</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a>;
+<a name="l00107"></a><a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">00107</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#aaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a>;
+<a name="l00111"></a><a class="code" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">00111</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a435d1572bf3f880d55459d9805097f62">uint32_t</a> <a class="code" href="rs__types_8rsh.html#a29d85914ddff32967d85ada69854206d">size_t</a>;
+<a name="l00115"></a><a class="code" href="rs__types_8rsh.html#a170745d0d946e79c4c2a056d1d158996">00115</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#a32f2e37ee053cf2ce8ca28d1f74630e5">int32_t</a> <a class="code" href="rs__types_8rsh.html#a170745d0d946e79c4c2a056d1d158996">ssize_t</a>;
+<a name="l00116"></a>00116 
+<a name="l00122"></a><a class="code" href="structrs__element.html">00122</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{ <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__element.html" title="Opaque handle to a RenderScript element.">rs_element</a>;
+<a name="l00128"></a><a class="code" href="structrs__type.html">00128</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__type.html" title="Opaque handle to a RenderScript type.">rs_type</a>;
+<a name="l00134"></a><a class="code" href="structrs__allocation.html">00134</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__allocation.html" title="Opaque handle to a RenderScript allocation.">rs_allocation</a>;
+<a name="l00140"></a><a class="code" href="structrs__sampler.html">00140</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__sampler.html" title="Opaque handle to a RenderScript sampler object.">rs_sampler</a>;
+<a name="l00146"></a><a class="code" href="structrs__script.html">00146</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__script.html" title="Opaque handle to a RenderScript script object.">rs_script</a>;
+<a name="l00152"></a><a class="code" href="structrs__mesh.html">00152</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__mesh.html" title="Opaque handle to a RenderScript mesh object.">rs_mesh</a>;
+<a name="l00158"></a><a class="code" href="structrs__path.html">00158</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__path.html" title="Opaque handle to a RenderScript Path object.">rs_path</a>;
+<a name="l00164"></a><a class="code" href="structrs__program__fragment.html">00164</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__fragment.html" title="Opaque handle to a RenderScript ProgramFragment object.">rs_program_fragment</a>;
+<a name="l00170"></a><a class="code" href="structrs__program__vertex.html">00170</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__vertex.html" title="Opaque handle to a RenderScript ProgramVertex object.">rs_program_vertex</a>;
+<a name="l00176"></a><a class="code" href="structrs__program__raster.html">00176</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__raster.html" title="Opaque handle to a RenderScript ProgramRaster object.">rs_program_raster</a>;
+<a name="l00182"></a><a class="code" href="structrs__program__store.html">00182</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__program__store.html" title="Opaque handle to a RenderScript ProgramStore object.">rs_program_store</a>;
+<a name="l00188"></a><a class="code" href="structrs__font.html">00188</a> typedef struct { <span class="keyword">const</span> <span class="keywordtype">int</span>* <span class="keyword">const</span> p; } __attribute__((packed, aligned(4))) <a class="code" href="structrs__font.html" title="Opaque handle to a RenderScript font object.">rs_font</a>;
+<a name="l00189"></a>00189 
+<a name="l00195"></a><a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">00195</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#a5086d0fcb71f916c936af486ccf0dd41">float2</a> __attribute__((ext_vector_type(2)));
+<a name="l00200"></a><a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">00200</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#a0046fa0f208d0899adbcf1f8b5aafadd">float3</a> __attribute__((ext_vector_type(3)));
+<a name="l00206"></a><a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">00206</a> typedef <span class="keywordtype">float</span> <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> __attribute__((ext_vector_type(4)));
+<a name="l00207"></a>00207 
+<a name="l00212"></a><a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">00212</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#a75ef868cedebc2a6eeb1bc6ca6ca49c3">double2</a> __attribute__((ext_vector_type(2)));
+<a name="l00217"></a><a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">00217</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#aa3c90d5a23d674185a13e95402eda7eb">double3</a> __attribute__((ext_vector_type(3)));
+<a name="l00222"></a><a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">00222</a> typedef <span class="keywordtype">double</span> <a class="code" href="rs__types_8rsh.html#a60f4b04e076f0dd0ecc99c365fc4ca21">double4</a> __attribute__((ext_vector_type(4)));
+<a name="l00223"></a>00223 
+<a name="l00228"></a><a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">00228</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#aff5eb7cd53a34bb01924bf64485296de">uchar2</a> __attribute__((ext_vector_type(2)));
+<a name="l00233"></a><a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">00233</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#a247b5eacf2b662849668cbc33120343f">uchar3</a> __attribute__((ext_vector_type(3)));
+<a name="l00238"></a><a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">00238</a> typedef <a class="code" href="rs__types_8rsh.html#a27c902d5ca78afa82d5ed75554d5cedc">uchar</a> <a class="code" href="rs__types_8rsh.html#ae6ed52a87d4ff920c303b13b00f7396d">uchar4</a> __attribute__((ext_vector_type(4)));
+<a name="l00239"></a>00239 
+<a name="l00244"></a><a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">00244</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#a24a9d78cfc32475e2c6eb1cdec239bf2">ushort2</a> __attribute__((ext_vector_type(2)));
+<a name="l00249"></a><a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">00249</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#ab78391445785d2ca0276392a9c97fcba">ushort3</a> __attribute__((ext_vector_type(3)));
+<a name="l00254"></a><a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">00254</a> typedef <a class="code" href="rs__types_8rsh.html#a9e58a7bf060b7a5fbf6a401d3020adca">ushort</a> <a class="code" href="rs__types_8rsh.html#a77a09fa01d7fc721bbc44c32aac2d487">ushort4</a> __attribute__((ext_vector_type(4)));
+<a name="l00255"></a>00255 
+<a name="l00260"></a><a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">00260</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#aaf90cd1f01a121e824fc6e1b927e7683">uint2</a> __attribute__((ext_vector_type(2)));
+<a name="l00265"></a><a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">00265</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#ae80e36ac834c891aa76b09a220344e78">uint3</a> __attribute__((ext_vector_type(3)));
+<a name="l00270"></a><a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">00270</a> typedef <a class="code" href="rs__types_8rsh.html#a4f5fce8c1ef282264f9214809524d836">uint</a> <a class="code" href="rs__types_8rsh.html#ad92f0ec6c2cdc1f11a6d7fe321047462">uint4</a> __attribute__((ext_vector_type(4)));
+<a name="l00271"></a>00271 
+<a name="l00276"></a><a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">00276</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#a56988b12ab16acf753356f7a5c70565a">ulong2</a> __attribute__((ext_vector_type(2)));
+<a name="l00281"></a><a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">00281</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#ac623a569c28935fbedd3a8ed27ae0696">ulong3</a> __attribute__((ext_vector_type(3)));
+<a name="l00286"></a><a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">00286</a> typedef <a class="code" href="rs__types_8rsh.html#ab46637ef82283186e57f54756fe67203">ulong</a> <a class="code" href="rs__types_8rsh.html#a3029c54b8e1779a1ddbdfe875432d137">ulong4</a> __attribute__((ext_vector_type(4)));
+<a name="l00287"></a>00287 
+<a name="l00292"></a><a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">00292</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#ac532b4c1895c8bd4fb75dc370c484351">char2</a> __attribute__((ext_vector_type(2)));
+<a name="l00297"></a><a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">00297</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#a4617fb31f4c03402515efee0a9b56210">char3</a> __attribute__((ext_vector_type(3)));
+<a name="l00302"></a><a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">00302</a> typedef <span class="keywordtype">char</span> <a class="code" href="rs__types_8rsh.html#aecb498648daac97c7cc5f31c242dfa03">char4</a> __attribute__((ext_vector_type(4)));
+<a name="l00303"></a>00303 
+<a name="l00308"></a><a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">00308</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a303d3ad18aaeacfcfeda2b8580b98796">short2</a> __attribute__((ext_vector_type(2)));
+<a name="l00313"></a><a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">00313</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a3f4967691ae2b249511b5f3dd9e18793">short3</a> __attribute__((ext_vector_type(3)));
+<a name="l00318"></a><a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">00318</a> typedef <span class="keywordtype">short</span> <a class="code" href="rs__types_8rsh.html#a198219da0b1d51c8d7f8f12aad7e502d">short4</a> __attribute__((ext_vector_type(4)));
+<a name="l00319"></a>00319 
+<a name="l00324"></a><a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">00324</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a6bc1fa1354fe2145b8f12b4bbfafcf4c">int2</a> __attribute__((ext_vector_type(2)));
+<a name="l00329"></a><a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">00329</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#ad5512266b63fd06dcf450f6c9d5326c8">int3</a> __attribute__((ext_vector_type(3)));
+<a name="l00334"></a><a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">00334</a> typedef <span class="keywordtype">int</span> <a class="code" href="rs__types_8rsh.html#a897deab71f679999ed99d4153c797e70">int4</a> __attribute__((ext_vector_type(4)));
+<a name="l00335"></a>00335 
+<a name="l00340"></a><a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">00340</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#afd55d62cee0785034b73375acd0df9da">long2</a> __attribute__((ext_vector_type(2)));
+<a name="l00345"></a><a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">00345</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#ad9cedbf4050fad14138d1dcb3428ec18">long3</a> __attribute__((ext_vector_type(3)));
+<a name="l00350"></a><a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">00350</a> typedef <span class="keywordtype">long</span> <a class="code" href="rs__types_8rsh.html#ae177e4918f36e5c9da36d524cdb7a2e7">long4</a> __attribute__((ext_vector_type(4)));
+<a name="l00351"></a>00351 
+<a name="l00358"></a><a class="code" href="structrs__matrix4x4.html">00358</a> typedef struct {
+<a name="l00359"></a>00359     <span class="keywordtype">float</span> m[16];
+<a name="l00360"></a>00360 } <a class="code" href="structrs__matrix4x4.html" title="4x4 float matrix">rs_matrix4x4</a>;
+<a name="l00367"></a><a class="code" href="structrs__matrix3x3.html">00367</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
+<a name="l00368"></a>00368     <span class="keywordtype">float</span> m[9];
+<a name="l00369"></a>00369 } <a class="code" href="structrs__matrix3x3.html" title="3x3 float matrix">rs_matrix3x3</a>;
+<a name="l00376"></a><a class="code" href="structrs__matrix2x2.html">00376</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
+<a name="l00377"></a>00377     <span class="keywordtype">float</span> m[4];
+<a name="l00378"></a>00378 } <a class="code" href="structrs__matrix2x2.html" title="2x2 float matrix">rs_matrix2x2</a>;
+<a name="l00379"></a>00379 
+<a name="l00383"></a><a class="code" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">00383</a> <span class="keyword">typedef</span> <a class="code" href="rs__types_8rsh.html#adb5162dc168ddd471d948faa60b37c5e">float4</a> <a class="code" href="rs__types_8rsh.html#a86f99f382dc35fc8ad98b524fe6d5447">rs_quaternion</a>;
+<a name="l00384"></a>00384 
+<a name="l00385"></a>00385 <span class="preprocessor">#define RS_PACKED __attribute__((packed, aligned(4)))</span>
+<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define NULL ((void *)0)</span>
+<a name="l00387"></a>00387 <span class="preprocessor"></span>
+<a name="l00388"></a>00388 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14))</span>
+<a name="l00389"></a>00389 <span class="preprocessor"></span>
+<a name="l00393"></a><a class="code" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229">00393</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00394"></a>00394     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0,
+<a name="l00395"></a>00395     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1,
+<a name="l00396"></a>00396     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2,
+<a name="l00397"></a>00397     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3,
+<a name="l00398"></a>00398     RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4,
+<a name="l00399"></a>00399     RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5
+<a name="l00400"></a>00400 } <a class="code" href="rs__types_8rsh.html#acc6f9a94176656c73fd74f789cfa2229" title="Enum for selecting cube map faces.">rs_allocation_cubemap_face</a>;
+<a name="l00401"></a>00401 
+<a name="l00408"></a><a class="code" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171">00408</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00409"></a>00409     RS_ALLOCATION_USAGE_SCRIPT = 0x0001,
+<a name="l00410"></a>00410     RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002,
+<a name="l00411"></a>00411     RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004,
+<a name="l00412"></a>00412     RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008,
+<a name="l00413"></a>00413     RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010
+<a name="l00414"></a>00414 } <a class="code" href="rs__types_8rsh.html#af8c988b9715d55b6e41e0ee1925fb171" title="Bitfield to specify the usage types for an allocation.">rs_allocation_usage_type</a>;
+<a name="l00415"></a>00415 
+<a name="l00416"></a>00416 <span class="preprocessor">#endif //defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 14)</span>
+<a name="l00417"></a>00417 <span class="preprocessor"></span>
+<a name="l00418"></a>00418 <span class="comment">// New API&#39;s</span>
+<a name="l00419"></a>00419 <span class="preprocessor">#if (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
+<a name="l00420"></a>00420 <span class="preprocessor"></span>
+<a name="l00425"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">00425</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00429"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158">00429</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a337ab7046b7cb5cc9eb14bc325ae3158">RS_PRIMITIVE_POINT</a>              = 0,
+<a name="l00433"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf">00433</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a09a49eaa42585d6181c8a2f711b63ddf">RS_PRIMITIVE_LINE</a>               = 1,
+<a name="l00437"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da">00437</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951abe563a9f68706a5aa567793a5088b4da">RS_PRIMITIVE_LINE_STRIP</a>         = 2,
+<a name="l00441"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79">00441</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951aeb062ef8811156915afccfc5f4259b79">RS_PRIMITIVE_TRIANGLE</a>           = 3,
+<a name="l00447"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9">00447</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a497d5376ef6c9f9ead810a053b9b35d9">RS_PRIMITIVE_TRIANGLE_STRIP</a>     = 4,
+<a name="l00452"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01">00452</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951afadd96d3a17724e061d9eb07bfca4a01">RS_PRIMITIVE_TRIANGLE_FAN</a>       = 5,
+<a name="l00453"></a>00453 
+<a name="l00457"></a><a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d">00457</a>     <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951a136481c7695b09f01126da71bb132c9d">RS_PRIMITIVE_INVALID</a>            = 100,
+<a name="l00458"></a>00458 } <a class="code" href="rs__types_8rsh.html#aaaa4ecd4a284cf9cccc6e06407229951">rs_primitive</a>;
+<a name="l00459"></a>00459 
+<a name="l00478"></a><a class="code" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647">00478</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00479"></a>00479     RS_TYPE_NONE             = 0,
+<a name="l00480"></a>00480     RS_TYPE_FLOAT_32         = 2,
+<a name="l00481"></a>00481     RS_TYPE_FLOAT_64         = 3,
+<a name="l00482"></a>00482     RS_TYPE_SIGNED_8         = 4,
+<a name="l00483"></a>00483     RS_TYPE_SIGNED_16        = 5,
+<a name="l00484"></a>00484     RS_TYPE_SIGNED_32        = 6,
+<a name="l00485"></a>00485     RS_TYPE_SIGNED_64        = 7,
+<a name="l00486"></a>00486     RS_TYPE_UNSIGNED_8       = 8,
+<a name="l00487"></a>00487     RS_TYPE_UNSIGNED_16      = 9,
+<a name="l00488"></a>00488     RS_TYPE_UNSIGNED_32      = 10,
+<a name="l00489"></a>00489     RS_TYPE_UNSIGNED_64      = 11,
+<a name="l00490"></a>00490 
+<a name="l00491"></a>00491     RS_TYPE_BOOLEAN          = 12,
+<a name="l00492"></a>00492 
+<a name="l00493"></a>00493     RS_TYPE_UNSIGNED_5_6_5   = 13,
+<a name="l00494"></a>00494     RS_TYPE_UNSIGNED_5_5_5_1 = 14,
+<a name="l00495"></a>00495     RS_TYPE_UNSIGNED_4_4_4_4 = 15,
+<a name="l00496"></a>00496 
+<a name="l00497"></a>00497     RS_TYPE_MATRIX_4X4       = 16,
+<a name="l00498"></a>00498     RS_TYPE_MATRIX_3X3       = 17,
+<a name="l00499"></a>00499     RS_TYPE_MATRIX_2X2       = 18,
+<a name="l00500"></a>00500 
+<a name="l00501"></a>00501     RS_TYPE_ELEMENT          = 1000,
+<a name="l00502"></a>00502     RS_TYPE_TYPE             = 1001,
+<a name="l00503"></a>00503     RS_TYPE_ALLOCATION       = 1002,
+<a name="l00504"></a>00504     RS_TYPE_SAMPLER          = 1003,
+<a name="l00505"></a>00505     RS_TYPE_SCRIPT           = 1004,
+<a name="l00506"></a>00506     RS_TYPE_MESH             = 1005,
+<a name="l00507"></a>00507     RS_TYPE_PROGRAM_FRAGMENT = 1006,
+<a name="l00508"></a>00508     RS_TYPE_PROGRAM_VERTEX   = 1007,
+<a name="l00509"></a>00509     RS_TYPE_PROGRAM_RASTER   = 1008,
+<a name="l00510"></a>00510     RS_TYPE_PROGRAM_STORE    = 1009,
+<a name="l00511"></a>00511     RS_TYPE_FONT             = 1010,
+<a name="l00512"></a>00512 
+<a name="l00513"></a>00513     RS_TYPE_INVALID          = 10000,
+<a name="l00514"></a>00514 } <a class="code" href="rs__types_8rsh.html#ae7551db5705f864fde49c13660aff647" title="Enumeration for possible element data types.">rs_data_type</a>;
+<a name="l00515"></a>00515 
+<a name="l00524"></a><a class="code" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a">00524</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00525"></a>00525     RS_KIND_USER         = 0,
+<a name="l00526"></a>00526 
+<a name="l00527"></a>00527     RS_KIND_PIXEL_L      = 7,
+<a name="l00528"></a>00528     RS_KIND_PIXEL_A      = 8,
+<a name="l00529"></a>00529     RS_KIND_PIXEL_LA     = 9,
+<a name="l00530"></a>00530     RS_KIND_PIXEL_RGB    = 10,
+<a name="l00531"></a>00531     RS_KIND_PIXEL_RGBA   = 11,
+<a name="l00532"></a>00532     RS_KIND_PIXEL_DEPTH  = 12,
+<a name="l00533"></a>00533     RS_KIND_PIXEL_YUV    = 13,
+<a name="l00534"></a>00534 
+<a name="l00535"></a>00535     RS_KIND_INVALID      = 100,
+<a name="l00536"></a>00536 } <a class="code" href="rs__types_8rsh.html#a1692d177c4a3fe1544bd91172056581a" title="Enumeration for possible element data kind.">rs_data_kind</a>;
+<a name="l00537"></a>00537 
+<a name="l00538"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">00538</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00542"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a">00542</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa8d469fa992bac113a001d75aa7cfbb5a">RS_DEPTH_FUNC_ALWAYS</a>        = 0,
+<a name="l00547"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a">00547</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfac1ddb06fe80be898bf8d4a517187575a">RS_DEPTH_FUNC_LESS</a>          = 1,
+<a name="l00552"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f">00552</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa62459990f41930a88542b878ddd53d9f">RS_DEPTH_FUNC_LEQUAL</a>        = 2,
+<a name="l00557"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d">00557</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa412bb65be35e058a7699b8211cc2ef7d">RS_DEPTH_FUNC_GREATER</a>       = 3,
+<a name="l00562"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d">00562</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2858ef91becfeb84d8f34a1458a4126d">RS_DEPTH_FUNC_GEQUAL</a>        = 4,
+<a name="l00567"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21">00567</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa56339400e4089e546199547717bdcd21">RS_DEPTH_FUNC_EQUAL</a>         = 5,
+<a name="l00572"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d">00572</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfa2105e438ae89b89a2f4361483e65966d">RS_DEPTH_FUNC_NOTEQUAL</a>      = 6,
+<a name="l00576"></a><a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3">00576</a>     <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bfadfc3917c562a540b4114181440b909e3">RS_DEPTH_FUNC_INVALID</a>       = 100,
+<a name="l00577"></a>00577 } <a class="code" href="rs__types_8rsh.html#a03e91ad8ebfc283ba20f7443dea4a4bf">rs_depth_func</a>;
 <a name="l00578"></a>00578 
 <a name="l00579"></a>00579 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00580"></a>00580     RS_BLEND_DST_ZERO                   = 0,
-<a name="l00581"></a>00581     RS_BLEND_DST_ONE                    = 1,
-<a name="l00582"></a>00582     RS_BLEND_DST_SRC_COLOR              = 2,
-<a name="l00583"></a>00583     RS_BLEND_DST_ONE_MINUS_SRC_COLOR    = 3,
-<a name="l00584"></a>00584     RS_BLEND_DST_SRC_ALPHA              = 4,
-<a name="l00585"></a>00585     RS_BLEND_DST_ONE_MINUS_SRC_ALPHA    = 5,
-<a name="l00586"></a>00586     RS_BLEND_DST_DST_ALPHA              = 6,
-<a name="l00587"></a>00587     RS_BLEND_DST_ONE_MINUS_DST_ALPHA    = 7,
-<a name="l00588"></a>00588 
-<a name="l00589"></a>00589     RS_BLEND_DST_INVALID                = 100,
-<a name="l00590"></a>00590 } rs_blend_dst_func;
-<a name="l00591"></a>00591 
-<a name="l00592"></a>00592 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00593"></a>00593     RS_CULL_BACK     = 0,
-<a name="l00594"></a>00594     RS_CULL_FRONT    = 1,
-<a name="l00595"></a>00595     RS_CULL_NONE     = 2,
-<a name="l00596"></a>00596 
-<a name="l00597"></a>00597     RS_CULL_INVALID  = 100,
-<a name="l00598"></a>00598 } rs_cull_mode;
-<a name="l00599"></a>00599 
-<a name="l00600"></a>00600 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00601"></a>00601     RS_SAMPLER_NEAREST              = 0,
-<a name="l00602"></a>00602     RS_SAMPLER_LINEAR               = 1,
-<a name="l00603"></a>00603     RS_SAMPLER_LINEAR_MIP_LINEAR    = 2,
-<a name="l00604"></a>00604     RS_SAMPLER_WRAP                 = 3,
-<a name="l00605"></a>00605     RS_SAMPLER_CLAMP                = 4,
-<a name="l00606"></a>00606     RS_SAMPLER_LINEAR_MIP_NEAREST   = 5,
-<a name="l00607"></a>00607 
-<a name="l00608"></a>00608     RS_SAMPLER_INVALID              = 100,
-<a name="l00609"></a>00609 } rs_sampler_value;
+<a name="l00580"></a>00580     RS_BLEND_SRC_ZERO                   = 0,
+<a name="l00581"></a>00581     RS_BLEND_SRC_ONE                    = 1,
+<a name="l00582"></a>00582     RS_BLEND_SRC_DST_COLOR              = 2,
+<a name="l00583"></a>00583     RS_BLEND_SRC_ONE_MINUS_DST_COLOR    = 3,
+<a name="l00584"></a>00584     RS_BLEND_SRC_SRC_ALPHA              = 4,
+<a name="l00585"></a>00585     RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA    = 5,
+<a name="l00586"></a>00586     RS_BLEND_SRC_DST_ALPHA              = 6,
+<a name="l00587"></a>00587     RS_BLEND_SRC_ONE_MINUS_DST_ALPHA    = 7,
+<a name="l00588"></a>00588     RS_BLEND_SRC_SRC_ALPHA_SATURATE     = 8,
+<a name="l00589"></a>00589 
+<a name="l00590"></a>00590     RS_BLEND_SRC_INVALID                = 100,
+<a name="l00591"></a>00591 } rs_blend_src_func;
+<a name="l00592"></a>00592 
+<a name="l00593"></a>00593 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00594"></a>00594     RS_BLEND_DST_ZERO                   = 0,
+<a name="l00595"></a>00595     RS_BLEND_DST_ONE                    = 1,
+<a name="l00596"></a>00596     RS_BLEND_DST_SRC_COLOR              = 2,
+<a name="l00597"></a>00597     RS_BLEND_DST_ONE_MINUS_SRC_COLOR    = 3,
+<a name="l00598"></a>00598     RS_BLEND_DST_SRC_ALPHA              = 4,
+<a name="l00599"></a>00599     RS_BLEND_DST_ONE_MINUS_SRC_ALPHA    = 5,
+<a name="l00600"></a>00600     RS_BLEND_DST_DST_ALPHA              = 6,
+<a name="l00601"></a>00601     RS_BLEND_DST_ONE_MINUS_DST_ALPHA    = 7,
+<a name="l00602"></a>00602 
+<a name="l00603"></a>00603     RS_BLEND_DST_INVALID                = 100,
+<a name="l00604"></a>00604 } rs_blend_dst_func;
+<a name="l00605"></a>00605 
+<a name="l00606"></a>00606 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00607"></a>00607     RS_CULL_BACK     = 0,
+<a name="l00608"></a>00608     RS_CULL_FRONT    = 1,
+<a name="l00609"></a>00609     RS_CULL_NONE     = 2,
 <a name="l00610"></a>00610 
-<a name="l00611"></a>00611 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
-<a name="l00612"></a>00612 <span class="preprocessor"></span>
-<a name="l00613"></a>00613 <span class="preprocessor">#endif // __RS_TYPES_RSH__</span>
+<a name="l00611"></a>00611     RS_CULL_INVALID  = 100,
+<a name="l00612"></a>00612 } rs_cull_mode;
+<a name="l00613"></a>00613 
+<a name="l00614"></a>00614 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
+<a name="l00615"></a>00615     RS_SAMPLER_NEAREST              = 0,
+<a name="l00616"></a>00616     RS_SAMPLER_LINEAR               = 1,
+<a name="l00617"></a>00617     RS_SAMPLER_LINEAR_MIP_LINEAR    = 2,
+<a name="l00618"></a>00618     RS_SAMPLER_WRAP                 = 3,
+<a name="l00619"></a>00619     RS_SAMPLER_CLAMP                = 4,
+<a name="l00620"></a>00620     RS_SAMPLER_LINEAR_MIP_NEAREST   = 5,
+<a name="l00621"></a>00621     RS_SAMPLER_MIRRORED_REPEAT      = 6,
+<a name="l00622"></a>00622 
+<a name="l00623"></a>00623     RS_SAMPLER_INVALID              = 100,
+<a name="l00624"></a>00624 } rs_sampler_value;
+<a name="l00625"></a>00625 
+<a name="l00626"></a>00626 <span class="preprocessor">#endif // (defined(RS_VERSION) &amp;&amp; (RS_VERSION &gt;= 16))</span>
+<a name="l00627"></a>00627 <span class="preprocessor"></span>
+<a name="l00628"></a>00628 <span class="preprocessor">#endif // __RS_TYPES_RSH__</span>
 </pre></div></div>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__allocation.html b/docs/html/reference/renderscript/structrs__allocation.html
index ba6d973..1ffbc47 100644
--- a/docs/html/reference/renderscript/structrs__allocation.html
+++ b/docs/html/reference/renderscript/structrs__allocation.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_allocation" -->
-<p>Opaque handle to a Renderscript allocation.  
+<p>Opaque handle to a RenderScript allocation.  
  <a href="structrs__allocation.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript allocation. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript allocation. </p>
 <p>See: android.renderscript.Allocation </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00121">121</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00134">134</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__element.html b/docs/html/reference/renderscript/structrs__element.html
index e380378..d6a1460 100644
--- a/docs/html/reference/renderscript/structrs__element.html
+++ b/docs/html/reference/renderscript/structrs__element.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_element" -->
-<p>Opaque handle to a Renderscript element.  
+<p>Opaque handle to a RenderScript element.  
  <a href="structrs__element.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript element. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript element. </p>
 <p>See: android.renderscript.Element </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00109">109</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00122">122</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__font.html b/docs/html/reference/renderscript/structrs__font.html
index 4d5cd9e..dbc4c4d 100644
--- a/docs/html/reference/renderscript/structrs__font.html
+++ b/docs/html/reference/renderscript/structrs__font.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_font" -->
-<p>Opaque handle to a Renderscript font object.  
+<p>Opaque handle to a RenderScript font object.  
  <a href="structrs__font.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript font object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript font object. </p>
 <p>See: android.renderscript.Font </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00175">175</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00188">188</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__matrix2x2.html b/docs/html/reference/renderscript/structrs__matrix2x2.html
index 5d08900..bacfa02 100644
--- a/docs/html/reference/renderscript/structrs__matrix2x2.html
+++ b/docs/html/reference/renderscript/structrs__matrix2x2.html
@@ -35,9 +35,9 @@
 <div class="textblock"><p>2x2 float matrix </p>
 <p>Native holder for RS matrix. Elements are stored in the array at the location [row*2 + col] </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00363">363</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00376">376</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__matrix3x3.html b/docs/html/reference/renderscript/structrs__matrix3x3.html
index f63ffe8..3745608 100644
--- a/docs/html/reference/renderscript/structrs__matrix3x3.html
+++ b/docs/html/reference/renderscript/structrs__matrix3x3.html
@@ -35,9 +35,9 @@
 <div class="textblock"><p>3x3 float matrix </p>
 <p>Native holder for RS matrix. Elements are stored in the array at the location [row*3 + col] </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00354">354</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00367">367</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__matrix4x4.html b/docs/html/reference/renderscript/structrs__matrix4x4.html
index 1a10edf..26b57d1 100644
--- a/docs/html/reference/renderscript/structrs__matrix4x4.html
+++ b/docs/html/reference/renderscript/structrs__matrix4x4.html
@@ -35,9 +35,9 @@
 <div class="textblock"><p>4x4 float matrix </p>
 <p>Native holder for RS matrix. Elements are stored in the array at the location [row*4 + col] </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00345">345</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00358">358</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__mesh.html b/docs/html/reference/renderscript/structrs__mesh.html
index 2a49a6a..fed96d9 100644
--- a/docs/html/reference/renderscript/structrs__mesh.html
+++ b/docs/html/reference/renderscript/structrs__mesh.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_mesh" -->
-<p>Opaque handle to a Renderscript mesh object.  
+<p>Opaque handle to a RenderScript mesh object.  
  <a href="structrs__mesh.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript mesh object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript mesh object. </p>
 <p>See: android.renderscript.Mesh </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00139">139</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00152">152</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__path.html b/docs/html/reference/renderscript/structrs__path.html
index 2ec823d..ef7f650 100644
--- a/docs/html/reference/renderscript/structrs__path.html
+++ b/docs/html/reference/renderscript/structrs__path.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_path" -->
-<p>Opaque handle to a Renderscript Path object.  
+<p>Opaque handle to a RenderScript Path object.  
  <a href="structrs__path.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript Path object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript Path object. </p>
 <p>See: android.renderscript.Path </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00145">145</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00158">158</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__program__fragment.html b/docs/html/reference/renderscript/structrs__program__fragment.html
index 8c9a241..707e899 100644
--- a/docs/html/reference/renderscript/structrs__program__fragment.html
+++ b/docs/html/reference/renderscript/structrs__program__fragment.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_program_fragment" -->
-<p>Opaque handle to a Renderscript ProgramFragment object.  
+<p>Opaque handle to a RenderScript ProgramFragment object.  
  <a href="structrs__program__fragment.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript ProgramFragment object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript ProgramFragment object. </p>
 <p>See: android.renderscript.ProgramFragment </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00151">151</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00164">164</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__program__raster.html b/docs/html/reference/renderscript/structrs__program__raster.html
index 201825b..444aaf9 100644
--- a/docs/html/reference/renderscript/structrs__program__raster.html
+++ b/docs/html/reference/renderscript/structrs__program__raster.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_program_raster" -->
-<p>Opaque handle to a Renderscript ProgramRaster object.  
+<p>Opaque handle to a RenderScript ProgramRaster object.  
  <a href="structrs__program__raster.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript ProgramRaster object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript ProgramRaster object. </p>
 <p>See: android.renderscript.ProgramRaster </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00163">163</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00176">176</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__program__store.html b/docs/html/reference/renderscript/structrs__program__store.html
index 800d29b..c187392 100644
--- a/docs/html/reference/renderscript/structrs__program__store.html
+++ b/docs/html/reference/renderscript/structrs__program__store.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_program_store" -->
-<p>Opaque handle to a Renderscript ProgramStore object.  
+<p>Opaque handle to a RenderScript ProgramStore object.  
  <a href="structrs__program__store.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript ProgramStore object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript ProgramStore object. </p>
 <p>See: android.renderscript.ProgramStore </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00169">169</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00182">182</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__program__vertex.html b/docs/html/reference/renderscript/structrs__program__vertex.html
index 9f425fe..c3688b7 100644
--- a/docs/html/reference/renderscript/structrs__program__vertex.html
+++ b/docs/html/reference/renderscript/structrs__program__vertex.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_program_vertex" -->
-<p>Opaque handle to a Renderscript ProgramVertex object.  
+<p>Opaque handle to a RenderScript ProgramVertex object.  
  <a href="structrs__program__vertex.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript ProgramVertex object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript ProgramVertex object. </p>
 <p>See: android.renderscript.ProgramVertex </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00157">157</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00170">170</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__sampler.html b/docs/html/reference/renderscript/structrs__sampler.html
index 9f48abc..daba2bb 100644
--- a/docs/html/reference/renderscript/structrs__sampler.html
+++ b/docs/html/reference/renderscript/structrs__sampler.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_sampler" -->
-<p>Opaque handle to a Renderscript sampler object.  
+<p>Opaque handle to a RenderScript sampler object.  
  <a href="structrs__sampler.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript sampler object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript sampler object. </p>
 <p>See: android.renderscript.Sampler </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00127">127</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00140">140</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__script.html b/docs/html/reference/renderscript/structrs__script.html
index 8294378..ea39d95 100644
--- a/docs/html/reference/renderscript/structrs__script.html
+++ b/docs/html/reference/renderscript/structrs__script.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_script" -->
-<p>Opaque handle to a Renderscript script object.  
+<p>Opaque handle to a RenderScript script object.  
  <a href="structrs__script.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript script object. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript script object. </p>
 <p>See: android.renderscript.ScriptC </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00133">133</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00146">146</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__script__call.html b/docs/html/reference/renderscript/structrs__script__call.html
index 83432e5..e4c0820 100644
--- a/docs/html/reference/renderscript/structrs__script__call.html
+++ b/docs/html/reference/renderscript/structrs__script__call.html
@@ -31,9 +31,9 @@
 <!-- doxytag: class="rs_script_call" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
 <div class="textblock"><p>Structure to provide extra information to a rsForEach call. Primarly used to restrict the call to a subset of cells in the allocation. </p>
 
-<p>Definition at line <a class="el" href="rs__core_8rsh_source.html#l00106">106</a> of file <a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__core_8rsh_source.html#l00110">110</a> of file <a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__core_8rsh_source.html">rs_core.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__tm.html b/docs/html/reference/renderscript/structrs__tm.html
index 8148dcb..b6447b5 100644
--- a/docs/html/reference/renderscript/structrs__tm.html
+++ b/docs/html/reference/renderscript/structrs__tm.html
@@ -67,7 +67,7 @@
 
 <p>Definition at line <a class="el" href="rs__time_8rsh_source.html#l00049">49</a> of file <a class="el" href="rs__time_8rsh_source.html">rs_time.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__time_8rsh_source.html">rs_time.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__time_8rsh_source.html">rs_time.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/reference/renderscript/structrs__type.html b/docs/html/reference/renderscript/structrs__type.html
index 7d97fb9..ef95ed18 100644
--- a/docs/html/reference/renderscript/structrs__type.html
+++ b/docs/html/reference/renderscript/structrs__type.html
@@ -29,15 +29,15 @@
 </div>
 <div class="contents">
 <!-- doxytag: class="rs_type" -->
-<p>Opaque handle to a Renderscript type.  
+<p>Opaque handle to a RenderScript type.  
  <a href="structrs__type.html#details">More...</a></p>
 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
-<div class="textblock"><p>Opaque handle to a Renderscript type. </p>
+<div class="textblock"><p>Opaque handle to a RenderScript type. </p>
 <p>See: android.renderscript.Type </p>
 
-<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00115">115</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
+<p>Definition at line <a class="el" href="rs__types_8rsh_source.html#l00128">128</a> of file <a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a>.</p>
 </div><hr/>The documentation for this struct was generated from the following file:<ul>
-<li><a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
+<li>/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/<a class="el" href="rs__types_8rsh_source.html">rs_types.rsh</a></li>
 </ul>
 </div>
 
diff --git a/docs/html/training/cloudsave/conflict-res.jd b/docs/html/training/cloudsave/conflict-res.jd
new file mode 100644
index 0000000..0ff50e2
--- /dev/null
+++ b/docs/html/training/cloudsave/conflict-res.jd
@@ -0,0 +1,597 @@
+page.title=Resolving Cloud Save Conflicts
+page.tags="cloud"
+
+page.article=true
+@jd:body
+
+<style type="text/css">
+.new-value {
+	color: #00F;
+}
+.conflict {
+	color: #F00;
+}
+</style>
+
+<div id="tb-wrapper">
+  <div id="tb">
+    <h2>In this document</h2>
+    <ol class="nolist">
+      <li><a href="#conflict">Get Notified of Conflicts</a></li>
+      <li><a href="#simple">Handle the Simple Cases</a></li>
+      <li><a href="#complicated">Design a Strategy for More Complex Cases</a>
+      <ol class="nolist">
+        <li><a href="#attempt-1">First Attempt: Store Only the Total</a></li>
+        <li><a href="#attempt-2">Second Attempt: Store the Total and the Delta</a></li>
+        <li><a href="#solution">Solution: Store the Sub-totals per Device</a></li>
+      </ol>
+      </li>
+      <li><a href="#cleanup">Clean Up Your Data</a></li>
+    </ol>
+    <h2>You should also read</h2>
+    <ul>
+      <li><a href="http://developers.google.com/games/services/common/concepts/cloudsave">Cloud Save</a></li>
+      <li><a href="https://developers.google.com/games/services/android/cloudsave">Cloud Save in Android</a></li>
+    </ul>
+  </div>
+</div>
+
+<p>This article describes how to design a robust conflict resolution strategy for
+apps that save data to the cloud using the
+<a href="http://developers.google.com/games/services/common/concepts/cloudsave">
+Cloud Save service</a>. The Cloud Save service
+allows you to store application data for each user of an application on Google's
+servers. Your application can retrieve and update this user data from Android
+devices, iOS devices, or web applications by using the Cloud Save APIs.</p>
+
+<p>Saving and loading progress in Cloud Save is straightforward: it's just a matter
+of serializing the player's data to and from byte arrays and storing those arrays
+in the cloud. However, when your user has multiple devices and two or more of them attempt
+to save data to the cloud, the saves might conflict, and you must decide how to
+resolve it. The structure of your cloud save data largely dictates how robust
+your conflict resolution can be, so you must design your data carefully in order
+to allow your conflict resolution logic to handle each case correctly.</p>
+
+<p>The article starts by describing a few flawed approaches
+and explains where they fall short. Then it presents a solution for avoiding
+conflicts. The discussion focuses on games, but you can
+apply the same principles to any app that saves data to the cloud.</p>
+
+<h2 id="conflict">Get Notified of Conflicts</h2>
+
+<p>The
+<a href="{@docRoot}reference/com/google/android/gms/appstate/OnStateLoadedListener.html">{@code OnStateLoadedListener}</a>
+methods are responsible for loading an application's state data from Google's servers.
+The callback <a href="{@docRoot}reference/com/google/android/gms/appstate/OnStateLoadedListener.html#onStateConflict">
+{@code OnStateLoadedListener.onStateConflict}</a> provides a mechanism
+for your application to resolve conflicts between the local state on a user's
+device and the state stored in the cloud:</p>
+
+<pre style="clear:right">&#64;Override
+public void onStateConflict(int stateKey, String resolvedVersion,
+    byte[] localData, byte[] serverData) {
+    // resolve conflict, then call mAppStateClient.resolveConflict()
+ ...
+}</pre>
+
+<p>At this point your application must choose which one of the data sets should
+be kept, or it can submit a new data set that represents the merged data. It is
+up to you to implement this conflict resolution logic.</p>
+
+<p>It's important to realize that the Cloud Save service synchronizes
+data in the background. Therefore, you should ensure that your app is prepared
+to receive that callback outside of the context where you originally generated
+the data. Specifically, if the Google Play services application detects a conflict
+in the background, the callback will be called the next time you attempt to load the
+data, which might not happen until the next time the user starts the app.</p>
+
+<p>Therefore, design of your cloud save data and conflict resolution code must be
+<em>context-independent</em>: given two conflicting save states, you must be able
+to resolve the conflict using only the data available within the data sets, without
+consulting any external context. </p>
+
+<h2 id="simple">Handle the Simple Cases</h2>
+
+<p>Here are some simple cases of conflict resolution. For many apps, it is
+sufficient to adopt a variant of one of these strategies:</p>
+
+<ul>
+  <li> <strong>New is better than old</strong>. In some cases, new data should
+always replace old data. For example, if the data represents the player's choice
+for a character's shirt color, then a more recent choice should override an
+older choice. In this case, you would probably choose to store the timestamp in the cloud
+save data. When resolving the conflict, pick the data set with the most recent
+timestamp (remember to use a reliable clock, and be careful about time zone
+differences).</li>
+
+  <li> <strong>One set of data is clearly better than the other</strong>. In other
+cases, it will always be clear which data can be defined as &quot;best&quot;. For
+example, if the data represents the player's best time in a racing game, then it's
+clear that, in case of conflicts, you should keep the best (smallest) time.</li>
+
+  <li> <strong>Merge by union</strong>. It may be possible to resolve the conflict
+by computing a union of the two conflicting sets. For example, if your data
+represents the set of levels that player has unlocked, then the resolved data is
+simply the union of the two conflicting sets. This way, players won't lose any
+levels they have unlocked. The
+<a href="https://github.com/playgameservices/android-samples/tree/master/CollectAllTheStars">
+CollectAllTheStars</a> sample game uses a variant of this strategy.</li>
+</ul>
+
+<h2 id="complicated">Design a Strategy for More Complex Cases</h2>
+
+<p>A more complicated case happens when your game allows the player to collect
+fungible items or units, such as gold coins or experience points. Let's
+consider a hypothetical game, called Coin Run, an infinite runner where the goal
+is to collect coins and become very, very rich. Each coin collected gets added to
+the player's piggy bank.</p>
+
+<p>The following sections describe three strategies for resolving sync conflicts
+between multiple devices: two that sound good but ultimately fail to successfully
+resolve all scenarios, and one final solution that can manage conflicts between
+any number of devices.</p>
+
+<h3 id="attempt-1">First Attempt: Store Only the Total</h3>
+
+<p>At first thought, it might seem that the cloud save data should simply be the
+number of coins in the bank. But if that data is all that's available, conflict
+resolution will be severely limited. The best you could do would be to pick the largest of
+the two numbers in case of a conflict.</p>
+
+<p>Consider the scenario illustrated in Table 1. Suppose the player initially
+has 20 coins, and then collects 10 coins on device A and 15 coins on device B.
+Then device B saves the state to the cloud. When device A attempts to save, a
+conflict is detected. The "store only the total" conflict resolution algorithm would resolve
+the conflict by writing 35 (the largest of the two numbers).</p>
+
+<p class="table-caption"><strong>Table 1.</strong> Storing only the total number
+of coins (failed strategy).</p>
+
+<table border="1">
+  <tr>
+    <th>Event</th>
+    <th>Data on Device A</th>
+    <th>Data on Device B</th>
+    <th>Data on Cloud</th>
+    <th>Actual Total</th>
+  </tr>
+  <tr>
+    <td>Starting conditions</td>
+    <td>20</td>
+    <td>20</td>
+    <td>20</td>
+    <td>20</td>
+  </tr>
+  <tr>
+    <td>Player collects 10 coins on device A</td>
+    <td class="new-value">30</td>
+    <td>20</td>
+    <td>20</td>
+    <td>30</td>
+  </tr>
+  <tr>
+    <td>Player collects 15 coins on device B</td>
+    <td>30</td>
+    <td class="new-value">35</td>
+    <td>20</td>
+    <td>45</td>
+  </tr>
+  <tr>
+    <td>Device B saves state to cloud</td>
+    <td>30</td>
+    <td>35</td>
+    <td class="new-value">35</td>
+    <td>45</td>
+  </tr>
+  <tr>
+    <td>Device A tries to save state to cloud.<br />
+    <span class="conflict">Conflict detected.</span></td>
+    <td class="conflict">30</td>
+    <td>35</td>
+    <td class="conflict">35</td>
+    <td>45</td>
+  </tr>
+  <tr>
+    <td>Device A resolves conflict by picking largest of the two numbers.</td>
+    <td class="new-value">35</td>
+    <td>35</td>
+    <td class="new-value">35</td>
+    <td>45</td>
+  </tr>
+</table>
+
+<p>This strategy would fail&mdash;the player's bank has gone from 20
+to 35, when the user actually collected a total of 25 coins (10 on device A and 15 on
+device B). So 10 coins were lost. Storing only the total number of coins in the
+cloud save is not enough to implement a robust conflict resolution algorithm.</p>
+
+<h3 id="attempt-2">Second Attempt: Store the Total and the Delta</h3>
+
+<p>A different approach is to include an additional field in
+the save data: the number of coins added (the delta) since the last commit. In
+this approach the save data can be represented by a tuple <em>(T,d)</em> where <em>T</em> is
+the total number of coins and <em>d</em> is the number of coins that you just
+added.</p>
+
+<p>With this structure, your conflict resolution algorithm has room to be more
+robust, as illustrated below. But this approach still doesn't give your app
+a reliable picture of the player's overall state.</p>
+
+<p>Here is the conflict resolution algorithm for including the delta:</p>
+
+<ul>
+  <li><strong>Local data:</strong> (T, d)</li>
+  <li><strong>Cloud data:</strong> (T', d')</li>
+  <li><strong>Resolved data:</strong> (T' + d, d)</li>
+</ul>
+
+<p>For example, when you get a conflict between the local state <em>(T,d)</em>
+and the cloud state <em>(T',d')</em>, you can resolve it as <em>(T'+d, d)</em>.
+What this means is that you are taking the delta from your local data and
+incorporating it into the cloud data, hoping that this will correctly account for
+any gold coins that were collected on the other device.</p>
+
+<p>This approach might sound promising, but it breaks down in a dynamic mobile
+environment:</p>
+<ul>
+<li>Users might save state when the device is offline. These changes will be
+queued up for submission when the device comes back online.</li>
+
+<li>The way that sync works is that
+the most recent change overwrites any previous changes. In other words, the
+second write is the only one that gets sent to the cloud (this happens
+when the device eventually comes online), and the delta in the first
+write is ignored.</li>
+</ul>
+
+<p>To illustrate, consider the scenario illustrated by Table 2. After the
+series of operations shown in the table, the cloud state
+will be (130, +5). This means the resolved state would be (140, +10). This is
+incorrect because in total, the user has collected 110 coins on device A and
+120 coins on device B. The total should be 250 coins.</p>
+
+<p class="table-caption"><strong>Table 2.</strong>  Failure case for total+delta
+strategy.</p>
+
+<table border="1">
+  <tr>
+    <th>Event</th>
+    <th>Data on Device A</th>
+    <th>Data on Device B</th>
+    <th>Data on Cloud</th>
+    <th>Actual Total</th>
+  </tr>
+  <tr>
+    <td>Starting conditions</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>20</td>
+  </tr>
+  <tr>
+    <td>Player collects 100 coins on device A</td>
+    <td class="test2">(120, +100)</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>120</td>
+  </tr>
+  <tr>
+    <td>Player collects 10 more coins on device A</td>
+    <td class="new-value" style="white-space:nowrap">(130, +10)</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>130</td>
+  </tr>
+  <tr>
+    <td>Player collects 115 coins on device B</td>
+    <td>(130, +10)</td>
+    <td class="new-value" style="white-space:nowrap">(125, +115)</td>
+    <td>(20, x)</td>
+    <td>245</td>
+  </tr>
+  <tr>
+    <td>Player collects 5 more coins on device B</td>
+    <td>(130, +10)</td>
+    <td class="new-value">
+(130, +5)</td>
+    <td>
+(20, x)</td>
+    <td>250</td>
+  </tr>
+  <tr>
+    <td>Device B uploads its data to the cloud
+      </td>
+    <td>(130, +10)</td>
+    <td>(130, +5)</td>
+    <td class="new-value">
+(130, +5)</td>
+    <td>250</td>
+  </tr>
+  <tr>
+    <td>Device A tries to upload its data to the cloud.
+    <br />
+    <span class="conflict">Conflict detected.</span></td>
+    <td class="conflict">(130, +10)</td>
+    <td>(130, +5)</td>
+    <td class="conflict">(130, +5)</td>
+    <td>250</td>
+  </tr>
+  <tr>
+    <td>Device A resolves the conflict by applying the local delta to the cloud total.
+      </td>
+    <td class="new-value" style="white-space:nowrap">(140, +10)</td>
+    <td>(130, +5)</td>
+    <td class="new-value" style="white-space:nowrap">(140, +10)</td>
+    <td>250</td>
+  </tr>
+</table>
+<p><em>(*): x represents data that is irrelevant to our scenario.</em></p>
+
+<p>You might try to fix the problem by not resetting the delta after each save,
+so that the second save on each device accounts for all the coins collected thus far.
+With that change the second save made by device A would be<em> (130, +110)</em> instead of
+<em>(130, +10)</em>. However, you would then run into the problem illustrated in Table 3.</p>
+
+<p class="table-caption"><strong>Table 3.</strong>  Failure case for the modified
+algorithm.</p>
+<table border="1">
+  <tr>
+    <th>Event</th>
+    <th>Data on Device A</th>
+    <th>Data on Device B</th>
+    <th>Data on Cloud</th>
+    <th>Actual Total</th>
+  </tr>
+  <tr>
+    <td>Starting conditions</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>20</td>
+  </tr>
+  <tr>
+    <td>Player collects 100 coins on device A
+      </td>
+    <td class="new-value">(120, +100)</td>
+    <td>(20, x)</td>
+    <td>(20, x)</td>
+    <td>120</td>
+  </tr>
+  <tr>
+    <td>Device A saves state to cloud</td>
+    <td>(120, +100)</td>
+    <td>(20, x)</td>
+    <td class="new-value">(120, +100)</td>
+    <td>120</td>
+  </tr>
+  <tr>
+    <td>Player collects 10 more coins on device A
+      </td>
+    <td class="new-value">(130, +110)</td>
+    <td>
+(20, x)</td>
+    <td>(120, +100)</td>
+    <td>130</td>
+  </tr>
+  <tr>
+    <td>Player collects 1 coin on device B
+
+      </td>
+    <td>(130, +110)</td>
+    <td class="new-value">(21, +1)</td>
+    <td>(120, +100)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device B attempts to save state to cloud.
+    <br />
+    Conflict detected.
+      </td>
+    <td>(130, +110)</td>
+    <td class="conflict">(21, +1)</td>
+    <td class="conflict">
+(120, +100)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device B solves conflict by applying local delta to cloud total.
+
+      </td>
+    <td>(130, +110)</td>
+    <td>(121, +1)</td>
+    <td>(121, +1)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device A tries to upload its data to the cloud.
+    <br />
+    <span class="conflict">Conflict detected. </span></td>
+    <td class="conflict">(130, +110)</td>
+    <td>(121, +1)</td>
+    <td class="conflict">(121, +1)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device A resolves the conflict by applying the local delta to the cloud total.
+
+      </td>
+    <td class="new-value" style="white-space:nowrap">(231, +110)</td>
+    <td>(121, +1)</td>
+    <td class="new-value" style="white-space:nowrap">(231, +110)</td>
+    <td>131</td>
+  </tr>
+</table>
+<p><em>(*): x represents data that is irrelevant to our scenario.</em></p>
+
+<p>Now you have the opposite problem: you are giving the player too many coins.
+The player has gained 211 coins, when in fact she has collected only 111 coins.</p>
+
+<h3 id="solution">Solution: Store the Sub-totals per Device</h3>
+
+<p>Analyzing the previous attempts, it seems that what those strategies
+fundamentally miss is the ability to know which coins have already been counted
+and which coins have not been counted yet, especially in the presence of multiple
+consecutive commits coming from different devices.</p>
+
+<p>The solution to the problem is to change the structure of your cloud save to
+be a dictionary that maps strings to integers. Each key-value pair in this
+dictionary represents a &quot;drawer&quot; that contains coins, and the total
+number of coins in the save is the sum of the values of all entries.
+The fundamental principle of this design is that each device has its own
+drawer, and only the device itself can put coins into that drawer.</p>
+
+<p>The structure of the dictionary is <em>(A:a, B:b, C:c, ...)</em>, where
+<em>a</em> is the total number of coins in the drawer A, <em>b</em> is
+the total number of coins in drawer B, and so on.</p>
+
+<p>The new conflict resolution algorithm for the "drawer" solution is as follows:</p>
+
+  <ul>
+    <li><strong>Local data:</strong> (A:a, B:b, C:c, ...)</li>
+    <li><strong>Cloud data:</strong> (A:a', B:b', C:c', ...)</li>
+    <li><strong>Resolved data:</strong> (A:<em>max</em>(a,a'), B:<em>max</em>(b,b'),
+        C:<em>max</em>(c,c'), ...)</li>
+  </ul>
+
+<p>For example, if the local data is <em>(A:20, B:4, C:7)</em> and the cloud data
+is <em>(B:10, C:2, D:14)</em>, then the resolved data will be
+<em>(A:20, B:10, C:7, D:14)</em>. Note that how you apply  conflict resolution
+logic to this dictionary data may vary depending on your app. For example, for
+some apps you might want to take the lower value.</p>
+
+<p>To test this new algorithm, apply it to any of the test scenarios
+mentioned above. You will see that it arrives at the correct result.</p>
+
+Table 4 illustrates this, based on the scenario from Table 3. Note the following:</p>
+
+<ul>
+  <li>In the initial state, the player has 20 coins. This is accurately reflected
+  on each device and the cloud. This value is represented as a dictionary (X:20),
+  where the value of X isn't significant&mdash;we don't care where this initial data came from.</li>
+  <li>When the player collects 100 coins on device A, this change
+  is packaged as a dictionary and saved to the cloud. The dictionary's value is 100 because
+  that is the number of coins that the player collected on device A. There is no
+  calculation being performed on the data at this point&mdash;device A is simply
+  reporting the number of coins the player collected on it.</li>
+  <li>Each new
+  submission of coins is packaged as a dictionary associated with the device
+  that saved it to the cloud. When the player collects 10 more coins on device A,
+  for example, the device A dictionary value is updated to be 110.</li>
+
+  <li>The net result is that the app knows the total number of coins
+  the player has collected on each device. Thus it can easily calculate the total.</li>
+</ul>
+
+<p class="table-caption"><strong>Table 4.</strong> Successful application of the
+key-value pair strategy.</p>
+
+<table border="1">
+  <tr>
+    <th>Event</th>
+    <th>Data on Device A</th>
+    <th>Data on Device B</th>
+    <th>Data on Cloud</th>
+    <th>Actual Total</th>
+  </tr>
+  <tr>
+    <td>Starting conditions</td>
+    <td>(X:20, x)</td>
+    <td>(X:20, x)</td>
+    <td>(X:20, x)</td>
+    <td>20</td>
+  </tr>
+  <tr>
+    <td>Player collects 100 coins on device A
+
+      </td>
+    <td class="new-value">(X:20, A:100)</td>
+    <td>(X:20)</td>
+    <td>(X:20)</td>
+    <td>120</td>
+  </tr>
+  <tr>
+    <td>Device A saves state to cloud
+
+      </td>
+    <td>(X:20, A:100)</td>
+    <td>(X:20)</td>
+    <td class="new-value">(X:20, A:100)</td>
+    <td>120</td>
+  </tr>
+  <tr>
+    <td>Player collects 10 more coins on device A
+            </td>
+    <td class="new-value">(X:20, A:110)</td>
+    <td>(X:20)</td>
+    <td>(X:20, A:100)</td>
+    <td>130</td>
+  </tr>
+  <tr>
+    <td>Player collects 1 coin on device B</td>
+    <td>(X:20, A:110)</td>
+    <td class="new-value">
+(X:20, B:1)</td>
+    <td>
+(X:20, A:100)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device B attempts to save state to cloud.
+    <br />
+    <span class="conflict">Conflict detected. </span></td>
+    <td>(X:20, A:110)</td>
+    <td class="conflict">(X:20, B:1)</td>
+    <td class="conflict">
+(X:20, A:100)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device B solves conflict
+
+      </td>
+    <td>(X:20, A:110)</td>
+    <td class="new-value">(X:20, A:100, B:1)</td>
+    <td class="new-value">(X:20, A:100, B:1)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device A tries to upload its data to the cloud. <br />
+      <span class="conflict">Conflict detected.</span></td>
+    <td class="conflict">(X:20, A:110)</td>
+    <td>(X:20, A:100, B:1)</td>
+    <td class="conflict">
+(X:20, A:100, B:1)</td>
+    <td>131</td>
+  </tr>
+  <tr>
+    <td>Device A resolves the conflict
+
+      </td>
+    <td class="new-value" style="white-space:nowrap">(X:20, A:110, B:1)</td>
+    <td style="white-space:nowrap">(X:20, A:100, B:1)</td>
+    <td class="new-value" style="white-space:nowrap">(X:20, A:110, B:1)
+      <br />
+    <em>total 131</em></td>
+    <td>131</td>
+  </tr>
+</table>
+
+
+<h2 id="cleanup">Clean Up Your Data</h2>
+<p>There is a limit to the size of cloud save data, so in following the strategy
+outlined in this article, take care not to create arbitrarily large dictionaries. At first
+glance it may seem that the dictionary will have only one entry per device, and even
+the very enthusiastic user is unlikely to have thousands of them. However,
+obtaining a device ID is difficult and considered a bad practice, so instead you should
+use an installation ID, which is easier to obtain and more reliable. This means
+that the dictionary might have one entry for each time the user installed the
+application on each device. Assuming each key-value pair takes 32 bytes, and
+since an individual cloud save buffer can be
+up to 128K in size, you are safe if you have up to 4,096 entries.</p>
+
+<p>In real-life situations, your data will probably be more complex than a number
+of coins. In this case, the number of entries in this dictionary may be much more
+limited. Depending on your implementation, it might make sense to store the
+timestamp for when each entry in the dictionary was modified. When you detect that a
+given entry has not been modified in the last several weeks or months, it is
+probably safe to transfer the coins into another entry and delete the old entry.</p>
\ No newline at end of file
diff --git a/docs/html/training/cloudsync/gcm.jd b/docs/html/training/cloudsync/gcm.jd
index fa395e4..6303372 100644
--- a/docs/html/training/cloudsync/gcm.jd
+++ b/docs/html/training/cloudsync/gcm.jd
@@ -1,12 +1,7 @@
 page.title=Making the Most of Google Cloud Messaging
-parent.title=Syncing to the Cloud
-parent.link=index.html
 
 trainingnavtop=true
 
-previous.title=Using the Backup API
-previous.link=backupapi.html
-
 @jd:body
 
 <div id="tb-wrapper">
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 61517e0..58db404 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -375,7 +375,6 @@
     </div>
     <ul>
 
-
       <li class="nav-section">
         <div class="nav-section-header">
           <a href="<?cs var:toroot ?>training/connect-devices-wirelessly/index.html"
@@ -469,6 +468,12 @@
           </a>
           </li>
         </ul>
+        <li><a href="<?cs var:toroot ?>training/cloudsave/conflict-res.html"
+           description=
+           "How to design a robust conflict resolution strategy for apps that save data to the cloud."
+           >Resolving Cloud Save Conflicts
+          </a>
+          </li>
       </li>
     </ul>
   </li>
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index a1c87cb..bd871c4 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -37,12 +37,14 @@
  * Canvas and Drawables</a> developer guide.</p></div>
  */
 public class Canvas {
+
     // assigned in constructors or setBitmap, freed in finalizer
-    int mNativeCanvas;
-    
+    /** @hide */
+    public int mNativeCanvas;
+
     // may be null
     private Bitmap mBitmap;
-    
+
     // optional field set by the caller
     private DrawFilter mDrawFilter;
 
@@ -59,7 +61,6 @@
     protected int mScreenDensity = Bitmap.DENSITY_NONE;
     
     // Used by native code
-    @SuppressWarnings({"UnusedDeclaration"})
     private int mSurfaceFormat;
 
     /**
@@ -79,10 +80,9 @@
     private static final int MAXMIMUM_BITMAP_SIZE = 32766;
 
     // This field is used to finalize the native Canvas properly
-    @SuppressWarnings({"UnusedDeclaration"})
     private final CanvasFinalizer mFinalizer;
 
-    private static class CanvasFinalizer {
+    private static final class CanvasFinalizer {
         private int mNativeCanvas;
 
         public CanvasFinalizer(int nativeCanvas) {
@@ -92,13 +92,18 @@
         @Override
         protected void finalize() throws Throwable {
             try {
-                if (mNativeCanvas != 0) {
-                    finalizer(mNativeCanvas);
-                }
+                dispose();
             } finally {
                 super.finalize();
             }
         }
+
+        public void dispose() {
+            if (mNativeCanvas != 0) {
+                finalizer(mNativeCanvas);
+                mNativeCanvas = 0;
+            }
+        }
     }
 
     /**
@@ -132,13 +137,14 @@
         mBitmap = bitmap;
         mDensity = bitmap.mDensity;
     }
-    
-    Canvas(int nativeCanvas) {
+
+    /** @hide */
+    public Canvas(int nativeCanvas) {
         if (nativeCanvas == 0) {
             throw new IllegalStateException();
         }
         mNativeCanvas = nativeCanvas;
-        mFinalizer = new CanvasFinalizer(nativeCanvas);
+        mFinalizer = new CanvasFinalizer(mNativeCanvas);
         mDensity = Bitmap.getDefaultDensity();
     }
 
@@ -155,7 +161,18 @@
         }
         finalizer(oldCanvas);
     }
-    
+
+    /**
+     * Gets the native canvas pointer.
+     *
+     * @return The native pointer.
+     *
+     * @hide
+     */
+    public int getNativeCanvas() {
+        return mNativeCanvas;
+    }
+
     /**
      * Returns null.
      * 
@@ -1660,6 +1677,15 @@
     }
 
     /**
+     * Releases the resources associated with this canvas.
+     *
+     * @hide
+     */
+    public void release() {
+        mFinalizer.dispose();
+    }
+
+    /**
      * Free up as much memory as possible from private caches (e.g. fonts, images)
      *
      * @hide
diff --git a/libs/androidfw/InputTransport.cpp b/libs/androidfw/InputTransport.cpp
index 498389ea..cfbc923 100644
--- a/libs/androidfw/InputTransport.cpp
+++ b/libs/androidfw/InputTransport.cpp
@@ -159,7 +159,7 @@
         if (error == EAGAIN || error == EWOULDBLOCK) {
             return WOULD_BLOCK;
         }
-        if (error == EPIPE || error == ENOTCONN) {
+        if (error == EPIPE || error == ENOTCONN || error == ECONNREFUSED || error == ECONNRESET) {
             return DEAD_OBJECT;
         }
         return -error;
@@ -193,7 +193,7 @@
         if (error == EAGAIN || error == EWOULDBLOCK) {
             return WOULD_BLOCK;
         }
-        if (error == EPIPE || error == ENOTCONN) {
+        if (error == EPIPE || error == ENOTCONN || error == ECONNREFUSED) {
             return DEAD_OBJECT;
         }
         return -error;
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index 31b0f6a..1089b7c 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -386,8 +386,8 @@
 
 bool Caches::bindIndicesBuffer() {
     if (!mMeshIndices) {
-        uint16_t* regionIndices = new uint16_t[REGION_MESH_QUAD_COUNT * 6];
-        for (int i = 0; i < REGION_MESH_QUAD_COUNT; i++) {
+        uint16_t* regionIndices = new uint16_t[gMaxNumberOfQuads * 6];
+        for (uint32_t i = 0; i < gMaxNumberOfQuads; i++) {
             uint16_t quad = i * 4;
             int index = i * 6;
             regionIndices[index    ] = quad;       // top-left
@@ -400,7 +400,7 @@
 
         glGenBuffers(1, &mMeshIndices);
         bool force = bindIndicesBuffer(mMeshIndices);
-        glBufferData(GL_ELEMENT_ARRAY_BUFFER, REGION_MESH_QUAD_COUNT * 6 * sizeof(uint16_t),
+        glBufferData(GL_ELEMENT_ARRAY_BUFFER, gMaxNumberOfQuads * 6 * sizeof(uint16_t),
                 regionIndices, GL_STATIC_DRAW);
 
         delete[] regionIndices;
@@ -638,7 +638,7 @@
 TextureVertex* Caches::getRegionMesh() {
     // Create the mesh, 2 triangles and 4 vertices per rectangle in the region
     if (!mRegionMesh) {
-        mRegionMesh = new TextureVertex[REGION_MESH_QUAD_COUNT * 4];
+        mRegionMesh = new TextureVertex[gMaxNumberOfQuads * 4];
     }
 
     return mRegionMesh;
diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h
index bdde8fb..b7a97ad 100644
--- a/libs/hwui/Caches.h
+++ b/libs/hwui/Caches.h
@@ -58,7 +58,8 @@
 // GL ES 2.0 defines that at least 16 texture units must be supported
 #define REQUIRED_TEXTURE_UNITS_COUNT 3
 
-#define REGION_MESH_QUAD_COUNT 512
+// Maximum number of quads that pre-allocated meshes can draw
+static const uint32_t gMaxNumberOfQuads = 2048;
 
 // Generates simple and textured vertices
 #define FV(x, y, u, v) { { x, y }, { u, v } }
@@ -181,7 +182,7 @@
 
     /**
      * Binds a global indices buffer that can draw up to
-     * REGION_MESH_QUAD_COUNT quads.
+     * gMaxNumberOfQuads quads.
      */
     bool bindIndicesBuffer();
     bool bindIndicesBuffer(const GLuint buffer);
diff --git a/libs/hwui/DeferredDisplayList.cpp b/libs/hwui/DeferredDisplayList.cpp
index 887e822..7ce15c5 100644
--- a/libs/hwui/DeferredDisplayList.cpp
+++ b/libs/hwui/DeferredDisplayList.cpp
@@ -152,8 +152,9 @@
 
 class MergingDrawBatch : public DrawBatch {
 public:
-    MergingDrawBatch(DeferInfo& deferInfo, Rect viewport) :
-           DrawBatch(deferInfo), mClipRect(viewport), mClipSideFlags(kClipSide_None) {}
+    MergingDrawBatch(DeferInfo& deferInfo, int width, int height) :
+            DrawBatch(deferInfo), mClipRect(width, height),
+            mClipSideFlags(kClipSide_None) {}
 
     /*
      * Helper for determining if a new op can merge with a MergingDrawBatch based on their bounds
@@ -489,6 +490,7 @@
     // complex clip has a complex set of expectations on the renderer state - for now, avoid taking
     // the merge path in those cases
     deferInfo.mergeable &= !recordingComplexClip();
+    deferInfo.opaqueOverBounds &= !recordingComplexClip() && mSaveStack.isEmpty();
 
     if (CC_LIKELY(mAvoidOverdraw) && mBatches.size() &&
             op->state.mClipSideFlags != kClipSide_ConservativeFull &&
@@ -570,7 +572,8 @@
 
     if (!targetBatch) {
         if (deferInfo.mergeable) {
-            targetBatch = new MergingDrawBatch(deferInfo, mBounds);
+            targetBatch = new MergingDrawBatch(deferInfo,
+                    renderer.getViewportWidth(), renderer.getViewportHeight());
             mMergingBatches[deferInfo.batchId].put(deferInfo.mergeId, targetBatch);
         } else {
             targetBatch = new DrawBatch(deferInfo);
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index f678bfd..6099f5d 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -77,7 +77,7 @@
     virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level,
             bool useQuickReject) = 0;
 
-    virtual void output(int level, uint32_t logFlags = 0) = 0;
+    virtual void output(int level, uint32_t logFlags = 0) const = 0;
 
     // NOTE: it would be nice to declare constants and overriding the implementation in each op to
     // point at the constants, but that seems to require a .cpp file
@@ -278,7 +278,7 @@
         renderer.save(mFlags);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Save flags %x", mFlags);
     }
 
@@ -312,7 +312,7 @@
         renderer.restoreToCount(saveCount + mCount);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Restore to count %d", mCount);
     }
 
@@ -351,7 +351,7 @@
         renderer.saveLayer(mArea.left, mArea.top, mArea.right, mArea.bottom, mAlpha, mMode, mFlags);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SaveLayer%s of area " RECT_STRING,
                 (isSaveLayerAlpha() ? "Alpha" : ""),RECT_ARGS(mArea));
     }
@@ -372,7 +372,7 @@
         return this;
     }
 
-    bool isSaveLayerAlpha() { return mAlpha < 255 && mMode == SkXfermode::kSrcOver_Mode; }
+    bool isSaveLayerAlpha() const { return mAlpha < 255 && mMode == SkXfermode::kSrcOver_Mode; }
     Rect mArea;
     int mAlpha;
     SkXfermode::Mode mMode;
@@ -388,7 +388,7 @@
         renderer.translate(mDx, mDy);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Translate by %f %f", mDx, mDy);
     }
 
@@ -408,7 +408,7 @@
         renderer.rotate(mDegrees);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Rotate by %f degrees", mDegrees);
     }
 
@@ -427,7 +427,7 @@
         renderer.scale(mSx, mSy);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Scale by %f %f", mSx, mSy);
     }
 
@@ -447,7 +447,7 @@
         renderer.skew(mSx, mSy);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Skew by %f %f", mSx, mSy);
     }
 
@@ -467,7 +467,7 @@
         renderer.setMatrix(mMatrix);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SetMatrix " MATRIX_STRING, MATRIX_ARGS(mMatrix));
     }
 
@@ -486,7 +486,7 @@
         renderer.concatMatrix(mMatrix);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("ConcatMatrix " MATRIX_STRING, MATRIX_ARGS(mMatrix));
     }
 
@@ -530,7 +530,7 @@
         renderer.clipRect(mArea.left, mArea.top, mArea.right, mArea.bottom, mOp);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("ClipRect " RECT_STRING, RECT_ARGS(mArea));
     }
 
@@ -559,7 +559,7 @@
         renderer.clipPath(mPath, mOp);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         SkRect bounds = mPath->getBounds();
         OP_LOG("ClipPath bounds " RECT_STRING,
                 bounds.left(), bounds.top(), bounds.right(), bounds.bottom());
@@ -580,7 +580,7 @@
         renderer.clipRegion(mRegion, mOp);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         SkIRect bounds = mRegion->getBounds();
         OP_LOG("ClipRegion bounds %d %d %d %d",
                 bounds.left(), bounds.top(), bounds.right(), bounds.bottom());
@@ -599,7 +599,7 @@
         renderer.resetShader();
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOGS("ResetShader");
     }
 
@@ -614,7 +614,7 @@
         renderer.setupShader(mShader);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SetupShader, shader %p", mShader);
     }
 
@@ -630,7 +630,7 @@
         renderer.resetColorFilter();
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOGS("ResetColorFilter");
     }
 
@@ -646,7 +646,7 @@
         renderer.setupColorFilter(mColorFilter);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SetupColorFilter, filter %p", mColorFilter);
     }
 
@@ -662,7 +662,7 @@
         renderer.resetShadow();
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOGS("ResetShadow");
     }
 
@@ -678,7 +678,7 @@
         renderer.setupShadow(mRadius, mDx, mDy, mColor);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SetupShadow, radius %f, %f, %f, color %#x", mRadius, mDx, mDy, mColor);
     }
 
@@ -697,7 +697,7 @@
         renderer.resetPaintFilter();
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOGS("ResetPaintFilter");
     }
 
@@ -713,7 +713,7 @@
         renderer.setupPaintFilter(mClearBits, mSetBits);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("SetupPaintFilter, clear %#x, set %#x", mClearBits, mSetBits);
     }
 
@@ -751,12 +751,18 @@
     TextureVertex::set(ptr++, posRect.xDim - offsetRect.left, posRect.yDim - offsetRect.top, \
             texCoordsRect.xDim, texCoordsRect.yDim)
 
+    /**
+     * This multi-draw operation builds a mesh on the stack by generating a quad
+     * for each bitmap in the batch. This method is also responsible for dirtying
+     * the current layer, if any.
+     */
     virtual status_t multiDraw(OpenGLRenderer& renderer, Rect& dirty,
             const Vector<DrawOp*>& ops, const Rect& bounds) {
         renderer.restoreDisplayState(state, true); // restore all but the clip
         TextureVertex vertices[6 * ops.size()];
         TextureVertex* vertex = &vertices[0];
 
+        const bool hasLayer = renderer.hasLayer();
         bool transformed = false;
 
         // TODO: manually handle rect clip for bitmaps by adjusting texCoords per op,
@@ -778,13 +784,18 @@
             SET_TEXTURE(vertex, opBounds, bounds, texCoords, left, bottom);
             SET_TEXTURE(vertex, opBounds, bounds, texCoords, right, top);
             SET_TEXTURE(vertex, opBounds, bounds, texCoords, right, bottom);
+
+            if (hasLayer) {
+                const Rect& dirty = ops[i]->state.mBounds;
+                renderer.dirtyLayer(dirty.left, dirty.top, dirty.right, dirty.bottom);
+            }
         }
 
         return renderer.drawBitmaps(mBitmap, ops.size(), &vertices[0],
                 transformed, bounds, mPaint);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw bitmap %p at %f %f", mBitmap, mLocalBounds.left, mLocalBounds.top);
     }
 
@@ -822,7 +833,7 @@
         return renderer.drawBitmap(mBitmap, mMatrix, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw bitmap %p matrix " MATRIX_STRING, mBitmap, MATRIX_ARGS(mMatrix));
     }
 
@@ -850,7 +861,7 @@
                 getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw bitmap %p src="RECT_STRING", dst="RECT_STRING,
                 mBitmap, RECT_ARGS(mSrc), RECT_ARGS(mLocalBounds));
     }
@@ -876,7 +887,7 @@
                 mLocalBounds.top, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw bitmap %p", mBitmap);
     }
 
@@ -900,7 +911,7 @@
                 mVertices, mColors, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw bitmap %p mesh %d x %d", mBitmap, mMeshWidth, mMeshHeight);
     }
 
@@ -921,28 +932,107 @@
 class DrawPatchOp : public DrawBoundedOp {
 public:
     DrawPatchOp(SkBitmap* bitmap, Res_png_9patch* patch,
-            float left, float top, float right, float bottom, int alpha, SkXfermode::Mode mode)
-            : DrawBoundedOp(left, top, right, bottom, 0),
-            mBitmap(bitmap), mPatch(patch), mAlpha(alpha), mMode(mode),
-            mGenerationId(0), mMesh(NULL) {
+            float left, float top, float right, float bottom, SkPaint* paint)
+            : DrawBoundedOp(left, top, right, bottom, paint),
+            mBitmap(bitmap), mPatch(patch), mGenerationId(0), mMesh(NULL) {
         mEntry = Caches::getInstance().assetAtlas.getEntry(bitmap);
     };
 
-    virtual status_t applyDraw(OpenGLRenderer& renderer, Rect& dirty) {
+    const Patch* getMesh(OpenGLRenderer& renderer) {
         if (!mMesh || renderer.getCaches().patchCache.getGenerationId() != mGenerationId) {
             PatchCache& cache = renderer.getCaches().patchCache;
             mMesh = cache.get(mEntry, mBitmap->width(), mBitmap->height(),
-                    mLocalBounds.right - mLocalBounds.left, mLocalBounds.bottom - mLocalBounds.top,
-                    mPatch);
+                    mLocalBounds.getWidth(), mLocalBounds.getHeight(), mPatch);
             mGenerationId = cache.getGenerationId();
         }
-        // We're not calling the public variant of drawPatch() here
-        // This method won't perform the quickReject() since we've already done it at this point
-        return renderer.drawPatch(mBitmap, mMesh, mEntry, mLocalBounds.left, mLocalBounds.top,
-                mLocalBounds.right, mLocalBounds.bottom, mAlpha, mMode);
+        return mMesh;
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    /**
+     * This multi-draw operation builds an indexed mesh on the stack by copying
+     * and transforming the vertices of each 9-patch in the batch. This method
+     * is also responsible for dirtying the current layer, if any.
+     */
+    virtual status_t multiDraw(OpenGLRenderer& renderer, Rect& dirty,
+            const Vector<DrawOp*>& ops, const Rect& bounds) {
+        renderer.restoreDisplayState(state, true);
+
+        // Batches will usually contain a small number of items so it's
+        // worth performing a first iteration to count the exact number
+        // of vertices we need in the new mesh
+        uint32_t totalVertices = 0;
+        for (unsigned int i = 0; i < ops.size(); i++) {
+            totalVertices += ((DrawPatchOp*) ops[i])->getMesh(renderer)->verticesCount;
+        }
+
+        const bool hasLayer = renderer.hasLayer();
+
+        uint32_t indexCount = 0;
+
+        TextureVertex vertices[totalVertices];
+        TextureVertex* vertex = &vertices[0];
+
+        // Create a mesh that contains the transformed vertices for all the
+        // 9-patch objects that are part of the batch. Note that onDefer()
+        // enforces ops drawn by this function to have a pure translate or
+        // identity matrix
+        for (unsigned int i = 0; i < ops.size(); i++) {
+            DrawPatchOp* patchOp = (DrawPatchOp*) ops[i];
+            const Patch* opMesh = patchOp->getMesh(renderer);
+            uint32_t vertexCount = opMesh->verticesCount;
+            if (vertexCount == 0) continue;
+
+            // We use the bounds to know where to translate our vertices
+            // Using patchOp->state.mBounds wouldn't work because these
+            // bounds are clipped
+            const float tx = (int) floorf(patchOp->state.mMatrix.getTranslateX() +
+                    patchOp->mLocalBounds.left + 0.5f);
+            const float ty = (int) floorf(patchOp->state.mMatrix.getTranslateY() +
+                    patchOp->mLocalBounds.top + 0.5f);
+
+            // Copy & transform all the vertices for the current operation
+            TextureVertex* opVertices = opMesh->vertices;
+            for (uint32_t j = 0; j < vertexCount; j++, opVertices++) {
+                TextureVertex::set(vertex++,
+                        opVertices->position[0] + tx, opVertices->position[1] + ty,
+                        opVertices->texture[0], opVertices->texture[1]);
+            }
+
+            // Dirty the current layer if possible. When the 9-patch does not
+            // contain empty quads we can take a shortcut and simply set the
+            // dirty rect to the object's bounds.
+            if (hasLayer) {
+                if (!opMesh->hasEmptyQuads) {
+                    renderer.dirtyLayer(tx, ty,
+                            tx + patchOp->mLocalBounds.getWidth(),
+                            ty + patchOp->mLocalBounds.getHeight());
+                } else {
+                    const size_t count = opMesh->quads.size();
+                    for (size_t i = 0; i < count; i++) {
+                        const Rect& quadBounds = opMesh->quads[i];
+                        const float x = tx + quadBounds.left;
+                        const float y = ty + quadBounds.top;
+                        renderer.dirtyLayer(x, y,
+                                x + quadBounds.getWidth(), y + quadBounds.getHeight());
+                    }
+                }
+            }
+
+            indexCount += opMesh->indexCount;
+        }
+
+        return renderer.drawPatches(mBitmap, mEntry, &vertices[0], indexCount, getPaint(renderer));
+    }
+
+    virtual status_t applyDraw(OpenGLRenderer& renderer, Rect& dirty) {
+        // We're not calling the public variant of drawPatch() here
+        // This method won't perform the quickReject() since we've already done it at this point
+        return renderer.drawPatch(mBitmap, getMesh(renderer), mEntry,
+                mLocalBounds.left, mLocalBounds.top, mLocalBounds.right, mLocalBounds.bottom,
+                getPaint(renderer));
+    }
+
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw patch "RECT_STRING, RECT_ARGS(mLocalBounds));
     }
 
@@ -951,7 +1041,8 @@
     virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo) {
         deferInfo.batchId = DeferredDisplayList::kOpBatch_Patch;
         deferInfo.mergeId = mEntry ? (mergeid_t) &mEntry->atlas : (mergeid_t) mBitmap;
-        deferInfo.mergeable = true;
+        deferInfo.mergeable = state.mMatrix.isPureTranslate() &&
+                OpenGLRenderer::getXfermodeDirect(mPaint) == SkXfermode::kSrcOver_Mode;
         deferInfo.opaqueOverBounds = isOpaqueOverBounds() && mBitmap->isOpaque();
     }
 
@@ -959,11 +1050,9 @@
     SkBitmap* mBitmap;
     Res_png_9patch* mPatch;
 
-    int mAlpha;
-    SkXfermode::Mode mMode;
-
     uint32_t mGenerationId;
     const Patch* mMesh;
+
     AssetAtlas::Entry* mEntry;
 };
 
@@ -976,7 +1065,7 @@
         return renderer.drawColor(mColor, mMode);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw color %#x, mode %d", mColor, mMode);
     }
 
@@ -1021,7 +1110,7 @@
                 mLocalBounds.right, mLocalBounds.bottom, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Rect "RECT_STRING, RECT_ARGS(mLocalBounds));
     }
 
@@ -1044,7 +1133,7 @@
         return renderer.drawRects(mRects, mCount, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Rects count %d", mCount);
     }
 
@@ -1070,7 +1159,7 @@
                 mLocalBounds.right, mLocalBounds.bottom, mRx, mRy, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw RoundRect "RECT_STRING", rx %f, ry %f", RECT_ARGS(mLocalBounds), mRx, mRy);
     }
 
@@ -1091,7 +1180,7 @@
         return renderer.drawCircle(mX, mY, mRadius, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Circle x %f, y %f, r %f", mX, mY, mRadius);
     }
 
@@ -1113,7 +1202,7 @@
                 mLocalBounds.right, mLocalBounds.bottom, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Oval "RECT_STRING, RECT_ARGS(mLocalBounds));
     }
 
@@ -1133,7 +1222,7 @@
                 mStartAngle, mSweepAngle, mUseCenter, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Arc "RECT_STRING", start %f, sweep %f, useCenter %d",
                 RECT_ARGS(mLocalBounds), mStartAngle, mSweepAngle, mUseCenter);
     }
@@ -1169,7 +1258,7 @@
         deferInfo.batchId = DeferredDisplayList::kOpBatch_AlphaMaskTexture;
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Path %p in "RECT_STRING, mPath, RECT_ARGS(mLocalBounds));
     }
 
@@ -1191,7 +1280,7 @@
         return renderer.drawLines(mPoints, mCount, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Lines count %d", mCount);
     }
 
@@ -1217,7 +1306,7 @@
         return renderer.drawPoints(mPoints, mCount, getPaint(renderer));
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Points count %d", mCount);
     }
 
@@ -1229,7 +1318,7 @@
     DrawSomeTextOp(const char* text, int bytesCount, int count, SkPaint* paint)
             : DrawOp(paint), mText(text), mBytesCount(bytesCount), mCount(count) {};
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw some text, %d bytes", mBytesCount);
     }
 
@@ -1339,7 +1428,7 @@
         return status;
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Text of count %d, bytes %d", mCount, mBytesCount);
     }
 
@@ -1372,7 +1461,7 @@
         return ret;
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Functor %p", mFunctor);
     }
 
@@ -1406,7 +1495,7 @@
         return DrawGlInfo::kStatusDone;
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Display List %p, flags %#x", mDisplayList, mFlags);
         if (mDisplayList && (logFlags & kOpLogFlag_Recurse)) {
             mDisplayList->output(level + 1);
@@ -1429,7 +1518,7 @@
         return renderer.drawLayer(mLayer, mX, mY);
     }
 
-    virtual void output(int level, uint32_t logFlags) {
+    virtual void output(int level, uint32_t logFlags) const {
         OP_LOG("Draw Layer %p at %f %f", mLayer, mX, mY);
     }
 
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index 6d85a16..5d23e1d 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -317,13 +317,10 @@
 
 status_t DisplayListRenderer::drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
         float left, float top, float right, float bottom, SkPaint* paint) {
-    int alpha;
-    SkXfermode::Mode mode;
-    OpenGLRenderer::getAlphaAndModeDirect(paint, &alpha, &mode);
-
     bitmap = refBitmap(bitmap);
+    paint = refPaint(paint);
 
-    addDrawOp(new (alloc()) DrawPatchOp(bitmap, patch, left, top, right, bottom, alpha, mode));
+    addDrawOp(new (alloc()) DrawPatchOp(bitmap, patch, left, top, right, bottom, paint));
     return DrawGlInfo::kStatusDone;
 }
 
diff --git a/libs/hwui/Extensions.cpp b/libs/hwui/Extensions.cpp
index eefdb84..218c18e 100644
--- a/libs/hwui/Extensions.cpp
+++ b/libs/hwui/Extensions.cpp
@@ -26,6 +26,7 @@
 
 #include "Debug.h"
 #include "Extensions.h"
+#include "Properties.h"
 
 namespace android {
 
@@ -63,7 +64,13 @@
 
     // Query EGL extensions
     findExtensions(eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS), mEglExtensionList);
-    mHasNvSystemTime = hasEglExtension("EGL_NV_system_time");
+
+    char property[PROPERTY_VALUE_MAX];
+    if (property_get(PROPERTY_DEBUG_NV_PROFILING, property, NULL) > 0) {
+        mHasNvSystemTime = !strcmp(property, "true") && hasEglExtension("EGL_NV_system_time");
+    } else {
+        mHasNvSystemTime = false;
+    }
 
     const char* version = (const char*) glGetString(GL_VERSION);
 
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 3e3d882..79a7a93 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -64,8 +64,6 @@
 
     mLinearFiltering = false;
 
-    mIndexBufferID = 0;
-
     mSmallCacheWidth = DEFAULT_TEXT_SMALL_CACHE_WIDTH;
     mSmallCacheHeight = DEFAULT_TEXT_SMALL_CACHE_HEIGHT;
     mLargeCacheWidth = DEFAULT_TEXT_LARGE_CACHE_WIDTH;
@@ -111,12 +109,6 @@
     }
     mCacheTextures.clear();
 
-    if (mInitialized) {
-        // Unbinding the buffer shouldn't be necessary but it crashes with some drivers
-        Caches::getInstance().unbindIndicesBuffer();
-        glDeleteBuffers(1, &mIndexBufferID);
-    }
-
     LruCache<Font::FontDescription, Font*>::Iterator it(mActiveFonts);
     while (it.next()) {
         delete it.value();
@@ -319,33 +311,6 @@
     mCurrentCacheTexture = mCacheTextures[0];
 }
 
-// Avoid having to reallocate memory and render quad by quad
-void FontRenderer::initVertexArrayBuffers() {
-    uint32_t numIndices = gMaxNumberOfQuads * 6;
-    uint32_t indexBufferSizeBytes = numIndices * sizeof(uint16_t);
-    uint16_t* indexBufferData = (uint16_t*) malloc(indexBufferSizeBytes);
-
-    // Four verts, two triangles , six indices per quad
-    for (uint32_t i = 0; i < gMaxNumberOfQuads; i++) {
-        int i6 = i * 6;
-        int i4 = i * 4;
-
-        indexBufferData[i6 + 0] = i4 + 0;
-        indexBufferData[i6 + 1] = i4 + 1;
-        indexBufferData[i6 + 2] = i4 + 2;
-
-        indexBufferData[i6 + 3] = i4 + 0;
-        indexBufferData[i6 + 4] = i4 + 2;
-        indexBufferData[i6 + 5] = i4 + 3;
-    }
-
-    glGenBuffers(1, &mIndexBufferID);
-    Caches::getInstance().bindIndicesBuffer(mIndexBufferID);
-    glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexBufferSizeBytes, indexBufferData, GL_STATIC_DRAW);
-
-    free(indexBufferData);
-}
-
 // We don't want to allocate anything unless we actually draw text
 void FontRenderer::checkInit() {
     if (mInitialized) {
@@ -353,7 +318,6 @@
     }
 
     initTextTexture();
-    initVertexArrayBuffers();
 
     mInitialized = true;
 }
@@ -416,7 +380,7 @@
                 if (mFunctor) (*mFunctor)(0, NULL);
 
                 checkTextureUpdate();
-                caches.bindIndicesBuffer(mIndexBufferID);
+                caches.bindIndicesBuffer();
 
                 if (!mDrawn) {
                     // If returns true, a VBO was bound and we must
diff --git a/libs/hwui/FontRenderer.h b/libs/hwui/FontRenderer.h
index cbbd871..c1072ed 100644
--- a/libs/hwui/FontRenderer.h
+++ b/libs/hwui/FontRenderer.h
@@ -105,8 +105,6 @@
 private:
     friend class Font;
 
-    static const uint32_t gMaxNumberOfQuads = 2048;
-
     const uint8_t* mGammaTable;
 
     void allocateTextureMemory(CacheTexture* cacheTexture);
@@ -118,7 +116,6 @@
     CacheTexture* cacheBitmapInTexture(const SkGlyph& glyph, uint32_t* startX, uint32_t* startY);
 
     void flushAllAndInvalidate();
-    void initVertexArrayBuffers();
 
     void checkInit();
     void initRender(const Rect* clip, Rect* bounds, Functor* functor);
@@ -160,8 +157,6 @@
 
     bool mUploadTexture;
 
-    uint32_t mIndexBufferID;
-
     Functor* mFunctor;
     const Rect* mClip;
     Rect* mBounds;
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 6a5ea51..65e7eae 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -72,7 +72,7 @@
     return fabs(f) <= EPSILON;
 }
 
-uint32_t Matrix4::getType() const {
+uint8_t Matrix4::getType() const {
     if (mType & kTypeUnknown) {
         mType = kTypeIdentity;
 
@@ -114,7 +114,7 @@
     return mType;
 }
 
-uint32_t Matrix4::getGeometryType() const {
+uint8_t Matrix4::getGeometryType() const {
     return getType() & sGeometryMask;
 }
 
@@ -127,7 +127,7 @@
 }
 
 bool Matrix4::isPureTranslate() const {
-    return getGeometryType() == kTypeTranslate;
+    return getGeometryType() <= kTypeTranslate;
 }
 
 bool Matrix4::isSimple() const {
diff --git a/libs/hwui/Matrix.h b/libs/hwui/Matrix.h
index af520bd..5116203 100644
--- a/libs/hwui/Matrix.h
+++ b/libs/hwui/Matrix.h
@@ -124,7 +124,7 @@
 
     void loadOrtho(float left, float right, float bottom, float top, float near, float far);
 
-    uint32_t getType() const;
+    uint8_t getType() const;
 
     void multiply(const Matrix4& v) {
         Matrix4 u;
@@ -135,13 +135,13 @@
     void multiply(float v);
 
     void translate(float x, float y) {
-        if ((getType() & sGeometryMask) == kTypeTranslate) {
+        if ((getType() & sGeometryMask) <= kTypeTranslate) {
             data[kTranslateX] += x;
             data[kTranslateY] += y;
         } else {
             // Doing a translation will only affect the translate bit of the type
             // Save the type
-            uint32_t type = mType;
+            uint8_t type = mType;
 
             Matrix4 u;
             u.loadTranslate(x, y, 0.0f);
@@ -202,7 +202,7 @@
     static const Matrix4& identity();
 
 private:
-    mutable uint32_t mType;
+    mutable uint8_t mType;
 
     inline float get(int i, int j) const {
         return data[i * 4 + j];
@@ -212,7 +212,7 @@
         data[i * 4 + j] = v;
     }
 
-    uint32_t getGeometryType() const;
+    uint8_t getGeometryType() const;
 
 }; // class Matrix4
 
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 73d458d..6f1dc6f 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -827,6 +827,7 @@
         if (!mSnapshot->isIgnored()) {
             mSnapshot->resetTransform(-bounds.left, -bounds.top, 0.0f);
             mSnapshot->resetClip(clip.left, clip.top, clip.right, clip.bottom);
+            mSnapshot->viewport.set(0.0f, 0.0f, bounds.getWidth(), bounds.getHeight());
         }
     }
 
@@ -1061,7 +1062,7 @@
 }
 
 void OpenGLRenderer::drawTextureLayer(Layer* layer, const Rect& rect) {
-    float alpha = layer->getAlpha() / 255.0f * mSnapshot->alpha;
+    float alpha = getLayerAlpha(layer);
 
     setupDraw();
     if (layer->getRenderTarget() == GL_TEXTURE_2D) {
@@ -1191,7 +1192,7 @@
         // after we setup drawing in case we need to mess with the
         // stencil buffer in setupDraw()
         TextureVertex* mesh = mCaches.getRegionMesh();
-        GLsizei numQuads = 0;
+        uint32_t numQuads = 0;
 
         setupDrawWithTexture();
         setupDrawColor(alpha, alpha, alpha, alpha);
@@ -1230,7 +1231,7 @@
 
             numQuads++;
 
-            if (numQuads >= REGION_MESH_QUAD_COUNT) {
+            if (numQuads >= gMaxNumberOfQuads) {
                 DRAW_DOUBLE_STENCIL(glDrawElements(GL_TRIANGLES, numQuads * 6,
                                 GL_UNSIGNED_SHORT, NULL));
                 numQuads = 0;
@@ -2049,6 +2050,11 @@
             GL_TRIANGLE_STRIP, gMeshCount, ignoreTransform);
 }
 
+/**
+ * Important note: this method is intended to draw batches of bitmaps and
+ * will not set the scissor enable or dirty the current layer, if any.
+ * The caller is responsible for properly dirtying the current layer.
+ */
 status_t OpenGLRenderer::drawBitmaps(SkBitmap* bitmap, int bitmapCount, TextureVertex* vertices,
         bool transformed, const Rect& bounds, SkPaint* paint) {
     mCaches.activeTexture(0);
@@ -2071,12 +2077,12 @@
         drawAlpha8TextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
                 texture->id, paint != NULL, color, alpha, mode,
                 &vertices[0].position[0], &vertices[0].texture[0],
-                GL_TRIANGLES, bitmapCount * 6, true, true);
+                GL_TRIANGLES, bitmapCount * 6, true, true, false);
     } else {
         drawTextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
                 texture->id, alpha / 255.0f, mode, texture->blend,
                 &vertices[0].position[0], &vertices[0].texture[0],
-                GL_TRIANGLES, bitmapCount * 6, false, true, 0, true);
+                GL_TRIANGLES, bitmapCount * 6, false, true, 0, true, false);
     }
 
     return DrawGlInfo::kStatusDrew;
@@ -2367,10 +2373,6 @@
 
 status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
         float left, float top, float right, float bottom, SkPaint* paint) {
-    int alpha;
-    SkXfermode::Mode mode;
-    getAlphaAndMode(paint, &alpha, &mode);
-
     if (quickReject(left, top, right, bottom)) {
         return DrawGlInfo::kStatusDone;
     }
@@ -2379,13 +2381,11 @@
     const Patch* mesh = mCaches.patchCache.get(entry, bitmap->width(), bitmap->height(),
             right - left, bottom - top, patch);
 
-    return drawPatch(bitmap, mesh, entry, left, top, right, bottom, alpha, mode);
+    return drawPatch(bitmap, mesh, entry, left, top, right, bottom, paint);
 }
 
-status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, const Patch* mesh,
-        AssetAtlas::Entry* entry, float left, float top, float right, float bottom,
-        int alpha, SkXfermode::Mode mode) {
-
+status_t OpenGLRenderer::drawPatch(SkBitmap* bitmap, const Patch* mesh, AssetAtlas::Entry* entry,
+        float left, float top, float right, float bottom, SkPaint* paint) {
     if (quickReject(left, top, right, bottom)) {
         return DrawGlInfo::kStatusDone;
     }
@@ -2399,6 +2399,10 @@
         texture->setWrap(GL_CLAMP_TO_EDGE, true);
         texture->setFilter(GL_LINEAR, true);
 
+        int alpha;
+        SkXfermode::Mode mode;
+        getAlphaAndMode(paint, &alpha, &mode);
+
         const bool pureTranslate = currentTransform().isPureTranslate();
         // Mark the current layer dirty where we are going to draw the patch
         if (hasLayer() && mesh->hasEmptyQuads) {
@@ -2418,8 +2422,6 @@
             }
         }
 
-        alpha *= mSnapshot->alpha;
-
         if (CC_LIKELY(pureTranslate)) {
             const float x = (int) floorf(left + currentTransform().getTranslateX() + 0.5f);
             const float y = (int) floorf(top + currentTransform().getTranslateY() + 0.5f);
@@ -2441,6 +2443,32 @@
     return DrawGlInfo::kStatusDrew;
 }
 
+/**
+ * Important note: this method is intended to draw batches of 9-patch objects and
+ * will not set the scissor enable or dirty the current layer, if any.
+ * The caller is responsible for properly dirtying the current layer.
+ */
+status_t OpenGLRenderer::drawPatches(SkBitmap* bitmap, AssetAtlas::Entry* entry,
+        TextureVertex* vertices, uint32_t indexCount, SkPaint* paint) {
+    mCaches.activeTexture(0);
+    Texture* texture = entry ? entry->texture : mCaches.textureCache.get(bitmap);
+    if (!texture) return DrawGlInfo::kStatusDone;
+    const AutoTexture autoCleanup(texture);
+
+    texture->setWrap(GL_CLAMP_TO_EDGE, true);
+    texture->setFilter(GL_LINEAR, true);
+
+    int alpha;
+    SkXfermode::Mode mode;
+    getAlphaAndMode(paint, &alpha, &mode);
+
+    drawIndexedTextureMesh(0.0f, 0.0f, 1.0f, 1.0f, texture->id, alpha / 255.0f,
+            mode, texture->blend, &vertices[0].position[0], &vertices[0].texture[0],
+            GL_TRIANGLES, indexCount, false, true, 0, true, false);
+
+    return DrawGlInfo::kStatusDrew;
+}
+
 status_t OpenGLRenderer::drawVertexBuffer(const VertexBuffer& vertexBuffer, SkPaint* paint,
         bool useOffset) {
     if (!vertexBuffer.getVertexCount()) {
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 0760f9c..aa0f9fc 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -297,10 +297,12 @@
     virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
     virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
             float* vertices, int* colors, SkPaint* paint);
+    status_t drawPatches(SkBitmap* bitmap, AssetAtlas::Entry* entry,
+            TextureVertex* vertices, uint32_t indexCount, SkPaint* paint);
     virtual status_t drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
             float left, float top, float right, float bottom, SkPaint* paint);
     status_t drawPatch(SkBitmap* bitmap, const Patch* mesh, AssetAtlas::Entry* entry,
-            float left, float top, float right, float bottom, int alpha, SkXfermode::Mode mode);
+            float left, float top, float right, float bottom, SkPaint* paint);
     virtual status_t drawColor(int color, SkXfermode::Mode mode);
     virtual status_t drawRect(float left, float top, float right, float bottom, SkPaint* paint);
     virtual status_t drawRoundRect(float left, float top, float right, float bottom,
@@ -358,6 +360,9 @@
         return mSnapshot->clipRegion->isEmpty();
     }
 
+    int getViewportWidth() { return getSnapshot()->viewport.getWidth(); }
+    int getViewportHeight() { return getSnapshot()->viewport.getHeight(); }
+
     /**
      * Scales the alpha on the current snapshot. This alpha value will be modulated
      * with other alpha values when drawing primitives.
@@ -1115,6 +1120,8 @@
     friend class DisplayListRenderer;
     friend class Layer;
     friend class TextSetupFunctor;
+    friend class DrawBitmapOp;
+    friend class DrawPatchOp;
 
 }; // class OpenGLRenderer
 
diff --git a/libs/hwui/Patch.cpp b/libs/hwui/Patch.cpp
index 6b0734a..9e3e701 100644
--- a/libs/hwui/Patch.cpp
+++ b/libs/hwui/Patch.cpp
@@ -32,7 +32,7 @@
 // Constructors/destructor
 ///////////////////////////////////////////////////////////////////////////////
 
-Patch::Patch(): verticesCount(0), indexCount(0), hasEmptyQuads(false) {
+Patch::Patch(): vertices(NULL), verticesCount(0), indexCount(0), hasEmptyQuads(false) {
 }
 
 Patch::~Patch() {
@@ -47,14 +47,14 @@
 }
 
 TextureVertex* Patch::createMesh(const float bitmapWidth, const float bitmapHeight,
-        float left, float top, float right, float bottom, const Res_png_9patch* patch) {
+        float width, float height, const Res_png_9patch* patch) {
     UvMapper mapper;
-    return createMesh(bitmapWidth, bitmapHeight, left, top, right, bottom, mapper, patch);
+    return createMesh(bitmapWidth, bitmapHeight, width, height, mapper, patch);
 }
 
 TextureVertex* Patch::createMesh(const float bitmapWidth, const float bitmapHeight,
-        float left, float top, float right, float bottom,
-        const UvMapper& mapper, const Res_png_9patch* patch) {
+        float width, float height, const UvMapper& mapper, const Res_png_9patch* patch) {
+    if (vertices) return vertices;
 
     const uint32_t* colors = &patch->colors[0];
     const int8_t numColors = patch->numColors;
@@ -79,7 +79,7 @@
     uint32_t maxVertices = ((xCount + 1) * (yCount + 1) - emptyQuads) * 4;
     if (maxVertices == 0) return NULL;
 
-    TextureVertex* vertices = new TextureVertex[maxVertices];
+    vertices = new TextureVertex[maxVertices];
     TextureVertex* vertex = vertices;
 
     const int32_t* xDivs = patch->xDivs;
@@ -101,9 +101,9 @@
         }
         const float xStretchTex = stretchSize;
         const float fixed = bitmapWidth - stretchSize;
-        const float xStretch = fmaxf(right - left - fixed, 0.0f);
+        const float xStretch = fmaxf(width - fixed, 0.0f);
         stretchX = xStretch / xStretchTex;
-        rescaleX = fixed == 0.0f ? 0.0f : fminf(fmaxf(right - left, 0.0f) / fixed, 1.0f);
+        rescaleX = fixed == 0.0f ? 0.0f : fminf(fmaxf(width, 0.0f) / fixed, 1.0f);
     }
 
     if (yStretchCount > 0) {
@@ -113,9 +113,9 @@
         }
         const float yStretchTex = stretchSize;
         const float fixed = bitmapHeight - stretchSize;
-        const float yStretch = fmaxf(bottom - top - fixed, 0.0f);
+        const float yStretch = fmaxf(height - fixed, 0.0f);
         stretchY = yStretch / yStretchTex;
-        rescaleY = fixed == 0.0f ? 0.0f : fminf(fmaxf(bottom - top, 0.0f) / fixed, 1.0f);
+        rescaleY = fixed == 0.0f ? 0.0f : fminf(fmaxf(height, 0.0f) / fixed, 1.0f);
     }
 
     uint32_t quadCount = 0;
@@ -144,7 +144,7 @@
 
         if (stepY > 0.0f) {
             generateRow(xDivs, xCount, vertex, y1, y2, v1, v2, stretchX, rescaleX,
-                    right - left, bitmapWidth, quadCount);
+                    width, bitmapWidth, quadCount);
         }
 
         y1 = y2;
@@ -154,9 +154,9 @@
     }
 
     if (previousStepY != bitmapHeight) {
-        y2 = bottom - top;
+        y2 = height;
         generateRow(xDivs, xCount, vertex, y1, y2, v1, 1.0f, stretchX, rescaleX,
-                right - left, bitmapWidth, quadCount);
+                width, bitmapWidth, quadCount);
     }
 
     return vertices;
diff --git a/libs/hwui/Patch.h b/libs/hwui/Patch.h
index 448cf60..246ba66 100644
--- a/libs/hwui/Patch.h
+++ b/libs/hwui/Patch.h
@@ -45,6 +45,7 @@
      */
     uint32_t getSize() const;
 
+    TextureVertex* vertices;
     uint32_t verticesCount;
     uint32_t indexCount;
     bool hasEmptyQuads;
@@ -54,11 +55,9 @@
     GLintptr textureOffset;
 
     TextureVertex* createMesh(const float bitmapWidth, const float bitmapHeight,
-            float left, float top, float right, float bottom,
-            const Res_png_9patch* patch);
+            float width, float height, const Res_png_9patch* patch);
     TextureVertex* createMesh(const float bitmapWidth, const float bitmapHeight,
-            float left, float top, float right, float bottom,
-            const UvMapper& mapper, const Res_png_9patch* patch);
+            float width, float height, const UvMapper& mapper, const Res_png_9patch* patch);
 
 private:
     void generateRow(const int32_t* xDivs, uint32_t xCount, TextureVertex*& vertex,
diff --git a/libs/hwui/PatchCache.cpp b/libs/hwui/PatchCache.cpp
index c23e991..dc69d7f 100644
--- a/libs/hwui/PatchCache.cpp
+++ b/libs/hwui/PatchCache.cpp
@@ -118,10 +118,10 @@
 
         if (entry) {
             vertices = newMesh->createMesh(bitmapWidth, bitmapHeight,
-                    0.0f, 0.0f, pixelWidth, pixelHeight, entry->uvMapper, patch);
+                    pixelWidth, pixelHeight, entry->uvMapper, patch);
         } else {
             vertices = newMesh->createMesh(bitmapWidth, bitmapHeight,
-                    0.0f, 0.0f, pixelWidth, pixelHeight, patch);
+                    pixelWidth, pixelHeight, patch);
         }
 
         if (vertices) {
@@ -141,8 +141,6 @@
             mSize += size;
 
             glBufferSubData(GL_ARRAY_BUFFER, newMesh->offset, size, vertices);
-
-            delete[] vertices;
         }
 
         mCache.put(description, newMesh);
diff --git a/libs/hwui/PixelBuffer.cpp b/libs/hwui/PixelBuffer.cpp
index 29f8756..36e89c6 100644
--- a/libs/hwui/PixelBuffer.cpp
+++ b/libs/hwui/PixelBuffer.cpp
@@ -19,6 +19,7 @@
 #include <utils/Log.h>
 
 #include "Caches.h"
+#include "Debug.h"
 #include "Extensions.h"
 #include "PixelBuffer.h"
 #include "Properties.h"
@@ -113,6 +114,14 @@
     if (mAccessMode == kAccessMode_None) {
         mCaches.bindPixelBuffer(mBuffer);
         mMappedPointer = (uint8_t*) glMapBufferRange(GL_PIXEL_UNPACK_BUFFER, 0, getSize(), mode);
+#if DEBUG_OPENGL
+        if (!mMappedPointer) {
+            GLenum status = GL_NO_ERROR;
+            while ((status = glGetError()) != GL_NO_ERROR) {
+                ALOGE("Could not map GPU pixel buffer: 0x%x", status);
+            }
+        }
+#endif
         mAccessMode = mode;
     }
 
@@ -123,7 +132,10 @@
     if (mAccessMode != kAccessMode_None) {
         if (mMappedPointer) {
             mCaches.bindPixelBuffer(mBuffer);
-            glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
+            GLboolean status = glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
+            if (status == GL_FALSE) {
+                ALOGE("Corrupted GPU pixel buffer");
+            }
         }
         mAccessMode = kAccessMode_None;
         mMappedPointer = NULL;
diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h
index dbbb956..86b0aa2 100644
--- a/libs/hwui/Properties.h
+++ b/libs/hwui/Properties.h
@@ -76,6 +76,12 @@
 #define PROPERTY_DEBUG_OVERDRAW "debug.hwui.overdraw"
 
 /**
+ * Used to enable/disable PerfHUD ES profiling. The accepted values
+ * are "true" and "false". The default value is "false".
+ */
+#define PROPERTY_DEBUG_NV_PROFILING "debug.hwui.nv_profiling"
+
+/**
  * Used to enable/disable non-rectangular clipping debugging.
  *
  * The accepted values are:
diff --git a/libs/hwui/font/CacheTexture.h b/libs/hwui/font/CacheTexture.h
index 8c3ea0b..208b1ff 100644
--- a/libs/hwui/font/CacheTexture.h
+++ b/libs/hwui/font/CacheTexture.h
@@ -151,9 +151,9 @@
             float x3, float y3, float u3, float v3,
             float x4, float y4, float u4, float v4) {
         TextureVertex* mesh = mMesh + mCurrentQuad * 4;
-        TextureVertex::set(mesh++, x1, y1, u1, v1);
         TextureVertex::set(mesh++, x2, y2, u2, v2);
         TextureVertex::set(mesh++, x3, y3, u3, v3);
+        TextureVertex::set(mesh++, x1, y1, u1, v1);
         TextureVertex::set(mesh++, x4, y4, u4, v4);
         mCurrentQuad++;
     }
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
index cd53c17..b93557d 100644
--- a/opengl/java/android/opengl/EGL14.java
+++ b/opengl/java/android/opengl/EGL14.java
@@ -1,5 +1,4 @@
 /*
-**
 ** Copyright 2012, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/opengl/java/android/opengl/EGLConfig.java b/opengl/java/android/opengl/EGLConfig.java
index d457c9f..a7a6bbb 100644
--- a/opengl/java/android/opengl/EGLConfig.java
+++ b/opengl/java/android/opengl/EGLConfig.java
@@ -29,7 +29,7 @@
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (!(o instanceof EGLConfig)) return false;
 
         EGLConfig that = (EGLConfig) o;
         return getHandle() == that.getHandle();
diff --git a/opengl/java/android/opengl/EGLContext.java b/opengl/java/android/opengl/EGLContext.java
index 41b8ef1..c93bd6e 100644
--- a/opengl/java/android/opengl/EGLContext.java
+++ b/opengl/java/android/opengl/EGLContext.java
@@ -29,7 +29,7 @@
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (!(o instanceof EGLContext)) return false;
 
         EGLContext that = (EGLContext) o;
         return getHandle() == that.getHandle();
diff --git a/opengl/java/android/opengl/EGLDisplay.java b/opengl/java/android/opengl/EGLDisplay.java
index 17d1a64..5b8043a 100644
--- a/opengl/java/android/opengl/EGLDisplay.java
+++ b/opengl/java/android/opengl/EGLDisplay.java
@@ -29,7 +29,7 @@
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (!(o instanceof EGLDisplay)) return false;
 
         EGLDisplay that = (EGLDisplay) o;
         return getHandle() == that.getHandle();
diff --git a/opengl/java/android/opengl/EGLExt.java b/opengl/java/android/opengl/EGLExt.java
index 2e0363d1..b74b5fb 100644
--- a/opengl/java/android/opengl/EGLExt.java
+++ b/opengl/java/android/opengl/EGLExt.java
@@ -1,5 +1,4 @@
 /*
-**
 ** Copyright 2013, The Android Open Source Project
 **
 ** Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/opengl/java/android/opengl/EGLSurface.java b/opengl/java/android/opengl/EGLSurface.java
index 65bec4f..c379dc9 100644
--- a/opengl/java/android/opengl/EGLSurface.java
+++ b/opengl/java/android/opengl/EGLSurface.java
@@ -29,7 +29,7 @@
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (!(o instanceof EGLSurface)) return false;
 
         EGLSurface that = (EGLSurface) o;
         return getHandle() == that.getHandle();
diff --git a/opengl/java/android/opengl/Matrix.java b/opengl/java/android/opengl/Matrix.java
index 72128ac..ce3f57e 100644
--- a/opengl/java/android/opengl/Matrix.java
+++ b/opengl/java/android/opengl/Matrix.java
@@ -19,24 +19,21 @@
 /**
  * Matrix math utilities. These methods operate on OpenGL ES format
  * matrices and vectors stored in float arrays.
- *
+ * <p>
  * Matrices are 4 x 4 column-vector matrices stored in column-major
  * order:
  * <pre>
  *  m[offset +  0] m[offset +  4] m[offset +  8] m[offset + 12]
  *  m[offset +  1] m[offset +  5] m[offset +  9] m[offset + 13]
  *  m[offset +  2] m[offset +  6] m[offset + 10] m[offset + 14]
- *  m[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]
- * </pre>
+ *  m[offset +  3] m[offset +  7] m[offset + 11] m[offset + 15]</pre>
  *
- * Vectors are 4 row x 1 column column-vectors stored in order:
+ * Vectors are 4 x 1 column vectors stored in order:
  * <pre>
  * v[offset + 0]
  * v[offset + 1]
  * v[offset + 2]
- * v[offset + 3]
- * </pre>
- *
+ * v[offset + 3]</pre>
  */
 public class Matrix {
 
@@ -44,12 +41,18 @@
     private final static float[] sTemp = new float[32];
 
     /**
-     * Multiply two 4x4 matrices together and store the result in a third 4x4
+     * @deprecated All methods are static, do not instantiate this class.
+     */
+    @Deprecated
+    public Matrix() {}
+
+    /**
+     * Multiplies two 4x4 matrices together and stores the result in a third 4x4
      * matrix. In matrix notation: result = lhs x rhs. Due to the way
      * matrix multiplication works, the result matrix will have the same
      * effect as first multiplying by the rhs matrix, then multiplying by
      * the lhs matrix. This is the opposite of what you might expect.
-     *
+     * <p>
      * The same float array may be passed for result, lhs, and/or rhs. However,
      * the result element values are undefined if the result elements overlap
      * either the lhs or rhs elements.
@@ -70,9 +73,9 @@
             float[] lhs, int lhsOffset, float[] rhs, int rhsOffset);
 
     /**
-     * Multiply a 4 element vector by a 4x4 matrix and store the result in a 4
-     * element column vector. In matrix notation: result = lhs x rhs
-     *
+     * Multiplies a 4 element vector by a 4x4 matrix and stores the result in a
+     * 4-element column vector. In matrix notation: result = lhs x rhs
+     * <p>
      * The same float array may be passed for resultVec, lhsMat, and/or rhsVec.
      * However, the resultVec element values are undefined if the resultVec
      * elements overlap either the lhsMat or rhsVec elements.
@@ -97,12 +100,14 @@
 
     /**
      * Transposes a 4 x 4 matrix.
+     * <p>
+     * mTrans and m must not overlap.
      *
-     * @param mTrans the array that holds the output inverted matrix
-     * @param mTransOffset an offset into mInv where the inverted matrix is
+     * @param mTrans the array that holds the output transposed matrix
+     * @param mTransOffset an offset into mTrans where the transposed matrix is
      *        stored.
      * @param m the input array
-     * @param mOffset an offset into m where the matrix is stored.
+     * @param mOffset an offset into m where the input matrix is stored.
      */
     public static void transposeM(float[] mTrans, int mTransOffset, float[] m,
             int mOffset) {
@@ -117,12 +122,14 @@
 
     /**
      * Inverts a 4 x 4 matrix.
+     * <p>
+     * mInv and m must not overlap.
      *
      * @param mInv the array that holds the output inverted matrix
      * @param mInvOffset an offset into mInv where the inverted matrix is
      *        stored.
      * @param m the input array
-     * @param mOffset an offset into m where the matrix is stored.
+     * @param mOffset an offset into m where the input matrix is stored.
      * @return true if the matrix could be inverted, false if it could not.
      */
     public static boolean invertM(float[] mInv, int mInvOffset, float[] m,
@@ -301,10 +308,11 @@
 
 
     /**
-     * Define a projection matrix in terms of six clip planes
-     * @param m the float array that holds the perspective matrix
+     * Defines a projection matrix in terms of six clip planes.
+     *
+     * @param m the float array that holds the output perspective matrix
      * @param offset the offset into float array m where the perspective
-     * matrix data is written
+     *        matrix data is written
      * @param left
      * @param right
      * @param bottom
@@ -358,11 +366,12 @@
     }
 
     /**
-     * Define a projection matrix in terms of a field of view angle, an
-     * aspect ratio, and z clip planes
+     * Defines a projection matrix in terms of a field of view angle, an
+     * aspect ratio, and z clip planes.
+     *
      * @param m the float array that holds the perspective matrix
      * @param offset the offset into float array m where the perspective
-     * matrix data is written
+     *        matrix data is written
      * @param fovy field of view in y direction, in degrees
      * @param aspect width to height aspect ratio of the viewport
      * @param zNear
@@ -395,7 +404,7 @@
     }
 
     /**
-     * Computes the length of a vector
+     * Computes the length of a vector.
      *
      * @param x x coordinate of a vector
      * @param y y coordinate of a vector
@@ -408,6 +417,7 @@
 
     /**
      * Sets matrix m to the identity matrix.
+     *
      * @param sm returns the result
      * @param smOffset index into sm where the result matrix starts
      */
@@ -421,7 +431,10 @@
     }
 
     /**
-     * Scales matrix  m by x, y, and z, putting the result in sm
+     * Scales matrix m by x, y, and z, putting the result in sm.
+     * <p>
+     * m and sm must not overlap.
+     *
      * @param sm returns the result
      * @param smOffset index into sm where the result matrix starts
      * @param m source matrix
@@ -444,7 +457,8 @@
     }
 
     /**
-     * Scales matrix m in place by sx, sy, and sz
+     * Scales matrix m in place by sx, sy, and sz.
+     *
      * @param m matrix to scale
      * @param mOffset index into m where the matrix starts
      * @param x scale factor x
@@ -462,7 +476,10 @@
     }
 
     /**
-     * Translates matrix m by x, y, and z, putting the result in tm
+     * Translates matrix m by x, y, and z, putting the result in tm.
+     * <p>
+     * m and tm must not overlap.
+     *
      * @param tm returns the result
      * @param tmOffset index into sm where the result matrix starts
      * @param m source matrix
@@ -487,6 +504,7 @@
 
     /**
      * Translates matrix m by x, y, and z in place.
+     *
      * @param m matrix
      * @param mOffset index into m where the matrix starts
      * @param x translation factor x
@@ -503,15 +521,18 @@
     }
 
     /**
-     * Rotates matrix m by angle a (in degrees) around the axis (x, y, z)
+     * Rotates matrix m by angle a (in degrees) around the axis (x, y, z).
+     * <p>
+     * m and rm must not overlap.
+     *
      * @param rm returns the result
      * @param rmOffset index into rm where the result matrix starts
      * @param m source matrix
      * @param mOffset index into m where the source matrix starts
      * @param a angle to rotate in degrees
-     * @param x scale factor x
-     * @param y scale factor y
-     * @param z scale factor z
+     * @param x X axis component
+     * @param y Y axis component
+     * @param z Z axis component
      */
     public static void rotateM(float[] rm, int rmOffset,
             float[] m, int mOffset,
@@ -524,13 +545,14 @@
 
     /**
      * Rotates matrix m in place by angle a (in degrees)
-     * around the axis (x, y, z)
+     * around the axis (x, y, z).
+     *
      * @param m source matrix
      * @param mOffset index into m where the matrix starts
      * @param a angle to rotate in degrees
-     * @param x scale factor x
-     * @param y scale factor y
-     * @param z scale factor z
+     * @param x X axis component
+     * @param y Y axis component
+     * @param z Z axis component
      */
     public static void rotateM(float[] m, int mOffset,
             float a, float x, float y, float z) {
@@ -542,13 +564,18 @@
     }
 
     /**
-     * Rotates matrix m by angle a (in degrees) around the axis (x, y, z)
+     * Creates a matrix for rotation by angle a (in degrees)
+     * around the axis (x, y, z).
+     * <p>
+     * An optimized path will be used for rotation about a major axis
+     * (e.g. x=1.0f y=0.0f z=0.0f).
+     *
      * @param rm returns the result
      * @param rmOffset index into rm where the result matrix starts
      * @param a angle to rotate in degrees
-     * @param x scale factor x
-     * @param y scale factor y
-     * @param z scale factor z
+     * @param x X axis component
+     * @param y Y axis component
+     * @param z Z axis component
      */
     public static void setRotateM(float[] rm, int rmOffset,
             float a, float x, float y, float z) {
@@ -608,7 +635,8 @@
     }
 
     /**
-     * Converts Euler angles to a rotation matrix
+     * Converts Euler angles to a rotation matrix.
+     *
      * @param rm returns the result
      * @param rmOffset index into rm where the result matrix starts
      * @param x angle of rotation, in degrees
@@ -651,7 +679,7 @@
     }
 
     /**
-     * Define a viewing transformation in terms of an eye point, a center of
+     * Defines a viewing transformation in terms of an eye point, a center of
      * view, and an up vector.
      *
      * @param rm returns the result
diff --git a/packages/Keyguard/proguard.flags b/packages/Keyguard/proguard.flags
index 00ca0fa..fb74b64 100644
--- a/packages/Keyguard/proguard.flags
+++ b/packages/Keyguard/proguard.flags
@@ -1,2 +1,27 @@
--keep public class com.android.keyguard.KeyguardService
+-keep public class * {
+  public void setBackgroundAlpha(float);
+  public float getBackgroundAlpha();
+  public void setContentAlpha(float);
+  public float getContentAlpha();
+  public void setAlpha(float);
+  public float getAlpha();
+  public void setAlpha(int);
+  public int getAlpha();
+  public void setRotationX(float);
+  public float getRotationX();
+  public void setRotationY(float);
+  public float getRotationY();
+  public void setPivotX(float);
+  public float getPivotX();
+  public void setPivotY(float);
+  public float getPivotY();
+  public void setScaleX(float);
+  public float getScaleX();
+  public void setScaleY(float);
+  public float getScaleY();
+  public void setTranslationX(float);
+  public float getTranslationX();
+  public void setTranslationY(float);
+  public float getTranslationY();
+}
 
diff --git a/packages/PrintSpooler/Android.mk b/packages/PrintSpooler/Android.mk
new file mode 100644
index 0000000..a68fcdf
--- /dev/null
+++ b/packages/PrintSpooler/Android.mk
@@ -0,0 +1,32 @@
+# Copyright (C) 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.
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := PrintSpooler
+
+LOCAL_JAVA_LIBRARIES := framework
+
+LOCAL_CERTIFICATE := platform
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+include $(BUILD_PACKAGE)
+
diff --git a/packages/PrintSpooler/AndroidManifest.xml b/packages/PrintSpooler/AndroidManifest.xml
new file mode 100644
index 0000000..fbb0060
--- /dev/null
+++ b/packages/PrintSpooler/AndroidManifest.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (c) 2013 Google 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.printspooler"
+        android:sharedUserId="android.uid.printspooler"
+        android:versionName="1"
+        android:versionCode="1"
+        coreApp="true">
+
+    <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17"/>
+
+    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
+    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
+
+    <permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
+        android:label="@string/permlab_bindPrintSpoolerService"
+        android:description="@string/permdesc_bindPrintSpoolerService"
+        android:protectionLevel="signature" />
+
+    <application
+            android:allowClearUserData="false"
+            android:label="@string/app_label"
+            android:allowBackup= "false">
+
+        <service
+            android:name=".PrintSpoolerService"
+            android:exported="true"
+            android:permission="android.permission.BIND_PRINT_SPOOLER_SERVICE">
+        </service>
+
+        <activity
+            android:name=".PrintJobConfigActivity"
+            android:exported="true">
+        </activity>
+
+    </application>
+
+</manifest>
diff --git a/packages/PrintSpooler/MODULE_LICENSE_APACHE2 b/packages/PrintSpooler/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/PrintSpooler/MODULE_LICENSE_APACHE2
diff --git a/packages/PrintSpooler/NOTICE b/packages/PrintSpooler/NOTICE
new file mode 100644
index 0000000..c5b1efa
--- /dev/null
+++ b/packages/PrintSpooler/NOTICE
@@ -0,0 +1,190 @@
+
+   Copyright (c) 2005-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.
+
+   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.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/packages/PrintSpooler/res/layout/print_job_config_activity.xml b/packages/PrintSpooler/res/layout/print_job_config_activity.xml
new file mode 100644
index 0000000..51e425d
--- /dev/null
+++ b/packages/PrintSpooler/res/layout/print_job_config_activity.xml
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content">
+
+    <GridLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:orientation="vertical"
+        android:columnCount="2">
+
+        <EditText
+            android:id="@+id/copies_edittext"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="0"
+            android:layout_column="1"
+            android:minWidth="150dip"
+            android:inputType="number"
+            android:selectAllOnFocus="true">
+        </EditText>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="0"
+            android:layout_column="0"
+            android:text="@string/label_copies"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:labelFor="@id/copies_edittext">
+        </TextView>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="1"
+            android:layout_column="0"
+            android:text="@string/label_destination"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/destination_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="1"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="2"
+            android:layout_column="0"
+            android:text="@string/label_media_size"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/media_size_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="2"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="3"
+            android:layout_column="0"
+            android:text="@string/label_resolution"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/resolution_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="3"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="4"
+            android:layout_column="0"
+            android:text="@string/label_input_tray"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/input_tray_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="4"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="5"
+            android:layout_column="0"
+            android:text="@string/label_output_tray"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/output_tray_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="5"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="6"
+            android:layout_column="0"
+            android:text="@string/label_duplex_mode"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/duplex_mode_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="6"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="7"
+            android:layout_column="0"
+            android:text="@string/label_color_mode"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/color_mode_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="7"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="8"
+            android:layout_column="0"
+            android:text="@string/label_fitting_mode"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/fitting_mode_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="8"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="9"
+            android:layout_column="0"
+            android:text="@string/label_orientation"
+            android:textAppearance="?android:attr/textAppearanceMedium">
+        </TextView>
+
+        <Spinner
+            android:id="@+id/orientation_spinner"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="12dip"
+            android:layout_marginRight="12dip"
+            android:layout_row="9"
+            android:layout_column="1"
+            android:minWidth="150dip">
+        </Spinner>
+
+    </GridLayout>
+
+</ScrollView>
diff --git a/packages/PrintSpooler/res/menu/print_job_config_activity.xml b/packages/PrintSpooler/res/menu/print_job_config_activity.xml
new file mode 100644
index 0000000..149c274
--- /dev/null
+++ b/packages/PrintSpooler/res/menu/print_job_config_activity.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/print_button"
+          android:title="@string/print_button"
+          android:showAsAction="ifRoom">
+    </item>
+</menu>
diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml
new file mode 100644
index 0000000..8b4b40a
--- /dev/null
+++ b/packages/PrintSpooler/res/values/strings.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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>
+
+    <!-- Title of the PrintSpooler application. [CHAR LIMIT=16] -->
+    <string name="app_label">Print Spooler</string>
+
+    <!-- Title of the print dialog. [CHAR LIMIT=10] -->
+    <string name="print_job_config_dialog_title">Print</string>
+
+    <!-- Label of the print dialog's print button. [CHAR LIMIT=16] -->
+    <string name="print_button">Print</string>
+
+    <!-- Label of the print dialog's cancel button. [CHAR LIMIT=16] -->
+    <string name="cancel_button">Cancel</string>
+
+    <!-- Label of the destination spinner. [CHAR LIMIT=16] -->
+    <string name="label_destination">Destination</string>
+
+    <!-- Label of the copies count edit text. [CHAR LIMIT=16] -->
+    <string name="label_copies">Copies</string>
+
+    <!-- Label of the media size spinner. [CHAR LIMIT=16] -->
+    <string name="label_media_size">Media size</string>
+
+    <!-- Label of the resolution spinner. [CHAR LIMIT=16] -->
+    <string name="label_resolution">Resolution</string>
+
+    <!-- Label of the input tray spinner. [CHAR LIMIT=16] -->
+    <string name="label_input_tray">Input tray</string>
+
+    <!-- Label of the output tray spinner. [CHAR LIMIT=16] -->
+    <string name="label_output_tray">Output tray</string>
+
+    <!-- Label of the duplex mode spinner. [CHAR LIMIT=16] -->
+    <string name="label_duplex_mode">Duplex mode</string>
+
+    <!-- Label of the color mode spinner. [CHAR LIMIT=16] -->
+    <string name="label_color_mode">Color mode</string>
+
+    <!-- Label of the fitting mode spinner. [CHAR LIMIT=16] -->
+    <string name="label_fitting_mode">Fitting mode</string>
+
+    <!-- Label of the orientation spinner. [CHAR LIMIT=16] -->
+    <string name="label_orientation">Orientation</string>
+
+    <!-- Duplex mode labels. -->
+    <string-array name="duplex_mode_labels">
+        <!-- Duplex mode label: No duplexing. [CHAR LIMIT=20] -->
+        <item>None</item>
+        <!-- Duplex mode label: Turn a page along its long edge, e.g. like a book. [CHAR LIMIT=20] -->
+        <item>Long edge</item>
+        <!-- Duplex mode label: Turn a page along its short edge, e.g. like a notepad. [CHAR LIMIT=20] -->
+        <item>Short edge</item>
+    </string-array>
+
+    <!-- Color mode labels. -->
+    <string-array name="color_mode_labels">
+        <!-- Color modelabel: Monochrome color scheme, e.g. one color is used. [CHAR LIMIT=20] -->
+        <item>Monochrome</item>
+        <!-- Color mode label: Color color scheme, e.g. many colors are used. [CHAR LIMIT=20] -->
+        <item>Color</item>
+    </string-array>
+
+    <!-- Fitting mode labels. -->
+    <string-array name="fitting_mode_labels">
+        <!-- Fitting mode label: No fitting. [CHAR LIMIT=30] -->
+        <item>None</item>
+        <!-- Fitting mode label: Fit the content to the page. [CHAR LIMIT=30] -->
+        <item>Fit to page</item>
+    </string-array>
+
+    <!-- Orientation labels. -->
+    <string-array name="orientation_labels">
+        <!-- Orientation label: Portrait page orientation. [CHAR LIMIT=30] -->
+        <item>Portrait</item>
+        <!-- Orientation label: Landscape page orientation [CHAR LIMIT=30] -->
+        <item>Landscape</item>
+    </string-array>
+
+    <!-- Title of an application permission, listed so the user can choose
+         whether they want to allow the application to do this. -->
+    <string name="permlab_bindPrintSpoolerService">bind to a print spooler service</string>
+    <!-- Description of an application permission, listed so the user can
+         choose whether they want to allow the application to do this. -->
+    <string name="permdesc_bindPrintSpoolerService">Allows the holder to bind to the top-level
+        interface of a print spooler service. Should never be needed for normal apps.</string>
+
+</resources>
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
new file mode 100644
index 0000000..ae2fe5c
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java
@@ -0,0 +1,794 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.printspooler;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Binder;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.UserHandle;
+import android.os.IBinder.DeathRecipient;
+import android.print.IPrintAdapter;
+import android.print.IPrintManager;
+import android.print.IPrinterDiscoveryObserver;
+import android.print.PageRange;
+import android.print.PrintAttributes;
+import android.print.PrintAttributes.MediaSize;
+import android.print.PrintAttributes.Resolution;
+import android.print.PrintAttributes.Tray;
+import android.print.PrintJobInfo;
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+import android.text.Editable;
+import android.text.InputFilter;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.ArrayAdapter;
+import android.widget.EditText;
+import android.widget.Spinner;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Activity for configuring a print job.
+ */
+public class PrintJobConfigActivity extends Activity {
+
+    private static final boolean DEBUG = false;
+
+    private static final String LOG_TAG = PrintJobConfigActivity.class.getSimpleName();
+
+    public static final String EXTRA_PRINTABLE = "printable";
+    public static final String EXTRA_APP_ID = "appId";
+    public static final String EXTRA_ATTRIBUTES = "attributes";
+    public static final String EXTRA_PRINT_JOB_ID = "printJobId";
+
+    private static final int MIN_COPIES = 1;
+
+    private final List<QueuedAsyncTask<?>> mTaskQueue = new ArrayList<QueuedAsyncTask<?>>();
+
+    private IPrintManager mPrintManager;
+
+    private IPrinterDiscoveryObserver mPrinterDiscoveryObserver;
+
+    private int mAppId;
+    private int mPrintJobId;
+
+    private PrintAttributes mPrintAttributes;
+
+    private final PrintSpooler mPrintSpooler = PrintSpooler.getInstance(this);
+
+    private RemotePrintAdapter mRemotePrintAdapter;
+
+    // UI elements
+
+    private EditText mCopiesEditText;
+
+    private Spinner mDestinationSpinner;
+    public ArrayAdapter<SpinnerItem<PrinterInfo>> mDestinationSpinnerAdapter;
+
+    private Spinner mMediaSizeSpinner;
+    public ArrayAdapter<SpinnerItem<MediaSize>> mMediaSizeSpinnerAdapter;
+
+    private Spinner mResolutionSpinner;
+    public ArrayAdapter<SpinnerItem<Resolution>> mResolutionSpinnerAdapter;
+
+    private Spinner mInputTraySpinner;
+    public ArrayAdapter<SpinnerItem<Tray>> mInputTraySpinnerAdapter;
+
+    private Spinner mOutputTraySpinner;
+    public ArrayAdapter<SpinnerItem<Tray>> mOutputTraySpinnerAdapter;
+
+    private Spinner mDuplexModeSpinner;
+    public ArrayAdapter<SpinnerItem<Integer>> mDuplexModeSpinnerAdapter;
+
+    private Spinner mColorModeSpinner;
+    public ArrayAdapter<SpinnerItem<Integer>> mColorModeSpinnerAdapter;
+
+    private Spinner mFittingModeSpinner;
+    public ArrayAdapter<SpinnerItem<Integer>> mFittingModeSpinnerAdapter;
+
+    private Spinner mOrientationSpinner;
+    public ArrayAdapter<SpinnerItem<Integer>> mOrientationSpinnerAdapter;
+
+    private boolean mPrintStarted;
+
+    private boolean mPrintConfirmed;
+
+    private IBinder mPrinable;
+
+    // TODO: Implement store/restore state.
+
+    private final OnItemSelectedListener mOnItemSelectedListener =
+            new AdapterView.OnItemSelectedListener() {
+        @Override
+        public void onItemSelected(AdapterView<?> spinner, View view, int position, long id) {
+            if (spinner == mDestinationSpinner) {
+                updateUi();
+                notifyPrintableStartIfNeeded();
+            } else if (spinner == mMediaSizeSpinner) {
+                SpinnerItem<MediaSize> mediaItem = mMediaSizeSpinnerAdapter.getItem(position);
+                mPrintAttributes.setMediaSize(mediaItem.value);
+                updatePrintableContentIfNeeded();
+            } else if (spinner == mResolutionSpinner) {
+                SpinnerItem<Resolution> resolutionItem =
+                        mResolutionSpinnerAdapter.getItem(position);
+                mPrintAttributes.setResolution(resolutionItem.value);
+                updatePrintableContentIfNeeded();
+            } else if (spinner == mInputTraySpinner) {
+                SpinnerItem<Tray> inputTrayItem =
+                        mInputTraySpinnerAdapter.getItem(position);
+                mPrintAttributes.setInputTray(inputTrayItem.value);
+            } else if (spinner == mOutputTraySpinner) {
+                SpinnerItem<Tray> outputTrayItem =
+                        mOutputTraySpinnerAdapter.getItem(position);
+                mPrintAttributes.setOutputTray(outputTrayItem.value);
+            } else if (spinner == mDuplexModeSpinner) {
+                SpinnerItem<Integer> duplexModeItem =
+                        mDuplexModeSpinnerAdapter.getItem(position);
+                mPrintAttributes.setDuplexMode(duplexModeItem.value);
+            } else if (spinner == mColorModeSpinner) {
+                SpinnerItem<Integer> colorModeItem =
+                        mColorModeSpinnerAdapter.getItem(position);
+                mPrintAttributes.setColorMode(colorModeItem.value);
+            } else if (spinner == mFittingModeSpinner) {
+                SpinnerItem<Integer> fittingModeItem =
+                        mFittingModeSpinnerAdapter.getItem(position);
+                mPrintAttributes.setFittingMode(fittingModeItem.value);
+            } else if (spinner == mOrientationSpinner) {
+                SpinnerItem<Integer> orientationItem =
+                        mOrientationSpinnerAdapter.getItem(position);
+                mPrintAttributes.setOrientation(orientationItem.value);
+            }
+        }
+
+        @Override
+        public void onNothingSelected(AdapterView<?> parent) {
+            /* do nothing*/
+        }
+    };
+
+    private final TextWatcher mTextWatcher = new TextWatcher() {
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+            final int copies = Integer.parseInt(mCopiesEditText.getText().toString());
+            mPrintAttributes.setCopies(copies);
+        }
+
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+            /* do nothing */
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+            /* do nothing */
+        }
+    };
+
+    private final InputFilter mInputFilter = new InputFilter() {
+        @Override
+        public CharSequence filter(CharSequence source, int start, int end,
+                Spanned dest, int dstart, int dend) {
+            StringBuffer text = new StringBuffer(dest.toString());
+            text.replace(dstart, dend, source.subSequence(start, end).toString());
+            if (TextUtils.isEmpty(text)) {
+                return dest;
+            }
+            final int copies = Integer.parseInt(text.toString());
+            if (copies < MIN_COPIES) {
+                return dest;
+            }
+            return null;
+        }
+    };
+
+    private final DeathRecipient mDeathRecipient = new DeathRecipient() {
+        @Override
+        public void binderDied() {
+            finish();
+        }
+    };
+
+    @Override
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+        setContentView(R.layout.print_job_config_activity);
+
+        getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
+                | WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
+
+        mPrintManager = (IPrintManager) IPrintManager.Stub.asInterface(
+                ServiceManager.getService(PRINT_SERVICE));
+
+        Bundle extras = getIntent().getExtras();
+
+        mPrintJobId = extras.getInt(EXTRA_PRINT_JOB_ID, -1);
+        if (mPrintJobId < 0) {
+            throw new IllegalArgumentException("Invalid print job id: " + mPrintJobId);
+        }
+
+        mAppId = extras.getInt(EXTRA_APP_ID, -1);
+        if (mAppId < 0) {
+            throw new IllegalArgumentException("Invalid app id: " + mAppId);
+        }
+
+        mPrintAttributes = getIntent().getParcelableExtra(EXTRA_ATTRIBUTES);
+        if (mPrintAttributes == null) {
+            mPrintAttributes = new PrintAttributes.Builder().create();
+        }
+
+        mPrinable = extras.getBinder(EXTRA_PRINTABLE);
+        if (mPrinable == null) {
+            throw new IllegalArgumentException("Printable cannot be null");
+        }
+        mRemotePrintAdapter = new RemotePrintAdapter(IPrintAdapter.Stub.asInterface(mPrinable),
+                mPrintSpooler.generateFileForPrintJob(mPrintJobId));
+
+        try {
+            mPrinable.linkToDeath(mDeathRecipient, 0);
+        } catch (RemoteException re) {
+            finish();
+        }
+
+        mPrinterDiscoveryObserver = new PrintDiscoveryObserver(getMainLooper());
+
+        bindUi();
+    }
+
+    @Override
+    protected void onDestroy() {
+        mPrinable.unlinkToDeath(mDeathRecipient, 0);
+        super.onDestroy();
+    }
+
+    private void bindUi() {
+        // Copies
+        mCopiesEditText = (EditText) findViewById(R.id.copies_edittext);
+        mCopiesEditText.setText(String.valueOf(MIN_COPIES));
+        mCopiesEditText.addTextChangedListener(mTextWatcher);
+        mCopiesEditText.setFilters(new InputFilter[] {mInputFilter});
+
+        // Destination.
+        mDestinationSpinner = (Spinner) findViewById(R.id.destination_spinner);
+        mDestinationSpinnerAdapter = new ArrayAdapter<SpinnerItem<PrinterInfo>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mDestinationSpinner.setAdapter(mDestinationSpinnerAdapter);
+        mDestinationSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Media size.
+        mMediaSizeSpinner = (Spinner) findViewById(R.id.media_size_spinner);
+        mMediaSizeSpinnerAdapter = new ArrayAdapter<SpinnerItem<MediaSize>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mMediaSizeSpinner.setAdapter(mMediaSizeSpinnerAdapter);
+        mMediaSizeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Resolution.
+        mResolutionSpinner = (Spinner) findViewById(R.id.resolution_spinner);
+        mResolutionSpinnerAdapter = new ArrayAdapter<SpinnerItem<Resolution>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mResolutionSpinner.setAdapter(mResolutionSpinnerAdapter);
+        mResolutionSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Input tray.
+        mInputTraySpinner = (Spinner) findViewById(R.id.input_tray_spinner);
+        mInputTraySpinnerAdapter = new ArrayAdapter<SpinnerItem<Tray>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mInputTraySpinner.setAdapter(mInputTraySpinnerAdapter);
+
+        // Output tray.
+        mOutputTraySpinner = (Spinner) findViewById(R.id.output_tray_spinner);
+        mOutputTraySpinnerAdapter = new ArrayAdapter<SpinnerItem<Tray>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mOutputTraySpinner.setAdapter(mOutputTraySpinnerAdapter);
+        mOutputTraySpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Duplex mode.
+        mDuplexModeSpinner = (Spinner) findViewById(R.id.duplex_mode_spinner);
+        mDuplexModeSpinnerAdapter = new ArrayAdapter<SpinnerItem<Integer>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mDuplexModeSpinner.setAdapter(mDuplexModeSpinnerAdapter);
+        mDuplexModeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Color mode.
+        mColorModeSpinner = (Spinner) findViewById(R.id.color_mode_spinner);
+        mColorModeSpinnerAdapter = new ArrayAdapter<SpinnerItem<Integer>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mColorModeSpinner.setAdapter(mColorModeSpinnerAdapter);
+        mColorModeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Color mode.
+        mFittingModeSpinner = (Spinner) findViewById(R.id.fitting_mode_spinner);
+        mFittingModeSpinnerAdapter = new ArrayAdapter<SpinnerItem<Integer>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mFittingModeSpinner.setAdapter(mFittingModeSpinnerAdapter);
+        mFittingModeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Orientation
+        mOrientationSpinner = (Spinner) findViewById(R.id.orientation_spinner);
+        mOrientationSpinnerAdapter = new ArrayAdapter<SpinnerItem<Integer>>(this,
+                android.R.layout.simple_spinner_dropdown_item);
+        mOrientationSpinner.setAdapter(mOrientationSpinnerAdapter);
+        mOrientationSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+    }
+
+    private void updateUi() {
+        final int selectedIndex = mDestinationSpinner.getSelectedItemPosition();
+        PrinterInfo printer = mDestinationSpinnerAdapter.getItem(selectedIndex).value;
+        printer.getDefaults(mPrintAttributes);
+
+        // Copies.
+        mCopiesEditText.setText(String.valueOf(
+                Math.max(mPrintAttributes.getCopies(), MIN_COPIES)));
+
+        // Media size.
+        mMediaSizeSpinnerAdapter.clear();
+        List<MediaSize> mediaSizes = printer.getMediaSizes();
+        final int mediaSizeCount = mediaSizes.size();
+        for (int i = 0; i < mediaSizeCount; i++) {
+            MediaSize mediaSize = mediaSizes.get(i);
+            mMediaSizeSpinnerAdapter.add(new SpinnerItem<MediaSize>(
+                    mediaSize, mediaSize.getLabel(getPackageManager())));
+        }
+        final int selectedMediaSizeIndex = mediaSizes.indexOf(
+                mPrintAttributes.getMediaSize());
+        mMediaSizeSpinner.setOnItemSelectedListener(null);
+        mMediaSizeSpinner.setSelection(selectedMediaSizeIndex);
+        mMediaSizeSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Resolution.
+        mResolutionSpinnerAdapter.clear();
+        List<Resolution> resolutions = printer.getResolutions();
+        final int resolutionCount = resolutions.size();
+        for (int i = 0; i < resolutionCount; i++) {
+            Resolution resolution = resolutions.get(i);
+            mResolutionSpinnerAdapter.add(new SpinnerItem<Resolution>(
+                    resolution, resolution.getLabel(getPackageManager())));
+        }
+        final int selectedResolutionIndex = resolutions.indexOf(
+                mPrintAttributes.getResolution());
+        mResolutionSpinner.setOnItemSelectedListener(null);
+        mResolutionSpinner.setSelection(selectedResolutionIndex);
+        mResolutionSpinner.setOnItemSelectedListener(mOnItemSelectedListener);
+
+        // Input tray.
+        mInputTraySpinnerAdapter.clear();
+        List<Tray> inputTrays = printer.getInputTrays();
+        final int inputTrayCount = inputTrays.size();
+        for (int i = 0; i < inputTrayCount; i++) {
+            Tray inputTray = inputTrays.get(i);
+            mInputTraySpinnerAdapter.add(new SpinnerItem<Tray>(
+                    inputTray, inputTray.getLabel(getPackageManager())));
+        }
+        final int selectedInputTrayIndex = inputTrays.indexOf(
+                mPrintAttributes.getInputTray());
+        mInputTraySpinner.setSelection(selectedInputTrayIndex);
+
+        // Output tray.
+        mOutputTraySpinnerAdapter.clear();
+        List<Tray> outputTrays = printer.getOutputTrays();
+        final int outputTrayCount = outputTrays.size();
+        for (int i = 0; i < outputTrayCount; i++) {
+            Tray outputTray = outputTrays.get(i);
+            mOutputTraySpinnerAdapter.add(new SpinnerItem<Tray>(
+                    outputTray, outputTray.getLabel(getPackageManager())));
+        }
+        final int selectedOutputTrayIndex = outputTrays.indexOf(
+                mPrintAttributes.getOutputTray());
+        mOutputTraySpinner.setSelection(selectedOutputTrayIndex);
+
+        // Duplex mode.
+        final int duplexModes = printer.getDuplexModes();
+        mDuplexModeSpinnerAdapter.clear();
+        String[] duplexModeLabels = getResources().getStringArray(
+                R.array.duplex_mode_labels);
+        int remainingDuplexModes = duplexModes;
+        while (remainingDuplexModes != 0) {
+            final int duplexBitOffset = Integer.numberOfTrailingZeros(remainingDuplexModes);
+            final int duplexMode = 1 << duplexBitOffset;
+            remainingDuplexModes &= ~duplexMode;
+            mDuplexModeSpinnerAdapter.add(new SpinnerItem<Integer>(duplexMode,
+                    duplexModeLabels[duplexBitOffset]));
+        }
+        final int selectedDuplexModeIndex = Integer.numberOfTrailingZeros(
+                (duplexModes & mPrintAttributes.getDuplexMode()));
+        mDuplexModeSpinner.setSelection(selectedDuplexModeIndex);
+
+        // Color mode.
+        final int colorModes = printer.getColorModes();
+        mColorModeSpinnerAdapter.clear();
+        String[] colorModeLabels = getResources().getStringArray(
+                R.array.color_mode_labels);
+        int remainingColorModes = colorModes;
+        while (remainingColorModes != 0) {
+            final int colorBitOffset = Integer.numberOfTrailingZeros(remainingColorModes);
+            final int colorMode = 1 << colorBitOffset;
+            remainingColorModes &= ~colorMode;
+            mColorModeSpinnerAdapter.add(new SpinnerItem<Integer>(colorMode,
+                    colorModeLabels[colorBitOffset]));
+        }
+        final int selectedColorModeIndex = Integer.numberOfTrailingZeros(
+                (colorModes & mPrintAttributes.getColorMode()));
+        mColorModeSpinner.setSelection(selectedColorModeIndex);
+
+        // Fitting mode.
+        final int fittingModes = printer.getFittingModes();
+        mFittingModeSpinnerAdapter.clear();
+        String[] fittingModeLabels = getResources().getStringArray(
+                R.array.fitting_mode_labels);
+        int remainingFittingModes = fittingModes;
+        while (remainingFittingModes != 0) {
+            final int fittingBitOffset = Integer.numberOfTrailingZeros(remainingFittingModes);
+            final int fittingMode = 1 << fittingBitOffset;
+            remainingFittingModes &= ~fittingMode;
+            mFittingModeSpinnerAdapter.add(new SpinnerItem<Integer>(fittingMode,
+                    fittingModeLabels[fittingBitOffset]));
+        }
+        final int selectedFittingModeIndex = Integer.numberOfTrailingZeros(
+                (fittingModes & mPrintAttributes.getFittingMode()));
+        mFittingModeSpinner.setSelection(selectedFittingModeIndex);
+
+        // Orientation.
+        final int orientations = printer.getOrientations();
+        mOrientationSpinnerAdapter.clear();
+        String[] orientationLabels = getResources().getStringArray(
+                R.array.orientation_labels);
+        int remainingOrientations = orientations;
+        while (remainingOrientations != 0) {
+            final int orientationBitOffset = Integer.numberOfTrailingZeros(remainingOrientations);
+            final int orientation = 1 << orientationBitOffset;
+            remainingOrientations &= ~orientation;
+            mOrientationSpinnerAdapter.add(new SpinnerItem<Integer>(orientation,
+                    orientationLabels[orientationBitOffset]));
+        }
+        final int selectedOrientationIndex = Integer.numberOfTrailingZeros(
+                (orientations & mPrintAttributes.getOrientation()));
+        mOrientationSpinner.setSelection(selectedOrientationIndex);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        try {
+            mPrintManager.startDiscoverPrinters(mPrinterDiscoveryObserver);
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error starting printer discovery!", re);
+        }
+        notifyPrintableStartIfNeeded();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        try {
+            mPrintManager.stopDiscoverPrinters();
+        } catch (RemoteException re) {
+            Log.e(LOG_TAG, "Error starting printer discovery!", re);
+        }
+        notifyPrintableFinishIfNeeded();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.print_job_config_activity, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.print_button) {
+            mPrintConfirmed = true;
+            finish();
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    private void notifyPrintableStartIfNeeded() {
+        if (mDestinationSpinner.getSelectedItemPosition() < 0
+                || mPrintStarted) {
+            return;
+        }
+        mPrintStarted = true;
+        new QueuedAsyncTask<Void>(mTaskQueue) {
+            @Override
+            protected Void doInBackground(Void... params) {
+                try {
+                    mRemotePrintAdapter.start();
+                } catch (IOException ioe) {
+                    Log.e(LOG_TAG, "Error reading printed data!", ioe);
+                }
+                return null;
+            }
+
+            @Override
+            protected void onPostExecute(Void result) {
+                super.onPostExecute(result);
+                updatePrintableContentIfNeeded();
+            }
+        }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+    }
+
+    private void updatePrintableContentIfNeeded() {
+        if (!mPrintStarted) {
+            return;
+        }
+
+        mPrintSpooler.setPrintJobAttributes(mPrintJobId, mPrintAttributes);
+
+        // TODO: Implement page selector.
+        final List<PageRange> pages = new ArrayList<PageRange>();
+        pages.add(PageRange.ALL_PAGES);
+
+        new QueuedAsyncTask<File>(mTaskQueue) {
+            @Override
+            protected File doInBackground(Void... params) {
+                try {
+                    mRemotePrintAdapter.printAttributesChanged(mPrintAttributes);
+                    mRemotePrintAdapter.cancelPrint();
+                    mRemotePrintAdapter.print(pages);
+                    return mRemotePrintAdapter.getFile();
+                } catch (IOException ioe) {
+                    Log.e(LOG_TAG, "Error reading printed data!", ioe);
+                }
+                return null;
+            }
+
+            @Override
+            protected void onPostExecute(File file) {
+                super.onPostExecute(file);
+                updatePrintPreview(file);
+            }
+        }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+    }
+
+    private void notifyPrintableFinishIfNeeded() {
+        if (!mPrintStarted) {
+            return;
+        }
+        mPrintStarted = false;
+
+        // Cancel all pending async tasks if the activity was canceled.
+        if (!mPrintConfirmed) {
+            final int taskCount = mTaskQueue.size();
+            for (int i = taskCount - 1; i >= 0; i--) {
+                mTaskQueue.remove(i).cancel();
+            }
+        }
+
+        new AsyncTask<Void, Void, Void>() {
+            @Override
+            protected Void doInBackground(Void... params) {
+                // Notify the app that printing completed.
+                try {
+                    mRemotePrintAdapter.finish();
+                } catch (IOException ioe) {
+                    Log.e(LOG_TAG, "Error reading printed data!", ioe);
+                }
+
+                // If canceled, nothing to do.
+                if (!mPrintConfirmed) {
+                    mPrintSpooler.setPrintJobState(mPrintJobId,
+                            PrintJobInfo.STATE_CANCELED);
+                    return null;
+                }
+
+                // No printer, nothing to do.
+                final int selectedIndex = mDestinationSpinner.getSelectedItemPosition();
+                if (selectedIndex < 0) {
+                    // Update the print job's status.
+                    mPrintSpooler.setPrintJobState(mPrintJobId,
+                            PrintJobInfo.STATE_CANCELED);
+                    return null;
+                }
+
+                // Update the print job's printer.
+                SpinnerItem<PrinterInfo> printerItem =
+                        mDestinationSpinnerAdapter.getItem(selectedIndex);
+                PrinterId printerId =  printerItem.value.getId();
+                mPrintSpooler.setPrintJobPrinterId(mPrintJobId, printerId);
+
+                // Update the print job's status.
+                mPrintSpooler.setPrintJobState(mPrintJobId,
+                        PrintJobInfo.STATE_QUEUED);
+                return null;
+            }
+
+            // Important: If we are canceling, then we do not wait for the write
+            // to complete since the result will be discarded anyway, we simply
+            // execute the finish immediately which will interrupt the write.
+        }.executeOnExecutor(mPrintConfirmed ? AsyncTask.SERIAL_EXECUTOR
+                : AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null);
+
+        if (DEBUG) {
+            if (mPrintConfirmed) {
+                File file = mRemotePrintAdapter.getFile();
+                if (file.exists()) {
+                    new ViewSpooledFileAsyncTask(file).executeOnExecutor(
+                          AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+                }
+            }
+        }
+    }
+
+    private void updatePrintPreview(File file) {
+        // TODO: Implement
+    }
+
+    private void addPrinters(List<PrinterInfo> addedPrinters) {
+        final int addedPrinterCount = addedPrinters.size();
+        for (int i = 0; i < addedPrinterCount; i++) {
+            PrinterInfo addedPrinter = addedPrinters.get(i);
+            boolean duplicate = false;
+            final int existingPrinterCount = mDestinationSpinnerAdapter.getCount();
+            for (int j = 0; j < existingPrinterCount; j++) {
+                PrinterInfo existingPrinter = mDestinationSpinnerAdapter.getItem(j).value;
+                if (addedPrinter.getId().equals(existingPrinter.getId())) {
+                    duplicate = true;
+                    break;
+                }
+            }
+            if (!duplicate) {
+                mDestinationSpinnerAdapter.add(new SpinnerItem<PrinterInfo>(
+                        addedPrinter, addedPrinter.getLabel()));
+            } else {
+                Log.w(LOG_TAG, "Skipping a duplicate printer: " + addedPrinter);
+            }
+        }
+    }
+
+    private void removePrinters(List<PrinterId> pritnerIds) {
+        final int printerIdCount = pritnerIds.size();
+        for (int i = 0; i < printerIdCount; i++) {
+            PrinterId removedPrinterId = pritnerIds.get(i);
+            boolean removed = false;
+            final int existingPrinterCount = mDestinationSpinnerAdapter.getCount();
+            for (int j = 0; j < existingPrinterCount; j++) {
+                PrinterInfo existingPrinter = mDestinationSpinnerAdapter.getItem(j).value;
+                if (removedPrinterId.equals(existingPrinter.getId())) {
+                    mDestinationSpinnerAdapter.remove(mDestinationSpinnerAdapter.getItem(j));
+                    removed = true;
+                    break;
+                }
+            }
+            if (!removed) {
+                Log.w(LOG_TAG, "Ignoring not added printer with id: " + removedPrinterId);
+            }
+        }
+    }
+
+    private abstract class QueuedAsyncTask<T> extends AsyncTask<Void, Void, T> {
+
+        private final List<QueuedAsyncTask<?>> mPendingOrRunningTasks;
+
+        public QueuedAsyncTask(List<QueuedAsyncTask<?>> pendingOrRunningTasks) {
+            mPendingOrRunningTasks = pendingOrRunningTasks;
+        }
+
+        @Override
+        protected void onPreExecute() {
+            mPendingOrRunningTasks.add(this);
+        }
+
+        @Override
+        protected void onPostExecute(T result) {
+            mPendingOrRunningTasks.remove(this);
+        }
+
+        public void cancel() {
+            super.cancel(true);
+            mPendingOrRunningTasks.remove(this);
+        }
+    }
+
+    private final class ViewSpooledFileAsyncTask extends AsyncTask<Void, Void, Void> {
+
+        private final File mFile;
+
+        public ViewSpooledFileAsyncTask(File file) {
+            mFile = file;
+        }
+
+        @Override
+        protected Void doInBackground(Void... params) {
+            mFile.setExecutable(true, false);
+            mFile.setWritable(true, false);
+            mFile.setReadable(true, false);
+
+            final long identity = Binder.clearCallingIdentity();
+            Intent intent = new Intent(Intent.ACTION_VIEW);
+            intent.setDataAndType(Uri.fromFile(mFile), "application/pdf");
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            startActivityAsUser(intent, null, UserHandle.CURRENT);
+            Binder.restoreCallingIdentity(identity);
+            return null;
+        }
+    }
+
+    private final class PrintDiscoveryObserver extends IPrinterDiscoveryObserver.Stub {
+        private static final int MESSAGE_ADD_DICOVERED_PRINTERS = 1;
+        private static final int MESSAGE_REMOVE_DICOVERED_PRINTERS = 2;
+
+        private final Handler mHandler;
+
+        @SuppressWarnings("unchecked")
+        public PrintDiscoveryObserver(Looper looper) {
+            mHandler = new Handler(looper, null, true) {
+                @Override
+                public void handleMessage(Message message) {
+                    switch (message.what) {
+                        case MESSAGE_ADD_DICOVERED_PRINTERS: {
+                            List<PrinterInfo> printers = (List<PrinterInfo>) message.obj;
+                            addPrinters(printers);
+                            // Just added the first printer, so select it and start printing.
+                            if (mDestinationSpinnerAdapter.getCount() == 1) {
+                                mDestinationSpinner.setSelection(0);
+                            }
+                        } break;
+                        case MESSAGE_REMOVE_DICOVERED_PRINTERS: {
+                            List<PrinterId> printerIds = (List<PrinterId>) message.obj;
+                            removePrinters(printerIds);
+                            // TODO: Handle removing the last printer.
+                        } break;
+                    }
+                }
+            };
+        }
+
+        @Override
+        public void addDiscoveredPrinters(List<PrinterInfo> printers) {
+            mHandler.obtainMessage(MESSAGE_ADD_DICOVERED_PRINTERS, printers).sendToTarget();
+        }
+
+        @Override
+        public void removeDiscoveredPrinters(List<PrinterId> printers) {
+            mHandler.obtainMessage(MESSAGE_REMOVE_DICOVERED_PRINTERS, printers).sendToTarget();
+        }
+    }
+
+    private final class SpinnerItem<T> {
+        final T value;
+        CharSequence label;
+
+        public SpinnerItem(T value, CharSequence label) {
+            this.value = value;
+            this.label = label;
+        }
+
+        public String toString() {
+            return label.toString();
+        }
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
new file mode 100644
index 0000000..2b27b69
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpooler.java
@@ -0,0 +1,734 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.printspooler;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlSerializer;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.os.AsyncTask;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.print.IPrintClient;
+import android.print.IPrintManager;
+import android.print.PrintAttributes;
+import android.print.PrintJobInfo;
+import android.print.PrintManager;
+import android.print.PrinterId;
+import android.util.AtomicFile;
+import android.util.Log;
+import android.util.Slog;
+import android.util.Xml;
+
+import com.android.internal.util.FastXmlSerializer;
+
+public class PrintSpooler {
+
+    private static final String LOG_TAG = PrintSpooler.class.getSimpleName();
+
+    private static final boolean DEBUG_PRINT_JOB_LIFECYCLE = false;
+
+    private static final boolean DEBUG_PERSISTENCE = false;
+
+    private static final boolean PERSISTNECE_MANAGER_ENABLED = false;
+
+    private static final String PRINT_FILE_EXTENSION = "pdf";
+
+    private static int sPrintJobIdCounter;
+
+    private static final Object sLock = new Object();
+
+    private final Object mLock = new Object();
+
+    private static PrintSpooler sInstance;
+
+    private final List<PrintJobInfo> mPrintJobs = new ArrayList<PrintJobInfo>();
+
+    private final PersistenceManager mPersistanceManager;
+
+    private final Context mContext;
+
+    private final IPrintManager mPrintManager;
+
+    public static PrintSpooler getInstance(Context context) {
+        synchronized (sLock) {
+            if (sInstance == null) {
+                sInstance = new PrintSpooler(context);
+            }
+            return sInstance;
+        }
+    }
+
+    private PrintSpooler(Context context) {
+        mContext = context;
+        mPersistanceManager = new PersistenceManager();
+        mPersistanceManager.readStateLocked();
+        mPrintManager = IPrintManager.Stub.asInterface(
+                ServiceManager.getService("print"));
+    }
+
+    public List<PrintJobInfo> getPrintJobs(ComponentName componentName, int state, int appId) {
+        synchronized (mLock) {
+            List<PrintJobInfo> foundPrintJobs = null;
+            final int printJobCount = mPrintJobs.size();
+            for (int i = 0; i < printJobCount; i++) {
+                PrintJobInfo printJob = mPrintJobs.get(i);
+                PrinterId printerId = printJob.getPrinterId();
+                final boolean sameComponent = (componentName == null
+                        || (printerId != null
+                        && componentName.equals(printerId.getServiceComponentName())));
+                final boolean sameAppId = appId == PrintManager.APP_ID_ANY
+                        || printJob.getAppId() == appId;
+                final boolean sameState = state == PrintJobInfo.STATE_ANY
+                        || state == printJob.getState();
+                if (sameComponent && sameAppId && sameState) {
+                    if (foundPrintJobs == null) {
+                        foundPrintJobs = new ArrayList<PrintJobInfo>();
+                    }
+                    foundPrintJobs.add(printJob);
+                }
+            }
+            return foundPrintJobs;
+        }
+    }
+
+    public PrintJobInfo getPrintJob(int printJobId, int appId) {
+        synchronized (mLock) {
+            final int printJobCount = mPrintJobs.size();
+            for (int i = 0; i < printJobCount; i++) {
+                PrintJobInfo printJob = mPrintJobs.get(i);
+                if (printJob.getId() == printJobId
+                        && (appId == PrintManager.APP_ID_ANY || appId == printJob.getAppId())) {
+                    return printJob;
+                }
+             }
+            return null;
+        }
+    }
+
+    public boolean cancelPrintJob(int printJobId, int appId) {
+        synchronized (mLock) {
+            PrintJobInfo printJob = getPrintJob(printJobId, appId);
+            if (printJob != null) {
+                switch (printJob.getState()) {
+                    case PrintJobInfo.STATE_CREATED: {
+                        removePrintJobLocked(printJob);
+                    } return true;
+                    case PrintJobInfo.STATE_QUEUED: {
+                        removePrintJobLocked(printJob);
+                    } return true;
+                    default: {
+                        return false;
+                    }
+                }
+            }
+            return false;
+        }
+    }
+
+    public PrintJobInfo createPrintJob(CharSequence label, IPrintClient client,
+            PrintAttributes attributes, int appId) {
+        synchronized (mLock) {
+            final int printJobId = generatePrintJobIdLocked();
+            PrintJobInfo printJob = new PrintJobInfo();
+            printJob.setId(printJobId);
+            printJob.setAppId(appId);
+            printJob.setLabel(label);
+            printJob.setAttributes(attributes);
+
+            addPrintJobLocked(printJob);
+            setPrintJobState(printJobId, PrintJobInfo.STATE_CREATED);
+
+            return printJob;
+        }
+    }
+
+    private int generatePrintJobIdLocked() {
+        int printJobId = sPrintJobIdCounter++;
+        while (isDuplicatePrintJobId(printJobId)) {
+            printJobId = sPrintJobIdCounter++;
+        }
+        return printJobId;
+    }
+
+    private boolean isDuplicatePrintJobId(int printJobId) {
+        final int printJobCount = mPrintJobs.size();
+        for (int j = 0; j < printJobCount; j++) {
+            PrintJobInfo printJob = mPrintJobs.get(j);
+            if (printJob.getId() == printJobId) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @SuppressWarnings("resource")
+    public boolean writePrintJobData(ParcelFileDescriptor fd, int printJobId) {
+        synchronized (mLock) {
+            FileInputStream in = null;
+            FileOutputStream out = null;
+            try {
+                PrintJobInfo printJob = getPrintJob(printJobId, PrintManager.APP_ID_ANY);
+                if (printJob != null) {
+                    File file = generateFileForPrintJob(printJobId);
+                    in = new FileInputStream(file);
+                    out = new FileOutputStream(fd.getFileDescriptor());
+                    final byte[] buffer = new byte[8192];
+                    while (true) {
+                        final int readByteCount = in.read(buffer);
+                        if (readByteCount < 0) {
+                            return true;
+                        }
+                        out.write(buffer, 0, readByteCount);
+                    }
+                }
+            } catch (FileNotFoundException fnfe) {
+                Log.e(LOG_TAG, "Error writing print job data!", fnfe);
+            } catch (IOException ioe) {
+                Log.e(LOG_TAG, "Error writing print job data!", ioe);
+            } finally {
+                closeIfNotNullNoException(in);
+                closeIfNotNullNoException(out);
+                closeIfNotNullNoException(fd);
+            }
+        }
+        return false;
+    }
+
+    private void closeIfNotNullNoException(Closeable closeable) {
+        if (closeable != null) {
+            try {
+                closeable.close();
+            } catch (IOException ioe) {
+                /* ignore */;
+            }
+        }
+    }
+
+    public File generateFileForPrintJob(int printJobId) {
+        return new File(mContext.getFilesDir(), "print_job_"
+                + printJobId + "." + PRINT_FILE_EXTENSION);
+    }
+
+    private void addPrintJobLocked(PrintJobInfo printJob) {
+        mPrintJobs.add(printJob);
+        if (DEBUG_PRINT_JOB_LIFECYCLE) {
+            Slog.i(LOG_TAG, "[ADD] " + printJob);
+        }
+    }
+
+    private void removePrintJobLocked(PrintJobInfo printJob) {
+        if (mPrintJobs.remove(printJob)) {
+            generateFileForPrintJob(printJob.getId()).delete();
+            if (DEBUG_PRINT_JOB_LIFECYCLE) {
+                Slog.i(LOG_TAG, "[REMOVE] " + printJob);
+            }
+        }
+    }
+
+    public boolean setPrintJobState(int printJobId, int state) {
+        boolean success = false;
+        PrintJobInfo queuedPrintJob = null;
+
+        synchronized (mLock) {
+            PrintJobInfo printJob = getPrintJob(printJobId, PrintManager.APP_ID_ANY);
+            if (printJob != null && printJob.getState() < state) {
+                success = true;
+                printJob.setState(state);
+                // TODO: Update notifications.
+                switch (state) {
+                    case PrintJobInfo.STATE_COMPLETED:
+                    case PrintJobInfo.STATE_CANCELED: {
+                        removePrintJobLocked(printJob);
+                    } break;
+                    case PrintJobInfo.STATE_QUEUED: {
+                        queuedPrintJob = new PrintJobInfo(printJob);
+                    } break;
+                }
+                if (DEBUG_PRINT_JOB_LIFECYCLE) {
+                    Slog.i(LOG_TAG, "[STATUS CHANGED] " + printJob);
+                }
+                mPersistanceManager.writeStateLocked();
+            }
+        }
+
+        if (queuedPrintJob != null) {
+            try {
+                mPrintManager.onPrintJobQueued(queuedPrintJob.getPrinterId(),
+                        queuedPrintJob);
+            } catch (RemoteException re) {
+                /* ignore */
+            }
+        }
+
+        return success;
+    }
+
+    public boolean setPrintJobTag(int printJobId, String tag) {
+        synchronized (mLock) {
+            PrintJobInfo printJob = getPrintJob(printJobId, PrintManager.APP_ID_ANY);
+            if (printJob != null) {
+                printJob.setTag(tag);
+                mPersistanceManager.writeStateLocked();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public void setPrintJobAttributes(int printJobId, PrintAttributes attributes) {
+        synchronized (mLock) {
+            PrintJobInfo printJob = getPrintJob(printJobId, PrintManager.APP_ID_ANY);
+            if (printJob != null) {
+                printJob.setAttributes(attributes);
+                mPersistanceManager.writeStateLocked();
+            }
+        }
+    }
+
+    public void setPrintJobPrinterId(int printJobId, PrinterId printerId) {
+        synchronized (mLock) {
+            PrintJobInfo printJob = getPrintJob(printJobId, PrintManager.APP_ID_ANY);
+            if (printJob != null) {
+                printJob.setPrinterId(printerId);
+                mPersistanceManager.writeStateLocked();
+            }
+        }
+    }
+
+    private final class PersistenceManager {
+        private static final String PERSIST_FILE_NAME = "print_spooler_state.xml";
+
+        private static final String TAG_SPOOLER = "spooler";
+        private static final String TAG_JOB = "job";
+        private static final String TAG_ID = "id";
+        private static final String TAG_TAG = "tag";
+        private static final String TAG_APP_ID = "app-id";
+        private static final String TAG_STATE = "state";
+        private static final String TAG_ATTRIBUTES = "attributes";
+        private static final String TAG_LABEL = "label";
+        private static final String TAG_PRINTER = "printer";
+
+        private static final String ATTRIBUTE_MEDIA_SIZE = "mediaSize";
+        private static final String ATTRIBUTE_RESOLUTION = "resolution";
+        private static final String ATTRIBUTE_MARGINS = "margins";
+        private static final String ATTRIBUTE_INPUT_TRAY = "inputTray";
+        private static final String ATTRIBUTE_OUTPUT_TRAY = "outputTray";
+        private static final String ATTRIBUTE_DUPLEX_MODE = "duplexMode";
+        private static final String ATTRIBUTE_COLOR_MODE = "colorMode";
+        private static final String ATTRIBUTE_FITTING_MODE = "fittingMode";
+        private static final String ATTRIBUTE_ORIENTATION = "orientation";
+
+        private final AtomicFile mStatePersistFile;
+
+        private boolean mWriteStateScheduled;
+
+        private PersistenceManager() {
+            mStatePersistFile = new AtomicFile(new File(mContext.getFilesDir(),
+                    PERSIST_FILE_NAME));
+        }
+
+        public void writeStateLocked() {
+            // TODO: Implement persistence of PrintableInfo
+            if (!PERSISTNECE_MANAGER_ENABLED) {
+                return;
+            }
+            if (mWriteStateScheduled) {
+                return;
+            }
+            mWriteStateScheduled = true;
+            new AsyncTask<Void, Void, Void>() {
+                @Override
+                protected Void doInBackground(Void... params) {
+                    synchronized (mLock) {
+                        mWriteStateScheduled = false;
+                        doWriteStateLocked();
+                    }
+                    return null;
+                }
+            }.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR, (Void[]) null);
+        }
+
+        private void doWriteStateLocked() {
+            FileOutputStream out = null;
+            try {
+                out = mStatePersistFile.startWrite();
+
+                XmlSerializer serializer = new FastXmlSerializer();
+                serializer.setOutput(out, "utf-8");
+                serializer.startDocument(null, true);
+                serializer.startTag(null, TAG_SPOOLER);
+
+                List<PrintJobInfo> printJobs = mPrintJobs;
+
+                final int printJobCount = printJobs.size();
+                for (int j = 0; j < printJobCount; j++) {
+                    PrintJobInfo printJob = printJobs.get(j);
+
+                    final int state = printJob.getState();
+                    if (state < PrintJobInfo.STATE_QUEUED
+                            || state > PrintJobInfo.STATE_FAILED) {
+                        continue;
+                    }
+
+                    serializer.startTag(null, TAG_JOB);
+
+                    serializer.startTag(null, TAG_ID);
+                    serializer.text(String.valueOf(printJob.getId()));
+                    serializer.endTag(null, TAG_ID);
+
+                    serializer.startTag(null, TAG_TAG);
+                    serializer.text(printJob.getTag());
+                    serializer.endTag(null, TAG_TAG);
+
+                    serializer.startTag(null, TAG_APP_ID);
+                    serializer.text(String.valueOf(printJob.getAppId()));
+                    serializer.endTag(null, TAG_APP_ID);
+
+                    serializer.startTag(null, TAG_LABEL);
+                    serializer.text(printJob.getLabel().toString());
+                    serializer.endTag(null, TAG_LABEL);
+
+                    serializer.startTag(null, TAG_STATE);
+                    serializer.text(String.valueOf(printJob.getState()));
+                    serializer.endTag(null, TAG_STATE);
+
+                    serializer.startTag(null, TAG_PRINTER);
+                    serializer.text(printJob.getPrinterId().flattenToString());
+                    serializer.endTag(null, TAG_PRINTER);
+
+                    PrintAttributes attributes = printJob.getAttributes();
+                    if (attributes != null) {
+                        serializer.startTag(null, TAG_ATTRIBUTES);
+
+                            //TODO: Implement persistence of the attributes below.
+
+//                            MediaSize mediaSize = attributes.getMediaSize();
+//                            if (mediaSize != null) {
+//                                serializer.attribute(null, ATTRIBUTE_MEDIA_SIZE,
+//                                        mediaSize.flattenToString());
+//                            }
+//
+//                            Resolution resolution = attributes.getResolution();
+//                            if (resolution != null) {
+//                                serializer.attribute(null, ATTRIBUTE_RESOLUTION,
+//                                        resolution.flattenToString());
+//                            }
+//
+//                            Margins margins = attributes.getMargins();
+//                            if (margins != null) {
+//                                serializer.attribute(null, ATTRIBUTE_MARGINS,
+//                                        margins.flattenToString());
+//                            }
+//
+//                            Tray inputTray = attributes.getInputTray();
+//                            if (inputTray != null) {
+//                                serializer.attribute(null, ATTRIBUTE_INPUT_TRAY,
+//                                        inputTray.flattenToString());
+//                            }
+//
+//                            Tray outputTray = attributes.getOutputTray();
+//                            if (outputTray != null) {
+//                                serializer.attribute(null, ATTRIBUTE_OUTPUT_TRAY,
+//                                        outputTray.flattenToString());
+//                            }
+
+                        final int duplexMode = attributes.getDuplexMode();
+                        if (duplexMode > 0) {
+                            serializer.attribute(null, ATTRIBUTE_DUPLEX_MODE,
+                                    String.valueOf(duplexMode));
+                        }
+
+                        final int colorMode = attributes.getColorMode();
+                        if (colorMode > 0) {
+                            serializer.attribute(null, ATTRIBUTE_COLOR_MODE,
+                                    String.valueOf(colorMode));
+                        }
+
+                        final int fittingMode = attributes.getFittingMode();
+                        if (fittingMode > 0) {
+                            serializer.attribute(null, ATTRIBUTE_FITTING_MODE,
+                                    String.valueOf(fittingMode));
+                        }
+
+                        final int orientation = attributes.getOrientation();
+                        if (orientation > 0) {
+                            serializer.attribute(null, ATTRIBUTE_ORIENTATION,
+                                    String.valueOf(orientation));
+                        }
+
+                        serializer.endTag(null, TAG_ATTRIBUTES);
+                    }
+
+                    serializer.endTag(null, TAG_JOB);
+
+                    if (DEBUG_PERSISTENCE) {
+                        Log.i(LOG_TAG, "[PERSISTED] " + printJob);
+                    }
+                }
+
+                serializer.endTag(null, TAG_SPOOLER);
+                serializer.endDocument();
+                mStatePersistFile.finishWrite(out);
+            } catch (IOException e) {
+                Slog.w(LOG_TAG, "Failed to write state, restoring backup.", e);
+                mStatePersistFile.failWrite(out);
+            } finally {
+                if (out != null) {
+                    try {
+                        out.close();
+                    } catch (IOException ioe) {
+                        /* ignore */
+                    }
+                }
+            }
+        }
+
+        public void readStateLocked() {
+            if (!PERSISTNECE_MANAGER_ENABLED) {
+                return;
+            }
+            FileInputStream in = null;
+            try {
+                in = mStatePersistFile.openRead();
+            } catch (FileNotFoundException e) {
+                Log.i(LOG_TAG, "No existing print spooler state.");
+                return;
+            }
+            try {
+                XmlPullParser parser = Xml.newPullParser();
+                parser.setInput(in, null);
+                parseState(parser);
+            } catch (IllegalStateException ise) {
+                Slog.w(LOG_TAG, "Failed parsing " + ise);
+            } catch (NullPointerException npe) {
+                Slog.w(LOG_TAG, "Failed parsing " + npe);
+            } catch (NumberFormatException nfe) {
+                Slog.w(LOG_TAG, "Failed parsing " + nfe);
+            } catch (XmlPullParserException xppe) {
+                Slog.w(LOG_TAG, "Failed parsing " + xppe);
+            } catch (IOException ioe) {
+                Slog.w(LOG_TAG, "Failed parsing " + ioe);
+            } catch (IndexOutOfBoundsException iobe) {
+                Slog.w(LOG_TAG, "Failed parsing " + iobe);
+            } finally {
+                try {
+                    in.close();
+                } catch (IOException ioe) {
+                    /* ignore */
+                }
+            }
+        }
+
+        private void parseState(XmlPullParser parser)
+                throws IOException, XmlPullParserException {
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_SPOOLER);
+            parser.next();
+
+            while (parsePrintJob(parser)) {
+                parser.next();
+            }
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_SPOOLER);
+        }
+
+        private boolean parsePrintJob(XmlPullParser parser)
+                throws IOException, XmlPullParserException {
+            skipEmptyTextTags(parser);
+            if (!accept(parser, XmlPullParser.START_TAG, TAG_JOB)) {
+                return false;
+            }
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_ID);
+            parser.next();
+            final int printJobId = Integer.parseInt(parser.getText());
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_ID);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_TAG);
+            parser.next();
+            String tag = parser.getText();
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_TAG);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_APP_ID);
+            parser.next();
+            final int appId = Integer.parseInt(parser.getText());
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_APP_ID);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_LABEL);
+            parser.next();
+            String label = parser.getText();
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_LABEL);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_STATE);
+            parser.next();
+            final int state = Integer.parseInt(parser.getText());
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_STATE);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_PRINTER);
+            parser.next();
+            PrinterId printerId = PrinterId.unflattenFromString(parser.getText());
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_PRINTER);
+            parser.next();
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.START_TAG, TAG_ATTRIBUTES);
+
+            final int attributeCount = parser.getAttributeCount();
+            PrintAttributes attributes = null;
+            if (attributeCount > 0) {
+                PrintAttributes.Builder builder = new PrintAttributes.Builder();
+
+                // TODO: Implement reading of the attributes below.
+
+//                String mediaSize = parser.getAttributeValue(null, ATTRIBUTE_MEDIA_SIZE);
+//                if (mediaSize != null) {
+//                    builder.setMediaSize(MediaSize.unflattenFromString(mediaSize));
+//                }
+//
+//                String resolution = parser.getAttributeValue(null, ATTRIBUTE_RESOLUTION);
+//                if (resolution != null) {
+//                    builder.setMediaSize(Resolution.unflattenFromString(resolution));
+//                }
+//
+//                String margins = parser.getAttributeValue(null, ATTRIBUTE_MARGINS);
+//                if (margins != null) {
+//                    builder.setMediaSize(Margins.unflattenFromString(margins));
+//                }
+//
+//                String inputTray = parser.getAttributeValue(null, ATTRIBUTE_INPUT_TRAY);
+//                if (inputTray != null) {
+//                    builder.setMediaSize(Tray.unflattenFromString(inputTray));
+//                }
+//
+//                String outputTray = parser.getAttributeValue(null, ATTRIBUTE_OUTPUT_TRAY);
+//                if (outputTray != null) {
+//                    builder.setMediaSize(Tray.unflattenFromString(outputTray));
+//                }
+//
+//                String duplexMode = parser.getAttributeValue(null, ATTRIBUTE_DUPLEX_MODE);
+//                if (duplexMode != null) {
+//                    builder.setDuplexMode(Integer.parseInt(duplexMode));
+//                }
+
+                String colorMode = parser.getAttributeValue(null, ATTRIBUTE_COLOR_MODE);
+                if (colorMode != null) {
+                    builder.setColorMode(Integer.parseInt(colorMode));
+                }
+
+                String fittingMode = parser.getAttributeValue(null, ATTRIBUTE_COLOR_MODE);
+                if (fittingMode != null) {
+                    builder.setFittingMode(Integer.parseInt(fittingMode));
+                }
+            }
+            parser.next();
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_ATTRIBUTES);
+            parser.next();
+
+            PrintJobInfo printJob = new PrintJobInfo();
+            printJob.setId(printJobId);
+            printJob.setTag(tag);
+            printJob.setAppId(appId);
+            printJob.setLabel(label);
+            printJob.setState(state);
+            printJob.setAttributes(attributes);
+            printJob.setPrinterId(printerId);
+
+            mPrintJobs.add(printJob);
+
+            if (DEBUG_PERSISTENCE) {
+                Log.i(LOG_TAG, "[RESTORED] " + printJob);
+            }
+
+            skipEmptyTextTags(parser);
+            expect(parser, XmlPullParser.END_TAG, TAG_JOB);
+
+            return true;
+        }
+
+        private void expect(XmlPullParser parser, int type, String tag)
+                throws IOException, XmlPullParserException {
+            if (!accept(parser, type, tag)) {
+                throw new XmlPullParserException("Exepected event: " + type
+                        + " and tag: " + tag + " but got event: " + parser.getEventType()
+                        + " and tag:" + parser.getName());
+            }
+        }
+
+        private void skipEmptyTextTags(XmlPullParser parser)
+                throws IOException, XmlPullParserException {
+            while (accept(parser, XmlPullParser.TEXT, null)
+                    && "\n".equals(parser.getText())) {
+                parser.next();
+            }
+        }
+
+        private boolean accept(XmlPullParser parser, int type, String tag)
+                throws IOException, XmlPullParserException {
+            if (parser.getEventType() != type) {
+                return false;
+            }
+            if (tag != null) {
+                if (!tag.equals(parser.getName())) {
+                    return false;
+                }
+            } else if (parser.getName() != null) {
+                return false;
+            }
+            return true;
+        }
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
new file mode 100644
index 0000000..57c4557
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/PrintSpoolerService.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.printspooler;
+
+import java.util.List;
+
+import android.app.PendingIntent;
+import android.app.Service;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.IntentSender;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.IPrintAdapter;
+import android.print.IPrintClient;
+import android.print.IPrintSpoolerService;
+import android.print.IPrintSpoolerServiceCallbacks;
+import android.print.PrintAttributes;
+import android.print.PrintJobInfo;
+import android.util.Slog;
+
+import com.android.internal.os.SomeArgs;
+
+/**
+ * Service for exposing some of the {@link PrintSpooler} functionality to
+ * another process.
+ */
+public final class PrintSpoolerService extends Service {
+
+    private static final String LOG_TAG = "PrintSpoolerService";
+
+    private Intent mStartPrintJobConfigActivityIntent;
+
+    private PrintSpooler mSpooler;
+
+    private Handler mHanlder;
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        mStartPrintJobConfigActivityIntent = new Intent(PrintSpoolerService.this,
+                PrintJobConfigActivity.class);
+        mSpooler = PrintSpooler.getInstance(this);
+        mHanlder = new MyHandler(getMainLooper());
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return new IPrintSpoolerService.Stub() {
+            @Override
+            public void getPrintJobs(IPrintSpoolerServiceCallbacks callback,
+                    ComponentName componentName, int state, int appId, int sequence)
+                            throws RemoteException {
+                List<PrintJobInfo> printJobs = null;
+                try {
+                    printJobs = mSpooler.getPrintJobs(componentName, state, appId);
+                } finally {
+                    callback.onGetPrintJobsResult(printJobs, sequence);
+                }
+            }
+
+            @Override
+            public void getPrintJob(int printJobId, IPrintSpoolerServiceCallbacks callback,
+                    int appId, int sequence) throws RemoteException {
+                PrintJobInfo printJob = null;
+                try {
+                    printJob = mSpooler.getPrintJob(printJobId, appId);
+                } finally {
+                    callback.onGetPrintJobInfoResult(printJob, sequence);
+                }
+            }
+
+            @Override
+            public void cancelPrintJob(int printJobId, IPrintSpoolerServiceCallbacks callback,
+                    int appId, int sequence) throws RemoteException {
+                boolean success = false;
+                try {
+                    success = mSpooler.cancelPrintJob(printJobId, appId);
+                } finally {
+                    callback.onCancelPrintJobResult(success, sequence);
+                }
+            }
+
+            @SuppressWarnings("deprecation")
+            @Override
+            public void createPrintJob(String printJobName, IPrintClient client,
+                    IPrintAdapter printAdapter, PrintAttributes attributes,
+                    IPrintSpoolerServiceCallbacks callback, int appId, int sequence)
+                            throws RemoteException {
+                PrintJobInfo printJob = null;
+                try {
+                    printJob = mSpooler.createPrintJob(printJobName, client,
+                            attributes, appId);
+                    if (printJob != null) {
+                        Intent intent = mStartPrintJobConfigActivityIntent;
+                        intent.putExtra(PrintJobConfigActivity.EXTRA_PRINTABLE,
+                                printAdapter.asBinder());
+                        intent.putExtra(PrintJobConfigActivity.EXTRA_APP_ID, appId);
+                        intent.putExtra(PrintJobConfigActivity.EXTRA_PRINT_JOB_ID,
+                                printJob.getId());
+                        intent.putExtra(PrintJobConfigActivity.EXTRA_ATTRIBUTES, attributes);
+
+                        IntentSender sender = PendingIntent.getActivity(
+                                PrintSpoolerService.this, 0, intent, PendingIntent.FLAG_ONE_SHOT
+                                | PendingIntent.FLAG_CANCEL_CURRENT).getIntentSender();
+
+                        SomeArgs args = SomeArgs.obtain();
+                        args.arg1 = client;
+                        args.arg2 = sender;
+                        mHanlder.obtainMessage(0, args).sendToTarget();
+                    }
+                } finally {
+                    callback.onCreatePrintJobResult(printJob, sequence);
+                }
+            }
+
+            @Override
+            public void setPrintJobState(int printJobId, int state,
+                    IPrintSpoolerServiceCallbacks callback, int sequece)
+                            throws RemoteException {
+                boolean success = false;
+                try {
+                    // TODO: Make sure the clients (print services) can set the state
+                    //       only to acceptable ones, e.g. not settings STATE_CREATED.
+                    success = mSpooler.setPrintJobState(printJobId, state);
+                } finally {
+                    callback.onSetPrintJobStateResult(success, sequece);
+                }
+            }
+
+            @Override
+            public void setPrintJobTag(int printJobId, String tag,
+                    IPrintSpoolerServiceCallbacks callback, int sequece)
+                            throws RemoteException {
+                boolean success = false;
+                try {
+                    success = mSpooler.setPrintJobTag(printJobId, tag);
+                } finally {
+                    callback.onSetPrintJobTagResult(success, sequece);
+                }
+            }
+
+            @Override
+            public void writePrintJobData(ParcelFileDescriptor fd, int printJobId) {
+                mSpooler.writePrintJobData(fd, printJobId);
+            }
+        };
+    }
+
+    private static final class MyHandler extends Handler {
+
+        public MyHandler(Looper looper) {
+            super(looper, null, true);
+        }
+
+        @Override
+        public void handleMessage(Message message) {
+            SomeArgs args = (SomeArgs) message.obj;
+            IPrintClient client = (IPrintClient) args.arg1;
+            IntentSender sender = (IntentSender) args.arg2;
+            args.recycle();
+            try {
+                client.startPrintJobConfigActivity(sender);
+            } catch (RemoteException re) {
+                Slog.i(LOG_TAG, "Error starting print job config activity!", re);
+            }
+        }
+    }
+}
diff --git a/packages/PrintSpooler/src/com/android/printspooler/RemotePrintAdapter.java b/packages/PrintSpooler/src/com/android/printspooler/RemotePrintAdapter.java
new file mode 100644
index 0000000..7537218
--- /dev/null
+++ b/packages/PrintSpooler/src/com/android/printspooler/RemotePrintAdapter.java
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.printspooler;
+
+import android.os.ICancellationSignal;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.print.IPrintAdapter;
+import android.print.IPrintProgressListener;
+import android.print.PageRange;
+import android.print.PrintAdapterInfo;
+import android.print.PrintAttributes;
+import android.util.Log;
+
+import libcore.io.IoUtils;
+
+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.List;
+
+/**
+ * This class represents a remote print adapter instance.
+ */
+final class RemotePrintAdapter {
+    private static final String LOG_TAG = "RemotePrintAdapter";
+
+    private static final boolean DEBUG = true;
+
+    private final Object mLock = new Object();
+
+    private final IPrintAdapter mRemoteInterface;
+
+    private final File mFile;
+
+    private final IPrintProgressListener mIPrintProgressListener;
+
+    private PrintAdapterInfo mInfo;
+
+    private ICancellationSignal mCancellationSignal;
+
+    private Thread mWriteThread;
+
+    public RemotePrintAdapter(IPrintAdapter printAdatper, File file) {
+        mRemoteInterface = printAdatper;
+        mFile = file;
+        mIPrintProgressListener = new IPrintProgressListener.Stub() {
+            @Override
+            public void onWriteStarted(PrintAdapterInfo info,
+                    ICancellationSignal cancellationSignal) {
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "IPrintProgressListener#onWriteStarted()");
+                }
+                synchronized (mLock) {
+                    mInfo = info;
+                    mCancellationSignal = cancellationSignal;
+                }
+            }
+
+            @Override
+            public void onWriteFinished(List<PageRange> pages) {
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "IPrintProgressListener#onWriteFinished(" + pages + ")");
+                }
+                synchronized (mLock) {
+                    if (isPrintingLocked()) {
+                        mWriteThread.interrupt();
+                        mCancellationSignal = null;
+                    }
+                }
+            }
+
+            @Override
+            public void onWriteFailed(CharSequence error) {
+                if (DEBUG) {
+                    Log.i(LOG_TAG, "IPrintProgressListener#onWriteFailed(" + error + ")");
+                }
+                synchronized (mLock) {
+                    if (isPrintingLocked()) {
+                        mWriteThread.interrupt();
+                        mCancellationSignal = null;
+                    }
+                }
+            }
+        };
+    }
+
+    public File getFile() {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "getFile()");
+        }
+        return mFile;
+    }
+
+    public void start() throws IOException {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "start()");
+        }
+        try {
+            mRemoteInterface.start();
+        } catch (RemoteException re) {
+            throw new IOException("Error reading file", re);
+        }
+    }
+
+    public void printAttributesChanged(PrintAttributes attributes) throws IOException {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "printAttributesChanged(" + attributes +")");
+        }
+        try {
+            mRemoteInterface.printAttributesChanged(attributes);
+        } catch (RemoteException re) {
+            throw new IOException("Error reading file", re);
+        }
+    }
+
+    public void print(List<PageRange> pages) throws IOException {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "print(" + pages +")");
+        }
+        InputStream in = null;
+        OutputStream out = null;
+        ParcelFileDescriptor source = null;
+        ParcelFileDescriptor sink = null;
+        synchronized (mLock) {
+            mWriteThread = Thread.currentThread();
+        }
+        try {
+            ParcelFileDescriptor[] pipe = ParcelFileDescriptor.createPipe();
+            source = pipe[0];
+            sink = pipe[1];
+
+            in = new FileInputStream(source.getFileDescriptor());
+            out = new FileOutputStream(mFile);
+
+            // Async call to initiate the other process writing the data.
+            mRemoteInterface.print(pages, sink, mIPrintProgressListener);
+
+            // Close the source. It is now held by the client.
+            sink.close();
+            sink = null;
+
+            final byte[] buffer = new byte[8192];
+            while (true) {
+                if (Thread.currentThread().isInterrupted()) {
+                    Thread.currentThread().interrupt();
+                    break;
+                }
+                final int readByteCount = in.read(buffer);
+                if (readByteCount < 0) {
+                    break;
+                }
+                out.write(buffer, 0, readByteCount);
+            }
+        } catch (RemoteException re) {
+            throw new IOException("Error reading file", re);
+        } catch (IOException ioe) {
+            throw new IOException("Error reading file", ioe);
+        } finally {
+            IoUtils.closeQuietly(in);
+            IoUtils.closeQuietly(out);
+            IoUtils.closeQuietly(sink);
+            IoUtils.closeQuietly(source);
+        }
+    }
+
+    public void cancelPrint() throws IOException {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "cancelPrint()");
+        }
+        synchronized (mLock) {
+            if (isPrintingLocked()) {
+                try {
+                    mCancellationSignal.cancel();
+                } catch (RemoteException re) {
+                    throw new IOException("Error cancelling print", re);
+                }
+            }
+        }
+    }
+
+    public void finish() throws IOException {
+        if (DEBUG) {
+            Log.i(LOG_TAG, "finish()");
+        }
+        try {
+            mRemoteInterface.finish();
+        } catch (RemoteException re) {
+            throw new IOException("Error reading file", re);
+        }
+    }
+
+    public PrintAdapterInfo getInfo() {
+        synchronized (mLock) {
+            return mInfo;
+        }
+    }
+
+    private boolean isPrintingLocked() {
+        return mCancellationSignal != null;
+    }
+}
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 516608b..7d5959c 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Stelsel-UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Maak skoon"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Moenie steur nie"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Wys kennisgewings"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Verwyder uit lys"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Program Info"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Geen onlangse programme nie"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Ligging deur GPS gestel"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Verwyder alle kennisgewings."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Programinligting"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Kennisgewings af"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tik hier om kennisgewings weer aan te skakel."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Die skerm sal outomaties draai."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skerm is in landskapsoriëntasie gesluit."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skerm is in portretoriëntasie gesluit."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Kennisgewings verskyn hier"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Verkry enige tyd toegang tot hulle deur af te sleep."\n"Sleep weer af vir stelselkontroles."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Sleep op vanaf onderkant van skerm om stelselbalk te wys"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Sleep onderkant van skerm om balk te wys"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Sleep van regterkant van skerm af om stelselbalk te wys"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 6c461ef..e66149e 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"የስርዓት UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"አጥራ"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"አይረብሹ"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"ማሳወቂያዎች አሳይ"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"ከዝርዝር አስወግድ"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"የትግበራ መረጃ"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"ምንም የቅርብ ጊዜ ትግበራዎች የሉም"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"በ GPS የተዘጋጀ ሥፍራ"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"ሁሉንም ማሳወቂያዎች አጽዳ"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"የመተግበሪያ መረጃ"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"ማሳወቂያዎች ጠፍተዋል"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"ማስታወቅያዎችን መልሶ ለማብራት እዚህ ጋር መታ አድርግ።"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"ማያ ገጽ በራስ ሰር ይዞራል።"</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ማያ ገጽ በወርድ ገፅ አቀማመጥ ተቆልፏል።"</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ማያ ገጽ በቁም ገፅ አቀማመጥ ተቆልፏል።"</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ራስ-ሰር"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"ማሳወቂያዎች እዚህ ላይ ይታያሉ"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"ወደ ታች በማንሸራተት በማንኛውም ጊዜ ይድረሱባቸው።"\n"Swipe የስርዓት መቆጣጠሪያዎችን ለማምጣት እንደገና ወደ ታች ያንሸራትቱ።"</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"የስርዓት አሞሌውን ለማሳየት ከማያ ገጹ ታችኛው ክፍል ጀምረው ወደላይ ያንሸራትቱ"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"አሞሌውን ለማሳየት የማያ ገጹ ታችኛው ክፍል ያንሸራትቱ"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"አሞሌውን ለማሳየት ከማያ ገጹ ቀኝ ክፍል ጀምረው ያንሸራትቱ"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index f25849f..20347db 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"واجهة مستخدم النظام"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"محو"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"عدم الإزعاج"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"إظهار التنبيهات"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"إزالة من القائمة"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"معلومات التطبيق"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"ليس هناك تطبيقات حديثة"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"تم تعيين الموقع بواسطة GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"محو جميع الإشعارات."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"معلومات التطبيق"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"التنبيهات معطّلة"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"انقر هنا لإعادة تشغيل الإشعارات."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"سيتم تدوير الشاشة تلقائيًا."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"تم تأمين الشاشة في الاتجاه الأفقي."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"تم تأمين الشاشة في الاتجاه العمودي."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"تلقائي"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"تظهر الإشعارات هنا"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"يمكنك الدخول إليها في أي وقت بالتمرير السريع إلى أسفل."\n"يمكنك التمرير السريع إلى أسفل مرة أخرى للوصول إلى عناصر تحكم النظام."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"مرر سريعًا من أسفل الشاشة لإظهار شريط النظام"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"مرر سريعًا أسفل الشاشة لإظهار الشريط"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"مرر سريعًا من يمين الشاشة لإظهار شريط النظام"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 1c68530..b7d58e2 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Інтэрфейс карыстальніка сістэмы"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ачысціць"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Не турбаваць"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Паказваць паведамленні"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Выдаліць са спісу"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Звесткі аб прыкладанні"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Апошніх прыкладанняў няма"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Месца задана праз GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Выдалiць усе апавяшчэннi."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інфармацыя пра прыкладанне"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Паведамленні адключаны"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Націсніце тут, каб зноў уключыць апавяшчэнні."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран паварочваецца аўтаматычна."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Экран заблакiраваны ў альбомнай арыентацыі."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Экран заблакiраваны ў партрэтнай арыентацыі."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АЎТА"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Апавяшчэнні з\'яўляюцца тут"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Атрымлівайце доступ да іх у любы час, праводзячы пальцам уніз."\n"Правядзіце пальцам уніз яшчэ раз, каб атрымаць доступ да сродкаў кіравання сістэмай."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Правядзіце па экрану знізу ўверх, каб адлюстраваць сістэмны радок"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Правядзіце па ніжняй частцы экрану, каб адлюстраваць радок"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Правядзіце ад правага краю экрану, каб адлюстраваць сістэмны радок"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 7e27716..6cd66e3 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Системен ПИ"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Изчистване"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Не ме безпокойте"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Показване на известията"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Премахване от списъка"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Информация за приложението"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Няма скорошни приложения"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Местоположението е зададено от GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Изчистване на всички известия."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Информация за приложението"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Известията са изключени"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Докоснете тук, за да включите отново известията."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екранът ще се завърта автоматично."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екранът е заключен в хоризонтална ориентация."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екранът е заключен във вертикална ориентация."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТ."</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Известията се показват тук"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Осъществявайте достъп до тях по всяко време, като прекарате пръст надолу."\n"Направете го отново за системните контроли."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Прекарайте пръст нагоре от долната част на екрана, за да се покаже системната лента"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Прекарайте пръст от долната част на екрана, за да се покаже лентата"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Прекарайте пръст отдясно на екрана, за да се покаже системната лента"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 1f14d2d..61cb134 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"IU del sistema"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Esborra"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"No molesteu"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostra notificacions"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Elimina de la llista"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informació de l\'aplicació"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"No hi ha aplicacions recents"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"S\'ha establert la ubicació per GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Esborra totes les notificacions."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informació de l\'aplicació"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificacions desactivades"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Pica aquí per tornar a activar les notificacions."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girarà automàticament."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla està bloquejada en orientació horitzontal."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla està bloquejada en orientació vertical."</string>
@@ -205,7 +201,6 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÀTICA"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Les notificacions apareixen aquí"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Accedeix-hi en qualsevol moment: només has de fer lliscar el dit cap avall."\n"Torna a fer lliscar el dit cap avall per fer que es mostrin els controls del sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Fes lliscar el dit des de la part inferior de la pantalla perquè es mostri la barra del sistema"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Fes lliscar el dit des de la part inferior de la pantalla perquè es mostri la barra"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Fes lliscar el dit des de la dreta de la pantalla perquè es mostri la barra del sistema"</string>
+    <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Fes lliscar el dit per la vora de la pantalla perquè es mostri la barra"</string>
+    <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Fes lliscar el dit des de la vora de la pantalla perquè es mostri la barra del sistema"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 8621932..775d081 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI systému"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Vymazat"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Nerušit"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Zobrazit upozornění"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Odebrat ze seznamu"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informace o aplikaci"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Žádné nové aplikace"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavena pomocí systému GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazat všechna oznámení."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informace o aplikaci"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Oznámení jsou vypnuta"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Chcete-li oznámení znovu zapnout, klepněte sem."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka se automaticky otočí."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamčena v orientaci na šířku."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamčena v orientaci na výšku."</string>
@@ -205,7 +201,6 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Zde se zobrazují oznámení"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Můžete je kdykoli zobrazit tím, že přejedete prstem dolů."\n"Přejedete-li prstem dolů ještě jednou, zobrazí se ovládací prvky systému."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Systémový panel zobrazíte přejetím ze spodní části obrazovky nahoru"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Panel zobrazíte přejetím zdola nahoru"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Systémový panel zobrazíte přejetím z pravé strany obrazovky"</string>
+    <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Panel zobrazíte přejetím přes okraj obrazovky"</string>
+    <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Systémový panel zobrazíte přejetím přes okraj obrazovky"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 7e441af..34b39e2 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"System-UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ryd"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Forstyr ikke"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Vis meddelelser"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Fjern fra listen"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Oplysninger om appen"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Der er ingen seneste apps"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Placeringen er angivet ved hjælp af GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Ryd alle meddelelser."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Oplysninger om appen"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Underretninger slået fra"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tryk her for at slå underretninger til igen."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skærmen roterer automatisk."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skærmen er nu låst i liggende retning."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skærmen er nu låst i stående retning."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Underretninger vises her"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Få adgang til dem når som helst ved at stryge ned."\n"Stryg ned igen for at komme til systemindstillingerne."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Stryg op fra bunden af ​​skærmen for at vise systembjælken."</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Stryg bunden af ​​skærmen for at vise bjælken"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Stryg fra skærmens højre side for at vise systembjælken"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index f51f478..16968e5 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"System-UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Löschen"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Bitte nicht stören"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Benachrichtigungen zeigen"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Aus Liste entfernen"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"App-Info"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Keine kürzlich geöffneten Apps"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Standort durch GPS festgelegt"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Alle Benachrichtigungen löschen"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App-Details"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Benachrichtigungen aus"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tippen Sie hier, um die Benachrichtigungen wieder zu aktivieren."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Bildschirm wird automatisch gedreht."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Bildschirm bleibt im Querformat."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Bildschirm bleibt im Hochformat."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Benachrichtigungen erscheinen hier"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Greifen Sie jederzeit auf sie zu, indem Sie nach unten wischen."\n"Wischen Sie für Systemeinstellungen erneut nach unten."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Zum Einblenden der Systemleiste auf dem Display von unten nach oben wischen"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Zum Einblenden der Leiste nach oben wischen"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Zum Einblenden der Systemleiste auf dem Display von rechts nach links wischen"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 107b0ca..f7aa31c 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI συστήματ."</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Εκκαθάριση"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Μην ενοχλείτε"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Εμφάνιση ειδοποιήσεων"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Κατάργηση από τη λίστα"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Πληροφορίες εφαρμογής"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Δεν υπάρχουν πρόσφατες εφαρμογές"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Ρύθμιση τοποθεσίας με GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Εκκαθάριση όλων των ειδοποιήσεων."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Πληροφορίες εφαρμογής"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Ειδοποιήσεις ανενεργές"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Πατήστε εδώ για να ενεργοποιήσετε ξανά τις ειδοποιήσεις."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Θα γίνεται αυτόματη περιστροφή της οθόνης."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Η οθόνη έχει κλειδωθεί σε οριζόντιο προσανατολισμό."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Η οθόνη έχει κλειδωθεί σε κατακόρυφο προσανατολισμό."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"ΑΥΤΟΜΑΤΗ"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Οι ειδοποιήσεις εμφανίζονται εδώ"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Μεταβείτε σε αυτές ανά πάσα στιγμή σύροντας προς τα κάτω."\n"Σύρετε ξανά προς τα κάτω για τα στοιχεία ελέγχου συστήματος."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Σύρετε προς τα επάνω από το κάτω μέρος της οθόνης για να εμφανίσετε τη γραμμή συστήματος"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Σύρετε από το κάτω μέρος της οθόνης για να εμφανίσετε τη γραμμή"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Σύρετε από τη δεξιά πλευρά της οθόνης για να εμφανίσετε τη γραμμή συστήματος"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 5286911..68da06a 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"System UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Clear"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Do not disturb"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Show notifications"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Remove from list"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"App info"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"No recent apps"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Location set by GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Clear all notifications."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App info"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notifications off"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tap here to turn notifications back on."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Screen will rotate automatically."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Screen is locked in landscape orientation."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Screen is locked in portrait orientation."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Notifications appear here"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Access them any time by swiping down."\n"Swipe down again for system controls."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Swipe up from bottom of screen to reveal system bar"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Swipe bottom of screen to reveal bar"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Swipe from right of screen to reveal system bar"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index e9977e4..770b440 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"IU del sistema"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Eliminar"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"No molestar"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostrar notificaciones"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Eliminar de la lista"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Información de la aplicación"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Ninguna aplicación reciente"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"La ubicación se estableció por GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Eliminar todas las notificaciones"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Información de la aplicación"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificaciones desactivadas"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Toca aquí para volver a activar las notificaciones."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla está bloqueada en modo horizontal."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Las notificaciones aparecen aquí."</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Desliza el dedo hacia abajo para acceder al contenido."\n"Vuelve a deslizar el dedo hacia abajo para acceder a los controles del sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Desliza el dedo hacia arriba desde la parte inferior de la pantalla para mostrar la barra del sistema."</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Desliza el dedo desde la parte inferior de la pantalla para mostrar la barra."</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Desliza el dedo desde la derecha de la pantalla para mostrar la barra del sistema."</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index e4bd8c3..5295079 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"IU sistema"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Borrar"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"No molestar"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostrar notificaciones"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Eliminar de la lista"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Información de la aplicación"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"No hay aplicaciones recientes."</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Ubicación definida por GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Borrar todas las notificaciones"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Información de la aplicación"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificaciones desactivadas"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Toca aquí para volver a activar las notificaciones."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"La pantalla girará automáticamente."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"La pantalla está bloqueada en modo horizontal."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"La pantalla está bloqueada en modo vertical."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Las notificaciones aparecen aquí"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Desliza el dedo hacia abajo para acceder al contenido."\n"Vuelve a deslizar el dedo hacia abajo para acceder a los controles del sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Desliza la pantalla hacia arriba desde la parte inferior para mostrar la barra del sistema"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Desliza la parte inferior de la pantalla para mostrar la barra"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Desliza la pantalla desde la derecha para mostrar la barra del sistema"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 64b27ad..f084d2d 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Süsteemi UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Kustuta"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Mitte häirida"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Kuva teatised"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Loendist eemaldamine"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Rakenduse teave"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Uusi rakendusi pole"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS-i määratud asukoht"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Kustuta kõik teatised."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Rakenduse teave"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Teatised väljas"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Teatiste uuesti sisselülitamiseks puudutage siin."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekraani pööramine toimub automaatselt."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekraan on lukustatud horisontaalsuunas."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekraan on lukustatud vertikaalsuunas."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAATNE"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Märguanded ilmuvad siia"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Juurdepääs igal ajal sõrmega alla pühkides."\n"Süsteemi juhtnuppude jaoks pühkige uuesti alla."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Süsteemiriba kuvamiseks pühkige ekraani allosast üles"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Riba kuvamiseks pühkige ekraani allosas"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Süsteemiriba kuvamiseks pühkige ekraani paremast servast"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 610e3f8..6c48bed 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"رابط کاربر سیستم"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"پاک کردن"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"مزاحم نشوید"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"نمایش اعلان‌ها"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"حذف از لیست"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"اطلاعات برنامه"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"برنامه جدیدی موجود نیست"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"مکان تنظیم شده توسط GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"پاک کردن تمام اعلان‌ها"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"اطلاعات برنامه"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"اعلان‌ها خاموش"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"برای روشن کردن مجدد اعلان‌ها، اینجا را ضربه بزنید."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"صفحه به صورت خودکار می‌چرخد."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"صفحه اکنون در جهت افقی قفل است."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"صفحه اکنون در جهت عمودی قفل است."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"خودکار"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"اعلان‌ها در اینجا نمایش داده می‌شوند"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"با کشیدن انگشت به طرف پایین به آنها دسترسی پیدا کنید."\n"برای کنترل‌های سیستم دوباره انگشت خود را به سمت پایین بکشید."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"برای آشکارسازی نوار سیستم انگشت خود را از پایین صفحه به بالا بکشید"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"برای آشکارسازی نوار انگشت خود را روی پایین صفحه بکشید"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"برای آشکارسازی نوار سیستم انگشت خود را از سمت راست صفحه بکشید"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 77a1195..9f97fdb 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Käyttöliitt."</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Tyhjennä"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Varattu"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Näytä ilmoitukset"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Poista luettelosta"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Sovelluksen tiedot"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Ei viimeisimpiä sovelluksia"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Sijainti määritetty GPS:n avulla"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Tyhjennä kaikki ilmoitukset."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Sovelluksen tiedot"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Ilmoitukset pois käytöstä"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Ota ilmoitukset uudelleen käyttöön napauttamalla tätä."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ruutu kääntyy automaattisesti."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ruutu on lukittu vaakasuuntaan."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ruutu on lukittu pystysuuntaan."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Ilmoitukset näkyvät tässä"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Näet ilmoitukset liu\'uttamalla sormea alas ruudulla."\n"Voit palauttaa järjestelmän ohjaimet näkyviin liu\'uttamalla sormea alas uudelleen."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Tuo järjestelmäpalkki näkyviin liu\'uttamalla ruudun alalaidasta ylöspäin"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Tuo palkki näkyviin liu\'uttamalla ruudun alaosasta"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Tuo järjestelmäpalkki näkyviin liu\'uttamalla ruudun oikeasta laidasta vasemmalle"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index fab9104..aefcfe0 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"IU système"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Effacer"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ne pas déranger"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Afficher les notifications"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Supprimer de la liste"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informations sur l\'application"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Aucune application récente."</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Position définie par GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Supprimer toutes les notifications"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informations sur l\'application"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notifications désactivées"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Appuyez ici pour réactiver les notifications."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"L\'écran pivote automatiquement."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"L\'écran est verrouillé en mode paysage."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"L\'écran est verrouillé en mode portrait."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATIQUE"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Les notifications s’affichent ici"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Accédez-y à tout moment en faisant glisser le doigt vers le bas."\n"Répétez l\'opération pour accéder aux commandes du système."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Faites glisser votre doigt de bas en haut sur l\'écran pour afficher la barre système."</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Faites glisser votre doigt au bas de l\'écran pour afficher la barre."</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Faites glisser votre doigt de droite à gauche sur l\'écran pour afficher la barre système."</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index ffc2586..e8c07dd 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"सिस्‍टम UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"साफ़ करें"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"परेशान न करें"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"सूचनाएं दिखाएं"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"सूची से निकालें"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"एप्‍लिकेशन जानकारी"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"कोई हाल ही के एप्लिकेशन नहीं"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS द्वारा सेट किया गया स्‍थान"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"सभी सूचनाएं साफ़ करें."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"एप्‍लिकेशन जानकारी"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"सूचनाएं बंद"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"सूचनाओं को पुन: चालू करने के लिए यहां टैप करें."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"स्‍क्रीन स्‍वचालित रूप से घूमेगी."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"स्‍क्रीन लैंडस्केप अभिविन्यास में लॉक है."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"स्‍क्रीन पोर्ट्रेट अभिविन्‍यास में लॉक है."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"स्वत:"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"सूचनाएं यहां दिखाई देती हैं"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"नीचे स्वाइप करके उन तक कभी भी पहुंचें."\n"सिस्टम नियंत्रणों के लिए पुन: नीचे स्वाइप करें."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"सिस्टम बार दिखाने के लिए स्क्रीन के नीचे से ऊपर की ओर स्वाइप करें"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"बार दिखाने के लिए स्क्रीन के नीचे स्वाइप करें"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"सिस्टम बार दिखाने के लिए स्क्रीन की दाईं ओर से स्वाइप करें"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 49da7d0..a91eda5 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI sustava"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Očisti"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ne uznemiravaj"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Prikaži obavijesti"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Ukloni s popisa"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informacije o aplikaciji"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nema nedavnih aplikacija"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokaciju utvrdio GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Brisanje svih obavijesti."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informacije o aplikaciji"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Obavijesti isključene"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Dotaknite ovdje da biste ponovo uključili obavijesti."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon će se automatski zakrenuti."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Zaslon je zaključan u pejzažnoj orijentaciji."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaključan u portretnoj orijentaciji."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATSKI"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Obavijesti se prikazuju ovdje"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Pristupite im u bilo kojem trenutku tako da prstom trznete prema dolje. "\n"Ponovo prstom trznite prema dolje za kontrole sustava."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Prijeđite prstom od dna zaslona prema gore da bi se prikazala traka sustava"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Prijeđite prstom po dnu zaslona da bi se prikazala traka"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Prijeđite prstom od desne strane zaslona da bi se prikazala traka sustava"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index e7a70aa..a26575c 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Rendszer UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Törlés"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ne zavarjanak"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Értesítések megjelenítése"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Eltávolítás a listából"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Alkalmazásinformáció"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nincs újabb alkalmazás"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"A GPS beállította a helyet"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Minden értesítés törlése"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Alkalmazásinformáció"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Értesítések kikapcsolva"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Itt érintse meg az értesítések bekapcsolásához."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A képernyő automatikusan forogni fog."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A képernyő zárolva van fekvő tájolásban."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A képernyő zárolva van álló tájolásban."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"automatikus"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Az értesítések itt jelennek meg."</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Bármikor elérheti őket, ha lefelé húzza az ujját."\n"Húzza le az ujját még egyszer a rendszerbeállítások eléréséhez."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Csúsztassa ujját a képernyő aljától felfelé a rendszersáv megjelenítéséhez"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Csúsztassa ujját a képernyő alján a sáv megjelenítéséhez"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Csúsztassa ujját a képernyő jobb oldalától a rendszersáv megjelenítéséhez"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index fcc5252..93cfd86 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sistem UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Bersihkan"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Jangan ganggu"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Tampilkan pemberitahuan"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Hapus dari daftar"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Info apl"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Tidak ada apl terbaru"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi yang disetel oleh GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Menghapus semua pemberitahuan."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info aplikasi"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Pemberitahuan mati"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Ketuk di sini untuk menyalakan pemberitahuan lagi."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Layar akan diputar secara otomatis."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Layar dikunci dalam orientasi lanskap."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Layar dikunci dalam orientasi potret."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATIS"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Pemberitahuan muncul di sini"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Akses kapan saja dengan menggesek ke bawah."\n"Gesek ke bawah sekali lagi untuk kontrol sistem."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Gesek ke atas dari bagian bawah layar untuk membuka bilah sistem"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Gesek bagian bawah layar untuk membuka bilah"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Gesek dari bagian kanan layar untuk membuka bilah sistem"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 86fe11b..cef3733 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI sistema"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Cancella"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Non disturbare"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostra notifiche"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Rimuovi dall\'elenco"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informazioni applicazione"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nessuna app recente"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Posizione stabilita dal GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Cancella tutte le notifiche."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informazioni applicazione"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notifiche disattivate"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tocca qui per riattivare le notifiche."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Lo schermo ruoterà automaticamente."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Lo schermo è bloccato in orientamento orizzontale."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Lo schermo è bloccato in orientamento verticale."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Le notifiche vengono visualizzate qui"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Puoi accedervi in qualsiasi momento scorrendo verso il basso."\n"Fai scorrere di nuovo verso il basso per visualizzare i controlli del sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Fai scorrere il dito verso l\'alto dalla parte inferiore dello schermo per visualizzare la barra di sistema"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Fai scorrere parte inferiore dello schermo per visualizzare la barra"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Fai scorrere il dito dalla parte destra dello schermo per visualizzare la barra di sistema"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 212a581..d352972 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"ממשק משתמש של המערכת"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"נקה"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"נא לא להפריע"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"הצג התראות"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"הסר מהרשימה"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"פרטי יישום"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"אין יישומים אחרונים"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"מיקום מוגדר על ידי GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"נקה את כל ההתראות."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"פרטי יישום"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"מצב התראות כבוי"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"הקש כאן כדי להפעיל מחדש את ההתראות."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"המסך יסתובב באופן אוטומטי."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"המסך נעול כעת לרוחב."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"המסך נעול כעת לאורך."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"אוטומטי"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"הודעות מופיעות כאן"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"גש אליהם בכל עת על ידי החלקה למטה."\n"החלק למטה שוב למעבר למרכז הבקרה של המערכת."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"החלק מעלה מתחתית המסך כדי להציג את סרגל המערכת"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"החלק מתחתית המסך כדי להציג את הסרגל"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"החלק מצד ימין של המסך כדי להציג את סרגל המערכת"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 8a99e77..b57898a 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"システムUI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"通知を消去"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"通知を非表示"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"通知を表示"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"リストから削除"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"アプリ情報"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"最近使ったアプリはありません"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPSにより現在地が設定されました"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"通知をすべて消去。"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"アプリ情報"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"通知OFF"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"通知を再度ONにするにはここをタップします。"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"画面は自動的に回転します。"</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"画面は横向きにロックされています。"</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"画面は縦向きにロックされています。"</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"ここに通知が表示されます"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"下にスワイプすると、いつでも通知を表示できます。"\n"システムを管理するにはもう一度下にスワイプしてください。"</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"システムバーを表示するには、画面下部から上方向にスワイプします"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"バーを表示するには、画面下部からスワイプします"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"システムバーを表示するには、画面右からスワイプします"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 687b5d4..c9585fc 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"시스템 UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"지우기"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"응답 거부"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"알림 표시"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"목록에서 삭제"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"앱 정보"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"최근에 사용한 앱 없음"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS에서 위치 설정"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"모든 알림 지우기"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"앱 정보"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"알림 사용 안함"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"알림을 다시 사용하려면 여기를 터치하세요."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"화면이 자동으로 회전됩니다."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"화면이 가로 방향으로 잠겨 있습니다."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"화면이 세로 방향으로 잠겨 있습니다."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"자동"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"알림이 여기에 표시됨"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"아래로 스와이프하여 언제든 액세스하세요."\n"한 번 더 아래로 스와이프하면 시스템 관리로 이동합니다."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"화면 하단에서 위로 스와이프하여 시스템 표시줄 표시"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"화면 하단에서 스와이프하여 표시줄 표시"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"화면 오른쪽에서 스와이프하여 시스템 표시줄 표시"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 144b73f..9c57358 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sistemos NS"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Išvalyti"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Netrukdyti"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Rodyti pranešimus"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Pašalinti iš sąrašo"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Programos informacija"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nėra naujausių programų"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS nustatyta vieta"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Išvalyti visus pranešimus."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Programos informacija"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Pranešimai išjungti"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Jei norite vėl įjungti pranešimus, palieskite čia."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekranas bus sukamas automatiškai."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Užrakintas ekranas yra horizontalios orientacijos."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Užrakintas ekranas yra vertikalios orientacijos."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATINIS"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Pranešimai rodomi čia"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Perbraukę žemyn bet kuriuo metu pasieksite pranešimus."\n"Jei norite naudoti sistemos valdiklius, perbraukite žemyn dar kartą."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Jei norite, kad būtų rodoma sistemos juosta, perbraukite aukštyn iš ekrano apačios"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Jei norite, kad būtų rodoma juosta, perbraukite ekrano apačioje"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Jei norite, kad būtų rodoma sistemos juosta, perbraukite iš ekrano dešinės"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 0af4e5b..65cadd5 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sistēmas UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Notīrīt"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Netraucēt"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Rādīt paziņojumus"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Noņemšana no saraksta"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Lietotnes informācija"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nav nesen izmantotu lietotņu."</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS iestatītā atrašanās vieta"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Notīrīt visus paziņojumus"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informācija par lietotni"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Paziņojumi ir izslēgti"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Pieskarieties šeit, lai atkal ieslēgtu paziņojumus."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekrāns tiks pagriezts automātiski."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekrāns tagad ir bloķēts ainavas orientācijā."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekrāns tagad ir bloķēts portreta orientācijā."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMĀTISKI"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Šeit tiek rādīti paziņojumi"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Piekļūstiet tiem jebkurā laikā, velkot uz leju."\n"Vēlreiz velciet, lai tiktu parādītas sistēmas vadīklas."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Velciet augšup no ekrāna apakšdaļas, lai tiktu parādīta sistēmas josla."</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Velciet no ekrāna apakšdaļas, lai tiktu parādīta josla."</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Velciet no ekrāna labās malas, lai tiktu parādīta sistēmas josla."</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index b83e4b9..1bbe4df 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sistem UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Pdm bersih"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Jangan ganggu"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Tunjukkan pemberitahuan"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Alih keluar dari senarai"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Maklumat aplikasi"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Tiada aplikasi terbaharu"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasi ditetapkan oleh GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Padamkan semua pemberitahuan."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Maklumat apl"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Pemberitahuan dimatikan"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Ketik di sini untuk menghidupkan kembali pemberitahuan."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrin akan berputar secara automatik."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skrin dikunci dalam orientasi landskap."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrin dikunci dalam orientasi potret."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Pemberitahuan dipaparkan di sini"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Akses panel pada bila-bila masa dengan meleret ke bawah."\n"Leret ke bawah sekali lagi untuk mendapatkan kawalan sistem."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Leret ke atas dari bahagian bawah skrin untuk menampakkan bar sistem"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Leret ke bahagian bawah skrin untuk menampakkan bar"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Leret dari kanan skrin untuk menampakkan bar sistem"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 5feb05f..acda153 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sys.gr.snitt"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Fjern"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ikke forstyrr"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Vis varslinger"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Fjern fra listen"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Info om app"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Ingen nylige apper"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Posisjon angitt av GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Fjern alle varslinger."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info om app"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Varsler er deaktivert"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Trykk her for å aktivere varsler på nytt."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skjermen roterer automatisk."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skjermen er låst i liggende retning."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skjermen er låst i stående retning."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Varslene vises her"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Bruk dem når som helst ved å sveipe nedover."\n"Sveip nedover igjen for å gå til systemkontrollene."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Sveip opp fra bunnen av skjermen for å få frem systemfeltet"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Sveip på bunnen av skjermen for å få frem feltet"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Sveip fra høyre på skjermen for å få frem systemfeltet"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index b16cc9f..90faf36 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Systeem-UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Wissen"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Niet storen"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Meldingen weergeven"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Verwijderen uit lijst"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"App-info"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Geen recente apps"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Locatie bepaald met GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Alle meldingen wissen."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"App-info"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Meldingen uit"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tik hier om meldingen weer in te schakelen."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Scherm wordt automatisch geroteerd."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Het scherm is nu vergrendeld in liggende stand."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Het scherm is nu vergrendeld in staande stand."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATISCH"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Meldingen worden hier weergegeven"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"U kunt de meldingen op elk gewenst moment openen door met uw vinger omlaag te vegen."\n"Veeg nogmaals met uw vinger omlaag om de systeembesturingselementen weer te geven."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Veeg omhoog vanaf de onderkant van het scherm om de systeembalk weer te geven"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Veeg onderkant van scherm om balk weer te geven"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Veeg vanaf de rechterkant van het scherm om de systeembalk weer te geven"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 7a296b4..a7eb487 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Interfejs"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Wyczyść"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Nie przeszkadzać"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Pokaż powiadomienia"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Usuń z listy"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informacje o aplikacji"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Brak ostatnio uruchomionych aplikacji."</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokalizacja z GPSa"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Usuń wszystkie powiadomienia."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"O aplikacji"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Powiadomienia wyłączone"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Kliknij tutaj, by przywrócić powiadomienia."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran zostanie obrócony automatycznie."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran jest zablokowany w orientacji poziomej."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran jest zablokowany w orientacji pionowej."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATYCZNA"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Tutaj pokazują się powiadomienia"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Możesz je otworzyć w dowolnej chwili, przesuwając w dół."\n"Przesuń jeszcze raz w dół, by otworzyć ustawienia systemowe."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Przesuń palcem od dołu ekranu, by odkryć pasek systemu"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Przesuń palcem dół ekranu, by odkryć pasek"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Przesuń palcem od prawej strony ekranu, by odkryć pasek systemu"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 093a51f..93a47b0 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"IU do sist."</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Limpar"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Não incomodar"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostrar notificações"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Remover da lista"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informações da aplicação"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Não existem aplicações recentes"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Localização definida por GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações da aplicação"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificações desativadas"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Toque aqui para voltar a ativar as notificações."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"O ecrã será rodado automaticamente."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"O ecrã está bloqueado na orientação horizontal."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"O ecrã está bloqueado na orientação vertical."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMÁTICO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"As notificações são apresentadas aqui"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Pode aceder em qualquer altura, deslizando rapidamente para baixo com o dedo."\n"Deslize novamente para baixo para aceder aos controlos do sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Deslize p/ cima a partir da parte inferior do ecrã p/ revelar a barra do sistema"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Deslize da parte inferior do ecrã p/ revelar a barra"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Deslize da direita do ecrã p/ revelar a barra do sistema"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 0363bc1..8811f21 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Interf sist"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Limpar"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Não perturbe"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Mostrar notificações"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Remover da lista"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informações do aplicativo"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nenhum aplicativo recente"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Local definido por GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Limpar todas as notificações."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informações do aplicativo"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificações desativadas"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Toque aqui para ativar as notificações novamente."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"A tela girará automaticamente."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"A tela está bloqueada na orientação paisagem."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"A tela está bloqueada na orientação retrato."</string>
@@ -205,7 +201,6 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"As notificações aparecem aqui"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Acesse a qualquer momento deslizando para baixo."\n"Deslize para baixo novamente para acessar os controles do sistema."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Deslize de cima para baixo na tela para ver a barra do sistema"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Deslize para baixo para ver a barra"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Deslize da direita para a esquerda na tela para ver a barra do sistema"</string>
+    <string name="hideybar_confirmation_message" msgid="9050869548951044371">"Deslize a borda da tela para ver a barra"</string>
+    <string name="hideybar_confirmation_message_long" msgid="7117692795163620626">"Deslize a partir da borda da tela ver a barra do sistema"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index 6b01a72..d68b80c 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -22,10 +22,6 @@
     <!-- no translation found for app_label (7164937344850004466) -->
     <skip />
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Stizzar"</string>
-    <!-- no translation found for status_bar_do_not_disturb_button (5812628897510997853) -->
-    <skip />
-    <!-- no translation found for status_bar_please_disturb_button (3345398298841572813) -->
-    <skip />
     <!-- no translation found for status_bar_recent_remove_item_title (6026395868129852968) -->
     <skip />
     <!-- no translation found for status_bar_recent_inspect_item_title (7793624864528818569) -->
@@ -306,10 +302,6 @@
     <skip />
     <!-- no translation found for status_bar_notification_inspect_item_title (1163547729015390250) -->
     <skip />
-    <!-- no translation found for notifications_off_title (8936620513608443224) -->
-    <skip />
-    <!-- no translation found for notifications_off_text (2529001315769385273) -->
-    <skip />
     <!-- no translation found for accessibility_rotation_lock_off (4062780228931590069) -->
     <skip />
     <!-- no translation found for accessibility_rotation_lock_on_landscape (6731197337665366273) -->
@@ -376,10 +368,8 @@
     <skip />
     <!-- no translation found for status_bar_help_text (7874607155052076323) -->
     <skip />
-    <!-- no translation found for hideybar_confirmation_message_bottom (4678097945183429216) -->
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
     <skip />
-    <!-- no translation found for hideybar_confirmation_message_bottom_short (4014207345313478943) -->
-    <skip />
-    <!-- no translation found for hideybar_confirmation_message_right (5359586491708388067) -->
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
     <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 741b0e9..5d326d1 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI sistem"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ștergeţi"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Nu deranjaţi"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Afişaţi notificări"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Eliminaţi din listă"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informaţii despre aplicaţie"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Nu există aplicaţii recente"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Locaţie setată prin GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Ștergeţi toate notificările."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informaţii despre aplicaţie"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Notificările sunt dezactivate"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Apăsaţi aici pentru a reactiva notificările."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ecranul se va roti în mod automat."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ecranul este blocat în orientarea de tip peisaj."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ecranul este blocat în orientarea de tip portret."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMAT"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Notificările se afişează aici"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Accesaţi-le oricând glisând în jos."\n"Glisaţi în jos din nou pentru comenzile sistemului."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Glisați în sus din partea inferioară a ecranului pentru a afișa bara de sistem"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Glisați dinspre partea inferioară a ecranului pentru a afișa bara"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Glisați din partea dreaptă a ecranului pentru a afișa bara de sistem"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 1128675..f09e192 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Графический интерфейс системы"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Очистить"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Не беспокоить"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Показать уведомления"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Удалить из списка"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"О приложении"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Список недавно использованных приложений пуст."</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Координаты по GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Удалить все уведомления"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"О приложении"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Уведомления отключены"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Нажмите здесь, чтобы снова включить уведомления."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Экран будет поворачиваться автоматически."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Выбрана только альбомная ориентация экрана."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Выбрана только книжная ориентация экрана."</string>
@@ -207,7 +203,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТОНАСТРОЙКА"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Это панель уведомлений"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Ее можно открыть, пролистнув экран вниз."\n"Чтобы открыть настройки, проведите пальцем вниз ещё раз."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Чтобы увидеть строку состояния, проведите пальцем от нижней части экрана вверх"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Чтобы увидеть строку состояния, проведите по экрану снизу вверх"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Чтобы увидеть строку состояния, проведите пальцем по экрану справа налево"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 334cabf..4396daa 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI systému"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Vymazať"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Nerušiť"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Zobraziť upozornenia"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Odstrániť zo zoznamu"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Informácie o aplikácii"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Žiadne nedávne aplikácie"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Poloha nastavená pomocou GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Vymazať všetky upozornenia."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Informácie o aplikácii"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Upozornenia sú vypnuté"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Klepnutím sem upozornenia znova povolíte."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Obrazovka sa automaticky otočí."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Obrazovka je uzamknutá v orientácii na šírku."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Obrazovka je uzamknutá v orientácii na výšku."</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTOMATICKY"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Tu sa zobrazujú upozornenia"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Môžete ich kedykoľvek zobraziť tak, že posuniete prstom nadol."\n"Ak posuniete prstom nadol ešte raz, zobrazia sa ovládacie prvky systému."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Systémový panel zobrazíte posunutím z dolnej časti obrazovky smerom nahor"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Panel zobrazíte posunutím zdola nahor"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Systémový panel zobrazíte posunutím z pravej strany obrazovky"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index ca8823a..4a67b94 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sistemski uporabniški vmesnik"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Počisti"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ne moti"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Pokaži obvestila"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Odstrani s seznama"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Podatki o programu"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Ni nedavnih programov"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokacija nastavljena z GPS-om"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Izbriši vsa obvestila."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Podatki o aplikaciji"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Obvestila so izklopljena"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Dotaknite se tukaj, da ponovno vklopite obvestila."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Zaslon se bo samodejno zasukal."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Zaslon je zaklenjen v ležeči usmerjenosti."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Zaslon je zaklenjen v pokončni usmerjenosti."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"SAMODEJNO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Obvestila so prikazana tukaj"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Do njih lahko kadar koli dostopate tako, da povlečete navzdol."\n"Za prikaz sistemskih kontrolnikov znova povlecite navzdol."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Povlecite navzgor z dna zaslona, da prikažete sistemsko vrstico"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Prikažite vrstico tako, da povlečete na dnu zaslona"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Sistemsko vrstico prikažete tako, da povlečete z desne strani zaslona"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 10bfe8d..d37800f 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI система"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Обриши"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Не узнемиравај"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Приказуј упозорења"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Уклањање са листе"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Информације о апликацији"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Нема недавних апликација"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Локацију је подесио GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Обриши сва обавештења."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Информације о апликацији"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Обавештења су искључена"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Додирните овде да бисте поново укључили обавештења."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран ће се аутоматски ротирати."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран је закључан у хоризонталном положају."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран је закључан у вертикалном положају."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АУТОМАТСКА"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Обавештења се појављују овде"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Приступите им у било ком тренутку листањем надоле."\n"Поново листајте надоле да би се приказале системске контроле."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Превуците нагоре од доњег дела екрана да би се приказала системска трака"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Превуците од доњег дела екрана да би се приказала трака"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Превуците од десне стране екрана да би се приказала системска трака"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index db66858..0e81a4b 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Gränssnitt"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ta bort"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Stör ej"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Visa aviseringar"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Ta bort från listan"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Info om appen"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Inga nya appar"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Platsen har identifierats av GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Ta bort alla meddelanden."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Info om appen"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Meddelanden inaktiverade"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Knacka lätt här om du vill aktivera meddelanden igen."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skärmen roteras automatiskt."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Bildskärmens riktning är nu låst i liggande format."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Bildskärmens riktning är nu låst i stående format."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Meddelanden visas här"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Du kommer åt dem när som helst genom att dra nedåt."\n"Dra nedåt igen om du vill visa systemkontroller."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Dra uppåt från skärmens nederkant om du vill visa systemfältet"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Dra uppåt på skärmen om du vill visa fältet"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Dra från högersidan av skärmen om du vill visa systemfältet"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 7d1f825..85bcfb9 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI ya Mfumo"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Futa"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Usisumbue"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Onyesha arifa"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Ondoa kwenye orodha"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Taarifa za programu-matumizi"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Hakuna programu za sasa"</string>
@@ -166,8 +164,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Mahali pamewekwa na GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Futa arifa zote."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Taarifa ya programu"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Arifa zimelemazwa"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Gonga hapa ili kuwezesha tena arifa."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Skrini itazunguka kiotomatiki."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Skrini imefungwa sasa katika uelekezo wa mandhari."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Skrini imefungwa katika uelekeo wa picha."</string>
@@ -201,7 +197,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"KIOTOMATIKI"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Arifa zitaonekana hapa"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Zifikie wakati wowote kwa kutelezesha chini."\n"Telezesha chini tena kupata vidhibiti vya mfumo."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Telezesha kwenda juu kutoka chini ya skrini ili kuonyesha upau wa mfumo"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Telezesha sehemu ya chini ya skrini ili kuonyesha upau"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Telezesha kutoka kulia mwa skrini ili kuonyesha upau wa mfumo"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index dc4491d..18ed6e0 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"ส่วนติดต่อผู้ใช้ของระบบ"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"ล้างข้อมูล"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"ห้ามรบกวน"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"แสดงการแจ้งเตือน"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"ลบจากรายการ"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"ข้อมูลแอปพลิเคชัน"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"ไม่มีแอปพลิเคชันล่าสุด"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"ตำแหน่งที่กำหนดโดย GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"ล้างการแจ้งเตือนทั้งหมด"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"ข้อมูลแอป"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"การแจ้งเตือนปิดอยู่"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"แตะที่นี่เพื่อเปิดการแจ้งเตือนอีกครั้ง"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"หน้าจอจะหมุนโดยอัตโนมัติ"</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"ขณะนี้หน้าจอถูกล็อกให้วางในแนวนอน"</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"ขณะนี้หน้าจอถูกล็อกให้วางในแนวตั้ง"</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"อัตโนมัติ"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"การแจ้งเตือนจะแสดงขึ้นที่นี่"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"เข้าถึงได้ทุกเมื่อด้วยการกวาดนิ้วลง"\n"กวาดนิ้วลงอีกครั้งสำหรับการควบคุมระบบ"</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"กวาดขึ้นจากด้านล่างของหน้าจอเพื่อแสดงแถบระบบ"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"กวาดด้านล่างของหน้าจอเพื่อแสดงแถบ"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"กวาดจากด้านขวาของหน้าจอเพื่อแสดงแถบระบบ"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index a0c2afbdc..043a23e 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"UI ng System"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"I-clear"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Huwag gambalain"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Magpakita ng notification"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Alisin mula sa listahan"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Impormasyon ng app"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Walang kamakailang apps"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Lokasyong itinatakda ng GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"I-clear ang lahat ng notification."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Impormasyon ng app"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Naka-off ang mga notification"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Tumapik dito upang muling i-on ang mga notification."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Awtomatikong iikot ang screen."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Naka-lock ang screen sa pahigang oryentasyon."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Naka-lock ang screen sa patayong oryentasyon."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"AUTO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Dito lumalabas ang mga notification"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"I-access ang mga ito anumang oras sa pamamagitan ng pag-swipe pababa."\n"Muling mag-swipe pababa para sa mga kontrol ng system."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Mag-swipe pataas mula sa ibaba ng screen upang ipakita ang system bar"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Mag-swipe sa ibaba ng screen upang ipakita ang bar"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Mag-swipe mula sa kanan ng screen upang ipakita ang system bar"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index d7ec1c7..96c64d3 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Sist Arayüzü"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Temizle"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Rahatsız etmeyin"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Bildirimleri göster"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Listeden kaldır"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Uygulama bilgileri"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Son uygulama yok"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Konum GPS ile belirlendi"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Tüm bildirimleri temizle"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Uygulama bilgileri"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Bildirimler kapalı"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Bildirimleri tekrar açmak için buraya hafifçe vurun."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Ekran otomatik olarak dönecektir."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Ekran yatay yönde kilitlendi."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Ekran dikey yönde kilitlendi."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OTOMATİK"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Bildirimler burada görünür"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Aşağıya hızlıca kaydırarak bunlara istediğiniz zaman erişebilirsiniz."\n"Sistem denetimleri için tekrar hızlıca aşağı kaydırın."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Sistem çubuğunu görüntülemek için ekranın altında yukarı doğru hızlıca kaydırın"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Çubuğu görüntülemek için ekranın altından hızlıca kaydırın"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Sistem çubuğunu görüntülemek için ekranın sağından hızlıca kaydırın"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index b04d337..d470e64 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Інтерфейс системи"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Очист."</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Не турбувати"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Показувати сповіщення"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Видалити зі списку"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Інформація про програму"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Немає останніх програм"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Місцезнаходження встановлено за допомогою GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Очистити всі сповіщення."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Інформація про програму"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Сповіщення вимкнено"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Торкніться тут, щоб знову ввімкнути сповіщення."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Екран обертатиметься автоматично."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Екран заблоковано в альбомній орієнтації."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Екран заблоковано в книжковій орієнтації."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"АВТО"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Сповіщення з’являються тут"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Отримуйте до них доступ будь-коли, провівши пальцем униз."\n"Знову проведіть униз, щоб відкрити елементи керування системи."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Проведіть пальцем угору від низу екрана, щоб з’явився системний рядок"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Проведіть від низу екрана, щоб з’явився рядок"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Проведіть пальцем справа наліво на екрані, щоб з’явився системний рядок"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 20ec4cf..a4eee9d 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Giao diện người dùng hệ thống"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Xóa"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Không làm phiền"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Hiển thị thông báo"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Xóa khỏi danh sách"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Thông tin về ứng dụng"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Không có ứng dụng nào gần đây"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Vị trí đặt bởi GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Xóa tất cả thông báo."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Thông tin về ứng dụng"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Tắt thông báo"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Chạm vào đây để bật lại thông báo."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Màn hình sẽ xoay tự động."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Màn hình hiện bị khóa theo hướng ngang."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Màn hình hiện bị khóa theo hướng dọc."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"TỰ ĐỘNG"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Thông báo xuất hiện tại đây"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Truy cập vào chúng bất kỳ lúc nào bằng cách vuốt xuống."\n"Vuốt lại xuống để hiển thị các điều khiển hệ thống."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Vuốt lên từ cuối màn hình để hiển thị thanh hệ thống"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Vuốt cuối màn hình để hiển thị thanh"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Vuốt từ bên phải màn hình để hiển thị thanh hệ thống"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index af4d77d..ee8de82 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"系统用户界面"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"清除"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"请勿打扰"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"显示通知"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"从列表中删除"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"应用信息"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"最近没有运行任何应用"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"已通过 GPS 确定位置"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"应用信息"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"通知功能已停用"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"点按此处可重新启用通知功能。"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"屏幕会自动旋转。"</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"屏幕锁定为横向模式。"</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"屏幕锁定为纵向模式。"</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自动"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"通知会显示在这里"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"向下滑动可随时查看通知。"\n"再次向下滑动可使用系统控制功能。"</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"从屏幕底部向上滑动即可显示系统栏"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"从底部向上滑可显示系统栏"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"从屏幕右侧向左滑动即可显示系统栏"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 032d4c9..299f255 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"系統 UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"清除"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"勿干擾"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"顯示通知"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"從清單中移除"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"應用程式資訊"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"沒有最近使用的應用程式"</string>
@@ -170,8 +168,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"GPS 已定位"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"清除所有通知。"</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"應用程式資訊"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"關閉通知"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"輕按這裡即可重新開啟通知。"</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"螢幕會自動旋轉。"</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"螢幕已鎖定為橫向模式。"</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"螢幕已鎖定為垂直模式。"</string>
@@ -205,7 +201,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"自動"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"系統會在這裡顯示通知"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"向下滑動即可隨時存取通知。"\n"再次向下滑動即可使用系統控制項。"</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"從螢幕底部向上滑動即可顯示系統列"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"從螢幕底部滑動即可顯示系統列"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"從螢幕右側滑動即可顯示系統列"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 8cbf456..53837be 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -21,8 +21,6 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="7164937344850004466">"Uhlelo lwe-UI"</string>
     <string name="status_bar_clear_all_button" msgid="7774721344716731603">"Sula"</string>
-    <string name="status_bar_do_not_disturb_button" msgid="5812628897510997853">"Ungaphazamisi"</string>
-    <string name="status_bar_please_disturb_button" msgid="3345398298841572813">"Bonisa izaziso"</string>
     <string name="status_bar_recent_remove_item_title" msgid="6026395868129852968">"Susa ohlwini"</string>
     <string name="status_bar_recent_inspect_item_title" msgid="7793624864528818569">"Ulwazi lwensiza"</string>
     <string name="status_bar_no_recent_apps" msgid="6576392951053994640">"Azikho izinhlelo zokusebenza zakamuva"</string>
@@ -168,8 +166,6 @@
     <string name="gps_notification_found_text" msgid="4619274244146446464">"Indawo ihlelwe i-GPS"</string>
     <string name="accessibility_clear_all" msgid="5235938559247164925">"Susa zonke izaziso."</string>
     <string name="status_bar_notification_inspect_item_title" msgid="1163547729015390250">"Ulwazi lohlelo lokusebenza"</string>
-    <string name="notifications_off_title" msgid="8936620513608443224">"Izaziso zivaliwe"</string>
-    <string name="notifications_off_text" msgid="2529001315769385273">"Thepha lapha ukuvula futhi izaziso."</string>
     <string name="accessibility_rotation_lock_off" msgid="4062780228931590069">"Isikrini sizophenduka ngokuzenzakalela."</string>
     <string name="accessibility_rotation_lock_on_landscape" msgid="6731197337665366273">"Isikrini sikhiyelwe ngomumo we-landscape."</string>
     <string name="accessibility_rotation_lock_on_portrait" msgid="5809367521644012115">"Isikrini sikhiyelwe ngomumo we-portrait."</string>
@@ -203,7 +199,8 @@
     <string name="quick_settings_brightness_dialog_auto_brightness_label" msgid="5064982743784071218">"OKUZENZAKALELAYO"</string>
     <string name="status_bar_help_title" msgid="1199237744086469217">"Izaziso zivela lapha"</string>
     <string name="status_bar_help_text" msgid="7874607155052076323">"Kufinyelele noma kunini ngokuswayiphela phansi."\n"Swayiphela phansi futhi ngezilawuli zesistimu."</string>
-    <string name="hideybar_confirmation_message_bottom" msgid="4678097945183429216">"Swayipha kusukela ngaphansi kwesikrini ukuze uveze ibha yesistimu"</string>
-    <string name="hideybar_confirmation_message_bottom_short" msgid="4014207345313478943">"Swayipha ngaphansi kwesikrini ukuze uveze ibha"</string>
-    <string name="hideybar_confirmation_message_right" msgid="5359586491708388067">"Swayipha kusukela ngakwesokudla ukuze uveze ibha yesistimu"</string>
+    <!-- no translation found for hideybar_confirmation_message (9050869548951044371) -->
+    <skip />
+    <!-- no translation found for hideybar_confirmation_message_long (7117692795163620626) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 6661a63..b70dee1 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -100,6 +100,6 @@
     <bool name="config_hasFlipSettingsPanel">true</bool>
 
     <!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
-    <bool name="config_show4GForLTE">false</bool>
+    <bool name="config_show4GForLTE">true</bool>
 </resources>
 
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
index 043b64c..f130993 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
@@ -25,17 +25,14 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
 public class SystemUIService extends Service {
-    static final String TAG = "SystemUIService";
+    private static final String TAG = "SystemUIService";
 
     /**
-     * The class names of the stuff to start.
+     * The classes of the stuff to start.
      */
-    final Object[] SERVICES = new Object[] {
-            R.string.config_statusBarComponent,
+    private final Class<?>[] SERVICES = new Class[] {
+            com.android.systemui.statusbar.SystemBars.class,
             com.android.systemui.power.PowerUI.class,
             com.android.systemui.media.RingtonePlayer.class,
             com.android.systemui.settings.SettingsUI.class,
@@ -44,29 +41,13 @@
     /**
      * Hold a reference on the stuff we start.
      */
-    SystemUI[] mServices;
-
-    private Class chooseClass(Object o) {
-        if (o instanceof Integer) {
-            final String cl = getString((Integer)o);
-            try {
-                return getClassLoader().loadClass(cl);
-            } catch (ClassNotFoundException ex) {
-                throw new RuntimeException(ex);
-            }
-        } else if (o instanceof Class) {
-            return (Class)o;
-        } else {
-            throw new RuntimeException("Unknown system ui service: " + o);
-        }
-    }
+    private final SystemUI[] mServices = new SystemUI[SERVICES.length];
 
     @Override
     public void onCreate() {
         final int N = SERVICES.length;
-        mServices = new SystemUI[N];
         for (int i=0; i<N; i++) {
-            Class cl = chooseClass(SERVICES[i]);
+            Class<?> cl = SERVICES[i];
             Log.d(TAG, "loading: " + cl);
             try {
                 mServices[i] = (SystemUI)cl.newInstance();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 0879e0f..bf82466 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -194,6 +194,18 @@
         }
     };
 
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (Intent.ACTION_USER_SWITCHED.equals(action)) {
+                mCurrentUserId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
+                if (true) Log.v(TAG, "userId " + mCurrentUserId + " is in the house");
+                userSwitched(mCurrentUserId);
+            }
+        }
+    };
+
     public void start() {
         mWindowManager = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
         mWindowManagerService = WindowManagerGlobal.getWindowManagerService();
@@ -271,16 +283,7 @@
 
         IntentFilter filter = new IntentFilter();
         filter.addAction(Intent.ACTION_USER_SWITCHED);
-        mContext.registerReceiver(new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                String action = intent.getAction();
-                if (Intent.ACTION_USER_SWITCHED.equals(action)) {
-                    mCurrentUserId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
-                    if (true) Log.v(TAG, "userId " + mCurrentUserId + " is in the house");
-                    userSwitched(mCurrentUserId);
-                }
-            }}, filter);
+        mContext.registerReceiver(mBroadcastReceiver, filter);
 
         mLocale = mContext.getResources().getConfiguration().locale;
     }
@@ -1177,4 +1180,11 @@
     public void resumeAutohide() {
         // hook for subclasses
     }
+
+    public void destroy() {
+        if (mSearchPanelView != null) {
+            mWindowManager.removeViewImmediate(mSearchPanelView);
+        }
+        mContext.unregisterReceiver(mBroadcastReceiver);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java b/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java
new file mode 100644
index 0000000..f763f03
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ServiceMonitor.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.util.Log;
+
+import java.util.Arrays;
+
+/**
+ * Manages a persistent connection to a service component defined in a secure setting.
+ *
+ * <p>If a valid service component is specified in the secure setting, starts it up and keeps it
+ * running; handling setting changes, package updates, component disabling, and unexpected
+ * process termination.
+ *
+ * <p>Clients can listen for important events using the supplied {@link Callbacks}.
+ */
+public class ServiceMonitor {
+    private static final int RECHECK_DELAY = 2000;
+    private static final int WAIT_FOR_STOP = 500;
+
+    public interface Callbacks {
+        /** The service does not exist or failed to bind */
+        void onNoService();
+        /** The service is about to start, this is a chance to perform cleanup and
+         * delay the start if necessary */
+        long onServiceStartAttempt();
+    }
+
+    // internal handler + messages used to serialize access to internal state
+    public static final int MSG_START_SERVICE = 1;
+    public static final int MSG_CONTINUE_START_SERVICE = 2;
+    public static final int MSG_STOP_SERVICE = 3;
+    public static final int MSG_PACKAGE_INTENT = 4;
+    public static final int MSG_CHECK_BOUND = 5;
+    public static final int MSG_SERVICE_DISCONNECTED = 6;
+
+    private final Handler mHandler = new Handler() {
+        public void handleMessage(Message msg) {
+            switch(msg.what) {
+                case MSG_START_SERVICE:
+                    startService();
+                    break;
+                case MSG_CONTINUE_START_SERVICE:
+                    continueStartService();
+                    break;
+                case MSG_STOP_SERVICE:
+                    stopService();
+                    break;
+                case MSG_PACKAGE_INTENT:
+                    packageIntent((Intent)msg.obj);
+                    break;
+                case MSG_CHECK_BOUND:
+                    checkBound();
+                    break;
+                case MSG_SERVICE_DISCONNECTED:
+                    serviceDisconnected((ComponentName)msg.obj);
+                    break;
+            }
+        }
+    };
+
+    private final ContentObserver mSettingObserver = new ContentObserver(mHandler) {
+        public void onChange(boolean selfChange) {
+            onChange(selfChange, null);
+        }
+
+        public void onChange(boolean selfChange, Uri uri) {
+            if (mDebug) Log.d(mTag, "onChange selfChange=" + selfChange + " uri=" + uri);
+            if (mBound) {
+                mHandler.sendEmptyMessage(MSG_STOP_SERVICE);
+            }
+            mHandler.sendEmptyMessageDelayed(MSG_START_SERVICE, WAIT_FOR_STOP);
+        }
+    };
+
+    private final class SC implements ServiceConnection, IBinder.DeathRecipient {
+        private ComponentName mName;
+        private IBinder mService;
+
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            if (mDebug) Log.d(mTag, "onServiceConnected name=" + name + " service=" + service);
+            mName = name;
+            mService = service;
+            try {
+                service.linkToDeath(this, 0);
+            } catch (RemoteException e) {
+                Log.w(mTag, "Error linking to death", e);
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName name) {
+            if (mDebug) Log.d(mTag, "onServiceDisconnected name=" + name);
+            boolean unlinked = mService.unlinkToDeath(this, 0);
+            if (mDebug) Log.d(mTag, "  unlinked=" + unlinked);
+            mHandler.sendMessage(mHandler.obtainMessage(MSG_SERVICE_DISCONNECTED, mName));
+        }
+
+        public void binderDied() {
+            if (mDebug) Log.d(mTag, "binderDied");
+            mHandler.sendMessage(mHandler.obtainMessage(MSG_SERVICE_DISCONNECTED, mName));
+        }
+    }
+
+    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
+        public void onReceive(Context context, Intent intent) {
+            String pkg = intent.getData().getSchemeSpecificPart();
+            if (mServiceName != null && mServiceName.getPackageName().equals(pkg)) {
+                mHandler.sendMessage(mHandler.obtainMessage(MSG_PACKAGE_INTENT, intent));
+            }
+        }
+    };
+
+    private final String mTag;
+    private final boolean mDebug;
+
+    private final Context mContext;
+    private final String mSettingKey;
+    private final Callbacks mCallbacks;
+
+    private ComponentName mServiceName;
+    private SC mServiceConnection;
+    private boolean mBound;
+
+    public ServiceMonitor(String ownerTag, boolean debug,
+            Context context, String settingKey, Callbacks callbacks) {
+        mTag = ownerTag + ".ServiceMonitor";
+        mDebug = debug;
+        mContext = context;
+        mSettingKey = settingKey;
+        mCallbacks = callbacks;
+    }
+
+    public void start() {
+        // listen for setting changes
+        ContentResolver cr = mContext.getContentResolver();
+        cr.registerContentObserver(Settings.Secure.getUriFor(mSettingKey),
+                false /*notifyForDescendents*/, mSettingObserver, UserHandle.USER_ALL);
+
+        // listen for package/component changes
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_PACKAGE_ADDED);
+        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
+        filter.addDataScheme("package");
+        mContext.registerReceiver(mBroadcastReceiver, filter);
+
+        mHandler.sendEmptyMessage(MSG_START_SERVICE);
+    }
+
+    // everything below is called on the handler
+
+    private void packageIntent(Intent intent) {
+        if (mDebug) Log.d(mTag, "packageIntent intent=" + intent
+                + " extras=" + bundleToString(intent.getExtras()));
+        if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
+            mHandler.sendEmptyMessage(MSG_START_SERVICE);
+        } else if (Intent.ACTION_PACKAGE_CHANGED.equals(intent.getAction())) {
+            PackageManager pm = mContext.getPackageManager();
+            boolean serviceEnabled =
+                    pm.getApplicationEnabledSetting(mServiceName.getPackageName())
+                        != PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+                    && pm.getComponentEnabledSetting(mServiceName)
+                        != PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
+            if (mBound && !serviceEnabled) {
+                stopService();
+                scheduleCheckBound();
+            } else if (!mBound && serviceEnabled) {
+                startService();
+            }
+        }
+    }
+
+    private void stopService() {
+        if (mDebug) Log.d(mTag, "stopService");
+        boolean stopped = mContext.stopService(new Intent().setComponent(mServiceName));
+        if (mDebug) Log.d(mTag, "  stopped=" + stopped);
+        mContext.unbindService(mServiceConnection);
+        mBound = false;
+    }
+
+    private void startService() {
+        String cn = Settings.Secure.getStringForUser(mContext.getContentResolver(),
+                mSettingKey, UserHandle.USER_CURRENT);
+        mServiceName = cn == null ? null : ComponentName.unflattenFromString(cn);
+        if (mDebug) Log.d(mTag, "startService mServiceName=" + mServiceName);
+        if (mServiceName == null) {
+            mBound = false;
+            mCallbacks.onNoService();
+        } else {
+            long delay = mCallbacks.onServiceStartAttempt();
+            mHandler.sendEmptyMessageDelayed(MSG_CONTINUE_START_SERVICE, delay);
+        }
+    }
+
+    private void continueStartService() {
+        if (mDebug) Log.d(mTag, "continueStartService");
+        Intent intent = new Intent().setComponent(mServiceName);
+        try {
+            mServiceConnection = new SC();
+            mBound = mContext.bindService(intent, mServiceConnection, Context.BIND_AUTO_CREATE);
+            if (mDebug) Log.d(mTag, "mBound: " + mBound);
+        } catch (Throwable t) {
+            Log.w(mTag, "Error binding to service: " + mServiceName, t);
+        }
+        if (!mBound) {
+            mCallbacks.onNoService();
+        }
+    }
+
+    private void serviceDisconnected(ComponentName serviceName) {
+        if (mDebug) Log.d(mTag, "serviceDisconnected serviceName=" + serviceName
+                + " mServiceName=" + mServiceName);
+        if (serviceName.equals(mServiceName)) {
+            mBound = false;
+            scheduleCheckBound();
+        }
+    }
+
+    private void checkBound() {
+        if (mDebug) Log.d(mTag, "checkBound mBound=" + mBound);
+        if (!mBound) {
+            startService();
+        }
+    }
+
+    private void scheduleCheckBound() {
+        mHandler.removeMessages(MSG_CHECK_BOUND);
+        mHandler.sendEmptyMessageDelayed(MSG_CHECK_BOUND, RECHECK_DELAY);
+    }
+
+    private static String bundleToString(Bundle bundle) {
+        if (bundle == null) return null;
+        StringBuilder sb = new StringBuilder('{');
+        for (String key : bundle.keySet()) {
+            if (sb.length() > 1) sb.append(',');
+            Object v = bundle.get(key);
+            v = (v instanceof String[]) ? Arrays.asList((String[]) v) : v;
+            sb.append(key).append('=').append(v);
+        }
+        return sb.append('}').toString();
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SystemBars.java b/packages/SystemUI/src/com/android/systemui/statusbar/SystemBars.java
new file mode 100644
index 0000000..847bf96
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SystemBars.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.systemui.statusbar;
+
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.systemui.R;
+import com.android.systemui.SystemUI;
+
+/**
+ * Ensure a single status bar service implementation is running at all times.
+ *
+ * <p>The implementation either comes from a service component running in a remote process (defined
+ * using a secure setting), else falls back to using the in-process implementation according
+ * to the product config.
+ */
+public class SystemBars extends SystemUI implements ServiceMonitor.Callbacks {
+    private static final String TAG = "SystemBars";
+    private static final boolean DEBUG = true;
+    private static final int WAIT_FOR_BARS_TO_DIE = 500;
+
+    // manages the implementation coming from the remote process
+    private ServiceMonitor mServiceMonitor;
+
+    // in-process fallback implementation, per the product config
+    private BaseStatusBar mStatusBar;
+
+    @Override
+    public void start() {
+        if (DEBUG) Log.d(TAG, "start");
+        mServiceMonitor = new ServiceMonitor(TAG, DEBUG,
+                mContext, Settings.Secure.BAR_SERVICE_COMPONENT, this);
+        mServiceMonitor.start();  // will call onNoService if no remote service is found
+    }
+
+    @Override
+    public void onNoService() {
+        if (DEBUG) Log.d(TAG, "onNoService");
+        createStatusBarFromConfig();  // fallback to using an in-process implementation
+    }
+
+    @Override
+    public long onServiceStartAttempt() {
+        if (DEBUG) Log.d(TAG, "onServiceStartAttempt mStatusBar="+mStatusBar);
+        if (mStatusBar != null) {
+            // tear down the in-process version, we'll recreate it again if needed
+            mStatusBar.destroy();
+            mStatusBar = null;
+            return WAIT_FOR_BARS_TO_DIE;
+        }
+        return 0;
+    }
+
+    private void createStatusBarFromConfig() {
+        if (DEBUG) Log.d(TAG, "createStatusBarFromConfig");
+        final String clsName = mContext.getString(R.string.config_statusBarComponent);
+        if (clsName == null || clsName.length() == 0) {
+            throw andLog("No status bar component configured", null);
+        }
+        Class<?> cls = null;
+        try {
+            cls = mContext.getClassLoader().loadClass(clsName);
+        } catch (Throwable t) {
+            throw andLog("Error loading status bar component: " + clsName, t);
+        }
+        try {
+            mStatusBar = (BaseStatusBar) cls.newInstance();
+        } catch (Throwable t) {
+            throw andLog("Error creating status bar component: " + clsName, t);
+        }
+        mStatusBar.mContext = mContext;
+        mStatusBar.start();
+        if (DEBUG) Log.d(TAG, "started " + mStatusBar.getClass().getSimpleName());
+    }
+
+    private RuntimeException andLog(String msg, Throwable t) {
+        Log.w(TAG, msg, t);
+        throw new RuntimeException(msg, t);
+    }
+}
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 d86760f..dca8c97e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2691,4 +2691,16 @@
         public void setBounds(Rect bounds) {
         }
     }
+
+    @Override
+    public void destroy() {
+        super.destroy();
+        if (mStatusBarWindow != null) {
+            mWindowManager.removeViewImmediate(mStatusBarWindow);
+        }
+        if (mNavigationBarView != null) {
+            mWindowManager.removeViewImmediate(mNavigationBarView);
+        }
+        mContext.unregisterReceiver(mBroadcastReceiver);
+    }
 }
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 a19b52a..0e40140 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -90,7 +90,6 @@
     boolean mShowPhoneRSSIForData = false;
     boolean mShowAtLeastThreeGees = false;
     boolean mAlwaysShowCdmaRssi = false;
-    boolean mShow4GforLTE = false;
 
     String mContentDescriptionPhoneSignal;
     String mContentDescriptionWifi;
@@ -200,7 +199,6 @@
 
         mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
         mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
-        mShow4GforLTE = res.getBoolean(R.bool.config_show4GForLTE);
         mAlwaysShowCdmaRssi = res.getBoolean(
                 com.android.internal.R.bool.config_alwaysUseCdmaRssi);
 
@@ -680,7 +678,8 @@
                             R.string.accessibility_data_connection_3g);
                     break;
                 case TelephonyManager.NETWORK_TYPE_LTE:
-                    if (mShow4GforLTE) {
+                    boolean show4GforLTE = mContext.getResources().getBoolean(R.bool.config_show4GForLTE);
+                    if (show4GforLTE) {
                         mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
                         mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
                         mQSDataTypeIconId = R.drawable.ic_qs_signal_4g;
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 55f2a32..acfc096 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -63,6 +63,7 @@
 import com.android.server.pm.UserManagerService;
 import com.android.server.power.PowerManagerService;
 import com.android.server.power.ShutdownThread;
+import com.android.server.print.PrintManagerService;
 import com.android.server.search.SearchManagerService;
 import com.android.server.usb.UsbService;
 import com.android.server.wifi.WifiService;
@@ -789,6 +790,14 @@
             } catch (Throwable e) {
                 reportWtf("starting IdleMaintenanceService", e);
             }
+
+            try {
+                Slog.i(TAG, "Print Service");
+                ServiceManager.addService(Context.PRINT_SERVICE,
+                        new PrintManagerService(context));
+            } catch (Throwable e) {
+                reportWtf("starting Print Service", e);
+            }
         }
 
         // Before things start rolling, be sure we have decided whether
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index bdfa447..6b13fc7 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -406,7 +406,7 @@
      * Tracking long-term execution of processes to look for abuse and other
      * bad app behavior.
      */
-    final ProcessTracker mProcessTracker = new ProcessTracker();
+    ProcessTracker mProcessTracker;
 
     /**
      * The currently running isolated processes.
@@ -1547,6 +1547,7 @@
         m.mContext = context;
         m.mFactoryTest = factoryTest;
         m.mIntentFirewall = new IntentFirewall(m.new IntentFirewallInterface());
+        m.mProcessTracker = new ProcessTracker(context);
 
         m.mStackSupervisor = new ActivityStackSupervisor(m, context, thr.mLooper);
 
@@ -10173,12 +10174,12 @@
         }
 
         String[] newArgs = new String[args.length - opti];
-        if (args.length > 2) System.arraycopy(args, opti, newArgs, 0, args.length - opti);
+        System.arraycopy(args, opti, newArgs, 0, args.length - opti);
 
         TaskRecord lastTask = null;
         boolean needSep = false;
         for (int i=activities.size()-1; i>=0; i--) {
-            ActivityRecord r = (ActivityRecord)activities.get(i);
+            ActivityRecord r = activities.get(i);
             if (needSep) {
                 pw.println();
             }
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 2d7a171..5e6bdb1 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -2857,6 +2857,8 @@
             return;
         }
 
+        mStackSupervisor.moveHomeStack(isHomeStack());
+
         // Shift all activities with this task up to the top
         // of the stack, keeping them in the same internal order.
         mTaskHistory.remove(tr);
diff --git a/services/java/com/android/server/am/ProcessList.java b/services/java/com/android/server/am/ProcessList.java
index b5d783d..7ea4a32 100644
--- a/services/java/com/android/server/am/ProcessList.java
+++ b/services/java/com/android/server/am/ProcessList.java
@@ -244,7 +244,8 @@
     }
 
     int adjToTrackedState(int adj) {
-        return adj >= FOREGROUND_APP_ADJ ? mAdjToTrackedState[adj] : ProcessTracker.STATE_NOTHING;
+        return adj >= FOREGROUND_APP_ADJ
+                ? mAdjToTrackedState[adj] : ProcessTracker.STATE_PERSISTENT;
     }
 
     private void writeFile(String path, String data) {
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index cc0a5a3..e72656f 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -451,8 +451,8 @@
             ProcessList plist) {
         int state = this == TOP_APP ? ProcessTracker.STATE_TOP
                 : plist.adjToTrackedState(setAdj);
-        for (int ip=pkgList.size()-1; ip>=0; ip--) {
-            pkgList.valueAt(ip).setState(state, memFactor, now);
+        if (pkgList.size() > 0) {
+            pkgList.valueAt(0).setState(state, memFactor, now, pkgList);
         }
     }
 
@@ -461,8 +461,8 @@
      */
     public void resetPackageList() {
         long now = SystemClock.uptimeMillis();
-        for (int i=0; i<pkgList.size(); i++) {
-            pkgList.valueAt(i).setState(ProcessTracker.STATE_NOTHING, 0, now);
+        if (pkgList.size() > 0) {
+            pkgList.valueAt(0).setState(ProcessTracker.STATE_NOTHING, 0, now, pkgList);
         }
         pkgList.clear();
         pkgList.put(info.packageName, baseProcessTracker);
diff --git a/services/java/com/android/server/am/ProcessTracker.java b/services/java/com/android/server/am/ProcessTracker.java
index ec8a0b2..8a83412 100644
--- a/services/java/com/android/server/am/ProcessTracker.java
+++ b/services/java/com/android/server/am/ProcessTracker.java
@@ -16,9 +16,12 @@
 
 package com.android.server.am;
 
+import android.content.Context;
+import android.content.pm.PackageManager;
 import android.os.SystemClock;
 import android.os.UserHandle;
 import android.util.ArrayMap;
+import android.util.ArraySet;
 import android.util.SparseArray;
 import android.util.TimeUtils;
 import com.android.server.ProcessMap;
@@ -26,20 +29,22 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 
 public final class ProcessTracker {
     public static final int STATE_NOTHING = -1;
-    public static final int STATE_TOP = 0;
-    public static final int STATE_FOREGROUND = 1;
-    public static final int STATE_VISIBLE = 2;
-    public static final int STATE_PERCEPTIBLE = 3;
-    public static final int STATE_BACKUP = 4;
-    public static final int STATE_SERVICE = 5;
-    public static final int STATE_HOME = 6;
-    public static final int STATE_PREVIOUS = 7;
-    public static final int STATE_CACHED = 8;
+    public static final int STATE_PERSISTENT = 0;
+    public static final int STATE_TOP = 1;
+    public static final int STATE_FOREGROUND = 2;
+    public static final int STATE_VISIBLE = 3;
+    public static final int STATE_PERCEPTIBLE = 4;
+    public static final int STATE_BACKUP = 5;
+    public static final int STATE_SERVICE = 6;
+    public static final int STATE_HOME = 7;
+    public static final int STATE_PREVIOUS = 8;
+    public static final int STATE_CACHED = 9;
     public static final int STATE_COUNT = STATE_CACHED+1;
 
     public static final int ADJ_NOTHING = -1;
@@ -53,12 +58,32 @@
     public static final int ADJ_SCREEN_ON = ADJ_SCREEN_MOD;
     public static final int ADJ_COUNT = ADJ_SCREEN_ON*2;
 
-    static String[] STATE_NAMES = new String[] {
-            "Top        ", "Foreground ", "Visible    ", "Perceptible", "Backup     ",
-            "Service    ", "Home       ", "Previous   ", "Cached     "
+    static final String[] STATE_NAMES = new String[] {
+            "Persistent ", "Top        ", "Foreground ", "Visible    ", "Perceptible",
+            "Backup     ", "Service    ", "Home       ", "Previous   ", "Cached     "
     };
 
+    static final String[] ADJ_SCREEN_NAMES_CSV = new String[] {
+            "off", "on"
+    };
+
+    static final String[] ADJ_MEM_NAMES_CSV = new String[] {
+            "norm", "mod",  "low", "crit"
+    };
+
+    static final String[] STATE_NAMES_CSV = new String[] {
+            "pers", "top", "fore", "vis", "percept",
+            "backup", "service", "home", "prev", "cached"
+    };
+
+    static final String CSV_SEP = "\t";
+
+    final Context mContext;
+    final State mState = new State();
+
     public static final class ProcessState {
+        final State mState;
+        final ProcessState mCommonProcess;
         final String mPackage;
         final int mUid;
         final String mName;
@@ -67,26 +92,96 @@
         int mCurState = STATE_NOTHING;
         long mStartTime;
 
+        boolean mMultiPackage;
+
         long mTmpTotalTime;
 
-        public ProcessState(String pkg, int uid, String name) {
+        /**
+         * Create a new top-level process state, for the initial case where there is only
+         * a single package running in a process.  The initial state is not running.
+         */
+        public ProcessState(State state, String pkg, int uid, String name) {
+            mState = state;
+            mCommonProcess = null;
             mPackage = pkg;
             mUid = uid;
             mName = name;
         }
 
-        public void setState(int state, int memFactor, long now) {
+        /**
+         * Create a new per-package process state for an existing top-level process
+         * state.  The current running state of the top-level process is also copied,
+         * marked as started running at 'now'.
+         */
+        public ProcessState(ProcessState commonProcess, String pkg, int uid, String name,
+                long now) {
+            mState = commonProcess.mState;
+            mCommonProcess = commonProcess;
+            mPackage = pkg;
+            mUid = uid;
+            mName = name;
+            mCurState = commonProcess.mCurState;
+            mStartTime = now;
+        }
+
+        ProcessState clone(String pkg, long now) {
+            ProcessState pnew = new ProcessState(this, pkg, mUid, mName, now);
+            pnew.add(this, now);
+            return pnew;
+        }
+
+        public void setState(int state, int memFactor, long now,
+                ArrayMap<String, ProcessTracker.ProcessState> pkgList) {
             if (state != STATE_NOTHING) {
                 state += memFactor*STATE_COUNT;
             }
+
+            if (mCommonProcess != null) {
+                // First update the common process.
+                mCommonProcess.setState(state, now);
+                if (!mCommonProcess.mMultiPackage) {
+                    // This common process is for a single package, so it is shared
+                    // with the per-package state.  Nothing more to do.
+                    return;
+                }
+            }
+
+            for (int ip=pkgList.size()-1; ip>=0; ip--) {
+                ProcessState proc = pkgList.valueAt(ip);
+                if (proc.mMultiPackage) {
+                    // The array map is still pointing to a common process state
+                    // that is now shared across packages.  Update it to point to
+                    // the new per-package state.
+                    proc = mState.mPackages.get(pkgList.keyAt(ip),
+                            proc.mUid).mProcesses.get(proc.mName);
+                    if (proc == null) {
+                        throw new IllegalStateException("Didn't create per-package process");
+                    }
+                    pkgList.setValueAt(ip, proc);
+                }
+                proc.setState(state, now);
+            }
+        }
+
+        void setState(int state, long now) {
             if (mCurState != state) {
                 if (mCurState != STATE_NOTHING) {
-                    mDurations[mCurState] += now - mStartTime;
+                    long dur = now - mStartTime;
+                    mDurations[mCurState] += dur;
                 }
                 mCurState = state;
                 mStartTime = now;
             }
         }
+
+        void add(ProcessState other, long now) {
+            for (int i=0; i<(STATE_COUNT*ADJ_COUNT); i++) {
+                mDurations[i] += other.mDurations[i];
+                if (other.mCurState == i) {
+                    mDurations[i] += now - other.mStartTime;
+                }
+            }
+        }
     }
 
     public static final class ServiceState {
@@ -157,39 +252,78 @@
 
     static final class State {
         final ProcessMap<PackageState> mPackages = new ProcessMap<PackageState>();
+        final ProcessMap<ProcessState> mProcesses = new ProcessMap<ProcessState>();
         final long[] mMemFactorDurations = new long[ADJ_COUNT];
         int mMemFactor = STATE_NOTHING;
         long mStartTime;
-    }
 
-    final State mState = new State();
-
-    public ProcessTracker() {
-    }
-
-    private PackageState getPackageStateLocked(String packageName, int uid) {
-        PackageState as = mState.mPackages.get(packageName, uid);
-        if (as != null) {
+        PackageState getPackageStateLocked(String packageName, int uid) {
+            PackageState as = mPackages.get(packageName, uid);
+            if (as != null) {
+                return as;
+            }
+            as = new PackageState(uid);
+            mPackages.put(packageName, uid, as);
             return as;
         }
-        as = new PackageState(uid);
-        mState.mPackages.put(packageName, uid, as);
-        return as;
+
+        ProcessState getProcessStateLocked(String packageName, int uid, String processName) {
+            final PackageState pkgState = getPackageStateLocked(packageName, uid);
+            ProcessState ps = pkgState.mProcesses.get(processName);
+            if (ps != null) {
+                return ps;
+            }
+            ProcessState commonProc = mProcesses.get(processName, uid);
+            if (commonProc == null) {
+                commonProc = new ProcessState(this, packageName, uid, processName);
+                mProcesses.put(processName, uid, commonProc);
+            }
+            if (!commonProc.mMultiPackage) {
+                if (packageName.equals(commonProc.mPackage)) {
+                    // This common process is not in use by multiple packages, and
+                    // is for the calling package, so we can just use it directly.
+                    ps = commonProc;
+                } else {
+                    // This common process has not been in use by multiple packages,
+                    // but it was created for a different package than the caller.
+                    // We need to convert it to a multi-package process.
+                    commonProc.mMultiPackage = true;
+                    // The original package it was created for now needs to point
+                    // to its own copy.
+                    long now = SystemClock.uptimeMillis();
+                    pkgState.mProcesses.put(commonProc.mPackage, commonProc.clone(
+                            commonProc.mPackage, now));
+                    ps = new ProcessState(commonProc, packageName, uid, processName, now);
+                }
+            } else {
+                // The common process is for multiple packages, we need to create a
+                // separate object for the per-package data.
+                ps = new ProcessState(commonProc, packageName, uid, processName,
+                        SystemClock.uptimeMillis());
+            }
+            pkgState.mProcesses.put(processName, ps);
+            return ps;
+        }
+
+        void reset() {
+            mPackages.getMap().clear();
+            mProcesses.getMap().clear();
+            Arrays.fill(mMemFactorDurations, 0);
+            mMemFactor = STATE_NOTHING;
+            mStartTime = 0;
+        }
+    }
+
+    public ProcessTracker(Context context) {
+        mContext = context;
     }
 
     public ProcessState getProcessStateLocked(String packageName, int uid, String processName) {
-        final PackageState as = getPackageStateLocked(packageName, uid);
-        ProcessState ps = as.mProcesses.get(processName);
-        if (ps != null) {
-            return ps;
-        }
-        ps = new ProcessState(packageName, uid, processName);
-        as.mProcesses.put(processName, ps);
-        return ps;
+        return mState.getProcessStateLocked(packageName, uid, processName);
     }
 
     public ServiceState getServiceStateLocked(String packageName, int uid, String className) {
-        final PackageState as = getPackageStateLocked(packageName, uid);
+        final PackageState as = mState.getPackageStateLocked(packageName, uid);
         ServiceState ss = as.mServices.get(className);
         if (ss != null) {
             return ss;
@@ -252,6 +386,22 @@
         }
     }
 
+    static private void printScreenLabelCsv(PrintWriter pw, int offset) {
+        switch (offset) {
+            case ADJ_NOTHING:
+                break;
+            case ADJ_SCREEN_OFF:
+                pw.print(ADJ_SCREEN_NAMES_CSV[0]);
+                break;
+            case ADJ_SCREEN_ON:
+                pw.print(ADJ_SCREEN_NAMES_CSV[1]);
+                break;
+            default:
+                pw.print("???");
+                break;
+        }
+    }
+
     static private void printMemLabel(PrintWriter pw, int offset) {
         switch (offset) {
             case ADJ_NOTHING:
@@ -275,6 +425,16 @@
         }
     }
 
+    static private void printMemLabelCsv(PrintWriter pw, int offset) {
+        if (offset >= ADJ_MEM_FACTOR_NORMAL) {
+            if (offset <= ADJ_MEM_FACTOR_CRITICAL) {
+                pw.print(ADJ_MEM_NAMES_CSV[offset]);
+            } else {
+                pw.print("???");
+            }
+        }
+    }
+
     static void dumpSingleTime(PrintWriter pw, String prefix, long[] durations,
             int curState, long curStartTime, long now) {
         long totalTime = 0;
@@ -310,6 +470,43 @@
         }
     }
 
+    static void dumpSingleTimeCsv(PrintWriter pw, String sep, long[] durations,
+            int curState, long curStartTime, long now) {
+        for (int iscreen=0; iscreen<ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
+            for (int imem=0; imem<ADJ_MEM_FACTOR_COUNT; imem++) {
+                int state = imem+iscreen;
+                long time = durations[state];
+                if (curState == state) {
+                    time += now - curStartTime;
+                }
+                pw.print(sep);
+                if (time != 0) {
+                    pw.print(time);
+                } else {
+                    pw.print("0");
+                }
+            }
+        }
+    }
+
+    static void dumpServiceTimeCheckin(PrintWriter pw, String label, String packageName,
+            int uid, String serviceName, ServiceState svc, int opCount, long[] durations,
+            int curState, long curStartTime, long now) {
+        if (opCount <= 0) {
+            return;
+        }
+        pw.print(label);
+        pw.print(",");
+        pw.print(packageName);
+        pw.print(",");
+        pw.print(uid);
+        pw.print(",");
+        pw.print(serviceName);
+        pw.print(opCount);
+        dumpSingleTimeCsv(pw, ",", durations, curState, curStartTime, now);
+        pw.println();
+    }
+
     long computeProcessTimeLocked(ProcessState proc, int[] screenStates, int[] memStates,
                 int[] procStates, long now) {
         long totalTime = 0;
@@ -330,21 +527,33 @@
     }
 
     ArrayList<ProcessState> collectProcessesLocked(int[] screenStates, int[] memStates,
-            int[] procStates, long now) {
-        ArrayList<ProcessState> outProcs = new ArrayList<ProcessState>();
-        ArrayMap<String, SparseArray<PackageState>> pmap = mState.mPackages.getMap();
-        for (int ip=0; ip<pmap.size(); ip++) {
-            SparseArray<PackageState> procs = pmap.valueAt(ip);
+            int[] procStates, long now, String reqPackage) {
+        ArraySet<ProcessState> foundProcs = new ArraySet<ProcessState>();
+        ArrayMap<String, SparseArray<PackageState>> pkgMap = mState.mPackages.getMap();
+        for (int ip=0; ip<pkgMap.size(); ip++) {
+            if (reqPackage != null && !reqPackage.equals(pkgMap.keyAt(ip))) {
+                continue;
+            }
+            SparseArray<PackageState> procs = pkgMap.valueAt(ip);
             for (int iu=0; iu<procs.size(); iu++) {
                 PackageState state = procs.valueAt(iu);
                 for (int iproc=0; iproc<state.mProcesses.size(); iproc++) {
-                    if (computeProcessTimeLocked(state.mProcesses.valueAt(iproc),
-                            screenStates, memStates, procStates, now) > 0) {
-                        outProcs.add(state.mProcesses.valueAt(iproc));
+                    ProcessState proc = state.mProcesses.valueAt(iproc);
+                    if (proc.mCommonProcess != null) {
+                        proc = proc.mCommonProcess;
                     }
+                    foundProcs.add(proc);
                 }
             }
         }
+        ArrayList<ProcessState> outProcs = new ArrayList<ProcessState>(foundProcs.size());
+        for (int i=0; i<foundProcs.size(); i++) {
+            ProcessState proc = foundProcs.valueAt(i);
+            if (computeProcessTimeLocked(proc, screenStates, memStates,
+                    procStates, now) > 0) {
+                outProcs.add(proc);
+            }
+        }
         Collections.sort(outProcs, new Comparator<ProcessState>() {
             @Override
             public int compare(ProcessState lhs, ProcessState rhs) {
@@ -376,7 +585,6 @@
                         time += now - proc.mStartTime;
                         running = " (running)";
                     }
-                    totalTime += time;
                     if (time != 0) {
                         pw.print(prefix);
                         if (screenStates.length > 1) {
@@ -409,26 +617,119 @@
         }
     }
 
+    void dumpStateHeadersCsv(PrintWriter pw, String sep, int[] screenStates,
+            int[] memStates, int[] procStates) {
+        final int NS = screenStates != null ? screenStates.length : 1;
+        final int NM = memStates != null ? memStates.length : 1;
+        final int NP = procStates != null ? procStates.length : 1;
+        for (int is=0; is<NS; is++) {
+            for (int im=0; im<NM; im++) {
+                for (int ip=0; ip<NP; ip++) {
+                    pw.print(sep);
+                    boolean printed = false;
+                    if (screenStates != null && screenStates.length > 1) {
+                        printScreenLabelCsv(pw, screenStates[is]);
+                        printed = true;
+                    }
+                    if (memStates != null && memStates.length > 1) {
+                        if (printed) {
+                            pw.print("-");
+                        }
+                        printMemLabelCsv(pw, memStates[im]);
+                        printed = true;
+                    }
+                    if (procStates != null && procStates.length > 1) {
+                        if (printed) {
+                            pw.print("-");
+                        }
+                        pw.print(STATE_NAMES_CSV[procStates[ip]]);
+                    }
+                }
+            }
+        }
+    }
+
+    void dumpProcessStateCsv(PrintWriter pw, ProcessState proc,
+            boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates,
+            boolean sepProcStates, int[] procStates, long now) {
+        final int NSS = sepScreenStates ? screenStates.length : 1;
+        final int NMS = sepMemStates ? memStates.length : 1;
+        final int NPS = sepProcStates ? procStates.length : 1;
+        for (int iss=0; iss<NSS; iss++) {
+            for (int ims=0; ims<NMS; ims++) {
+                for (int ips=0; ips<NPS; ips++) {
+                    final int vsscreen = sepScreenStates ? screenStates[iss] : 0;
+                    final int vsmem = sepMemStates ? memStates[ims] : 0;
+                    final int vsproc = sepProcStates ? procStates[ips] : 0;
+                    final int NSA = sepScreenStates ? 1 : screenStates.length;
+                    final int NMA = sepMemStates ? 1 : memStates.length;
+                    final int NPA = sepProcStates ? 1 : procStates.length;
+                    long totalTime = 0;
+                    for (int isa=0; isa<NSA; isa++) {
+                        for (int ima=0; ima<NMA; ima++) {
+                            for (int ipa=0; ipa<NPA; ipa++) {
+                                final int vascreen = sepScreenStates ? 0 : screenStates[isa];
+                                final int vamem = sepMemStates ? 0 : memStates[ima];
+                                final int vaproc = sepProcStates ? 0 : procStates[ipa];
+                                final int bucket = ((vsscreen + vascreen + vsmem + vamem)
+                                        * STATE_COUNT) + vsproc + vaproc;
+                                totalTime += proc.mDurations[bucket];
+                                if (proc.mCurState == bucket) {
+                                    totalTime += now - proc.mStartTime;
+                                }
+                            }
+                        }
+                    }
+                    pw.print(CSV_SEP);
+                    if (totalTime != 0) {
+                        pw.print(totalTime);
+                    } else {
+                        pw.print("0");
+                    }
+                }
+            }
+        }
+    }
+
     void dumpProcessList(PrintWriter pw, String prefix, ArrayList<ProcessState> procs,
             int[] screenStates, int[] memStates, int[] procStates, long now) {
         String innerPrefix = prefix + "  ";
         for (int i=procs.size()-1; i>=0; i--) {
             ProcessState proc = procs.get(i);
             pw.print(prefix);
-            pw.print(proc.mPackage);
+            pw.print(proc.mName);
             pw.print(" / ");
             UserHandle.formatUid(pw, proc.mUid);
-            pw.print(" / ");
-            pw.print(proc.mName);
             pw.println(":");
             dumpProcessState(pw, innerPrefix, proc, screenStates, memStates, procStates, now);
         }
     }
 
+    void dumpProcessListCsv(PrintWriter pw, ArrayList<ProcessState> procs,
+            boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates,
+            boolean sepProcStates, int[] procStates, long now) {
+        pw.print("process");
+        pw.print(CSV_SEP);
+        pw.print("uid");
+        dumpStateHeadersCsv(pw, CSV_SEP, sepScreenStates ? screenStates : null,
+                sepMemStates ? memStates : null,
+                sepProcStates ? procStates : null);
+        pw.println();
+        for (int i=procs.size()-1; i>=0; i--) {
+            ProcessState proc = procs.get(i);
+            pw.print(proc.mName);
+            pw.print(CSV_SEP);
+            UserHandle.formatUid(pw, proc.mUid);
+            dumpProcessStateCsv(pw, proc, sepScreenStates, screenStates,
+                    sepMemStates, memStates, sepProcStates, procStates, now);
+            pw.println();
+        }
+    }
+
     void dumpFilteredProcesses(PrintWriter pw, String header, String prefix,
-            int[] screenStates, int[] memStates, int[] procStates, long now) {
+            int[] screenStates, int[] memStates, int[] procStates, long now, String reqPackage) {
         ArrayList<ProcessState> procs = collectProcessesLocked(screenStates, memStates,
-                procStates, now);
+                procStates, now, reqPackage);
         if (procs.size() > 0) {
             pw.println();
             pw.println(header);
@@ -436,100 +737,405 @@
         }
     }
 
-    public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) {
-        final long now = SystemClock.uptimeMillis();
-        ArrayMap<String, SparseArray<PackageState>> pmap = mState.mPackages.getMap();
-        pw.println("Per-Package Process Stats:");
-        for (int ip=0; ip<pmap.size(); ip++) {
-            String procName = pmap.keyAt(ip);
-            SparseArray<PackageState> procs = pmap.valueAt(ip);
-            for (int iu=0; iu<procs.size(); iu++) {
-                int uid = procs.keyAt(iu);
-                PackageState state = procs.valueAt(iu);
-                pw.print("  * "); pw.print(procName); pw.print(" / ");
-                        UserHandle.formatUid(pw, uid); pw.println(":");
-                for (int iproc=0; iproc<state.mProcesses.size(); iproc++) {
-                    pw.print("      Process ");
-                    pw.print(state.mProcesses.keyAt(iproc));
-                    pw.println(":");
-                    long totalTime = 0;
-                    ProcessState proc = state.mProcesses.valueAt(iproc);
-                    int printedScreen = -1;
-                    for (int iscreen=0; iscreen<ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
-                        int printedMem = -1;
-                        for (int imem=0; imem<ADJ_MEM_FACTOR_COUNT; imem++) {
-                            for (int is=0; is<STATE_NAMES.length; is++) {
-                                int bucket = is+(STATE_COUNT*(imem+iscreen));
-                                long time = proc.mDurations[bucket];
-                                String running = "";
-                                if (proc.mCurState == bucket) {
-                                    time += now - proc.mStartTime;
-                                    running = " (running)";
-                                }
-                                if (time != 0) {
-                                    pw.print("        ");
-                                    printScreenLabel(pw, printedScreen != iscreen
-                                            ? iscreen : STATE_NOTHING);
-                                    printedScreen = iscreen;
-                                    printMemLabel(pw, printedMem != imem ? imem : STATE_NOTHING);
-                                    printedMem = imem;
-                                    pw.print(STATE_NAMES[is]); pw.print(": ");
-                                    TimeUtils.formatDuration(time, pw); pw.println(running);
-                                    totalTime += time;
-                                }
-                            }
+    boolean dumpFilteredProcessesCsv(PrintWriter pw, String header,
+            boolean sepScreenStates, int[] screenStates, boolean sepMemStates, int[] memStates,
+            boolean sepProcStates, int[] procStates, long now, String reqPackage) {
+        ArrayList<ProcessState> procs = collectProcessesLocked(screenStates, memStates,
+                procStates, now, reqPackage);
+        if (procs.size() > 0) {
+            if (header != null) {
+                pw.println(header);
+            }
+            dumpProcessListCsv(pw, procs, sepScreenStates, screenStates,
+                    sepMemStates, memStates, sepProcStates, procStates, now);
+            return true;
+        }
+        return false;
+    }
+
+    void dumpAllProcessState(PrintWriter pw, String prefix, boolean isCheckin,
+            ProcessState proc, long now) {
+        long totalTime = 0;
+        int printedScreen = -1;
+        for (int iscreen=0; iscreen<ADJ_COUNT; iscreen+=ADJ_SCREEN_MOD) {
+            int printedMem = -1;
+            for (int imem=0; imem<ADJ_MEM_FACTOR_COUNT; imem++) {
+                for (int is=0; is<STATE_NAMES.length; is++) {
+                    int bucket = is+(STATE_COUNT*(imem+iscreen));
+                    long time = proc.mDurations[bucket];
+                    String running = "";
+                    if (proc.mCurState == bucket) {
+                        time += now - proc.mStartTime;
+                        running = " (running)";
+                    }
+                    if (!isCheckin) {
+                        if (time != 0) {
+                            pw.print(prefix);
+                            printScreenLabel(pw, printedScreen != iscreen
+                                    ? iscreen : STATE_NOTHING);
+                            printedScreen = iscreen;
+                            printMemLabel(pw, printedMem != imem
+                                    ? imem : STATE_NOTHING);
+                            printedMem = imem;
+                            pw.print(STATE_NAMES[is]); pw.print(": ");
+                            TimeUtils.formatDuration(time, pw); pw.println(running);
+                            totalTime += time;
+                        }
+                    } else {
+                        pw.print(",");
+                        if (time != 0) {
+                            pw.print(time);
+                        } else {
+                            pw.print("0");
                         }
                     }
-                    if (totalTime != 0) {
-                        pw.print("        ");
-                        printScreenLabel(pw, STATE_NOTHING);
-                        printMemLabel(pw, STATE_NOTHING);
-                        pw.print("TOTAL      : ");
-                        TimeUtils.formatDuration(totalTime, pw);
-                        pw.println();
+                }
+            }
+        }
+        if (!isCheckin) {
+            if (totalTime != 0) {
+                pw.print(prefix);
+                printScreenLabel(pw, STATE_NOTHING);
+                printMemLabel(pw, STATE_NOTHING);
+                pw.print("TOTAL      : ");
+                TimeUtils.formatDuration(totalTime, pw);
+                pw.println();
+            }
+        } else {
+            pw.println();
+        }
+    }
+
+    static int[] parseStateList(String[] states, int mult, String arg, boolean[] outSep,
+            String[] outError) {
+        ArrayList<Integer> res = new ArrayList<Integer>();
+        int lastPos = 0;
+        for (int i=0; i<=arg.length(); i++) {
+            char c = i < arg.length() ? arg.charAt(i) : 0;
+            if (c != ',' && c != '+' && c != ' ' && c != 0) {
+                continue;
+            }
+            boolean isSep = c == ',';
+            if (lastPos == 0) {
+                // We now know the type of op.
+                outSep[0] = isSep;
+            } else if (c != 0 && outSep[0] != isSep) {
+                outError[0] = "inconsistent separators (can't mix ',' with '+')";
+                return null;
+            }
+            if (lastPos < (i-1)) {
+                String str = arg.substring(lastPos, i);
+                for (int j=0; j<states.length; j++) {
+                    if (str.equals(states[j])) {
+                        res.add(j);
+                        str = null;
+                        break;
                     }
                 }
-                for (int isvc=0; isvc<state.mServices.size(); isvc++) {
-                    pw.print("      Service ");
-                    pw.print(state.mServices.keyAt(isvc));
-                    pw.println(":");
-                    ServiceState svc = state.mServices.valueAt(isvc);
-                    if (svc.mStartedCount != 0) {
-                        pw.print("        Started op count "); pw.print(svc.mStartedCount);
+                if (str != null) {
+                    outError[0] = "invalid word \"" + str + "\"";
+                    return null;
+                }
+            }
+            lastPos = i + 1;
+        }
+
+        int[] finalRes = new int[res.size()];
+        for (int i=0; i<res.size(); i++) {
+            finalRes[i] = res.get(i) * mult;
+        }
+        return finalRes;
+    }
+
+    private void dumpHelp(PrintWriter pw) {
+        pw.println("Process stats (procstats) dump options:");
+        pw.println("    [--checkin|--csv] [csv-screen] [csv-proc] [csv-mem]");
+        pw.println("    [--reset] [-h] [<package.name>]");
+        pw.println("  --checkin: format output for a checkin report.");
+        pw.println("  --csv: output data suitable for putting in a spreadsheet.");
+        pw.println("  --csv-screen: on, off.");
+        pw.println("  --csv-mem: norm, mod, low, crit.");
+        pw.println("  --csv-proc: pers, top, fore, vis, precept, backup,");
+        pw.println("    service, home, prev, cached");
+        pw.println("  --reset: reset the stats, clearing all current data.");
+        pw.println("  -h: print this help text.");
+        pw.println("  <package.name>: optional name of package to filter output by.");
+    }
+
+    public void dumpLocked(FileDescriptor fd, PrintWriter pw, String[] args) {
+        final long now = SystemClock.uptimeMillis();
+
+        boolean isCheckin = false;
+        boolean isCsv = false;
+        String reqPackage = null;
+        boolean csvSepScreenStats = false;
+        int[] csvScreenStats = new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON};
+        boolean csvSepMemStats = false;
+        int[] csvMemStats = new int[] {ADJ_MEM_FACTOR_CRITICAL};
+        boolean csvSepProcStats = true;
+        int[] csvProcStats = new int[] {
+                STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
+                STATE_PREVIOUS, STATE_CACHED };
+        if (args != null) {
+            for (int i=0; i<args.length; i++) {
+                String arg = args[i];
+                if ("--checkin".equals(arg)) {
+                    isCheckin = true;
+                } else if ("--csv".equals(arg)) {
+                    isCsv = true;
+                } else if ("--csv-screen".equals(arg)) {
+                    i++;
+                    if (i >= args.length) {
+                        pw.println("Error: argument required for --csv-screen");
+                        dumpHelp(pw);
+                        return;
+                    }
+                    boolean[] sep = new boolean[1];
+                    String[] error = new String[1];
+                    csvScreenStats = parseStateList(ADJ_SCREEN_NAMES_CSV, ADJ_SCREEN_MOD,
+                            args[i], sep, error);
+                    if (csvScreenStats == null) {
+                        pw.println("Error in \"" + args[i] + "\": " + error[0]);
+                        dumpHelp(pw);
+                        return;
+                    }
+                    csvSepScreenStats = sep[0];
+                } else if ("--csv-mem".equals(arg)) {
+                    i++;
+                    if (i >= args.length) {
+                        pw.println("Error: argument required for --csv-mem");
+                        dumpHelp(pw);
+                        return;
+                    }
+                    boolean[] sep = new boolean[1];
+                    String[] error = new String[1];
+                    csvMemStats = parseStateList(ADJ_MEM_NAMES_CSV, 1, args[i], sep, error);
+                    if (csvMemStats == null) {
+                        pw.println("Error in \"" + args[i] + "\": " + error[0]);
+                        dumpHelp(pw);
+                        return;
+                    }
+                    csvSepMemStats = sep[0];
+                } else if ("--csv-proc".equals(arg)) {
+                    i++;
+                    if (i >= args.length) {
+                        pw.println("Error: argument required for --csv-proc");
+                        dumpHelp(pw);
+                        return;
+                    }
+                    boolean[] sep = new boolean[1];
+                    String[] error = new String[1];
+                    csvProcStats = parseStateList(STATE_NAMES_CSV, 1, args[i], sep, error);
+                    if (csvProcStats == null) {
+                        pw.println("Error in \"" + args[i] + "\": " + error[0]);
+                        dumpHelp(pw);
+                        return;
+                    }
+                    csvSepProcStats = sep[0];
+                } else if ("--reset".equals(arg)) {
+                    mState.reset();
+                    pw.println("Process stats reset.");
+                    return;
+                } else if ("-h".equals(arg)) {
+                    dumpHelp(pw);
+                    return;
+                } else if ("-a".equals(arg)) {
+                    // ignore
+                } else if (arg.length() > 0 && arg.charAt(0) == '-'){
+                    pw.println("Unknown option: " + arg);
+                    dumpHelp(pw);
+                    return;
+                } else {
+                    // Not an option, last argument must be a package name.
+                    try {
+                        mContext.getPackageManager().getPackageUid(arg,
+                                UserHandle.getCallingUserId());
+                        reqPackage = arg;
+                    } catch (PackageManager.NameNotFoundException e) {
+                        pw.println("Unknown package: " + arg);
+                        dumpHelp(pw);
+                        return;
+                    }
+                }
+            }
+        }
+
+        if (isCsv) {
+            pw.print("Processes running summed over");
+            if (!csvSepScreenStats) {
+                for (int i=0; i<csvScreenStats.length; i++) {
+                    pw.print(" ");
+                    printScreenLabelCsv(pw, csvScreenStats[i]);
+                }
+            }
+            if (!csvSepMemStats) {
+                for (int i=0; i<csvMemStats.length; i++) {
+                    pw.print(" ");
+                    printMemLabelCsv(pw, csvMemStats[i]);
+                }
+            }
+            if (!csvSepProcStats) {
+                for (int i=0; i<csvProcStats.length; i++) {
+                    pw.print(" ");
+                    pw.print(STATE_NAMES_CSV[csvProcStats[i]]);
+                }
+            }
+            pw.println();
+            dumpFilteredProcessesCsv(pw, null,
+                    csvSepScreenStats, csvScreenStats, csvSepMemStats, csvMemStats,
+                    csvSepProcStats, csvProcStats, now, reqPackage);
+            /*
+            dumpFilteredProcessesCsv(pw, "Processes running while critical mem:",
+                    false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    true, new int[] {ADJ_MEM_FACTOR_CRITICAL},
+                    true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
+                            STATE_PREVIOUS, STATE_CACHED},
+                    now, reqPackage);
+            dumpFilteredProcessesCsv(pw, "Processes running over all mem:",
+                    false, new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    false, new int[] {ADJ_MEM_FACTOR_CRITICAL, ADJ_MEM_FACTOR_LOW,
+                            ADJ_MEM_FACTOR_MODERATE, ADJ_MEM_FACTOR_MODERATE},
+                    true, new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME,
+                            STATE_PREVIOUS, STATE_CACHED},
+                    now, reqPackage);
+            */
+            return;
+        }
+
+        ArrayMap<String, SparseArray<PackageState>> pkgMap = mState.mPackages.getMap();
+        boolean printedHeader = false;
+        if (isCheckin) {
+            pw.println("vers,1");
+        }
+        for (int ip=0; ip<pkgMap.size(); ip++) {
+            String pkgName = pkgMap.keyAt(ip);
+            if (reqPackage != null && !reqPackage.equals(pkgName)) {
+                continue;
+            }
+            SparseArray<PackageState> uids = pkgMap.valueAt(ip);
+            for (int iu=0; iu<uids.size(); iu++) {
+                int uid = uids.keyAt(iu);
+                PackageState state = uids.valueAt(iu);
+                final int NPROCS = state.mProcesses.size();
+                final int NSRVS = state.mServices.size();
+                if (!isCheckin) {
+                    if (NPROCS > 0 || NSRVS > 0) {
+                        if (!printedHeader) {
+                            pw.println("Per-Package Process Stats:");
+                            printedHeader = true;
+                        }
+                        pw.print("  * "); pw.print(pkgName); pw.print(" / ");
+                                UserHandle.formatUid(pw, uid); pw.println(":");
+                    }
+                }
+                for (int iproc=0; iproc<NPROCS; iproc++) {
+                    if (!isCheckin) {
+                        pw.print("      Process ");
+                        pw.print(state.mProcesses.keyAt(iproc));
                         pw.println(":");
-                        dumpSingleTime(pw, "          ", svc.mStartedDurations, svc.mStartedState,
+                    } else {
+                        pw.print("pkgproc,");
+                        pw.print(pkgName);
+                        pw.print(",");
+                        pw.print(uid);
+                        pw.print(",");
+                        pw.print(state.mProcesses.keyAt(iproc));
+                    }
+                    dumpAllProcessState(pw, "        ", isCheckin,
+                            state.mProcesses.valueAt(iproc), now);
+                }
+                for (int isvc=0; isvc<NSRVS; isvc++) {
+                    if (!isCheckin) {
+                        pw.print("      Service ");
+                        pw.print(state.mServices.keyAt(isvc));
+                        pw.println(":");
+                        ServiceState svc = state.mServices.valueAt(isvc);
+                        if (svc.mStartedCount != 0) {
+                            pw.print("        Started op count "); pw.print(svc.mStartedCount);
+                            pw.println(":");
+                            dumpSingleTime(pw, "          ", svc.mStartedDurations, svc.mStartedState,
+                                    svc.mStartedStartTime, now);
+                        }
+                        if (svc.mBoundCount != 0) {
+                            pw.print("        Bound op count "); pw.print(svc.mBoundCount);
+                            pw.println(":");
+                            dumpSingleTime(pw, "          ", svc.mBoundDurations, svc.mBoundState,
+                                    svc.mBoundStartTime, now);
+                        }
+                        if (svc.mExecCount != 0) {
+                            pw.print("        Executing op count "); pw.print(svc.mExecCount);
+                            pw.println(":");
+                            dumpSingleTime(pw, "          ", svc.mExecDurations, svc.mExecState,
+                                    svc.mExecStartTime, now);
+                        }
+                    } else {
+                        String serviceName = state.mServices.keyAt(isvc);
+                        ServiceState svc = state.mServices.valueAt(isvc);
+                        dumpServiceTimeCheckin(pw, "pkgsvc-start", pkgName, uid, serviceName,
+                                svc, svc.mStartedCount, svc.mStartedDurations, svc.mStartedState,
                                 svc.mStartedStartTime, now);
-                    }
-                    if (svc.mBoundCount != 0) {
-                        pw.print("        Bound op count "); pw.print(svc.mBoundCount);
-                        pw.println(":");
-                        dumpSingleTime(pw, "          ", svc.mBoundDurations, svc.mBoundState,
+                        dumpServiceTimeCheckin(pw, "pkgsvc-bound", pkgName, uid, serviceName,
+                                svc, svc.mBoundCount, svc.mBoundDurations, svc.mBoundState,
                                 svc.mBoundStartTime, now);
-                    }
-                    if (svc.mExecCount != 0) {
-                        pw.print("        Executing op count "); pw.print(svc.mExecCount);
-                        pw.println(":");
-                        dumpSingleTime(pw, "          ", svc.mExecDurations, svc.mExecState,
+                        dumpServiceTimeCheckin(pw, "pkgsvc-exec", pkgName, uid, serviceName,
+                                svc, svc.mExecCount, svc.mExecDurations, svc.mExecState,
                                 svc.mExecStartTime, now);
                     }
                 }
             }
         }
-        dumpFilteredProcesses(pw, "Processes running while critical mem:", "  ",
-                new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
-                new int[] {ADJ_MEM_FACTOR_CRITICAL},
-                new int[] {STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE, STATE_PERCEPTIBLE,
-                        STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
-                now);
-        dumpFilteredProcesses(pw, "Processes running while low mem:", "  ",
-                new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
-                new int[] {ADJ_MEM_FACTOR_LOW},
-                new int[] {STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE, STATE_PERCEPTIBLE,
-                        STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
-                now);
-        pw.println();
-        pw.println("Run time Stats:");
-        dumpSingleTime(pw, "  ", mState.mMemFactorDurations, mState.mMemFactor,
-                mState.mStartTime, now);
+
+        if (!isCheckin) {
+            dumpFilteredProcesses(pw, "Processes running while critical mem:", "  ",
+                    new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    new int[] {ADJ_MEM_FACTOR_CRITICAL},
+                    new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
+                    now, reqPackage);
+            dumpFilteredProcesses(pw, "Processes running while low mem:", "  ",
+                    new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    new int[] {ADJ_MEM_FACTOR_LOW},
+                    new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
+                    now, reqPackage);
+            dumpFilteredProcesses(pw, "Processes running while moderate mem:", "  ",
+                    new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    new int[] {ADJ_MEM_FACTOR_MODERATE},
+                    new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
+                    now, reqPackage);
+            dumpFilteredProcesses(pw, "Processes running while normal mem:", "  ",
+                    new int[] {ADJ_SCREEN_OFF, ADJ_SCREEN_ON},
+                    new int[] {ADJ_MEM_FACTOR_NORMAL},
+                    new int[] {STATE_PERSISTENT, STATE_TOP, STATE_FOREGROUND, STATE_VISIBLE,
+                            STATE_PERCEPTIBLE, STATE_BACKUP, STATE_SERVICE, STATE_HOME, STATE_PREVIOUS},
+                    now, reqPackage);
+            pw.println();
+            pw.println("Run time Stats:");
+            dumpSingleTime(pw, "  ", mState.mMemFactorDurations, mState.mMemFactor,
+                    mState.mStartTime, now);
+        } else {
+            ArrayMap<String, SparseArray<ProcessState>> procMap = mState.mProcesses.getMap();
+            for (int ip=0; ip<procMap.size(); ip++) {
+                String procName = procMap.keyAt(ip);
+                SparseArray<ProcessState> uids = procMap.valueAt(ip);
+                for (int iu=0; iu<uids.size(); iu++) {
+                    int uid = uids.keyAt(iu);
+                    ProcessState state = uids.valueAt(iu);
+                    pw.print("proc,");
+                    pw.print(procName);
+                    pw.print(",");
+                    pw.print(uid);
+                    dumpAllProcessState(pw, "        ", isCheckin, state, now);
+                }
+            }
+            pw.print("total,");
+            dumpSingleTimeCsv(pw, ",", mState.mMemFactorDurations, mState.mMemFactor,
+                    mState.mStartTime, now);
+            pw.println();
+        }
     }
 }
diff --git a/services/java/com/android/server/pm/KeySetManager.java b/services/java/com/android/server/pm/KeySetManager.java
index 2acc779..ee8cc71 100644
--- a/services/java/com/android/server/pm/KeySetManager.java
+++ b/services/java/com/android/server/pm/KeySetManager.java
@@ -505,9 +505,6 @@
                 readKeysLPw(parser);
             } else if (tagName.equals("keysets")) {
                 readKeySetListLPw(parser);
-            } else {
-                PackageManagerService.reportSettingsProblem(Log.WARN,
-                        "Could not read KeySets for KeySetManager!");
             }
         }
     }
@@ -528,9 +525,6 @@
                 lastIssuedKeyId = Long.parseLong(parser.getAttributeValue(null, "value"));
             } else if (tagName.equals("lastIssuedKeySetId")) {
                 lastIssuedKeySetId = Long.parseLong(parser.getAttributeValue(null, "value"));
-            } else {
-                PackageManagerService.reportSettingsProblem(Log.WARN,
-                        "Could not read keys for KeySetManager!");
             }
         }
     }
@@ -553,9 +547,6 @@
             } else if (tagName.equals("key-id")) {
                 long id = readIdentifierLPw(parser);
                 mKeySetMapping.get(currentKeySetId).add(id);
-            } else {
-                PackageManagerService.reportSettingsProblem(Log.WARN,
-                        "Could not read KeySets for KeySetManager!");
             }
         }
     }
@@ -571,10 +562,7 @@
         long identifier = Long.parseLong(encodedID);
         String encodedPublicKey = parser.getAttributeValue(null, "value");
         PublicKey pub = PackageParser.parsePublicKey(encodedPublicKey);
-        if (pub == null) {
-            PackageManagerService.reportSettingsProblem(Log.WARN,
-                    "Could not read public key for KeySetManager!");
-        } else {
+        if (pub != null) {
             mPublicKeys.put(identifier, pub);
         }
     }
diff --git a/services/java/com/android/server/print/PrintManagerService.java b/services/java/com/android/server/print/PrintManagerService.java
new file mode 100644
index 0000000..5173998
--- /dev/null
+++ b/services/java/com/android/server/print/PrintManagerService.java
@@ -0,0 +1,789 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.server.print;
+
+import android.Manifest;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.ServiceConnection;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.ParcelFileDescriptor;
+import android.os.Process;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.print.IPrintAdapter;
+import android.print.IPrintClient;
+import android.print.IPrintManager;
+import android.print.IPrinterDiscoveryObserver;
+import android.print.PrintAttributes;
+import android.print.PrintJobInfo;
+import android.print.PrintManager;
+import android.print.PrinterId;
+import android.print.PrinterInfo;
+import android.printservice.IPrintService;
+import android.printservice.IPrintServiceClient;
+import android.printservice.PrintServiceInfo;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.text.TextUtils.SimpleStringSplitter;
+import android.util.Slog;
+
+import com.android.internal.content.PackageMonitor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
+public final class PrintManagerService extends IPrintManager.Stub {
+
+    private static final String LOG_TAG = PrintManagerService.class.getSimpleName();
+
+    private static final char COMPONENT_NAME_SEPARATOR = ':';
+
+    private final Object mLock = new Object();
+
+    private final SimpleStringSplitter mStringColonSplitter =
+            new SimpleStringSplitter(COMPONENT_NAME_SEPARATOR);
+
+    private final Map<ComponentName, PrintServiceClient> mServices =
+            new HashMap<ComponentName, PrintServiceClient>();
+
+    private final List<PrintServiceInfo> mInstalledServices = new ArrayList<PrintServiceInfo>();
+
+    private final Set<ComponentName> mEnabledServiceNames = new HashSet<ComponentName>();
+
+    private final Context mContext;
+
+    private final RemoteSpooler mSpooler;
+
+    private final int mMyUid;
+
+    private int mCurrentUserId = UserHandle.USER_OWNER;
+
+    private IPrinterDiscoveryObserver mPrinterDiscoveryObserver;
+
+    public PrintManagerService(Context context) {
+        mContext = context;
+        mSpooler = new RemoteSpooler(context);
+        mMyUid = android.os.Process.myUid();
+        registerContentObservers();
+        registerBoradcastreceivers();
+    }
+
+    @Override
+    public PrintJobInfo print(String printJobName, IPrintClient client, IPrintAdapter printAdapter,
+            PrintAttributes attributes, int appId, int userId) {
+        final int resolvedAppId = resolveCallingAppEnforcingPermissionsLocked(appId);
+        final int resolvedUserId = resolveCallingUserEnforcingPermissionsIdLocked(userId);
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            return mSpooler.createPrintJob(printJobName, client, printAdapter,
+                    attributes, resolvedAppId, resolvedUserId);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    @Override
+    public List<PrintJobInfo> getPrintJobs(int appId, int userId) {
+        final int resolvedAppId = resolveCallingAppEnforcingPermissionsLocked(appId);
+        final int resolvedUserId = resolveCallingUserEnforcingPermissionsIdLocked(userId);
+        // TODO: Do we want to return jobs in STATE_CREATED? We should probably
+        // have additional argument for the types to get
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            return mSpooler.getPrintJobs(null, PrintJobInfo.STATE_ANY,
+                    resolvedAppId, resolvedUserId);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    @Override
+    public PrintJobInfo getPrintJob(int printJobId, int appId, int userId) {
+        final int resolvedAppId = resolveCallingAppEnforcingPermissionsLocked(appId);
+        final int resolvedUserId = resolveCallingUserEnforcingPermissionsIdLocked(userId);
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            return mSpooler.getPrintJobInfo(printJobId, resolvedAppId, resolvedUserId);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    @Override
+    public void cancelPrintJob(int printJobId, int appId, int userId) {
+        final int resolvedAppId = resolveCallingAppEnforcingPermissionsLocked(appId);
+        final int resolvedUserId = resolveCallingUserEnforcingPermissionsIdLocked(userId);
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            if (mSpooler.cancelPrintJob(printJobId, resolvedAppId, resolvedUserId)) {
+                return;
+            }
+            PrintJobInfo printJob = getPrintJob(printJobId, resolvedAppId, resolvedUserId);
+            if (printJob == null) {
+                return;
+            }
+            ComponentName printServiceName = printJob.getPrinterId().getServiceComponentName();
+            PrintServiceClient printService = null;
+            synchronized (mLock) {
+                printService = mServices.get(printServiceName);
+            }
+            if (printService == null) {
+                return;
+            }
+            printService.requestCancelPrintJob(printJob);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    // Called only from the spooler.
+    @Override
+    public void onPrintJobQueued(PrinterId printerId, PrintJobInfo printJob) {
+        throwIfCallerNotSignedWithSystemKey();
+        PrintServiceClient printService = null;
+        synchronized (mLock) {
+            ComponentName printServiceName = printerId.getServiceComponentName();
+            printService = mServices.get(printServiceName);
+        } 
+        if (printService != null) {
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                printService.notifyPrintJobQueued(printJob);
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
+        }
+    }
+
+    // Called only from the spooler.
+    @Override
+    public void startDiscoverPrinters(IPrinterDiscoveryObserver observer) {
+        throwIfCallerNotSignedWithSystemKey();
+        List<PrintServiceClient> services = new ArrayList<PrintServiceClient>();
+        synchronized (mLock) {
+            mPrinterDiscoveryObserver = observer;
+            services.addAll(mServices.values());
+        }
+        final int serviceCount = services.size();
+        if (serviceCount <= 0) {
+            return;
+        }
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            for (int i = 0; i < serviceCount; i++) {
+                PrintServiceClient service = services.get(i);
+                service.startPrinterDiscovery();
+            }
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    // Called only from the spooler.
+    @Override
+    public void stopDiscoverPrinters() {
+        throwIfCallerNotSignedWithSystemKey();
+        List<PrintServiceClient> services = new ArrayList<PrintServiceClient>();
+        synchronized (mLock) {
+            mPrinterDiscoveryObserver = null;
+            services.addAll(mServices.values());
+        }
+        final int serviceCount = services.size();
+        if (serviceCount <= 0) {
+            return;
+        }
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            for (int i = 0; i < serviceCount; i++) {
+                PrintServiceClient service = services.get(i);
+                service.stopPrintersDiscovery();
+            }
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    private void registerContentObservers() {
+        final Uri enabledPrintServicesUri = Settings.Secure.getUriFor(
+                Settings.Secure.ENABLED_PRINT_SERVICES);
+
+        ContentObserver observer = new ContentObserver(new Handler(mContext.getMainLooper())) {
+            @Override
+            public void onChange(boolean selfChange, Uri uri) {
+                if (enabledPrintServicesUri.equals(uri)) {
+                    synchronized (mLock) {
+                        if (readEnabledPrintServicesChangedLocked()) {
+                            onUserStateChangedLocked();
+                        }
+                    }
+                }
+            }
+        };
+
+        mContext.getContentResolver().registerContentObserver(enabledPrintServicesUri,
+                false, observer, UserHandle.USER_ALL);
+    }
+
+    private void registerBoradcastreceivers() {
+        PackageMonitor monitor = new PackageMonitor() {
+            @Override
+            public void onSomePackagesChanged() {
+                synchronized (mLock) {
+                    if (getChangingUserId() != mCurrentUserId) {
+                        return;
+                    }
+                    if (readConfigurationForUserStateLocked()) {
+                        onUserStateChangedLocked();
+                    }
+                }
+            }
+
+            @Override
+            public void onPackageRemoved(String packageName, int uid) {
+                synchronized (mLock) {
+                    if (getChangingUserId() != mCurrentUserId) {
+                        return;
+                    }
+                    Iterator<ComponentName> iterator = mEnabledServiceNames.iterator();
+                    while (iterator.hasNext()) {
+                        ComponentName componentName = iterator.next();
+                        if (packageName.equals(componentName.getPackageName())) {
+                            iterator.remove();
+                            onEnabledServiceNamesChangedLocked();
+                            return;
+                        }
+                    }
+                }
+            }
+
+            @Override
+            public boolean onHandleForceStop(Intent intent, String[] stoppedPackages,
+                    int uid, boolean doit) {
+                synchronized (mLock) {
+                    if (getChangingUserId() != mCurrentUserId) {
+                        return false;
+                    }
+                    Iterator<ComponentName> iterator = mEnabledServiceNames.iterator();
+                    while (iterator.hasNext()) {
+                        ComponentName componentName = iterator.next();
+                        String componentPackage = componentName.getPackageName();
+                        for (String stoppedPackage : stoppedPackages) {
+                            if (componentPackage.equals(stoppedPackage)) {
+                                if (!doit) {
+                                    return true;
+                                }
+                                iterator.remove();
+                                onEnabledServiceNamesChangedLocked();
+                            }
+                        }
+                    }
+                    return false;
+                }
+            }
+
+            private void onEnabledServiceNamesChangedLocked() {
+                // Update the enabled services setting.
+                persistComponentNamesToSettingLocked(
+                        Settings.Secure.ENABLED_PRINT_SERVICES,
+                        mEnabledServiceNames, mCurrentUserId);
+                // Update the current user state.
+                onUserStateChangedLocked();
+            }
+        };
+
+        // package changes
+        monitor.register(mContext, null,  UserHandle.ALL, true);
+
+        // user changes
+        IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(Intent.ACTION_USER_SWITCHED);
+
+        mContext.registerReceiverAsUser(new BroadcastReceiver() {
+            @Override
+            public void onReceive(Context context, Intent intent) {
+                String action = intent.getAction();
+                if (Intent.ACTION_USER_SWITCHED.equals(action)) {
+                    switchUser(intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0));
+                }
+            }
+        }, UserHandle.ALL, intentFilter, null, null);
+    }
+
+    private void throwIfCallerNotSignedWithSystemKey() {
+        if (mContext.getPackageManager().checkSignatures(
+                mMyUid, Binder.getCallingUid()) != PackageManager.SIGNATURE_MATCH) {
+            throw new SecurityException("Caller must be signed with the system key!");
+        }
+    }
+
+    private void onUserStateChangedLocked() {
+        manageServicesLocked();
+    }
+
+    private void manageServicesLocked() {
+        final int installedCount = mInstalledServices.size();
+        for (int i = 0; i < installedCount; i++) {
+            ResolveInfo resolveInfo = mInstalledServices.get(i).getResolveInfo();
+            ComponentName serviceName = new ComponentName(resolveInfo.serviceInfo.packageName,
+                    resolveInfo.serviceInfo.name);
+            if (mEnabledServiceNames.contains(serviceName)) {
+                if (!mServices.containsKey(serviceName)) {
+                    new PrintServiceClient(serviceName, mCurrentUserId).ensureBoundLocked();
+                }
+            } else {
+                PrintServiceClient service = mServices.get(serviceName);
+                if (service != null) {
+                    service.ensureUnboundLocked();
+                }
+            }
+        }
+    }
+
+    private boolean readConfigurationForUserStateLocked() {
+        boolean somethingChanged = false;
+        somethingChanged |= readInstalledPrintServiceLocked();
+        somethingChanged |= readEnabledPrintServicesChangedLocked();
+        return somethingChanged;
+    }
+
+    private boolean readEnabledPrintServicesChangedLocked() {
+        Set<ComponentName> tempEnabledServiceNameSet = new HashSet<ComponentName>();
+        readComponentNamesFromSettingLocked(Settings.Secure.ENABLED_PRINT_SERVICES,
+            mCurrentUserId, tempEnabledServiceNameSet);
+        if (!tempEnabledServiceNameSet.equals(mEnabledServiceNames)) {
+            mEnabledServiceNames.clear();
+            mEnabledServiceNames.addAll(tempEnabledServiceNameSet);
+            return true;
+        }
+        return false;
+    }
+
+    private boolean readInstalledPrintServiceLocked() {
+        Set<PrintServiceInfo> tempPrintServices = new HashSet<PrintServiceInfo>();
+
+        List<ResolveInfo> installedServices = mContext.getPackageManager()
+                .queryIntentServicesAsUser(
+                        new Intent(android.printservice.PrintService.SERVICE_INTERFACE),
+                        PackageManager.GET_SERVICES | PackageManager.GET_META_DATA,
+                        mCurrentUserId);
+
+        final int installedCount = installedServices.size();
+        for (int i = 0, count = installedCount; i < count; i++) {
+            ResolveInfo installedService = installedServices.get(i);
+            if (!android.Manifest.permission.BIND_PRINT_SERVICE.equals(
+                    installedService.serviceInfo.permission)) {
+                ComponentName serviceName = new ComponentName(
+                        installedService.serviceInfo.packageName,
+                        installedService.serviceInfo.name);
+                Slog.w(LOG_TAG, "Skipping print service "
+                        + serviceName.flattenToShortString()
+                        + " since it does not require permission "
+                        + android.Manifest.permission.BIND_PRINT_SERVICE);
+                continue;
+            }
+            tempPrintServices.add(PrintServiceInfo.create(installedService, mContext));
+        }
+
+        if (!tempPrintServices.equals(mInstalledServices)) {
+            mInstalledServices.clear();
+            mInstalledServices.addAll(tempPrintServices);
+            return true;
+        }
+        return false;
+    }
+
+    private void readComponentNamesFromSettingLocked(String settingName, int userId,
+            Set<ComponentName> outComponentNames) {
+        String settingValue = Settings.Secure.getStringForUser(mContext.getContentResolver(),
+                settingName, userId);
+        outComponentNames.clear();
+        if (!TextUtils.isEmpty(settingValue)) {
+            TextUtils.SimpleStringSplitter splitter = mStringColonSplitter;
+            splitter.setString(settingValue);
+            while (splitter.hasNext()) {
+                String string = splitter.next();
+                if (TextUtils.isEmpty(string)) {
+                    continue;
+                }
+                ComponentName componentName = ComponentName.unflattenFromString(string);
+                if (componentName != null) {
+                    outComponentNames.add(componentName);
+                }
+            }
+        }
+    }
+
+    private void persistComponentNamesToSettingLocked(String settingName,
+            Set<ComponentName> componentNames, int userId) {
+        StringBuilder builder = new StringBuilder();
+        for (ComponentName componentName : componentNames) {
+            if (builder.length() > 0) {
+                builder.append(COMPONENT_NAME_SEPARATOR);
+            }
+            builder.append(componentName.flattenToShortString());
+        }
+        Settings.Secure.putStringForUser(mContext.getContentResolver(),
+                settingName, builder.toString(), userId);
+    }
+
+    private void switchUser(int newUserId) {
+        synchronized (mLock) {
+            // Disconnect services for the old user.
+            mEnabledServiceNames.clear();
+            onUserStateChangedLocked();
+
+            // The user changed.
+            mCurrentUserId = newUserId;
+
+            // Update the user state based on current settings.
+            readConfigurationForUserStateLocked();
+            onUserStateChangedLocked();
+        }
+
+        // Unbind the spooler for the old user).
+        mSpooler.unbind();
+
+        // If we have queued jobs, advertise it, or we do
+        // not need the spooler for now.
+        if (notifyQueuedPrintJobs()) {
+            mSpooler.unbind();
+        }
+    }
+
+    private boolean notifyQueuedPrintJobs() {
+        Map<PrintServiceClient, List<PrintJobInfo>> notifications =
+                new HashMap<PrintServiceClient, List<PrintJobInfo>>();
+        synchronized (mLock) {
+            for (PrintServiceClient service : mServices.values()) {
+                List<PrintJobInfo> printJobs = mSpooler.getPrintJobs(
+                        service.mComponentName, PrintJobInfo.STATE_QUEUED,
+                        PrintManager.APP_ID_ANY, service.mUserId);
+                notifications.put(service, printJobs);
+            }
+        }
+        if (notifications.isEmpty()) {
+            return false;
+        }
+        for (Map.Entry<PrintServiceClient, List<PrintJobInfo>> notification
+                : notifications.entrySet()) {
+            PrintServiceClient service = notification.getKey();
+            List<PrintJobInfo> printJobs = notification.getValue();
+            final int printJobIdCount = printJobs.size();
+            for (int i = 0; i < printJobIdCount; i++) {
+                service.notifyPrintJobQueued(printJobs.get(i));
+            }
+        }
+        return true;
+    }
+
+    private int resolveCallingUserEnforcingPermissionsIdLocked(int userId) {
+        final int callingUid = Binder.getCallingUid();
+        if (callingUid == 0 || callingUid == Process.SYSTEM_UID
+                || callingUid == Process.SHELL_UID) {
+            return userId;
+        }
+        final int callingUserId = UserHandle.getUserId(callingUid);
+        if (callingUserId == userId) {
+            return userId;
+        }
+        if (mContext.checkCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS_FULL)
+                != PackageManager.PERMISSION_GRANTED
+            ||  mContext.checkCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS)
+                != PackageManager.PERMISSION_GRANTED) {
+            if (userId == UserHandle.USER_CURRENT_OR_SELF) {
+                return callingUserId;
+            }
+            throw new SecurityException("Call from user " + callingUserId + " as user "
+                    + userId + " without permission INTERACT_ACROSS_USERS or "
+                    + "INTERACT_ACROSS_USERS_FULL not allowed.");
+        }
+        if (userId == UserHandle.USER_CURRENT || userId == UserHandle.USER_CURRENT_OR_SELF) {
+            return mCurrentUserId;
+        }
+        throw new IllegalArgumentException("Calling user can be changed to only "
+                + "UserHandle.USER_CURRENT or UserHandle.USER_CURRENT_OR_SELF.");
+    }
+
+    private int resolveCallingAppEnforcingPermissionsLocked(int appId) {
+        final int callingUid = Binder.getCallingUid();
+        if (callingUid == 0 || callingUid == Process.SYSTEM_UID
+                || callingUid == Process.SHELL_UID) {
+            return appId;
+        }
+        final int callingAppId = UserHandle.getAppId(callingUid);
+        if (appId == callingAppId) {
+            return appId;
+        }
+        if (mContext.checkCallingPermission(Manifest.permission.ACCESS_ALL_PRINT_JOBS)
+                != PackageManager.PERMISSION_GRANTED) {
+            throw new SecurityException("Call from app " + callingAppId + " as app "
+                    + appId + " without permission INTERACT_ACROSS_APPS");
+        }
+        return appId;
+    }
+
+    private final class PrintServiceClient extends IPrintServiceClient.Stub
+            implements ServiceConnection, DeathRecipient {
+
+        private final ComponentName mComponentName;
+
+        private final Intent mIntent;
+
+        private final int mUserId;
+
+        private IPrintService mInterface;
+
+        private boolean mBinding;
+
+        private boolean mWasConnectedAndDied;
+
+        public PrintServiceClient(ComponentName componentName, int userId) {
+            mComponentName = componentName;
+            mIntent = new Intent().setComponent(mComponentName);
+            mUserId = userId;
+        }
+
+        @Override
+        public List<PrintJobInfo> getPrintJobs() {
+            return mSpooler.getPrintJobs(mComponentName, PrintJobInfo.STATE_ANY,
+                    PrintManager.APP_ID_ANY, mUserId);
+        }
+
+        @Override
+        public PrintJobInfo getPrintJob(int printJobId) {
+            return mSpooler.getPrintJobInfo(printJobId,
+                    PrintManager.APP_ID_ANY, mUserId);
+        }
+
+        @Override
+        public boolean setPrintJobState(int printJobId, int state) {
+            return mSpooler.setPrintJobState(printJobId, state, mUserId);
+        }
+
+        @Override
+        public boolean setPrintJobTag(int printJobId, String tag) {
+            return mSpooler.setPrintJobTag(printJobId, tag, mUserId);
+        }
+
+        @Override
+        public void writePrintJobData(ParcelFileDescriptor fd, int printJobId) {
+            mSpooler.writePrintJobData(fd, printJobId, mUserId);
+        }
+
+        @Override
+        public void addDiscoveredPrinters(List<PrinterInfo> printers) {
+            throwIfPrinterIdsForPrinterInfoTampered(printers);
+            synchronized (mLock) {
+                if (mPrinterDiscoveryObserver != null) {
+                    try {
+                        mPrinterDiscoveryObserver.addDiscoveredPrinters(printers);
+                    } catch (RemoteException re) {
+                        /* ignore */
+                    }
+                }
+            }
+        }
+
+        @Override
+        public void removeDiscoveredPrinters(List<PrinterId> printerIds) {
+            throwIfPrinterIdsTampered(printerIds);
+            synchronized (mLock) {
+                if (mPrinterDiscoveryObserver != null) {
+                    try {
+                        mPrinterDiscoveryObserver.removeDiscoveredPrinters(printerIds);
+                    } catch (RemoteException re) {
+                        /* ignore */
+                    }
+                }
+            }
+        }
+
+        public void requestCancelPrintJob(PrintJobInfo printJob) {
+            synchronized (mLock) {
+                try {
+                    mInterface.requestCancelPrintJob(printJob);
+                } catch (RemoteException re) {
+                    Slog.e(LOG_TAG, "Error canceling pring job!", re);
+                }
+            }
+        }
+
+        public void notifyPrintJobQueued(PrintJobInfo printJob) {
+            IPrintService service = mInterface;
+            if (service != null) {
+                try {
+                    service.onPrintJobQueued(printJob);
+                } catch (RemoteException re) {
+                    /* ignore */
+                }
+            }
+        }
+
+        public void startPrinterDiscovery() {
+            IPrintService service = mInterface;
+            if (service != null) {
+                try {
+                    service.startPrinterDiscovery();
+                } catch (RemoteException re) {
+                    /* ignore */
+                }
+            }
+        }
+
+        public void stopPrintersDiscovery() {
+            IPrintService service = mInterface;
+            if (service != null) {
+                try {
+                    service.stopPrinterDiscovery();
+                } catch (RemoteException re) {
+                    /* ignore */
+                }
+            }
+        }
+
+        public void ensureBoundLocked() {
+            if (mBinding) {
+                return;
+            }
+            if (mInterface == null) {
+                mBinding = true;
+                mContext.bindServiceAsUser(mIntent, this,
+                        Context.BIND_AUTO_CREATE, new UserHandle(mUserId));
+            }
+        }
+
+        public void ensureUnboundLocked() {
+            if (mBinding) {
+                mBinding = false;
+                return;
+            }
+            if (mInterface != null) {
+                mContext.unbindService(this);
+                destroyLocked();
+            }
+        }
+
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            synchronized (mLock) {
+                mInterface = IPrintService.Stub.asInterface(service);
+                mServices.put(mComponentName, this);
+                try {
+                    mInterface.asBinder().linkToDeath(this, 0);
+                } catch (RemoteException re) {
+                    destroyLocked();
+                    return;
+                }
+                if (mUserId != mCurrentUserId) {
+                    destroyLocked();
+                    return;
+                }
+                if (mBinding || mWasConnectedAndDied) {
+                    mBinding = false;
+                    mWasConnectedAndDied = false;
+                    onUserStateChangedLocked();
+                    try {
+                        mInterface.setClient(this);
+                    } catch (RemoteException re) {
+                        Slog.w(LOG_TAG, "Error while setting client for service: "
+                                + service, re);
+                    }
+                } else {
+                    destroyLocked();
+                }
+            }
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            /* do nothing - #binderDied takes care */
+        }
+
+        @Override
+        public void binderDied() {
+            synchronized (mLock) {
+                if (isConnectedLocked()) {
+                    mWasConnectedAndDied = true;
+                }
+                destroyLocked();
+            }
+        }
+
+        private void destroyLocked() {
+            if (mServices.remove(mComponentName) == null) {
+                return;
+            }
+            if (isConnectedLocked()) {
+                try {
+                    mInterface.asBinder().unlinkToDeath(this, 0);
+                } catch (NoSuchElementException nse) {
+                    /* ignore */
+                }
+                try {
+                    mInterface.setClient(null);
+                } catch (RemoteException re) {
+                    /* ignore */
+                }
+                mInterface = null;
+            }
+            mBinding = false;
+        }
+
+        private boolean isConnectedLocked() {
+            return (mInterface != null);
+        }
+
+        private void throwIfPrinterIdsForPrinterInfoTampered(List<PrinterInfo> printerInfos) {
+            final int printerInfoCount = printerInfos.size();
+            for (int i = 0; i < printerInfoCount; i++) {
+                PrinterId printerId = printerInfos.get(i).getId();
+                throwIfPrinterIdTampered(printerId);
+            }
+        }
+
+        private void throwIfPrinterIdsTampered(List<PrinterId> printerIds) {
+            final int printerIdCount = printerIds.size();
+            for (int i = 0; i < printerIdCount; i++) {
+                PrinterId printerId = printerIds.get(i);
+                throwIfPrinterIdTampered(printerId);
+            }
+        }
+
+        private void throwIfPrinterIdTampered(PrinterId printerId) {
+            if (printerId == null || printerId.getServiceComponentName() == null
+                    || !printerId.getServiceComponentName().equals(mComponentName)) {
+                throw new IllegalArgumentException("Invalid printer id: " + printerId);
+            }
+        }
+    }
+}
diff --git a/services/java/com/android/server/print/RemoteSpooler.java b/services/java/com/android/server/print/RemoteSpooler.java
new file mode 100644
index 0000000..fef5818
--- /dev/null
+++ b/services/java/com/android/server/print/RemoteSpooler.java
@@ -0,0 +1,416 @@
+/*
+ * Copyright (C) 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.
+ */
+
+package com.android.server.print;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Binder;
+import android.os.IBinder;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.os.UserHandle;
+import android.os.IBinder.DeathRecipient;
+import android.print.IPrintAdapter;
+import android.print.IPrintClient;
+import android.print.IPrintSpoolerService;
+import android.print.IPrintSpoolerServiceCallbacks;
+import android.print.PrintAttributes;
+import android.print.PrintJobInfo;
+import android.util.Slog;
+import android.util.TimedRemoteCaller;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeoutException;
+
+/**
+ * This represents the remote print spooler as a local object to the
+ * PrintManagerSerivce. It is responsible to connecting to the remove
+ * spooler if needed, to make the timed out remote calls, and to handle
+ * remove exceptions.
+ */
+final class RemoteSpooler implements ServiceConnection, DeathRecipient {
+
+    private static final String LOG_TAG = "Spooler";
+
+    private static final long BIND_SPOOLER_SERVICE_TIMEOUT = 10000;
+
+    private final Object mLock = new Object();
+
+    private final Context mContext;
+
+    private final Intent mIntent;
+
+    private final GetPrintJobsCaller mGetPrintJobsCaller = new GetPrintJobsCaller();
+
+    private final CreatePrintJobCaller mCreatePrintJobCaller = new CreatePrintJobCaller();
+
+    private final CancelPrintJobCaller mCancelPrintJobCaller = new CancelPrintJobCaller();
+
+    private final GetPrintJobCaller mGetPrintJobCaller = new GetPrintJobCaller();
+
+    private final SetPrintJobStateCaller mSetPrintJobStatusCaller = new SetPrintJobStateCaller();
+
+    private final SetPrintJobTagCaller mSetPrintJobTagCaller = new SetPrintJobTagCaller();
+
+    private IPrintSpoolerService mRemoteInterface;
+
+    private int mUserId = UserHandle.USER_NULL;
+
+    public RemoteSpooler(Context context) {
+        mContext = context;
+        mIntent = new Intent();
+        mIntent.setComponent(new ComponentName("com.android.printspooler",
+                "com.android.printspooler.PrintSpoolerService"));
+    }
+
+    public List<PrintJobInfo> getPrintJobs(ComponentName componentName, int state, int appId,
+            int userId) {
+        try {
+            return mGetPrintJobsCaller.getPrintJobs(getRemoteInstance(userId),
+                    componentName, state, appId);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error getting print jobs!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error getting print jobs!", te);
+        }
+        return null;
+    }
+
+    public PrintJobInfo createPrintJob(String printJobName, IPrintClient client,
+            IPrintAdapter printAdapter, PrintAttributes attributes, int appId, int userId) {
+        try {
+            return mCreatePrintJobCaller.createPrintJob(getRemoteInstance(userId),
+                    printJobName, client, printAdapter, attributes, appId);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error creating print job!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error creating print job!", te);
+        }
+        return null;
+    }
+
+    public boolean cancelPrintJob(int printJobId, int appId, int userId) {
+        try {
+            return mCancelPrintJobCaller.cancelPrintJob(getRemoteInstance(userId),
+                    printJobId, appId);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error canceling print job!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error canceling print job!", te);
+        }
+        return false;
+    }
+
+    public void writePrintJobData(ParcelFileDescriptor fd, int printJobId, int userId) {
+        try {
+            getRemoteInstance(userId).writePrintJobData(fd, printJobId);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error writing print job data!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error writing print job data!", te);
+        } finally {
+            // We passed the file descriptor across and now the other
+            // side is responsible to close it, so close the local copy.
+            try {
+                fd.close();
+            } catch (IOException ioe) {
+                /* ignore */
+            }
+        }
+    }
+
+    public PrintJobInfo getPrintJobInfo(int printJobId, int appId, int userId) {
+        try {
+            return mGetPrintJobCaller.getPrintJobInfo(getRemoteInstance(userId),
+                    printJobId, appId);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error getting print job!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error getting print job!", te);
+        }
+        return null;
+    }
+
+    public boolean setPrintJobState(int printJobId, int state, int userId) {
+        try {
+            return mSetPrintJobStatusCaller.setPrintJobState(getRemoteInstance(userId),
+                    printJobId, state);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error setting print job status!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error setting print job status!", te);
+        }
+        return false;
+    }
+
+    public boolean setPrintJobTag(int printJobId, String tag, int userId) {
+        try {
+            return mSetPrintJobTagCaller.setPrintJobTag(getRemoteInstance(userId),
+                    printJobId, tag);
+        } catch (RemoteException re) {
+            Slog.e(LOG_TAG, "Error setting print job tag!", re);
+        } catch (TimeoutException te) {
+            Slog.e(LOG_TAG, "Error setting print job tag!", te);
+        }
+        return false;
+    }
+
+    @Override
+    public void onServiceDisconnected(ComponentName name) {
+        binderDied();
+    }
+
+    @Override
+    public void onServiceConnected(ComponentName name, IBinder service) {
+        synchronized (mLock) {
+            try {
+                service.linkToDeath(this, 0);
+                mRemoteInterface = IPrintSpoolerService.Stub.asInterface(service);
+            } catch (RemoteException re) {
+                /* ignore */
+            }
+        }
+    }
+
+    private IPrintSpoolerService getRemoteInstance(int userId) throws TimeoutException {
+        synchronized (mLock) {
+            if (mRemoteInterface != null && mUserId == userId) {
+                return mRemoteInterface;
+            }
+
+            final long identity = Binder.clearCallingIdentity();
+            try {
+                if (mUserId != UserHandle.USER_NULL && mUserId != userId) {
+                    unbind();
+                }
+
+                mContext.bindServiceAsUser(mIntent, this,
+                        Context.BIND_AUTO_CREATE | Context.BIND_ALLOW_OOM_MANAGEMENT,
+                        UserHandle.CURRENT);
+            } finally {
+                Binder.restoreCallingIdentity(identity);
+            }
+
+            final long startMillis = SystemClock.uptimeMillis();
+            while (true) {
+                if (mRemoteInterface != null) {
+                    break;
+                }
+                final long elapsedMillis = SystemClock.uptimeMillis() - startMillis;
+                final long remainingMillis = BIND_SPOOLER_SERVICE_TIMEOUT - elapsedMillis;
+                if (remainingMillis <= 0) {
+                    throw new TimeoutException("Cannot get spooler!");
+                }
+                try {
+                    mLock.wait(remainingMillis);
+                } catch (InterruptedException ie) {
+                    /* ignore */
+                }
+            }
+
+            mUserId = userId;
+
+            return mRemoteInterface;
+        }
+    }
+
+    public void unbind() {
+        synchronized (mLock) {
+            if (mRemoteInterface != null) {
+                mContext.unbindService(this);
+                mRemoteInterface = null;
+                mUserId = UserHandle.USER_NULL;
+            }
+        }
+    }
+
+    @Override
+    public void binderDied() {
+        synchronized (mLock) {
+            if (mRemoteInterface != null) {
+                mRemoteInterface.asBinder().unlinkToDeath(this, 0);
+                mRemoteInterface = null;
+            }
+        }
+    }
+
+    private final class GetPrintJobsCaller extends TimedRemoteCaller<List<PrintJobInfo>> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public GetPrintJobsCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onGetPrintJobsResult(List<PrintJobInfo> printJobs, int sequence) {
+                    onRemoteMethodResult(printJobs, sequence);
+                }
+            };
+        }
+
+        public List<PrintJobInfo> getPrintJobs(IPrintSpoolerService target,
+                ComponentName componentName, int state, int appId)
+                        throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.getPrintJobs(mCallback, componentName, state, appId, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private final class CreatePrintJobCaller extends TimedRemoteCaller<PrintJobInfo> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public CreatePrintJobCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onCreatePrintJobResult(PrintJobInfo printJob, int sequence) {
+                    onRemoteMethodResult(printJob, sequence);
+                }
+            };
+        }
+
+        public PrintJobInfo createPrintJob(IPrintSpoolerService target, String printJobName,
+                IPrintClient client, IPrintAdapter printAdapter, PrintAttributes attributes,
+                int appId) throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.createPrintJob(printJobName, client, printAdapter, attributes,
+                    mCallback, appId, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private final class CancelPrintJobCaller extends TimedRemoteCaller<Boolean> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public CancelPrintJobCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onCancelPrintJobResult(boolean canceled, int sequence) {
+                    onRemoteMethodResult(canceled, sequence);
+                }
+            };
+        }
+
+        public boolean cancelPrintJob(IPrintSpoolerService target, int printJobId,
+                int appId) throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.cancelPrintJob(printJobId, mCallback, appId, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private final class GetPrintJobCaller extends TimedRemoteCaller<PrintJobInfo> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public GetPrintJobCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onGetPrintJobInfoResult(PrintJobInfo printJob, int sequence) {
+                    onRemoteMethodResult(printJob, sequence);
+                }
+            };
+        }
+
+        public PrintJobInfo getPrintJobInfo(IPrintSpoolerService target, int printJobId,
+                int appId) throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.getPrintJob(printJobId, mCallback, appId, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private final class SetPrintJobStateCaller extends TimedRemoteCaller<Boolean> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public SetPrintJobStateCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onSetPrintJobStateResult(boolean success, int sequence) {
+                    onRemoteMethodResult(success, sequence);
+                }
+            };
+        }
+
+        public boolean setPrintJobState(IPrintSpoolerService target, int printJobId,
+                int status) throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.setPrintJobState(printJobId, status, mCallback, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private final class SetPrintJobTagCaller extends TimedRemoteCaller<Boolean> {
+        private final IPrintSpoolerServiceCallbacks mCallback;
+
+        public SetPrintJobTagCaller() {
+            super(TimedRemoteCaller.DEFAULT_CALL_TIMEOUT_MILLIS);
+            mCallback = new BasePrintSpoolerServiceCallbacks() {
+                @Override
+                public void onSetPrintJobTagResult(boolean success, int sequence) {
+                    onRemoteMethodResult(success, sequence);
+                }
+            };
+        }
+
+        public boolean setPrintJobTag(IPrintSpoolerService target, int printJobId,
+                String tag) throws RemoteException, TimeoutException {
+            final int sequence = onBeforeRemoteCall();
+            target.setPrintJobTag(printJobId, tag, mCallback, sequence);
+            return getResultTimed(sequence);
+        }
+    }
+
+    private abstract class BasePrintSpoolerServiceCallbacks
+            extends IPrintSpoolerServiceCallbacks.Stub {
+        @Override
+        public void onGetPrintJobsResult(List<PrintJobInfo> printJobIds, int sequence) {
+            /** do nothing */
+        }
+
+        @Override
+        public void onGetPrintJobInfoResult(PrintJobInfo printJob, int sequence) {
+            /** do nothing */
+        }
+
+        @Override
+        public void onCreatePrintJobResult(PrintJobInfo printJob, int sequence) {
+            /** do nothing */
+        }
+
+        @Override
+        public void onCancelPrintJobResult(boolean canceled, int sequence) {
+            /** do nothing */
+        }
+
+        @Override
+        public void onSetPrintJobStateResult(boolean success, int sequece) {
+            /** do nothing */
+        }
+
+        @Override
+        public void onSetPrintJobTagResult(boolean success, int sequence) {
+            /** do nothing */
+        }
+    }
+}
\ No newline at end of file
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 55680c8..b456bb3 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -94,7 +94,7 @@
      * @hide
      */
     public void initialize(SignalStrength ss, int timingAdvance) {
-        mSignalStrength = ss.getLteSignalStrenght();
+        mSignalStrength = ss.getLteSignalStrength();
         mRsrp = ss.getLteRsrp();
         mRsrq = ss.getLteRsrq();
         mRssnr = ss.getLteRssnr();
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index 674955c..7b9cf4e 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -438,7 +438,7 @@
     }
 
     /** @hide */
-    public int getLteSignalStrenght() {
+    public int getLteSignalStrength() {
         return mLteSignalStrength;
     }
 
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 26dde1e..4185aea 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1252,7 +1252,7 @@
     public void listen(PhoneStateListener listener, int events) {
         String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
         try {
-            Boolean notifyNow = (getITelephony() != null);
+            Boolean notifyNow = true;
             sRegistry.listen(pkgForDebug, listener.callback, events, notifyNow);
         } catch (RemoteException ex) {
             // system process dead
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index 228a630..6978551 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -49,10 +49,6 @@
     private static final String TAG = "CallerInfo";
     private static final boolean VDBG = Rlog.isLoggable(TAG, Log.VERBOSE);
 
-    public static final String UNKNOWN_NUMBER = "-1";
-    public static final String PRIVATE_NUMBER = "-2";
-    public static final String PAYPHONE_NUMBER = "-3";
-
     /**
      * Please note that, any one of these member variables can be null,
      * and any accesses to them should be prepared to handle such a case.
diff --git a/tests/TransitionTests/AndroidManifest.xml b/tests/TransitionTests/AndroidManifest.xml
index 98174ab..5483f64 100644
--- a/tests/TransitionTests/AndroidManifest.xml
+++ b/tests/TransitionTests/AndroidManifest.xml
@@ -219,6 +219,20 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+        <activity android:label="FadingHierachy"
+                  android:name=".FadingHierarchy">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:label="HierarchicalMove"
+                  android:name=".HierarchicalMove">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
 
     </application>
 
diff --git a/tests/TransitionTests/res/layout/fading_hierarchy.xml b/tests/TransitionTests/res/layout/fading_hierarchy.xml
new file mode 100644
index 0000000..a24a6b6
--- /dev/null
+++ b/tests/TransitionTests/res/layout/fading_hierarchy.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:orientation="vertical"
+              android:id="@+id/container"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent">
+
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/submit"
+            android:onClick="sendMessage"
+            android:id="@+id/sceneSwitchButton"/>
+    <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+        <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/button"/>
+        <LinearLayout
+                android:orientation="vertical"
+                android:id="@+id/removingContainer"
+                android:layout_width="wrap_content"
+                android:layout_height="200dip">
+            <Button
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/removingButton"
+                    android:id="@+id/removingButton"/>
+        </LinearLayout>
+        <Button
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/button"/>
+    </LinearLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/tests/TransitionTests/res/layout/hierarchical_move.xml b/tests/TransitionTests/res/layout/hierarchical_move.xml
new file mode 100644
index 0000000..1e70ba9
--- /dev/null
+++ b/tests/TransitionTests/res/layout/hierarchical_move.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:orientation="vertical"
+              android:id="@+id/container"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent">
+
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/submit"
+            android:onClick="sendMessage"
+            android:id="@+id/sceneSwitchButton"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button0"
+            android:id="@+id/button0"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button1"
+            android:id="@+id/button1"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button2"
+            android:id="@+id/button2"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button3"
+            android:id="@+id/button3"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button4"
+            android:id="@+id/button4"/>
+    <Button
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/button5"
+            android:id="@+id/button5"/>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/tests/TransitionTests/res/values/strings.xml b/tests/TransitionTests/res/values/strings.xml
index 3be243b..9b80a26 100644
--- a/tests/TransitionTests/res/values/strings.xml
+++ b/tests/TransitionTests/res/values/strings.xml
@@ -43,4 +43,10 @@
     <string name="state2">State 2</string>
     <string name="state3">State 3</string>
     <string name="state4">State 4</string>
+    <string name="button0">Button 0</string>
+    <string name="button1">Button 1</string>
+    <string name="button2">Button 2</string>
+    <string name="button3">Button 3</string>
+    <string name="button4">Button 4</string>
+    <string name="button5">Button 5</string>
 </resources>
diff --git a/tests/TransitionTests/src/com/android/transitiontests/FadingHierarchy.java b/tests/TransitionTests/src/com/android/transitiontests/FadingHierarchy.java
new file mode 100644
index 0000000..e0fe379
--- /dev/null
+++ b/tests/TransitionTests/src/com/android/transitiontests/FadingHierarchy.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 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.
+ */
+package com.android.transitiontests;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.transition.Scene;
+import android.view.transition.TransitionManager;
+import android.widget.Button;
+
+public class FadingHierarchy extends Activity {
+
+    ViewGroup mRemovingContainer, mContainer;
+    Button mRemovingButton;
+    boolean mVisible = true;
+    ViewGroup mInnerContainerParent;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.fading_hierarchy);
+
+        mContainer = (ViewGroup) findViewById(R.id.container);
+        mRemovingContainer = (ViewGroup) findViewById(R.id.removingContainer);
+        mInnerContainerParent = (ViewGroup) mRemovingContainer.getParent();
+
+        mRemovingButton = (Button) findViewById(R.id.removingButton);
+    }
+
+    public void sendMessage(View view) {
+        TransitionManager.beginDelayedTransition(mContainer, null);
+        if (mVisible) {
+            mInnerContainerParent.removeView(mRemovingContainer);
+        } else {
+            mInnerContainerParent.addView(mRemovingContainer);
+        }
+        mVisible = !mVisible;
+    }
+}
diff --git a/tests/TransitionTests/src/com/android/transitiontests/HierarchicalMove.java b/tests/TransitionTests/src/com/android/transitiontests/HierarchicalMove.java
new file mode 100644
index 0000000..093d7c1
--- /dev/null
+++ b/tests/TransitionTests/src/com/android/transitiontests/HierarchicalMove.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 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.
+ */
+package com.android.transitiontests;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.transition.Move;
+import android.view.transition.Transition;
+import android.view.transition.TransitionGroup;
+import android.view.transition.TransitionManager;
+import android.widget.Button;
+
+import static android.widget.LinearLayout.LayoutParams;
+
+public class HierarchicalMove extends Activity {
+
+    Button[] buttons = new Button[6];
+    ViewGroup mSceneRoot;
+    boolean wide = false;
+    Transition mTransition;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.hierarchical_move);
+
+        View container = (View) findViewById(R.id.container);
+        mSceneRoot = (ViewGroup) container.getParent();
+
+        buttons[0] = (Button) findViewById(R.id.button0);
+        buttons[1] = (Button) findViewById(R.id.button1);
+        buttons[2] = (Button) findViewById(R.id.button2);
+        buttons[3] = (Button) findViewById(R.id.button3);
+        buttons[4] = (Button) findViewById(R.id.button4);
+        buttons[5] = (Button) findViewById(R.id.button5);
+
+        // Move button0, then buttons 1/2 together, then buttons 3/4/5 sequentially:
+        // group (seq)
+        //    Move 0
+        //    group (seq)
+        //       group (together)
+        //          Move 1
+        //          Move 2
+        //       group (sequentially)
+        //          Move 3
+        //          Move 4/5
+        TransitionGroup rootTransition = new TransitionGroup(TransitionGroup.SEQUENTIALLY);
+
+        // button0
+        Transition move0 = new Move();
+        move0.setTargets(buttons[0]);
+
+        // buttons 1/2/3/4/5
+        TransitionGroup group12345 = new TransitionGroup(TransitionGroup.SEQUENTIALLY);
+
+        // buttons 1/2
+        TransitionGroup group12 = new TransitionGroup(TransitionGroup.TOGETHER);
+        Move move1 = new Move();
+        move1.setTargets(buttons[1]);
+        Move move2 = new Move();
+        move2.setTargets(buttons[2]);
+        group12.addTransitions(move1, move2);
+
+        TransitionGroup group345 = new TransitionGroup(TransitionGroup.SEQUENTIALLY);
+        Move move3 = new Move();
+        move3.setTargets(buttons[3]);
+        Move move45 = new Move();
+        move45.setTargets(buttons[4], buttons[5]);
+        group345.addTransitions(move3, move45);
+
+        group12345.addTransitions(move0, group12, group345);
+
+        rootTransition.addTransitions(group12345);
+        rootTransition.setDuration(1000);
+        mTransition = rootTransition;
+
+    }
+
+    public void sendMessage(View view) {
+        TransitionManager.beginDelayedTransition(mSceneRoot, mTransition);
+        int widthSpec = wide ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT;
+        LayoutParams params = new LayoutParams(widthSpec, LayoutParams.WRAP_CONTENT);
+        for (int i = 0; i < buttons.length; ++i) {
+            buttons[i].setLayoutParams(params);
+        }
+        wide = !wide;
+    }
+
+}
diff --git a/wifi/java/android/net/wifi/WifiNative.java b/wifi/java/android/net/wifi/WifiNative.java
index 1fbed3d..375a160 100644
--- a/wifi/java/android/net/wifi/WifiNative.java
+++ b/wifi/java/android/net/wifi/WifiNative.java
@@ -198,6 +198,7 @@
     /**
      * Format of results:
      * =================
+     * id=1
      * bssid=68:7f:74:d7:1b:6e
      * freq=2412
      * level=-43
@@ -208,10 +209,11 @@
      * ====
      *
      * RANGE=ALL gets all scan results
+     * RANGE=ID- gets results from ID
      * MASK=<N> see wpa_supplicant/src/common/wpa_ctrl.h for details
      */
-    public String scanResults() {
-        return doStringCommand("BSS RANGE=ALL MASK=0x21987");
+    public String scanResults(int sid) {
+        return doStringCommand("BSS RANGE=" + sid + "- MASK=0x21987");
     }
 
     public boolean startDriver() {
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 946bbad..1040ab19 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -68,8 +68,8 @@
 import android.os.UserHandle;
 import android.os.WorkSource;
 import android.provider.Settings;
-import android.text.TextUtils;
 import android.util.LruCache;
+import android.text.TextUtils;
 
 import com.android.internal.R;
 import com.android.internal.app.IBatteryStats;
@@ -1339,6 +1339,7 @@
         mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
     }
 
+    private static final String ID_STR = "id=";
     private static final String BSSID_STR = "bssid=";
     private static final String FREQ_STR = "freq=";
     private static final String LEVEL_STR = "level=";
@@ -1350,6 +1351,8 @@
 
     /**
      * Format:
+     *
+     * id=1
      * bssid=68:7f:76:d7:1a:6e
      * freq=2412
      * level=-44
@@ -1357,6 +1360,7 @@
      * flags=[WPA2-PSK-CCMP][WPS][ESS]
      * ssid=zfdy
      * ====
+     * id=2
      * bssid=68:5f:74:d7:1a:6f
      * freq=5180
      * level=-73
@@ -1365,16 +1369,43 @@
      * ssid=zuby
      * ====
      */
-    private void setScanResults(String scanResults) {
+    private void setScanResults() {
         String bssid = "";
         int level = 0;
         int freq = 0;
         long tsf = 0;
         String flags = "";
         WifiSsid wifiSsid = null;
+        String scanResults;
+        String tmpResults;
+        StringBuffer scanResultsBuf = new StringBuffer();
+        int sid = 0;
 
-        if (scanResults == null) {
-            return;
+        while (true) {
+            tmpResults = mWifiNative.scanResults(sid);
+            if (TextUtils.isEmpty(tmpResults)) break;
+            scanResultsBuf.append(tmpResults);
+            scanResultsBuf.append("\n");
+            String[] lines = tmpResults.split("\n");
+            sid = -1;
+            for (int i=lines.length - 1; i >= 0; i--) {
+                if (lines[i].startsWith(END_STR)) {
+                    break;
+                } else if (lines[i].startsWith(ID_STR)) {
+                    try {
+                        sid = Integer.parseInt(lines[i].substring(ID_STR.length())) + 1;
+                    } catch (NumberFormatException e) {
+                        // Nothing to do
+                    }
+                    break;
+                }
+            }
+            if (sid == -1) break;
+        }
+
+        scanResults = scanResultsBuf.toString();
+        if (TextUtils.isEmpty(scanResults)) {
+           return;
         }
 
         synchronized(mScanResultCache) {
@@ -2201,7 +2232,7 @@
                     sendMessageDelayed(CMD_START_SUPPLICANT, SUPPLICANT_RESTART_INTERVAL_MSECS);
                     break;
                 case WifiMonitor.SCAN_RESULTS_EVENT:
-                    setScanResults(mWifiNative.scanResults());
+                    setScanResults();
                     sendScanResultsAvailableBroadcast();
                     mScanResultIsPending = false;
                     break;