Merge "Simplify Z reordering logic"
diff --git a/api/current.txt b/api/current.txt
index 520d05a..241c540 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1647,6 +1647,12 @@
     field public static final int MediaButton_Play = 16973882; // 0x103003a
     field public static final int MediaButton_Previous = 16973880; // 0x1030038
     field public static final int MediaButton_Rew = 16973884; // 0x103003c
+    field public static final int Quantum_ButtonBar = 16974498; // 0x10302a2
+    field public static final int Quantum_ButtonBar_AlertDialog = 16974497; // 0x10302a1
+    field public static final int Quantum_Light_ButtonBar = 16974501; // 0x10302a5
+    field public static final int Quantum_Light_ButtonBar_AlertDialog = 16974500; // 0x10302a4
+    field public static final int Quantum_Light_SegmentedButton = 16974502; // 0x10302a6
+    field public static final int Quantum_SegmentedButton = 16974499; // 0x10302a3
     field public static final int TextAppearance = 16973886; // 0x103003e
     field public static final int TextAppearance_DeviceDefault = 16974253; // 0x10301ad
     field public static final int TextAppearance_DeviceDefault_DialogWindowTitle = 16974264; // 0x10301b8
@@ -1722,6 +1728,40 @@
     field public static final int TextAppearance_Large_Inverse = 16973891; // 0x1030043
     field public static final int TextAppearance_Medium = 16973892; // 0x1030044
     field public static final int TextAppearance_Medium_Inverse = 16973893; // 0x1030045
+    field public static final int TextAppearance_Quantum = 16974318; // 0x10301ee
+    field public static final int TextAppearance_Quantum_DialogWindowTitle = 16974319; // 0x10301ef
+    field public static final int TextAppearance_Quantum_Inverse = 16974320; // 0x10301f0
+    field public static final int TextAppearance_Quantum_Large = 16974321; // 0x10301f1
+    field public static final int TextAppearance_Quantum_Large_Inverse = 16974322; // 0x10301f2
+    field public static final int TextAppearance_Quantum_Medium = 16974323; // 0x10301f3
+    field public static final int TextAppearance_Quantum_Medium_Inverse = 16974324; // 0x10301f4
+    field public static final int TextAppearance_Quantum_SearchResult_Subtitle = 16974325; // 0x10301f5
+    field public static final int TextAppearance_Quantum_SearchResult_Title = 16974326; // 0x10301f6
+    field public static final int TextAppearance_Quantum_Small = 16974327; // 0x10301f7
+    field public static final int TextAppearance_Quantum_Small_Inverse = 16974328; // 0x10301f8
+    field public static final int TextAppearance_Quantum_Widget = 16974330; // 0x10301fa
+    field public static final int TextAppearance_Quantum_Widget_ActionBar_Menu = 16974331; // 0x10301fb
+    field public static final int TextAppearance_Quantum_Widget_ActionBar_Subtitle = 16974332; // 0x10301fc
+    field public static final int TextAppearance_Quantum_Widget_ActionBar_Subtitle_Inverse = 16974333; // 0x10301fd
+    field public static final int TextAppearance_Quantum_Widget_ActionBar_Title = 16974334; // 0x10301fe
+    field public static final int TextAppearance_Quantum_Widget_ActionBar_Title_Inverse = 16974335; // 0x10301ff
+    field public static final int TextAppearance_Quantum_Widget_ActionMode_Subtitle = 16974336; // 0x1030200
+    field public static final int TextAppearance_Quantum_Widget_ActionMode_Subtitle_Inverse = 16974337; // 0x1030201
+    field public static final int TextAppearance_Quantum_Widget_ActionMode_Title = 16974338; // 0x1030202
+    field public static final int TextAppearance_Quantum_Widget_ActionMode_Title_Inverse = 16974339; // 0x1030203
+    field public static final int TextAppearance_Quantum_Widget_Button = 16974340; // 0x1030204
+    field public static final int TextAppearance_Quantum_Widget_DropDownHint = 16974341; // 0x1030205
+    field public static final int TextAppearance_Quantum_Widget_DropDownItem = 16974342; // 0x1030206
+    field public static final int TextAppearance_Quantum_Widget_EditText = 16974343; // 0x1030207
+    field public static final int TextAppearance_Quantum_Widget_IconMenu_Item = 16974344; // 0x1030208
+    field public static final int TextAppearance_Quantum_Widget_PopupMenu = 16974345; // 0x1030209
+    field public static final int TextAppearance_Quantum_Widget_PopupMenu_Large = 16974346; // 0x103020a
+    field public static final int TextAppearance_Quantum_Widget_PopupMenu_Small = 16974347; // 0x103020b
+    field public static final int TextAppearance_Quantum_Widget_TabWidget = 16974348; // 0x103020c
+    field public static final int TextAppearance_Quantum_Widget_TextView = 16974349; // 0x103020d
+    field public static final int TextAppearance_Quantum_Widget_TextView_PopupMenu = 16974350; // 0x103020e
+    field public static final int TextAppearance_Quantum_Widget_TextView_SpinnerItem = 16974351; // 0x103020f
+    field public static final int TextAppearance_Quantum_WindowTitle = 16974329; // 0x10301f9
     field public static final int TextAppearance_Small = 16973894; // 0x1030046
     field public static final int TextAppearance_Small_Inverse = 16973895; // 0x1030047
     field public static final int TextAppearance_StatusBar_EventContent = 16973927; // 0x1030067
@@ -1816,8 +1856,34 @@
     field public static final int Theme_NoTitleBar_Fullscreen = 16973831; // 0x1030007
     field public static final int Theme_NoTitleBar_OverlayActionModes = 16973930; // 0x103006a
     field public static final int Theme_Panel = 16973913; // 0x1030059
-    field public static final int Theme_Quantum = 16974318; // 0x10301ee
-    field public static final int Theme_Quantum_NoActionBar = 16974319; // 0x10301ef
+    field public static final int Theme_Quantum = 16974352; // 0x1030210
+    field public static final int Theme_Quantum_Dialog = 16974353; // 0x1030211
+    field public static final int Theme_Quantum_DialogWhenLarge = 16974357; // 0x1030215
+    field public static final int Theme_Quantum_DialogWhenLarge_NoActionBar = 16974358; // 0x1030216
+    field public static final int Theme_Quantum_Dialog_MinWidth = 16974354; // 0x1030212
+    field public static final int Theme_Quantum_Dialog_NoActionBar = 16974355; // 0x1030213
+    field public static final int Theme_Quantum_Dialog_NoActionBar_MinWidth = 16974356; // 0x1030214
+    field public static final int Theme_Quantum_InputMethod = 16974359; // 0x1030217
+    field public static final int Theme_Quantum_Light = 16974367; // 0x103021f
+    field public static final int Theme_Quantum_Light_DarkActionBar = 16974368; // 0x1030220
+    field public static final int Theme_Quantum_Light_Dialog = 16974369; // 0x1030221
+    field public static final int Theme_Quantum_Light_DialogWhenLarge = 16974373; // 0x1030225
+    field public static final int Theme_Quantum_Light_DialogWhenLarge_NoActionBar = 16974374; // 0x1030226
+    field public static final int Theme_Quantum_Light_Dialog_MinWidth = 16974370; // 0x1030222
+    field public static final int Theme_Quantum_Light_Dialog_NoActionBar = 16974371; // 0x1030223
+    field public static final int Theme_Quantum_Light_Dialog_NoActionBar_MinWidth = 16974372; // 0x1030224
+    field public static final int Theme_Quantum_Light_NoActionBar = 16974375; // 0x1030227
+    field public static final int Theme_Quantum_Light_NoActionBar_Fullscreen = 16974376; // 0x1030228
+    field public static final int Theme_Quantum_Light_NoActionBar_Overscan = 16974377; // 0x1030229
+    field public static final int Theme_Quantum_Light_NoActionBar_TranslucentDecor = 16974378; // 0x103022a
+    field public static final int Theme_Quantum_Light_Panel = 16974379; // 0x103022b
+    field public static final int Theme_Quantum_NoActionBar = 16974360; // 0x1030218
+    field public static final int Theme_Quantum_NoActionBar_Fullscreen = 16974361; // 0x1030219
+    field public static final int Theme_Quantum_NoActionBar_Overscan = 16974362; // 0x103021a
+    field public static final int Theme_Quantum_NoActionBar_TranslucentDecor = 16974363; // 0x103021b
+    field public static final int Theme_Quantum_Panel = 16974364; // 0x103021c
+    field public static final int Theme_Quantum_Wallpaper = 16974365; // 0x103021d
+    field public static final int Theme_Quantum_Wallpaper_NoTitleBar = 16974366; // 0x103021e
     field public static final int Theme_Translucent = 16973839; // 0x103000f
     field public static final int Theme_Translucent_NoTitleBar = 16973840; // 0x1030010
     field public static final int Theme_Translucent_NoTitleBar_Fullscreen = 16973841; // 0x1030011
@@ -2105,11 +2171,123 @@
     field public static final int Widget_ProgressBar_Large_Inverse = 16973916; // 0x103005c
     field public static final int Widget_ProgressBar_Small = 16973854; // 0x103001e
     field public static final int Widget_ProgressBar_Small_Inverse = 16973917; // 0x103005d
-    field public static final int Widget_Quantum_Button = 16974320; // 0x10301f0
-    field public static final int Widget_Quantum_Button_Borderless = 16974322; // 0x10301f2
-    field public static final int Widget_Quantum_Button_Borderless_Small = 16974323; // 0x10301f3
-    field public static final int Widget_Quantum_Button_Small = 16974321; // 0x10301f1
-    field public static final int Widget_Quantum_ImageButton = 16974324; // 0x10301f4
+    field public static final int Widget_Quantum = 16974380; // 0x103022c
+    field public static final int Widget_Quantum_ActionBar = 16974381; // 0x103022d
+    field public static final int Widget_Quantum_ActionBar_Solid = 16974382; // 0x103022e
+    field public static final int Widget_Quantum_ActionBar_TabBar = 16974383; // 0x103022f
+    field public static final int Widget_Quantum_ActionBar_TabText = 16974384; // 0x1030230
+    field public static final int Widget_Quantum_ActionBar_TabView = 16974385; // 0x1030231
+    field public static final int Widget_Quantum_ActionButton = 16974386; // 0x1030232
+    field public static final int Widget_Quantum_ActionButton_CloseMode = 16974387; // 0x1030233
+    field public static final int Widget_Quantum_ActionButton_Overflow = 16974388; // 0x1030234
+    field public static final int Widget_Quantum_ActionButton_TextButton = 16974389; // 0x1030235
+    field public static final int Widget_Quantum_ActionMode = 16974390; // 0x1030236
+    field public static final int Widget_Quantum_AutoCompleteTextView = 16974391; // 0x1030237
+    field public static final int Widget_Quantum_Button = 16974392; // 0x1030238
+    field public static final int Widget_Quantum_Button_Borderless = 16974393; // 0x1030239
+    field public static final int Widget_Quantum_Button_Borderless_Small = 16974394; // 0x103023a
+    field public static final int Widget_Quantum_Button_Inset = 16974395; // 0x103023b
+    field public static final int Widget_Quantum_Button_Small = 16974396; // 0x103023c
+    field public static final int Widget_Quantum_Button_Toggle = 16974397; // 0x103023d
+    field public static final int Widget_Quantum_CalendarView = 16974398; // 0x103023e
+    field public static final int Widget_Quantum_CheckedTextView = 16974399; // 0x103023f
+    field public static final int Widget_Quantum_CompoundButton_CheckBox = 16974400; // 0x1030240
+    field public static final int Widget_Quantum_CompoundButton_RadioButton = 16974401; // 0x1030241
+    field public static final int Widget_Quantum_CompoundButton_Star = 16974402; // 0x1030242
+    field public static final int Widget_Quantum_DatePicker = 16974403; // 0x1030243
+    field public static final int Widget_Quantum_DropDownItem = 16974404; // 0x1030244
+    field public static final int Widget_Quantum_DropDownItem_Spinner = 16974405; // 0x1030245
+    field public static final int Widget_Quantum_EditText = 16974406; // 0x1030246
+    field public static final int Widget_Quantum_ExpandableListView = 16974407; // 0x1030247
+    field public static final int Widget_Quantum_FastScroll = 16974408; // 0x1030248
+    field public static final int Widget_Quantum_FragmentBreadCrumbs = 16974409; // 0x1030249
+    field public static final int Widget_Quantum_GridView = 16974410; // 0x103024a
+    field public static final int Widget_Quantum_HorizontalScrollView = 16974411; // 0x103024b
+    field public static final int Widget_Quantum_ImageButton = 16974412; // 0x103024c
+    field public static final int Widget_Quantum_Light = 16974436; // 0x1030264
+    field public static final int Widget_Quantum_Light_ActionBar = 16974437; // 0x1030265
+    field public static final int Widget_Quantum_Light_ActionBar_Solid = 16974438; // 0x1030266
+    field public static final int Widget_Quantum_Light_ActionBar_Solid_Inverse = 16974439; // 0x1030267
+    field public static final int Widget_Quantum_Light_ActionBar_TabBar = 16974440; // 0x1030268
+    field public static final int Widget_Quantum_Light_ActionBar_TabBar_Inverse = 16974441; // 0x1030269
+    field public static final int Widget_Quantum_Light_ActionBar_TabText = 16974442; // 0x103026a
+    field public static final int Widget_Quantum_Light_ActionBar_TabText_Inverse = 16974443; // 0x103026b
+    field public static final int Widget_Quantum_Light_ActionBar_TabView = 16974444; // 0x103026c
+    field public static final int Widget_Quantum_Light_ActionBar_TabView_Inverse = 16974445; // 0x103026d
+    field public static final int Widget_Quantum_Light_ActionButton = 16974446; // 0x103026e
+    field public static final int Widget_Quantum_Light_ActionButton_CloseMode = 16974447; // 0x103026f
+    field public static final int Widget_Quantum_Light_ActionButton_Overflow = 16974448; // 0x1030270
+    field public static final int Widget_Quantum_Light_ActionMode = 16974450; // 0x1030272
+    field public static final int Widget_Quantum_Light_ActionMode_Inverse = 16974449; // 0x1030271
+    field public static final int Widget_Quantum_Light_AutoCompleteTextView = 16974451; // 0x1030273
+    field public static final int Widget_Quantum_Light_Button = 16974452; // 0x1030274
+    field public static final int Widget_Quantum_Light_Button_Borderless_Small = 16974453; // 0x1030275
+    field public static final int Widget_Quantum_Light_Button_Inset = 16974454; // 0x1030276
+    field public static final int Widget_Quantum_Light_Button_Small = 16974455; // 0x1030277
+    field public static final int Widget_Quantum_Light_Button_Toggle = 16974456; // 0x1030278
+    field public static final int Widget_Quantum_Light_CalendarView = 16974457; // 0x1030279
+    field public static final int Widget_Quantum_Light_CheckedTextView = 16974458; // 0x103027a
+    field public static final int Widget_Quantum_Light_CompoundButton_CheckBox = 16974459; // 0x103027b
+    field public static final int Widget_Quantum_Light_CompoundButton_RadioButton = 16974460; // 0x103027c
+    field public static final int Widget_Quantum_Light_CompoundButton_Star = 16974461; // 0x103027d
+    field public static final int Widget_Quantum_Light_DropDownItem = 16974462; // 0x103027e
+    field public static final int Widget_Quantum_Light_DropDownItem_Spinner = 16974463; // 0x103027f
+    field public static final int Widget_Quantum_Light_EditText = 16974464; // 0x1030280
+    field public static final int Widget_Quantum_Light_ExpandableListView = 16974465; // 0x1030281
+    field public static final int Widget_Quantum_Light_FastScroll = 16974466; // 0x1030282
+    field public static final int Widget_Quantum_Light_FragmentBreadCrumbs = 16974467; // 0x1030283
+    field public static final int Widget_Quantum_Light_GridView = 16974468; // 0x1030284
+    field public static final int Widget_Quantum_Light_HorizontalScrollView = 16974469; // 0x1030285
+    field public static final int Widget_Quantum_Light_ImageButton = 16974470; // 0x1030286
+    field public static final int Widget_Quantum_Light_ListPopupWindow = 16974471; // 0x1030287
+    field public static final int Widget_Quantum_Light_ListView = 16974472; // 0x1030288
+    field public static final int Widget_Quantum_Light_ListView_DropDown = 16974473; // 0x1030289
+    field public static final int Widget_Quantum_Light_MediaRouteButton = 16974474; // 0x103028a
+    field public static final int Widget_Quantum_Light_PopupMenu = 16974475; // 0x103028b
+    field public static final int Widget_Quantum_Light_PopupWindow = 16974476; // 0x103028c
+    field public static final int Widget_Quantum_Light_ProgressBar = 16974477; // 0x103028d
+    field public static final int Widget_Quantum_Light_ProgressBar_Horizontal = 16974478; // 0x103028e
+    field public static final int Widget_Quantum_Light_ProgressBar_Inverse = 16974479; // 0x103028f
+    field public static final int Widget_Quantum_Light_ProgressBar_Large = 16974480; // 0x1030290
+    field public static final int Widget_Quantum_Light_ProgressBar_Large_Inverse = 16974481; // 0x1030291
+    field public static final int Widget_Quantum_Light_ProgressBar_Small = 16974482; // 0x1030292
+    field public static final int Widget_Quantum_Light_ProgressBar_Small_Inverse = 16974483; // 0x1030293
+    field public static final int Widget_Quantum_Light_ProgressBar_Small_Title = 16974484; // 0x1030294
+    field public static final int Widget_Quantum_Light_RatingBar = 16974485; // 0x1030295
+    field public static final int Widget_Quantum_Light_RatingBar_Indicator = 16974486; // 0x1030296
+    field public static final int Widget_Quantum_Light_RatingBar_Small = 16974487; // 0x1030297
+    field public static final int Widget_Quantum_Light_ScrollView = 16974488; // 0x1030298
+    field public static final int Widget_Quantum_Light_SeekBar = 16974489; // 0x1030299
+    field public static final int Widget_Quantum_Light_Spinner = 16974490; // 0x103029a
+    field public static final int Widget_Quantum_Light_Tab = 16974491; // 0x103029b
+    field public static final int Widget_Quantum_Light_TabWidget = 16974492; // 0x103029c
+    field public static final int Widget_Quantum_Light_TextView = 16974493; // 0x103029d
+    field public static final int Widget_Quantum_Light_TextView_SpinnerItem = 16974494; // 0x103029e
+    field public static final int Widget_Quantum_Light_WebTextView = 16974495; // 0x103029f
+    field public static final int Widget_Quantum_Light_WebView = 16974496; // 0x10302a0
+    field public static final int Widget_Quantum_ListPopupWindow = 16974413; // 0x103024d
+    field public static final int Widget_Quantum_ListView = 16974414; // 0x103024e
+    field public static final int Widget_Quantum_ListView_DropDown = 16974415; // 0x103024f
+    field public static final int Widget_Quantum_MediaRouteButton = 16974416; // 0x1030250
+    field public static final int Widget_Quantum_PopupMenu = 16974417; // 0x1030251
+    field public static final int Widget_Quantum_PopupWindow = 16974418; // 0x1030252
+    field public static final int Widget_Quantum_ProgressBar = 16974419; // 0x1030253
+    field public static final int Widget_Quantum_ProgressBar_Horizontal = 16974420; // 0x1030254
+    field public static final int Widget_Quantum_ProgressBar_Large = 16974421; // 0x1030255
+    field public static final int Widget_Quantum_ProgressBar_Small = 16974422; // 0x1030256
+    field public static final int Widget_Quantum_ProgressBar_Small_Title = 16974423; // 0x1030257
+    field public static final int Widget_Quantum_RatingBar = 16974424; // 0x1030258
+    field public static final int Widget_Quantum_RatingBar_Indicator = 16974425; // 0x1030259
+    field public static final int Widget_Quantum_RatingBar_Small = 16974426; // 0x103025a
+    field public static final int Widget_Quantum_ScrollView = 16974427; // 0x103025b
+    field public static final int Widget_Quantum_SeekBar = 16974428; // 0x103025c
+    field public static final int Widget_Quantum_Spinner = 16974429; // 0x103025d
+    field public static final int Widget_Quantum_Tab = 16974430; // 0x103025e
+    field public static final int Widget_Quantum_TabWidget = 16974431; // 0x103025f
+    field public static final int Widget_Quantum_TextView = 16974432; // 0x1030260
+    field public static final int Widget_Quantum_TextView_SpinnerItem = 16974433; // 0x1030261
+    field public static final int Widget_Quantum_WebTextView = 16974434; // 0x1030262
+    field public static final int Widget_Quantum_WebView = 16974435; // 0x1030263
     field public static final int Widget_RatingBar = 16973857; // 0x1030021
     field public static final int Widget_ScrollView = 16973869; // 0x103002d
     field public static final int Widget_SeekBar = 16973856; // 0x1030020
@@ -3161,6 +3339,14 @@
     method public void update(android.app.ActivityOptions);
   }
 
+  public class ActivityView extends android.view.ViewGroup {
+    ctor public ActivityView(android.content.Context);
+    ctor public ActivityView(android.content.Context, android.util.AttributeSet);
+    ctor public ActivityView(android.content.Context, android.util.AttributeSet, int);
+    method protected void onLayout(boolean, int, int, int, int);
+    method public void startActivity(android.content.Intent);
+  }
+
   public class AlarmManager {
     method public void cancel(android.app.PendingIntent);
     method public void set(int, long, android.app.PendingIntent);
@@ -11013,6 +11199,7 @@
     method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureRequestKeys();
     method public java.util.List<android.hardware.camera2.CameraMetadata.Key<?>> getAvailableCaptureResultKeys();
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_ANTIBANDING_MODES;
+    field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_MODES;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_RANGE;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_COMPENSATION_STEP;
@@ -11318,6 +11505,7 @@
     field public static final android.hardware.camera2.CameraMetadata.Key BLACK_LEVEL_LOCK;
     field public static final android.hardware.camera2.CameraMetadata.Key COLOR_CORRECTION_GAINS;
     field public static final android.hardware.camera2.CameraMetadata.Key COLOR_CORRECTION_TRANSFORM;
+    field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_REGIONS;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_STATE;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AF_MODE;
@@ -22397,7 +22585,7 @@
   }
 
   public class BaseObj {
-    method public synchronized void destroy();
+    method public void destroy();
     method public java.lang.String getName();
     method public void setName(java.lang.String);
   }
@@ -22989,6 +23177,7 @@
   public final class ScriptIntrinsic3DLUT extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsic3DLUT create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setLUT(android.renderscript.Allocation);
   }
@@ -22996,20 +23185,35 @@
   public class ScriptIntrinsicBlend extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicBlend create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEachAdd(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachAdd(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachClear(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachClear(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachDst(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachDst(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachDstAtop(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachDstAtop(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachDstIn(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachDstIn(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachDstOut(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachDstOut(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachDstOver(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachDstOver(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachMultiply(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachMultiply(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSrc(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSrc(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSrcAtop(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSrcAtop(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSrcIn(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSrcIn(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSrcOut(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSrcOut(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSrcOver(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSrcOver(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachSubtract(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachSubtract(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEachXor(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEachXor(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.KernelID getKernelIDAdd();
     method public android.renderscript.Script.KernelID getKernelIDClear();
     method public android.renderscript.Script.KernelID getKernelIDDst();
@@ -23030,6 +23234,7 @@
   public final class ScriptIntrinsicBlur extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicBlur create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.FieldID getFieldID_Input();
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setInput(android.renderscript.Allocation);
@@ -23040,6 +23245,7 @@
     method public static deprecated android.renderscript.ScriptIntrinsicColorMatrix create(android.renderscript.RenderScript, android.renderscript.Element);
     method public static android.renderscript.ScriptIntrinsicColorMatrix create(android.renderscript.RenderScript);
     method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setAdd(android.renderscript.Float4);
     method public void setAdd(float, float, float, float);
@@ -23053,6 +23259,7 @@
   public final class ScriptIntrinsicConvolve3x3 extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicConvolve3x3 create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.FieldID getFieldID_Input();
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setCoefficients(float[]);
@@ -23062,6 +23269,7 @@
   public final class ScriptIntrinsicConvolve5x5 extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicConvolve5x5 create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.FieldID getFieldID_Input();
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setCoefficients(float[]);
@@ -23071,7 +23279,9 @@
   public final class ScriptIntrinsicHistogram extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicHistogram create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public void forEach_Dot(android.renderscript.Allocation);
+    method public void forEach_Dot(android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.FieldID getFieldID_Input();
     method public android.renderscript.Script.KernelID getKernelID_Separate();
     method public void setDotCoefficients(float, float, float, float);
@@ -23081,6 +23291,7 @@
   public final class ScriptIntrinsicLUT extends android.renderscript.ScriptIntrinsic {
     method public static android.renderscript.ScriptIntrinsicLUT create(android.renderscript.RenderScript, android.renderscript.Element);
     method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation);
+    method public void forEach(android.renderscript.Allocation, android.renderscript.Allocation, android.renderscript.Script.LaunchOptions);
     method public android.renderscript.Script.KernelID getKernelID();
     method public void setAlpha(int, int);
     method public void setBlue(int, int);
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 3bc2ee6..7b81713 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -2027,7 +2027,12 @@
             IActivityContainer activityContainer =
                     createActivityContainer(parentActivityToken, callback);
             reply.writeNoException();
-            reply.writeStrongBinder(activityContainer.asBinder());
+            if (activityContainer != null) {
+                reply.writeInt(1);
+                reply.writeStrongBinder(activityContainer.asBinder());
+            } else {
+                reply.writeInt(0);
+            }
             return true;
         }
 
@@ -2036,7 +2041,12 @@
             IBinder activityToken = data.readStrongBinder();
             IActivityContainer activityContainer = getEnclosingActivityContainer(activityToken);
             reply.writeNoException();
-            reply.writeStrongBinder(activityContainer.asBinder());
+            if (activityContainer != null) {
+                reply.writeInt(1);
+                reply.writeStrongBinder(activityContainer.asBinder());
+            } else {
+                reply.writeInt(0);
+            }
             return true;
         }
 
@@ -4670,8 +4680,13 @@
         data.writeStrongBinder((IBinder)callback);
         mRemote.transact(CREATE_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0);
         reply.readException();
-        IActivityContainer res =
-                IActivityContainer.Stub.asInterface(reply.readStrongBinder());
+        final int result = reply.readInt();
+        final IActivityContainer res;
+        if (result == 1) {
+            res = IActivityContainer.Stub.asInterface(reply.readStrongBinder());
+        } else {
+            res = null;
+        }
         data.recycle();
         reply.recycle();
         return res;
@@ -4685,8 +4700,13 @@
         data.writeStrongBinder(activityToken);
         mRemote.transact(GET_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0);
         reply.readException();
-        IActivityContainer res =
-                IActivityContainer.Stub.asInterface(reply.readStrongBinder());
+        final int result = reply.readInt();
+        final IActivityContainer res;
+        if (result == 1) {
+            res = IActivityContainer.Stub.asInterface(reply.readStrongBinder());
+        } else {
+            res = null;
+        }
         data.recycle();
         reply.recycle();
         return res;
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 94ebff9..5239cc6 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -2235,7 +2235,8 @@
         try {
             IActivityContainer container =
                     ActivityManagerNative.getDefault().getEnclosingActivityContainer(r.token);
-            final int displayId = container.getDisplayId();
+            final int displayId =
+                    container == null ? Display.DEFAULT_DISPLAY : container.getDisplayId();
             if (displayId > Display.DEFAULT_DISPLAY) {
                 Display display = dm.getRealDisplay(displayId, r.token);
                 baseContext = appContext.createDisplayContext(display);
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
new file mode 100644
index 0000000..fef4597
--- /dev/null
+++ b/core/java/android/app/ActivityView.java
@@ -0,0 +1,163 @@
+/*
+ * 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.app;
+
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.content.Intent;
+import android.graphics.SurfaceTexture;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.AttributeSet;
+import android.util.DisplayMetrics;
+import android.view.Surface;
+import android.view.TextureView;
+import android.view.TextureView.SurfaceTextureListener;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+
+public class ActivityView extends ViewGroup {
+    private final TextureView mTextureView;
+    private IActivityContainer mActivityContainer;
+    private Activity mActivity;
+    private boolean mAttached;
+    private int mWidth;
+    private int mHeight;
+
+    public ActivityView(Context context) {
+        this(context, null);
+    }
+
+    public ActivityView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public ActivityView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+
+        while (context instanceof ContextWrapper) {
+            if (context instanceof Activity) {
+                mActivity = (Activity)context;
+                break;
+            }
+            context = ((ContextWrapper)context).getBaseContext();
+        }
+        if (mActivity == null) {
+            throw new IllegalStateException("The ActivityView's Context is not an Activity.");
+        }
+
+        mTextureView = new TextureView(context);
+        mTextureView.setSurfaceTextureListener(new ActivityViewSurfaceTextureListener());
+        addView(mTextureView);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        mTextureView.layout(l, t, r, b);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        try {
+            final IBinder token = mActivity.getActivityToken();
+            mActivityContainer =
+                    ActivityManagerNative.getDefault().createActivityContainer(token, null);
+        } catch (RemoteException e) {
+            throw new IllegalStateException("ActivityView: Unable to create ActivityContainer. "
+                    + e);
+        }
+
+        final SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();
+        if (surfaceTexture != null) {
+            createActivityView(surfaceTexture);
+        }
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        if (mActivityContainer != null) {
+            try {
+                mActivityContainer.deleteActivityView();
+            } catch (RemoteException e) {
+            }
+            mActivityContainer = null;
+        }
+        mAttached = false;
+    }
+
+    public void startActivity(Intent intent) {
+        if (mActivityContainer != null && mAttached) {
+            try {
+                mActivityContainer.startActivity(intent);
+            } catch (RemoteException e) {
+                throw new IllegalStateException("ActivityView: Unable to startActivity. " + e);
+            }
+        }
+    }
+
+    /** Call when both mActivityContainer and mTextureView's SurfaceTexture are not null */
+    private void createActivityView(SurfaceTexture surfaceTexture) {
+        WindowManager wm = (WindowManager)mActivity.getSystemService(Context.WINDOW_SERVICE);
+        DisplayMetrics metrics = new DisplayMetrics();
+        wm.getDefaultDisplay().getMetrics(metrics);
+
+        try {
+            mActivityContainer.createActivityView(new Surface(surfaceTexture), mWidth, mHeight,
+                    metrics.densityDpi);
+        } catch (RemoteException e) {
+            mActivityContainer = null;
+            throw new IllegalStateException(
+                    "ActivityView: Unable to create ActivityContainer. " + e);
+        }
+        mAttached = true;
+    }
+
+    private class ActivityViewSurfaceTextureListener implements SurfaceTextureListener {
+        @Override
+        public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
+                int height) {
+            mWidth = width;
+            mHeight = height;
+            if (mActivityContainer != null) {
+                createActivityView(surfaceTexture);
+            }
+        }
+
+        @Override
+        public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int width,
+                int height) {
+        }
+
+        @Override
+        public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
+            try {
+                mActivityContainer.deleteActivityView();
+                // TODO: Add binderDied to handle this nullification.
+                mActivityContainer = null;
+            } catch (RemoteException r) {
+            }
+            mAttached = false;
+            return false;
+        }
+
+        @Override
+        public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
+
+        }
+
+    }
+}
diff --git a/core/java/android/app/IActivityContainer.aidl b/core/java/android/app/IActivityContainer.aidl
index 2d8d18f..b03a459 100644
--- a/core/java/android/app/IActivityContainer.aidl
+++ b/core/java/android/app/IActivityContainer.aidl
@@ -19,6 +19,7 @@
 import android.app.IActivityContainerCallback;
 import android.content.Intent;
 import android.os.IBinder;
+import android.view.Surface;
 
 /** @hide */
 interface IActivityContainer {
@@ -26,4 +27,6 @@
     int getDisplayId();
     void detachFromDisplay();
     int startActivity(in Intent intent);
+    void createActivityView(in Surface surface, int width, int height, int density);
+    void deleteActivityView();
 }
diff --git a/core/java/android/app/SharedPreferencesImpl.java b/core/java/android/app/SharedPreferencesImpl.java
index dd882ce..1b838fb 100644
--- a/core/java/android/app/SharedPreferencesImpl.java
+++ b/core/java/android/app/SharedPreferencesImpl.java
@@ -420,13 +420,15 @@
                     for (Map.Entry<String, Object> e : mModified.entrySet()) {
                         String k = e.getKey();
                         Object v = e.getValue();
-                        if (v == this) {  // magic value for a removal mutation
+                        // "this" is the magic value for a removal mutation. In addition,
+                        // setting a value to "null" for a given key is specified to be
+                        // equivalent to calling remove on that key.
+                        if (v == this || v == null) {
                             if (!mMap.containsKey(k)) {
                                 continue;
                             }
                             mMap.remove(k);
                         } else {
-                            boolean isSame = false;
                             if (mMap.containsKey(k)) {
                                 Object existingValue = mMap.get(k);
                                 if (existingValue != null && existingValue.equals(v)) {
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 1bd698d..a396a05 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -945,8 +945,13 @@
       *               was started.
       */
      public boolean fetchUuidsWithSdp() {
+        IBluetooth service = sService;
+        if (service == null) {
+            Log.e(TAG, "BT not enabled. Cannot fetchUuidsWithSdp");
+            return false;
+        }
         try {
-            return sService.fetchRemoteUuids(this);
+            return service.fetchRemoteUuids(this);
         } catch (RemoteException e) {Log.e(TAG, "", e);}
             return false;
     }
diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java
index 5cb6e77..be35f08 100644
--- a/core/java/android/content/ClipDescription.java
+++ b/core/java/android/content/ClipDescription.java
@@ -87,7 +87,7 @@
     /**
      * Helper to compare two MIME types, where one may be a pattern.
      * @param concreteType A fully-specified MIME type.
-     * @param desiredType A desired MIME type that may be a pattern such as *\/*.
+     * @param desiredType A desired MIME type that may be a pattern such as *&#47;*.
      * @return Returns true if the two MIME types match.
      */
     public static boolean compareMimeTypes(String concreteType, String desiredType) {
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index ddde3fb..9d0ab3a 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -1328,7 +1328,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/* to retrieve all possible data types.
+     * a pattern, such as *&#47;* to retrieve all possible data types.
      * @return Returns {@code null} if there are no possible data streams for the
      * given mimeTypeFilter.  Otherwise returns an array of all available
      * concrete MIME types.
@@ -1366,7 +1366,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/*, if the caller does not have specific type
+     * a pattern, such as *&#47;*, if the caller does not have specific type
      * requirements; in this case the content provider will pick its best
      * type matching the pattern.
      * @param opts Additional options from the client.  The definitions of
@@ -1427,7 +1427,7 @@
      *
      * @param uri The data in the content provider being queried.
      * @param mimeTypeFilter The type of data the client desires.  May be
-     * a pattern, such as *\/*, if the caller does not have specific type
+     * a pattern, such as *&#47;*, if the caller does not have specific type
      * requirements; in this case the content provider will pick its best
      * type matching the pattern.
      * @param opts Additional options from the client.  The definitions of
diff --git a/core/java/android/content/ContentProviderNative.java b/core/java/android/content/ContentProviderNative.java
index bcf0b63..39286d6 100644
--- a/core/java/android/content/ContentProviderNative.java
+++ b/core/java/android/content/ContentProviderNative.java
@@ -112,17 +112,24 @@
                     Cursor cursor = query(callingPkg, url, projection, selection, selectionArgs,
                             sortOrder, cancellationSignal);
                     if (cursor != null) {
+                        CursorToBulkCursorAdaptor adaptor = null;
+
                         try {
-                            CursorToBulkCursorAdaptor adaptor = new CursorToBulkCursorAdaptor(
-                                    cursor, observer, getProviderName());
-                            BulkCursorDescriptor d = adaptor.getBulkCursorDescriptor();
+                            adaptor = new CursorToBulkCursorAdaptor(cursor, observer,
+                                    getProviderName());
                             cursor = null;
 
+                            BulkCursorDescriptor d = adaptor.getBulkCursorDescriptor();
+                            adaptor = null;
+
                             reply.writeNoException();
                             reply.writeInt(1);
                             d.writeToParcel(reply, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
                         } finally {
                             // Close cursor if an exception was thrown while constructing the adaptor.
+                            if (adaptor != null) {
+                                adaptor.close();
+                            }
                             if (cursor != null) {
                                 cursor.close();
                             }
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 018e4c5..3fc933d 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -344,7 +344,7 @@
      * @param url A Uri identifying content (either a list or specific type),
      * using the content:// scheme.
      * @param mimeTypeFilter The desired MIME type.  This may be a pattern,
-     * such as *\/*, to query for all available MIME types that match the
+     * such as *&#47;*, to query for all available MIME types that match the
      * pattern.
      * @return Returns an array of MIME type strings for all available
      * data streams that match the given mimeTypeFilter.  If there are none,
@@ -812,7 +812,7 @@
      *
      * <p>Note that if this function is called for read-only input (mode is "r")
      * on a content: URI, it will instead call {@link #openTypedAssetFileDescriptor}
-     * for you with a MIME type of "*\/*".  This allows such callers to benefit
+     * for you with a MIME type of "*&#47;*".  This allows such callers to benefit
      * from any built-in data conversion that a provider implements.
      *
      * @param uri The desired URI to open.
@@ -865,7 +865,7 @@
      *
      * <p>Note that if this function is called for read-only input (mode is "r")
      * on a content: URI, it will instead call {@link #openTypedAssetFileDescriptor}
-     * for you with a MIME type of "*\/*".  This allows such callers to benefit
+     * for you with a MIME type of "*&#47;*".  This allows such callers to benefit
      * from any built-in data conversion that a provider implements.
      *
      * @param uri The desired URI to open.
@@ -990,7 +990,7 @@
      *
      * @param uri The desired URI to open.
      * @param mimeType The desired MIME type of the returned data.  This can
-     * be a pattern such as *\/*, which will allow the content provider to
+     * be a pattern such as *&#47;*, which will allow the content provider to
      * select a type, though there is no way for you to determine what type
      * it is returning.
      * @param opts Additional provider-dependent options.
@@ -1023,7 +1023,7 @@
      *
      * @param uri The desired URI to open.
      * @param mimeType The desired MIME type of the returned data.  This can
-     * be a pattern such as *\/*, which will allow the content provider to
+     * be a pattern such as *&#47;*, which will allow the content provider to
      * select a type, though there is no way for you to determine what type
      * it is returning.
      * @param opts Additional provider-dependent options.
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index ba7db76..9f3b682 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -847,7 +847,7 @@
      * {@link #FLAG_GRANT_WRITE_URI_PERMISSION}, then these flags will also be
      * set in the returned chooser intent, with its ClipData set appropriately:
      * either a direct reflection of {@link #getClipData()} if that is non-null,
-     * or a new ClipData build from {@link #getData()}.
+     * or a new ClipData built from {@link #getData()}.
      *
      * @param target The Intent that the user will be selecting an activity
      * to perform.
@@ -5440,7 +5440,7 @@
      * directly used by Intent.  Applications should generally rely on the
      * MIME type of the Intent itself, not what it may find in the ClipData.
      * A common practice is to construct a ClipData for use with an Intent
-     * with a MIME type of "*\/*".
+     * with a MIME type of "*&#47;*".
      *
      * @param clip The new clip to set.  May be null to clear the current clip.
      */
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index ca89cb6..56bfdf8 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -126,14 +126,38 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
+
     /**
-     * <p>Which set of antibanding modes are
-     * supported</p>
+     * <p>The set of auto-exposure antibanding modes that are
+     * supported by this camera device.</p>
+     * <p>Not all of the auto-exposure anti-banding modes may be
+     * supported by a given camera device. This field lists the
+     * valid anti-banding modes that the application may request
+     * for this camera device; they must include AUTO.</p>
      */
     public static final Key<byte[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
             new Key<byte[]>("android.control.aeAvailableAntibandingModes", byte[].class);
 
     /**
+     * <p>The set of auto-exposure modes that are supported by this
+     * camera device.</p>
+     * <p>Not all the auto-exposure modes may be supported by a
+     * given camera device, especially if no flash unit is
+     * available. This entry lists the valid modes for
+     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
+     * <p>All camera devices support ON, and all camera devices with
+     * flash units support ON_AUTO_FLASH and
+     * ON_ALWAYS_FLASH.</p>
+     * <p>Full-capability camera devices always support OFF mode,
+     * which enables application control of camera exposure time,
+     * sensitivity, and frame duration.</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_MODE
+     */
+    public static final Key<byte[]> CONTROL_AE_AVAILABLE_MODES =
+            new Key<byte[]>("android.control.aeAvailableModes", byte[].class);
+
+    /**
      * <p>List of frame rate ranges supported by the
      * AE algorithm/hardware</p>
      */
@@ -211,14 +235,16 @@
      * <li>The sizes must be sorted by increasing pixel area (width x height).
      * If several resolutions have the same area, they must be sorted by increasing width.</li>
      * <li>The aspect ratio of the largest thumbnail size must be same as the
-     * aspect ratio of largest size in android.scaler.availableJpegSizes.
+     * aspect ratio of largest size in {@link CameraCharacteristics#SCALER_AVAILABLE_JPEG_SIZES android.scaler.availableJpegSizes}.
      * The largest size is defined as the size that has the largest pixel area
      * in a given size list.</li>
-     * <li>Each size in android.scaler.availableJpegSizes must have at least
+     * <li>Each size in {@link CameraCharacteristics#SCALER_AVAILABLE_JPEG_SIZES android.scaler.availableJpegSizes} must have at least
      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
      * and vice versa.</li>
      * <li>All non (0, 0) sizes must have non-zero widths and heights.</li>
      * </ul>
+     *
+     * @see CameraCharacteristics#SCALER_AVAILABLE_JPEG_SIZES
      */
     public static final Key<android.hardware.camera2.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
             new Key<android.hardware.camera2.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.camera2.Size[].class);
@@ -304,9 +330,7 @@
      * future versions of camera service. This quirk will stop
      * working at that point; DO NOT USE without careful
      * consideration of future support.</p>
-     *
-     * <b>Optional</b> - This value may be null on some devices.
-     *
+     * <p><b>Optional</b> - This value may be null on some devices.</p>
      * @hide
      */
     public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
@@ -429,12 +453,6 @@
     /**
      * <p>Gain factor from electrons to raw units when
      * ISO=100</p>
-     *
-     * <b>Optional</b> - This value may be null on some devices.
-     *
-     * <b>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL}</b> -
-     * Present on all devices that report being FULL level hardware devices in the
-     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL HARDWARE_LEVEL} key.
      */
     public static final Key<Rational> SENSOR_BASE_GAIN_FACTOR =
             new Key<Rational>("android.sensor.baseGainFactor", Rational.class);
@@ -442,16 +460,17 @@
     /**
      * <p>Maximum sensitivity that is implemented
      * purely through analog gain</p>
-     * <p>For android.sensor.sensitivity values less than or
+     * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
      * equal to this, all applied gain must be analog. For
      * values above this, it can be a mix of analog and
      * digital</p>
+     * <p><b>Optional</b> - This value may be null on some devices.</p>
+     * <p><b>Full capability</b> -
+     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
+     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
      *
-     * <b>Optional</b> - This value may be null on some devices.
-     *
-     * <b>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL}</b> -
-     * Present on all devices that report being FULL level hardware devices in the
-     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL HARDWARE_LEVEL} key.
+     * @see CaptureRequest#SENSOR_SENSITIVITY
+     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
      */
     public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
             new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
@@ -498,7 +517,6 @@
     /**
      * <p>A list of camera LEDs that are available on this system.</p>
      * @see #LED_AVAILABLE_LEDS_TRANSMIT
-     *
      * @hide
      */
     public static final Key<int[]> LED_AVAILABLE_LEDS =
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index f56feaa..58e93235 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -249,8 +249,11 @@
     //
 
     /**
-     * <p>Use the android.colorCorrection.transform matrix
-     * and android.colorCorrection.gains to do color conversion</p>
+     * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
+     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
+     * @see CaptureRequest#COLOR_CORRECTION_GAINS
      * @see CaptureRequest#COLOR_CORRECTION_MODE
      */
     public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
@@ -274,21 +277,31 @@
     //
 
     /**
+     * <p>The camera device will not adjust exposure duration to
+     * avoid banding problems.</p>
      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      */
     public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
 
     /**
+     * <p>The camera device will adjust exposure duration to
+     * avoid banding problems with 50Hz illumination sources.</p>
      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      */
     public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
 
     /**
+     * <p>The camera device will adjust exposure duration to
+     * avoid banding problems with 60Hz illumination
+     * sources.</p>
      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      */
     public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
 
     /**
+     * <p>The camera device will automatically adapt its
+     * antibanding routine to the current illumination
+     * conditions. This is the default.</p>
      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
      */
     public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
@@ -298,42 +311,73 @@
     //
 
     /**
-     * <p>Autoexposure is disabled; sensor.exposureTime,
-     * sensor.sensitivity and sensor.frameDuration are used</p>
+     * <p>The camera device's autoexposure routine is disabled;
+     * the application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
+     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
+     * device, along with android.flash.* fields, if there's
+     * a flash unit for this camera device.</p>
+     *
+     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
+     * @see CaptureRequest#SENSOR_SENSITIVITY
      * @see CaptureRequest#CONTROL_AE_MODE
      */
     public static final int CONTROL_AE_MODE_OFF = 0;
 
     /**
-     * <p>Autoexposure is active, no flash
-     * control</p>
+     * <p>The camera device's autoexposure routine is active,
+     * with no flash control. The application's values for
+     * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
+     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
+     * application has control over the various
+     * android.flash.* fields.</p>
+     *
+     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
+     * @see CaptureRequest#SENSOR_SENSITIVITY
      * @see CaptureRequest#CONTROL_AE_MODE
      */
     public static final int CONTROL_AE_MODE_ON = 1;
 
     /**
-     * <p>If autoexposure is active and flash exists, auto
-     * flash control; flash may be fired when precapture
-     * trigger is activated, and for captures for which
-     * captureIntent = STILL_CAPTURE</p>
+     * <p>Like ON, except that the camera device also controls
+     * the camera's flash unit, firing it in low-light
+     * conditions. The flash may be fired during a
+     * precapture sequence (triggered by
+     * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and may be fired
+     * for captures for which the
+     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
+     * STILL_CAPTURE</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
+     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
      * @see CaptureRequest#CONTROL_AE_MODE
      */
     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
 
     /**
-     * <p>If autoexposure is active and flash exists, auto
-     * flash control for precapture trigger and always flash
-     * when captureIntent = STILL_CAPTURE</p>
+     * <p>Like ON, except that the camera device also controls
+     * the camera's flash unit, always firing it for still
+     * captures. The flash may be fired during a precapture
+     * sequence (triggered by
+     * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and will always
+     * be fired for captures for which the
+     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
+     * STILL_CAPTURE</p>
+     *
+     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
+     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
      * @see CaptureRequest#CONTROL_AE_MODE
      */
     public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
 
     /**
-     * <p>Optional. Automatic red eye reduction with flash.
-     * If deemed necessary, red eye reduction sequence should
-     * fire when precapture trigger is activated, and final
-     * flash should fire when captureIntent =
-     * STILL_CAPTURE</p>
+     * <p>Like ON_AUTO_FLASH, but with automatic red eye
+     * reduction. If deemed necessary by the camera device,
+     * a red eye reduction flash will fire during the
+     * precapture sequence.</p>
      * @see CaptureRequest#CONTROL_AE_MODE
      */
     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
@@ -363,21 +407,25 @@
 
     /**
      * <p>The auto-focus routine does not control the lens;
-     * android.lens.focusDistance is controlled by the
+     * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
      * application</p>
+     *
+     * @see CaptureRequest#LENS_FOCUS_DISTANCE
      * @see CaptureRequest#CONTROL_AF_MODE
      */
     public static final int CONTROL_AF_MODE_OFF = 0;
 
     /**
      * <p>If lens is not fixed focus.</p>
-     * <p>Use android.lens.info.minimumFocusDistance to determine if lens
+     * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
      * is fixed-focus. In this mode, the lens does not move unless
      * the autofocus trigger action is called. When that trigger
      * is activated, AF must transition to ACTIVE_SCAN, then to
      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
      * <p>Triggering AF_CANCEL resets the lens position to default,
      * and sets the AF state to INACTIVE.</p>
+     *
+     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
      * @see CaptureRequest#CONTROL_AF_MODE
      */
     public static final int CONTROL_AF_MODE_AUTO = 1;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 28341d9..9ba3eea 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -317,9 +317,12 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
+
     /**
-     * <p>When android.control.awbMode is not OFF, TRANSFORM_MATRIX
+     * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is not OFF, TRANSFORM_MATRIX
      * should be ignored.</p>
+     *
+     * @see CaptureRequest#CONTROL_AWB_MODE
      * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
      * @see #COLOR_CORRECTION_MODE_FAST
      * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
@@ -331,12 +334,14 @@
      * <p>A color transform matrix to use to transform
      * from sensor RGB color space to output linear sRGB color space</p>
      * <p>This matrix is either set by HAL when the request
-     * android.colorCorrection.mode is not TRANSFORM_MATRIX, or
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
      * directly by the application in the request when the
-     * android.colorCorrection.mode is TRANSFORM_MATRIX.</p>
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
      * <p>In the latter case, the HAL may round the matrix to account
      * for precision issues; the final rounded matrix should be
      * reported back in this matrix result metadata.</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_MODE
      */
     public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM =
             new Key<Rational[]>("android.colorCorrection.transform", Rational[].class);
@@ -352,18 +357,52 @@
      * it should use the G_even value,and write G_odd equal to
      * G_even in the output result metadata.</p>
      * <p>This array is either set by HAL when the request
-     * android.colorCorrection.mode is not TRANSFORM_MATRIX, or
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
      * directly by the application in the request when the
-     * android.colorCorrection.mode is TRANSFORM_MATRIX.</p>
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
      * <p>The ouput should be the gains actually applied by the HAL to
      * the current frame.</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_MODE
      */
     public static final Key<float[]> COLOR_CORRECTION_GAINS =
             new Key<float[]>("android.colorCorrection.gains", float[].class);
 
     /**
-     * <p>Enum for controlling
-     * antibanding</p>
+     * <p>The desired setting for the camera device's auto-exposure
+     * algorithm's antibanding compensation.</p>
+     * <p>Some kinds of lighting fixtures, such as some fluorescent
+     * lights, flicker at the rate of the power supply frequency
+     * (60Hz or 50Hz, depending on country). While this is
+     * typically not noticeable to a person, it can be visible to
+     * a camera device. If a camera sets its exposure time to the
+     * wrong value, the flicker may become visible in the
+     * viewfinder as flicker or in a final captured image, as a
+     * set of variable-brightness bands across the image.</p>
+     * <p>Therefore, the auto-exposure routines of camera devices
+     * include antibanding routines that ensure that the chosen
+     * exposure value will not cause such banding. The choice of
+     * exposure time depends on the rate of flicker, which the
+     * camera device can detect automatically, or the expected
+     * rate can be selected by the application using this
+     * control.</p>
+     * <p>A given camera device may not support all of the possible
+     * options for the antibanding mode. The
+     * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
+     * the available modes for a given camera device.</p>
+     * <p>The default mode is AUTO, which must be supported by all
+     * camera devices.</p>
+     * <p>If manual exposure control is enabled (by setting
+     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
+     * then this setting has no effect, and the application must
+     * ensure it selects exposure times that do not cause banding
+     * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
+     * the application in this.</p>
+     *
+     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
+     * @see CaptureResult#STATISTICS_SCENE_FLICKER
+     * @see CaptureRequest#CONTROL_AE_MODE
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
      * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
      * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
@@ -393,17 +432,33 @@
             new Key<Boolean>("android.control.aeLock", boolean.class);
 
     /**
-     * <p>Whether AE is currently updating the sensor
-     * exposure and sensitivity fields</p>
-     * <p>Only effective if android.control.mode = AUTO.</p>
-     * <p>If auto-exposure is active, HAL auto-focus routine is enabled,
-     * then HAL auto-exposure routine overrides the control variables
-     * that relate to auto-exposure routine, and these override values
-     * are then available in the result metadata for that capture.</p>
-     * <p>For example, if auto-exposure is enabled in a request, the HAL should
-     * overwrite the exposure, gain, and frame duration fields (and potentially
-     * the flash fields, depending on AE mode) of the request.  The overridden
-     * values are then provided back to the user in the corresponding result.</p>
+     * <p>The desired mode for the camera device's
+     * auto-exposure routine.</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
+     * AUTO.</p>
+     * <p>When set to any of the ON modes, the camera device's
+     * auto-exposure routine is enabled, overriding the
+     * application's selected exposure time, sensor sensitivity,
+     * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
+     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
+     * is selected, the camera device's flash unit controls are
+     * also overridden.</p>
+     * <p>The FLASH modes are only available if the camera device
+     * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
+     * <p>If flash TORCH mode is desired, this field must be set to
+     * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
+     * <p>When set to any of the ON modes, the values chosen by the
+     * camera device auto-exposure routine for the overridden
+     * fields for a given capture will be available in its
+     * CaptureResult.</p>
+     *
+     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
+     * @see CaptureRequest#SENSOR_SENSITIVITY
+     * @see CaptureRequest#FLASH_MODE
+     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AE_MODE_OFF
      * @see #CONTROL_AE_MODE_ON
      * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
@@ -421,15 +476,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific metering area
      * needs to be used by the HAL. If the metering region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AE_REGIONS =
             new Key<int[]>("android.control.aeRegions", int[].class);
@@ -438,7 +496,9 @@
      * <p>Range over which fps can be adjusted to
      * maintain exposure</p>
      * <p>Only constrains AE algorithm, not manual control
-     * of android.sensor.exposureTime</p>
+     * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
+     *
+     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
      */
     public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE =
             new Key<int[]>("android.control.aeTargetFpsRange", int[].class);
@@ -462,10 +522,13 @@
     /**
      * <p>Whether AF is currently enabled, and what
      * mode it is set to</p>
-     * <p>Only effective if android.control.mode = AUTO.</p>
+     * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO.</p>
      * <p>If lens is controlled by HAL auto-focus algorithm, the HAL should
-     * report the current AF status in android.control.afState in
+     * report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} in
      * result metadata.</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CaptureResult#CONTROL_AF_STATE
      * @see #CONTROL_AF_MODE_OFF
      * @see #CONTROL_AF_MODE_AUTO
      * @see #CONTROL_AF_MODE_MACRO
@@ -484,15 +547,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific focus area
      * needs to be used by the HAL. If the focusing region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AF_REGIONS =
             new Key<int[]>("android.control.afRegions", int[].class);
@@ -528,7 +594,9 @@
      * transform fields, and what its illumination target
      * is</p>
      * <p>[BC - AWB lock,AWB modes]</p>
-     * <p>Only effective if android.control.mode = AUTO.</p>
+     * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO.</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AWB_MODE_OFF
      * @see #CONTROL_AWB_MODE_AUTO
      * @see #CONTROL_AWB_MODE_INCANDESCENT
@@ -551,15 +619,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific metering area
      * needs to be used by the HAL. If the metering region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AWB_REGIONS =
             new Key<int[]>("android.control.awbRegions", int[].class);
@@ -568,7 +639,9 @@
      * <p>Information to 3A routines about the purpose
      * of this capture, to help decide optimal 3A
      * strategy</p>
-     * <p>Only used if android.control.mode != OFF.</p>
+     * <p>Only used if {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_CAPTURE_INTENT_CUSTOM
      * @see #CONTROL_CAPTURE_INTENT_PREVIEW
      * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
@@ -581,7 +654,9 @@
 
     /**
      * <p>Whether any special color effect is in use.
-     * Only used if android.control.mode != OFF</p>
+     * Only used if {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_EFFECT_MODE_OFF
      * @see #CONTROL_EFFECT_MODE_MONO
      * @see #CONTROL_EFFECT_MODE_NEGATIVE
@@ -602,12 +677,14 @@
      * by the HAL is disabled. The application must set the fields for
      * capture parameters itself.</p>
      * <p>When set to AUTO, the individual algorithm controls in
-     * android.control.* are in effect, such as android.control.afMode.</p>
+     * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
      * <p>When set to USE_SCENE_MODE, the individual controls in
      * android.control.* are mostly disabled, and the HAL implements
      * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
      * as it wishes. The HAL scene mode 3A settings are provided by
      * android.control.sceneModeOverrides.</p>
+     *
+     * @see CaptureRequest#CONTROL_AF_MODE
      * @see #CONTROL_MODE_OFF
      * @see #CONTROL_MODE_AUTO
      * @see #CONTROL_MODE_USE_SCENE_MODE
@@ -617,7 +694,9 @@
 
     /**
      * <p>Which scene mode is active when
-     * android.control.mode = SCENE_MODE</p>
+     * {@link CaptureRequest#CONTROL_MODE android.control.mode} = SCENE_MODE</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_SCENE_MODE_UNSUPPORTED
      * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
      * @see #CONTROL_SCENE_MODE_ACTION
@@ -643,8 +722,10 @@
      * <p>Whether video stabilization is
      * active</p>
      * <p>If enabled, video stabilization can modify the
-     * android.scaler.cropRegion to keep the video stream
+     * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream
      * stabilized</p>
+     *
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<Boolean> CONTROL_VIDEO_STABILIZATION_MODE =
             new Key<Boolean>("android.control.videoStabilizationMode", boolean.class);
@@ -792,7 +873,6 @@
      * <p>An application-specified ID for the current
      * request. Must be maintained unchanged in output
      * frame</p>
-     *
      * @hide
      */
     public static final Key<Integer> REQUEST_ID =
@@ -868,7 +948,9 @@
      * <p>Whether face detection is enabled, and whether it
      * should output just the basic fields or the full set of
      * fields. Value must be one of the
-     * android.statistics.info.availableFaceDetectModes.</p>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
+     *
+     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
      * @see #STATISTICS_FACE_DETECT_MODE_OFF
      * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
      * @see #STATISTICS_FACE_DETECT_MODE_FULL
@@ -880,8 +962,10 @@
      * <p>Whether the HAL needs to output the lens
      * shading map in output result metadata</p>
      * <p>When set to ON,
-     * android.statistics.lensShadingMap must be provided in
+     * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in
      * the output result metadata.</p>
+     *
+     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
      * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
      */
@@ -892,8 +976,11 @@
      * <p>Table mapping blue input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the blue
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
-     * <p>See android.tonemap.curveRed for more details.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
+     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
+     * @see CaptureRequest#TONEMAP_CURVE_RED
      */
     public static final Key<float[]> TONEMAP_CURVE_BLUE =
             new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -902,8 +989,11 @@
      * <p>Table mapping green input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the green
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
-     * <p>See android.tonemap.curveRed for more details.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
+     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
+     * @see CaptureRequest#TONEMAP_CURVE_RED
      */
     public static final Key<float[]> TONEMAP_CURVE_GREEN =
             new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -912,7 +1002,7 @@
      * <p>Table mapping red input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the red
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
      * <p>Since the input and output ranges may vary depending on
      * the camera pipeline, the input and output pixel values
      * are represented by normalized floating-point values
@@ -923,6 +1013,8 @@
      * 0.3, 0.5, 1.0, 1.0], then the input-&gt;output mapping
      * for a few sample points would be: 0 -&gt; 0, 0.15 -&gt;
      * 0.25, 0.3 -&gt; 0.5, 0.5 -&gt; 0.64</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
      */
     public static final Key<float[]> TONEMAP_CURVE_RED =
             new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -946,7 +1038,6 @@
      * data is stored locally on the device.</p>
      * <p>The LED <em>may</em> be off if a trusted application is using the data that
      * doesn't violate the above rules.</p>
-     *
      * @hide
      */
     public static final Key<Boolean> LED_TRANSMIT =
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index dab4bcf..3b5d6b0 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -122,16 +122,19 @@
      * modify the comment blocks at the start or end.
      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
 
+
     /**
      * <p>A color transform matrix to use to transform
      * from sensor RGB color space to output linear sRGB color space</p>
      * <p>This matrix is either set by HAL when the request
-     * android.colorCorrection.mode is not TRANSFORM_MATRIX, or
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
      * directly by the application in the request when the
-     * android.colorCorrection.mode is TRANSFORM_MATRIX.</p>
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
      * <p>In the latter case, the HAL may round the matrix to account
      * for precision issues; the final rounded matrix should be
      * reported back in this matrix result metadata.</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_MODE
      */
     public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM =
             new Key<Rational[]>("android.colorCorrection.transform", Rational[].class);
@@ -147,11 +150,13 @@
      * it should use the G_even value,and write G_odd equal to
      * G_even in the output result metadata.</p>
      * <p>This array is either set by HAL when the request
-     * android.colorCorrection.mode is not TRANSFORM_MATRIX, or
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
      * directly by the application in the request when the
-     * android.colorCorrection.mode is TRANSFORM_MATRIX.</p>
+     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
      * <p>The ouput should be the gains actually applied by the HAL to
      * the current frame.</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_MODE
      */
     public static final Key<float[]> COLOR_CORRECTION_GAINS =
             new Key<float[]>("android.colorCorrection.gains", float[].class);
@@ -163,13 +168,49 @@
      * CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
      * by HAL. Always updated even if AE algorithm ignores the
      * trigger</p>
-     *
      * @hide
      */
     public static final Key<Integer> CONTROL_AE_PRECAPTURE_ID =
             new Key<Integer>("android.control.aePrecaptureId", int.class);
 
     /**
+     * <p>The desired mode for the camera device's
+     * auto-exposure routine.</p>
+     * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
+     * AUTO.</p>
+     * <p>When set to any of the ON modes, the camera device's
+     * auto-exposure routine is enabled, overriding the
+     * application's selected exposure time, sensor sensitivity,
+     * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
+     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
+     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
+     * is selected, the camera device's flash unit controls are
+     * also overridden.</p>
+     * <p>The FLASH modes are only available if the camera device
+     * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
+     * <p>If flash TORCH mode is desired, this field must be set to
+     * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
+     * <p>When set to any of the ON modes, the values chosen by the
+     * camera device auto-exposure routine for the overridden
+     * fields for a given capture will be available in its
+     * CaptureResult.</p>
+     *
+     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
+     * @see CaptureRequest#SENSOR_FRAME_DURATION
+     * @see CaptureRequest#SENSOR_SENSITIVITY
+     * @see CaptureRequest#FLASH_MODE
+     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * @see CaptureRequest#CONTROL_MODE
+     * @see #CONTROL_AE_MODE_OFF
+     * @see #CONTROL_AE_MODE_ON
+     * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
+     * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
+     * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
+     */
+    public static final Key<Integer> CONTROL_AE_MODE =
+            new Key<Integer>("android.control.aeMode", int.class);
+
+    /**
      * <p>List of areas to use for
      * metering</p>
      * <p>Each area is a rectangle plus weight: xmin, ymin,
@@ -177,15 +218,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific metering area
      * needs to be used by the HAL. If the metering region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AE_REGIONS =
             new Key<int[]>("android.control.aeRegions", int[].class);
@@ -208,10 +252,13 @@
     /**
      * <p>Whether AF is currently enabled, and what
      * mode it is set to</p>
-     * <p>Only effective if android.control.mode = AUTO.</p>
+     * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO.</p>
      * <p>If lens is controlled by HAL auto-focus algorithm, the HAL should
-     * report the current AF status in android.control.afState in
+     * report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} in
      * result metadata.</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
+     * @see CaptureResult#CONTROL_AF_STATE
      * @see #CONTROL_AF_MODE_OFF
      * @see #CONTROL_AF_MODE_AUTO
      * @see #CONTROL_AF_MODE_MACRO
@@ -230,15 +277,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific focus area
      * needs to be used by the HAL. If the focusing region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AF_REGIONS =
             new Key<int[]>("android.control.afRegions", int[].class);
@@ -265,7 +315,6 @@
      * <p>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
      * received yet by HAL. Always updated even if AF algorithm
      * ignores the trigger</p>
-     *
      * @hide
      */
     public static final Key<Integer> CONTROL_AF_TRIGGER_ID =
@@ -276,7 +325,9 @@
      * transform fields, and what its illumination target
      * is</p>
      * <p>[BC - AWB lock,AWB modes]</p>
-     * <p>Only effective if android.control.mode = AUTO.</p>
+     * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO.</p>
+     *
+     * @see CaptureRequest#CONTROL_MODE
      * @see #CONTROL_AWB_MODE_OFF
      * @see #CONTROL_AWB_MODE_AUTO
      * @see #CONTROL_AWB_MODE_INCANDESCENT
@@ -299,15 +350,18 @@
      * specified coordinates.</p>
      * <p>The coordinate system is based on the active pixel array,
      * with (0,0) being the top-left pixel in the active pixel array, and
-     * (android.sensor.info.activeArraySize.width - 1,
-     * android.sensor.info.activeArraySize.height - 1) being the
+     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
+     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
      * bottom-right pixel in the active pixel array. The weight
      * should be nonnegative.</p>
      * <p>If all regions have 0 weight, then no specific metering area
      * needs to be used by the HAL. If the metering region is
-     * outside the current android.scaler.cropRegion, the HAL
+     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the HAL
      * should ignore the sections outside the region and output the
      * used sections in the frame metadata</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CaptureRequest#SCALER_CROP_REGION
      */
     public static final Key<int[]> CONTROL_AWB_REGIONS =
             new Key<int[]>("android.control.awbRegions", int[].class);
@@ -332,12 +386,14 @@
      * by the HAL is disabled. The application must set the fields for
      * capture parameters itself.</p>
      * <p>When set to AUTO, the individual algorithm controls in
-     * android.control.* are in effect, such as android.control.afMode.</p>
+     * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
      * <p>When set to USE_SCENE_MODE, the individual controls in
      * android.control.* are mostly disabled, and the HAL implements
      * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
      * as it wishes. The HAL scene mode 3A settings are provided by
      * android.control.sceneModeOverrides.</p>
+     *
+     * @see CaptureRequest#CONTROL_AF_MODE
      * @see #CONTROL_MODE_OFF
      * @see #CONTROL_MODE_AUTO
      * @see #CONTROL_MODE_USE_SCENE_MODE
@@ -525,9 +581,7 @@
      * in any order relative to other frames, but all PARTIAL buffers for a given
      * capture must arrive before the FINAL buffer for that capture. This entry may
      * only be used by the HAL if quirks.usePartialResult is set to 1.</p>
-     *
-     * <b>Optional</b> - This value may be null on some devices.
-     *
+     * <p><b>Optional</b> - This value may be null on some devices.</p>
      * @hide
      */
     public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
@@ -546,7 +600,6 @@
      * <p>An application-specified ID for the current
      * request. Must be maintained unchanged in output
      * frame</p>
-     *
      * @hide
      */
     public static final Key<Integer> REQUEST_ID =
@@ -630,12 +683,6 @@
      * exposure began for this frame.</p>
      * <p>The thermal diode being queried should be inside the sensor PCB, or
      * somewhere close to it.</p>
-     *
-     * <b>Optional</b> - This value may be null on some devices.
-     *
-     * <b>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL}</b> -
-     * Present on all devices that report being FULL level hardware devices in the
-     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL HARDWARE_LEVEL} key.
      */
     public static final Key<Float> SENSOR_TEMPERATURE =
             new Key<Float>("android.sensor.temperature", float.class);
@@ -646,7 +693,9 @@
      * <p>Whether face detection is enabled, and whether it
      * should output just the basic fields or the full set of
      * fields. Value must be one of the
-     * android.statistics.info.availableFaceDetectModes.</p>
+     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
+     *
+     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
      * @see #STATISTICS_FACE_DETECT_MODE_OFF
      * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
      * @see #STATISTICS_FACE_DETECT_MODE_FULL
@@ -658,7 +707,6 @@
      * <p>List of unique IDs for detected
      * faces</p>
      * <p>Only available if faceDetectMode == FULL</p>
-     *
      * @hide
      */
     public static final Key<int[]> STATISTICS_FACE_IDS =
@@ -668,7 +716,6 @@
      * <p>List of landmarks for detected
      * faces</p>
      * <p>Only available if faceDetectMode == FULL</p>
-     *
      * @hide
      */
     public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
@@ -678,7 +725,6 @@
      * <p>List of the bounding rectangles for detected
      * faces</p>
      * <p>Only available if faceDetectMode != OFF</p>
-     *
      * @hide
      */
     public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
@@ -689,7 +735,6 @@
      * detected faces</p>
      * <p>Only available if faceDetectMode != OFF. The value should be
      * meaningful (for example, setting 100 at all times is illegal).</p>
-     *
      * @hide
      */
     public static final Key<byte[]> STATISTICS_FACE_SCORES =
@@ -701,7 +746,7 @@
      * Bayer color channel.</p>
      * <p>The least shaded section of the image should have a gain factor
      * of 1; all other sections should have gains above 1.</p>
-     * <p>When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
+     * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
      * must take into account the colorCorrection settings.</p>
      * <p>The shading map is for the entire active pixel array, and is not
      * affected by the crop region specified in the request. Each shading map
@@ -714,18 +759,18 @@
      * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
      * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
      * The shading map is stored in a fully interleaved format, and its size
-     * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p>
+     * is provided in the camera static metadata by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
      * <p>The shading map should have on the order of 30-40 rows and columns,
      * and must be smaller than 64x64.</p>
      * <p>As an example, given a very small map defined as:</p>
-     * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
-     * android.statistics.lensShadingMap =
+     * <pre><code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]
+     * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} =
      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
-     *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
-     *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
-     *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
-     *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
-     *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
+     * 1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
+     * 1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
+     * 1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
+     * 1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
+     * 1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
      * </code></pre>
      * <p>The low-resolution scaling map images for each channel are
      * (displayed using nearest-neighbor interpolation):</p>
@@ -736,6 +781,10 @@
      * <p>As a visualization only, inverting the full-color map to recover an
      * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_MODE
+     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
+     * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
      */
     public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
             new Key<float[]>("android.statistics.lensShadingMap", float[].class);
@@ -748,9 +797,11 @@
      * typically completes after the transform has already been
      * applied to that frame.</p>
      * <p>The 4 channel gains are defined in Bayer domain,
-     * see android.colorCorrection.gains for details.</p>
+     * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
      * <p>This value should always be calculated by the AWB block,
      * regardless of the android.control.* current values.</p>
+     *
+     * @see CaptureRequest#COLOR_CORRECTION_GAINS
      */
     public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
             new Key<float[]>("android.statistics.predictedColorGains", float[].class);
@@ -791,8 +842,11 @@
      * <p>Table mapping blue input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the blue
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
-     * <p>See android.tonemap.curveRed for more details.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
+     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
+     * @see CaptureRequest#TONEMAP_CURVE_RED
      */
     public static final Key<float[]> TONEMAP_CURVE_BLUE =
             new Key<float[]>("android.tonemap.curveBlue", float[].class);
@@ -801,8 +855,11 @@
      * <p>Table mapping green input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the green
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
-     * <p>See android.tonemap.curveRed for more details.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
+     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
+     * @see CaptureRequest#TONEMAP_CURVE_RED
      */
     public static final Key<float[]> TONEMAP_CURVE_GREEN =
             new Key<float[]>("android.tonemap.curveGreen", float[].class);
@@ -811,7 +868,7 @@
      * <p>Table mapping red input values to output
      * values</p>
      * <p>Tonemapping / contrast / gamma curve for the red
-     * channel, to use when android.tonemap.mode is CONTRAST_CURVE.</p>
+     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is CONTRAST_CURVE.</p>
      * <p>Since the input and output ranges may vary depending on
      * the camera pipeline, the input and output pixel values
      * are represented by normalized floating-point values
@@ -822,6 +879,8 @@
      * 0.3, 0.5, 1.0, 1.0], then the input-&gt;output mapping
      * for a few sample points would be: 0 -&gt; 0, 0.15 -&gt;
      * 0.25, 0.3 -&gt; 0.5, 0.5 -&gt; 0.64</p>
+     *
+     * @see CaptureRequest#TONEMAP_MODE
      */
     public static final Key<float[]> TONEMAP_CURVE_RED =
             new Key<float[]>("android.tonemap.curveRed", float[].class);
@@ -845,7 +904,6 @@
      * data is stored locally on the device.</p>
      * <p>The LED <em>may</em> be off if a trusted application is using the data that
      * doesn't violate the above rules.</p>
-     *
      * @hide
      */
     public static final Key<Boolean> LED_TRANSMIT =
@@ -855,9 +913,11 @@
      * <p>Whether black-level compensation is locked
      * to its current values, or is free to vary.</p>
      * <p>Whether the black level offset was locked for this frame.  Should be
-     * ON if android.blackLevel.lock was ON in the capture request, unless
+     * ON if {@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock} was ON in the capture request, unless
      * a change in other capture settings forced the camera device to
      * perform a black level reset.</p>
+     *
+     * @see CaptureRequest#BLACK_LEVEL_LOCK
      */
     public static final Key<Boolean> BLACK_LEVEL_LOCK =
             new Key<Boolean>("android.blackLevel.lock", boolean.class);
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index d4a3006..26e09b6 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -610,7 +610,7 @@
      * still running. Each call to this method will trigger the execution of
      * {@link #onProgressUpdate} on the UI thread.
      *
-     * {@link #onProgressUpdate} will note be called if the task has been
+     * {@link #onProgressUpdate} will not be called if the task has been
      * canceled.
      *
      * @param values The progress values to update the UI with.
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 94b9617..b132627 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -29,6 +29,7 @@
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
 import java.io.Serializable;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
@@ -2061,7 +2062,7 @@
             return readByte();
 
         case VAL_SERIALIZABLE:
-            return readSerializable();
+            return readSerializable(loader);
 
         case VAL_PARCELABLEARRAY:
             return readParcelableArray(loader);
@@ -2198,6 +2199,10 @@
      * wasn't found in the parcel.
      */
     public final Serializable readSerializable() {
+        return readSerializable(null);
+    }
+
+    private final Serializable readSerializable(final ClassLoader loader) {
         String name = readString();
         if (name == null) {
             // For some reason we were unable to read the name of the Serializable (either there
@@ -2209,14 +2214,27 @@
         byte[] serializedData = createByteArray();
         ByteArrayInputStream bais = new ByteArrayInputStream(serializedData);
         try {
-            ObjectInputStream ois = new ObjectInputStream(bais);
+            ObjectInputStream ois = new ObjectInputStream(bais) {
+                @Override
+                protected Class<?> resolveClass(ObjectStreamClass osClass)
+                        throws IOException, ClassNotFoundException {
+                    // try the custom classloader if provided
+                    if (loader != null) {
+                        Class<?> c = Class.forName(osClass.getName(), false, loader);
+                        if (c != null) {
+                            return c;
+                        }
+                    }
+                    return super.resolveClass(osClass);
+                }
+            };
             return (Serializable) ois.readObject();
         } catch (IOException ioe) {
             throw new RuntimeException("Parcelable encountered " +
                 "IOException reading a Serializable object (name = " + name +
                 ")", ioe);
         } catch (ClassNotFoundException cnfe) {
-            throw new RuntimeException("Parcelable encountered" +
+            throw new RuntimeException("Parcelable encountered " +
                 "ClassNotFoundException reading a Serializable object (name = "
                 + name + ")", cnfe);
         }
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 0d14a9e2..0418049 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -33,7 +33,6 @@
 import android.os.Parcelable;
 import android.text.TextUtils;
 import android.util.AttributeSet;
-import android.util.Log;
 import android.util.TypedValue;
 import android.util.Xml;
 import android.view.LayoutInflater;
@@ -1173,7 +1172,7 @@
         }
     }
 
-    private void switchToHeaderInner(String fragmentName, Bundle args, int direction) {
+    private void switchToHeaderInner(String fragmentName, Bundle args) {
         getFragmentManager().popBackStack(BACK_STACK_PREFS,
                 FragmentManager.POP_BACK_STACK_INCLUSIVE);
         if (!isValidFragment(fragmentName)) {
@@ -1196,7 +1195,7 @@
      */
     public void switchToHeader(String fragmentName, Bundle args) {
         setSelectedHeader(null);
-        switchToHeaderInner(fragmentName, args, 0);
+        switchToHeaderInner(fragmentName, args);
     }
 
     /**
@@ -1215,8 +1214,7 @@
             if (header.fragment == null) {
                 throw new IllegalStateException("can't switch to header that has no fragment");
             }
-            int direction = mHeaders.indexOf(header) - mHeaders.indexOf(mCurHeader);
-            switchToHeaderInner(header.fragment, header.fragmentArguments, direction);
+            switchToHeaderInner(header.fragment, header.fragmentArguments);
             setSelectedHeader(header);
         }
     }
diff --git a/core/java/android/widget/ActionMenuPresenter.java b/core/java/android/widget/ActionMenuPresenter.java
index b75d12f..1f405a7 100644
--- a/core/java/android/widget/ActionMenuPresenter.java
+++ b/core/java/android/widget/ActionMenuPresenter.java
@@ -74,6 +74,7 @@
     private ActionButtonSubmenu mActionButtonPopup;
 
     private OpenOverflowRunnable mPostedOpenRunnable;
+    private ActionMenuPopupCallback mPopupCallback;
 
     final PopupPresenterCallback mPopupPresenterCallback = new PopupPresenterCallback();
     int mOpenSubMenuId;
@@ -168,27 +169,6 @@
         }
         actionView.setVisibility(item.isActionViewExpanded() ? View.GONE : View.VISIBLE);
 
-        if (item.hasSubMenu()) {
-            actionView.setOnTouchListener(new ForwardingListener(actionView) {
-                @Override
-                public ListPopupWindow getPopup() {
-                    return mActionButtonPopup != null ? mActionButtonPopup.getPopup() : null;
-                }
-
-                @Override
-                protected boolean onForwardingStarted() {
-                    return onSubMenuSelected((SubMenuBuilder) item.getSubMenu());
-                }
-
-                @Override
-                protected boolean onForwardingStopped() {
-                    return dismissPopupMenus();
-                }
-            });
-        } else {
-            actionView.setOnTouchListener(null);
-        }
-
         final ActionMenuView menuParent = (ActionMenuView) parent;
         final ViewGroup.LayoutParams lp = actionView.getLayoutParams();
         if (!menuParent.checkLayoutParams(lp)) {
@@ -202,8 +182,13 @@
         itemView.initialize(item, 0);
 
         final ActionMenuView menuView = (ActionMenuView) mMenuView;
-        ActionMenuItemView actionItemView = (ActionMenuItemView) itemView;
+        final ActionMenuItemView actionItemView = (ActionMenuItemView) itemView;
         actionItemView.setItemInvoker(menuView);
+
+        if (mPopupCallback == null) {
+            mPopupCallback = new ActionMenuPopupCallback();
+        }
+        actionItemView.setPopupCallback(mPopupCallback);
     }
 
     @Override
@@ -761,4 +746,11 @@
             mPostedOpenRunnable = null;
         }
     }
+
+    private class ActionMenuPopupCallback extends ActionMenuItemView.PopupCallback {
+        @Override
+        public ListPopupWindow getPopup() {
+            return mActionButtonPopup != null ? mActionButtonPopup.getPopup() : null;
+        }
+    }
 }
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index e77a810..6e71a5c 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1329,7 +1329,7 @@
     
     /**
      * Updates the state of the popup window, if it is currently being displayed,
-     * from the currently set state.  This include:
+     * from the currently set state.  This includes:
      * {@link #setClippingEnabled(boolean)}, {@link #setFocusable(boolean)},
      * {@link #setIgnoreCheekPress()}, {@link #setInputMethodMode(int)},
      * {@link #setTouchable(boolean)}, and {@link #setAnimationStyle(int)}.
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 1fbcbcf..af9e2f0 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -304,6 +304,11 @@
         mMirrorForRtl = a.getBoolean(R.styleable.ProgressBar_mirrorForRtl, mMirrorForRtl);
 
         a.recycle();
+
+        // If not explicitly specified this view is important for accessibility.
+        if (getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
+            setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+        }
     }
 
     /**
diff --git a/core/java/com/android/internal/view/menu/ActionMenuItemView.java b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
index ad0853e..3cceebe 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuItemView.java
@@ -29,8 +29,10 @@
 import android.view.View;
 import android.view.accessibility.AccessibilityEvent;
 import android.widget.ActionMenuView;
+import android.widget.ListPopupWindow;
 import android.widget.TextView;
 import android.widget.Toast;
+import android.widget.ListPopupWindow.ForwardingListener;
 
 /**
  * @hide
@@ -44,6 +46,8 @@
     private CharSequence mTitle;
     private Drawable mIcon;
     private MenuBuilder.ItemInvoker mItemInvoker;
+    private ForwardingListener mForwardingListener;
+    private PopupCallback mPopupCallback;
 
     private boolean mAllowTextWithIcon;
     private boolean mExpandedFormat;
@@ -104,6 +108,7 @@
         return mItemData;
     }
 
+    @Override
     public void initialize(MenuItemImpl itemData, int menuType) {
         mItemData = itemData;
 
@@ -113,8 +118,24 @@
 
         setVisibility(itemData.isVisible() ? View.VISIBLE : View.GONE);
         setEnabled(itemData.isEnabled());
+
+        if (itemData.hasSubMenu()) {
+            if (mForwardingListener == null) {
+                mForwardingListener = new ActionMenuItemForwardingListener();
+            }
+        }
     }
 
+    @Override
+    public boolean onTouchEvent(MotionEvent e) {
+        if (mItemData.hasSubMenu() && mForwardingListener != null
+                && mForwardingListener.onTouch(this, e)) {
+            return true;
+        }
+        return super.onTouchEvent(e);
+    }
+
+    @Override
     public void onClick(View v) {
         if (mItemInvoker != null) {
             mItemInvoker.invokeItem(mItemData);
@@ -125,6 +146,10 @@
         mItemInvoker = invoker;
     }
 
+    public void setPopupCallback(PopupCallback popupCallback) {
+        mPopupCallback = popupCallback;
+    }
+
     public boolean prefersCondensedTitle() {
         return true;
     }
@@ -290,4 +315,42 @@
             super.setPadding((w - dw) / 2, getPaddingTop(), getPaddingRight(), getPaddingBottom());
         }
     }
+
+    private class ActionMenuItemForwardingListener extends ForwardingListener {
+        public ActionMenuItemForwardingListener() {
+            super(ActionMenuItemView.this);
+        }
+
+        @Override
+        public ListPopupWindow getPopup() {
+            if (mPopupCallback != null) {
+                return mPopupCallback.getPopup();
+            }
+            return null;
+        }
+
+        @Override
+        protected boolean onForwardingStarted() {
+            // Call the invoker, then check if the expected popup is showing.
+            if (mItemInvoker != null && mItemInvoker.invokeItem(mItemData)) {
+                final ListPopupWindow popup = getPopup();
+                return popup != null && popup.isShowing();
+            }
+            return false;
+        }
+
+        @Override
+        protected boolean onForwardingStopped() {
+            final ListPopupWindow popup = getPopup();
+            if (popup != null) {
+                popup.dismiss();
+                return true;
+            }
+            return false;
+        }
+    }
+
+    public static abstract class PopupCallback {
+        public abstract ListPopupWindow getPopup();
+    }
 }
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 80bd3e2..944b732 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -541,7 +541,9 @@
     } else {
         // since we know we'll be done with the asset when we return, we can
         // just use a simple wrapper
-        stream = new AssetStreamAdaptor(asset);
+        stream = new AssetStreamAdaptor(asset,
+                                        AssetStreamAdaptor::kNo_OwnAsset,
+                                        AssetStreamAdaptor::kNo_HasMemoryBase);
     }
     SkAutoUnref aur(stream);
     return doDecode(env, stream, padding, options, forcePurgeable, forcePurgeable);
diff --git a/core/jni/android/graphics/Movie.cpp b/core/jni/android/graphics/Movie.cpp
index feb2dec..55be7c1 100644
--- a/core/jni/android/graphics/Movie.cpp
+++ b/core/jni/android/graphics/Movie.cpp
@@ -85,7 +85,9 @@
 static jobject movie_decodeAsset(JNIEnv* env, jobject clazz, jint native_asset) {
     android::Asset* asset = reinterpret_cast<android::Asset*>(native_asset);
     if (asset == NULL) return NULL;
-    SkAutoTUnref<SkStreamRewindable> stream (new android::AssetStreamAdaptor(asset));
+    SkAutoTUnref<SkStreamRewindable> stream (new android::AssetStreamAdaptor(asset,
+            android::AssetStreamAdaptor::kNo_OwnAsset,
+            android::AssetStreamAdaptor::kNo_HasMemoryBase));
     SkMovie* moov = SkMovie::DecodeStream(stream.get());
     return create_jmovie(env, moov);
 }
diff --git a/core/jni/android/graphics/TypefaceImpl.cpp b/core/jni/android/graphics/TypefaceImpl.cpp
index 8874db8..f6d3a6e 100644
--- a/core/jni/android/graphics/TypefaceImpl.cpp
+++ b/core/jni/android/graphics/TypefaceImpl.cpp
@@ -32,68 +32,10 @@
 #endif
 
 #include "TypefaceImpl.h"
+#include "Utils.h"
 
 namespace android {
 
-class AssetStream : public SkStream {
-public:
-    AssetStream(Asset* asset, bool hasMemoryBase) : fAsset(asset)
-    {
-        fMemoryBase = hasMemoryBase ? fAsset->getBuffer(false) : NULL;
-    }
-
-    virtual ~AssetStream()
-    {
-        delete fAsset;
-    }
-
-    virtual const void* getMemoryBase()
-    {
-        return fMemoryBase;
-    }
-
-    virtual bool rewind()
-    {
-        off64_t pos = fAsset->seek(0, SEEK_SET);
-        return pos != (off64_t)-1;
-    }
-
-    virtual size_t read(void* buffer, size_t size)
-    {
-        ssize_t amount;
-
-        if (NULL == buffer)
-        {
-            if (0 == size)  // caller is asking us for our total length
-                return fAsset->getLength();
-
-            // asset->seek returns new total offset
-            // we want to return amount that was skipped
-
-            off64_t oldOffset = fAsset->seek(0, SEEK_CUR);
-            if (-1 == oldOffset)
-                return 0;
-            off64_t newOffset = fAsset->seek(size, SEEK_CUR);
-            if (-1 == newOffset)
-                return 0;
-
-            amount = newOffset - oldOffset;
-        }
-        else
-        {
-            amount = fAsset->read(buffer, size);
-        }
-
-        if (amount < 0)
-            amount = 0;
-        return amount;
-    }
-
-private:
-    Asset*      fAsset;
-    const void* fMemoryBase;
-};
-
 #ifdef USE_MINIKIN
 
 // Any weight greater than or equal to this is considered "bold" for
@@ -194,7 +136,9 @@
 }
 
 TypefaceImpl* TypefaceImpl_createFromAsset(Asset* asset) {
-    SkStream* stream = new AssetStream(asset, true);
+    SkStream* stream = new AssetStreamAdaptor(asset,
+                                              AssetStreamAdaptor::kYes_OwnAsset,
+                                              AssetStreamAdaptor::kYes_HasMemoryBase);
     SkTypeface* face = SkTypeface::CreateFromStream(stream);
     // SkTypeFace::CreateFromStream calls ref() on the stream, so we
     // need to unref it here or it won't be freed later on
@@ -234,7 +178,9 @@
 }
 
 TypefaceImpl* TypefaceImpl_createFromAsset(Asset* asset) {
-    SkStream* stream = new AssetStream(asset, true);
+    SkStream* stream = new AssetStreamAdaptor(asset,
+                                              AssetStreamAdaptor::kYes_OwnAsset,
+                                              AssetStreamAdaptor::kYes_HasMemoryBase);
     SkTypeface* face = SkTypeface::CreateFromStream(stream);
     // SkTypeFace::CreateFromStream calls ref() on the stream, so we
     // need to unref it here or it won't be freed later on
diff --git a/core/jni/android/graphics/Utils.cpp b/core/jni/android/graphics/Utils.cpp
index b7d1f3a..eb416cb 100644
--- a/core/jni/android/graphics/Utils.cpp
+++ b/core/jni/android/graphics/Utils.cpp
@@ -19,6 +19,21 @@
 
 using namespace android;
 
+AssetStreamAdaptor::AssetStreamAdaptor(Asset* asset, OwnAsset ownAsset,
+                                       HasMemoryBase hasMemoryBase)
+    : fAsset(asset)
+    , fMemoryBase(kYes_HasMemoryBase == hasMemoryBase ?
+                  asset->getBuffer(false) : NULL)
+    , fOwnAsset(ownAsset)
+{
+}
+
+AssetStreamAdaptor::~AssetStreamAdaptor() {
+    if (kYes_OwnAsset == fOwnAsset) {
+        delete fAsset;
+    }
+}
+
 bool AssetStreamAdaptor::rewind() {
     off64_t pos = fAsset->seek(0, SEEK_SET);
     if (pos == (off64_t)-1) {
diff --git a/core/jni/android/graphics/Utils.h b/core/jni/android/graphics/Utils.h
index a1ac72a..b90593c 100644
--- a/core/jni/android/graphics/Utils.h
+++ b/core/jni/android/graphics/Utils.h
@@ -28,16 +28,36 @@
 
 class AssetStreamAdaptor : public SkStreamRewindable {
 public:
-    AssetStreamAdaptor(Asset* a) : fAsset(a) {}
+    // Enum passed to constructor. If set to kYes_OwnAsset,
+    // the passed in Asset will be deleted upon destruction.
+    enum OwnAsset {
+        kYes_OwnAsset,
+        kNo_OwnAsset,
+    };
+
+    // Enum passed to constructor. If set to kYes_HasMemoryBase,
+    // getMemoryBase will return the Asset's buffer.
+    enum HasMemoryBase {
+        kYes_HasMemoryBase,
+        kNo_HasMemoryBase,
+    };
+
+    AssetStreamAdaptor(Asset*, OwnAsset, HasMemoryBase);
+    ~AssetStreamAdaptor();
+
     virtual bool rewind();
     virtual size_t read(void* buffer, size_t size);
     virtual bool hasLength() const { return true; }
     virtual size_t getLength() const;
     virtual bool isAtEnd() const;
 
+    virtual const void* getMemoryBase() { return fMemoryBase; }
+
     virtual SkStreamRewindable* duplicate() const;
 private:
-    Asset*  fAsset;
+    Asset*              fAsset;
+    const void* const   fMemoryBase;
+    const OwnAsset      fOwnAsset;
 };
 
 /**
diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h
new file mode 100644
index 0000000..f4bab26
--- /dev/null
+++ b/core/jni/android_media_AudioFormat.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_MEDIA_AUDIOFORMAT_H
+#define ANDROID_MEDIA_AUDIOFORMAT_H
+
+#include <system/audio.h>
+
+// keep these values in sync with AudioFormat.java
+#define ENCODING_PCM_16BIT 2
+#define ENCODING_PCM_8BIT  3
+
+static inline audio_format_t audioFormatToNative(int audioFormat)
+{
+    switch (audioFormat) {
+    case ENCODING_PCM_16BIT:
+        return AUDIO_FORMAT_PCM_16_BIT;
+    case ENCODING_PCM_8BIT:
+        return AUDIO_FORMAT_PCM_8_BIT;
+    default:
+        return AUDIO_FORMAT_INVALID;
+    }
+}
+
+#endif // ANDROID_MEDIA_AUDIOFORMAT_H
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index aae20e0..353334d 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -25,7 +25,7 @@
 #include <utils/Log.h>
 #include <media/AudioRecord.h>
 
-#include <system/audio.h>
+#include "android_media_AudioFormat.h"
 
 // ----------------------------------------------------------------------------
 
@@ -49,10 +49,6 @@
     Condition   cond;
 };
 
-// keep these values in sync with AudioFormat.java
-#define ENCODING_PCM_16BIT 2
-#define ENCODING_PCM_8BIT  3
-
 static Mutex sLock;
 static SortedVector <audiorecord_callback_cookie *> sAudioRecordCallBackCookies;
 
@@ -81,18 +77,6 @@
     }
 }
 
-static audio_format_t audioFormatToNative(int audioFormat)
-{
-    switch (audioFormat) {
-    case ENCODING_PCM_16BIT:
-        return AUDIO_FORMAT_PCM_16_BIT;
-    case ENCODING_PCM_8BIT:
-        return AUDIO_FORMAT_PCM_8_BIT;
-    default:
-        return AUDIO_FORMAT_INVALID;
-    }
-}
-
 // ----------------------------------------------------------------------------
 static void recorderCallback(int event, void* user, void *info) {
 
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 225bf06..2e419f1 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -28,7 +28,7 @@
 #include <binder/MemoryHeapBase.h>
 #include <binder/MemoryBase.h>
 
-#include <system/audio.h>
+#include "android_media_AudioFormat.h"
 
 // ----------------------------------------------------------------------------
 
@@ -55,9 +55,6 @@
 // keep these values in sync with AudioTrack.java
 #define MODE_STATIC 0
 #define MODE_STREAM 1
-// keep these values in sync with AudioFormat.java
-#define ENCODING_PCM_16BIT 2
-#define ENCODING_PCM_8BIT  3
 
 // ----------------------------------------------------------------------------
 class AudioTrackJniStorage {
@@ -244,7 +241,8 @@
 
     // check the format.
     // This function was called from Java, so we compare the format against the Java constants
-    if ((audioFormat != ENCODING_PCM_16BIT) && (audioFormat != ENCODING_PCM_8BIT)) {
+    audio_format_t format = audioFormatToNative(audioFormat);
+    if (format == AUDIO_FORMAT_INVALID) {
 
         ALOGE("Error creating AudioTrack: unsupported audio format.");
         return AUDIOTRACK_ERROR_SETUP_INVALIDFORMAT;
@@ -253,20 +251,18 @@
     // for the moment 8bitPCM in MODE_STATIC is not supported natively in the AudioTrack C++ class
     // so we declare everything as 16bitPCM, the 8->16bit conversion for MODE_STATIC will be handled
     // in android_media_AudioTrack_native_write_byte()
-    if ((audioFormat == ENCODING_PCM_8BIT)
+    if ((format == AUDIO_FORMAT_PCM_8_BIT)
         && (memoryMode == MODE_STATIC)) {
         ALOGV("android_media_AudioTrack_native_setup(): requesting MODE_STATIC for 8bit \
             buff size of %dbytes, switching to 16bit, buff size of %dbytes",
             buffSizeInBytes, 2*buffSizeInBytes);
-        audioFormat = ENCODING_PCM_16BIT;
+        format = AUDIO_FORMAT_PCM_16_BIT;
         // we will need twice the memory to store the data
         buffSizeInBytes *= 2;
     }
 
     // compute the frame count
-    int bytesPerSample = audioFormat == ENCODING_PCM_16BIT ? 2 : 1;
-    audio_format_t format = audioFormat == ENCODING_PCM_16BIT ?
-            AUDIO_FORMAT_PCM_16_BIT : AUDIO_FORMAT_PCM_8_BIT;
+    const size_t bytesPerSample = audio_bytes_per_sample(format);
     int frameCount = buffSizeInBytes / (nbChannels * bytesPerSample);
 
     jclass clazz = env->GetObjectClass(thiz);
@@ -519,14 +515,26 @@
             written = 0;
         }
     } else {
-        if (audioFormat == ENCODING_PCM_16BIT) {
+        const audio_format_t format = audioFormatToNative(audioFormat);
+        switch (format) {
+
+        default:
+            // TODO Currently the only possible values for format are AUDIO_FORMAT_PCM_16_BIT
+            // and AUDIO_FORMAT_PCM_8_BIT, due to the limited set of values for audioFormat.
+            // The next section of the switch will probably work for more formats, but it has only
+            // been tested for AUDIO_FORMAT_PCM_16_BIT, so that's why the "default" case fails.
+            break;
+
+        case AUDIO_FORMAT_PCM_16_BIT: {
             // writing to shared memory, check for capacity
             if ((size_t)sizeInBytes > track->sharedBuffer()->size()) {
                 sizeInBytes = track->sharedBuffer()->size();
             }
             memcpy(track->sharedBuffer()->pointer(), data + offsetInBytes, sizeInBytes);
             written = sizeInBytes;
-        } else if (audioFormat == ENCODING_PCM_8BIT) {
+            } break;
+
+        case AUDIO_FORMAT_PCM_8_BIT: {
             // data contains 8bit data we need to expand to 16bit before copying
             // to the shared memory
             // writing to shared memory, check for capacity,
@@ -543,6 +551,8 @@
             // even though we wrote 2*sizeInBytes, we only report sizeInBytes as written to hide
             // the 8bit mixer restriction from the user of this function
             written = sizeInBytes;
+            } break;
+
         }
     }
     return written;
@@ -829,12 +839,17 @@
 static jint android_media_AudioTrack_get_min_buff_size(JNIEnv *env,  jobject thiz,
     jint sampleRateInHertz, jint nbChannels, jint audioFormat) {
 
-    size_t frameCount = 0;
-    if (AudioTrack::getMinFrameCount(&frameCount, AUDIO_STREAM_DEFAULT,
-            sampleRateInHertz) != NO_ERROR) {
+    size_t frameCount;
+    const status_t status = AudioTrack::getMinFrameCount(&frameCount, AUDIO_STREAM_DEFAULT,
+            sampleRateInHertz);
+    if (status != NO_ERROR) {
+        ALOGE("AudioTrack::getMinFrameCount() for sample rate %d failed with status %d",
+                sampleRateInHertz, status);
         return -1;
     }
-    return frameCount * nbChannels * (audioFormat == ENCODING_PCM_16BIT ? 2 : 1);
+    const audio_format_t format = audioFormatToNative(audioFormat);
+    const size_t bytesPerSample = audio_bytes_per_sample(format);
+    return frameCount * nbChannels * bytesPerSample;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 7319994..4caff69 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -330,11 +330,11 @@
     <string name="permlab_runSetActivityWatcher" msgid="892239094867182656">"overvåge og kontrollere åbning af alle apps"</string>
     <string name="permdesc_runSetActivityWatcher" msgid="6003603162578577406">"Tillader, at appen kan overvåge og kontrollere, hvordan systemet starter aktiviteter. Ondsindede apps kan fuldstændig kompromittere systemet. Denne tilladelse er kun nødvendig til udvikling, aldrig til normal brug."</string>
     <string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"send udsendelse om fjernet pakke"</string>
-    <string name="permdesc_broadcastPackageRemoved" msgid="6621901216207931089">"Tillader, at appen kan udsende en meddelelse om, at en apppakke er fjernet. Ondsindede apps kan bruge dette til at dræbe andre kørende apps."</string>
+    <string name="permdesc_broadcastPackageRemoved" msgid="6621901216207931089">"Tillader, at appen kan udsende en underretning om, at en app-pakke er fjernet. Ondsindede apps kan bruge dette til at lukke andre kørende apps."</string>
     <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"send sms-modtaget udsendelse"</string>
-    <string name="permdesc_broadcastSmsReceived" msgid="4152037720034365492">"Tillader, at appen kan udsende en meddelelse om, at der er modtaget en sms-besked. Ondsindede apps kan bruge dette til at forfalske indgående sms-beskeder."</string>
+    <string name="permdesc_broadcastSmsReceived" msgid="4152037720034365492">"Tillader, at appen kan udsende en underretning om, at der er modtaget en sms-besked. Ondsindede apps kan bruge dette til at simulere indgående sms-beskeder."</string>
     <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"send WAP-PUSH-modtaget udsendelse"</string>
-    <string name="permdesc_broadcastWapPush" msgid="4783402525039442729">"Tillader, at appen kan udsende en meddelelse om, at der er modtaget en WAP PUSH-besked. Ondsindede apps kan bruge dette til at forfalske modtagelse af mms-beskeder eller i det skjulte erstatte indholdet på en webside med ondsindede varianter."</string>
+    <string name="permdesc_broadcastWapPush" msgid="4783402525039442729">"Tillader, at appen kan udsende en underretning om, at der er modtaget en WAP PUSH-besked. Ondsindede apps kan bruge dette til at simulere modtagelse af mms-beskeder eller i det skjulte erstatte indholdet på en webside med ondsindede varianter."</string>
     <string name="permlab_setProcessLimit" msgid="2451873664363662666">"begræns antallet af kørende processer"</string>
     <string name="permdesc_setProcessLimit" msgid="7318061314040879542">"Tillader, at appen kan kontrollere det maksimale antal kørende processer. Dette er aldrig nødvendigt til normale apps."</string>
     <string name="permlab_setAlwaysFinish" msgid="550958507798796965">"tvinge baggrundsapps til at lukke"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 96762cb..4ee1315 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1124,8 +1124,8 @@
     <string name="no" msgid="5141531044935541497">"Annuler"</string>
     <string name="dialog_alert_title" msgid="2049658708609043103">"Attention"</string>
     <string name="loading" msgid="7933681260296021180">"Chargement en cours..."</string>
-    <string name="capital_on" msgid="1544682755514494298">"ACTIVÉE"</string>
-    <string name="capital_off" msgid="6815870386972805832">"DÉSACTIVÉE"</string>
+    <string name="capital_on" msgid="1544682755514494298">"OUI"</string>
+    <string name="capital_off" msgid="6815870386972805832">"NON"</string>
     <string name="whichApplication" msgid="4533185947064773386">"Continuer avec"</string>
     <string name="whichHomeApplication" msgid="4616420172727326782">"Sélectionnez une application de l\'écran d\'accueil"</string>
     <string name="alwaysUse" msgid="4583018368000610438">"Utiliser cette application par défaut pour cette action"</string>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 9a9b71a..6969d2c 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2110,12 +2110,196 @@
   <public type="style" name="Widget.DeviceDefault.FastScroll" />
   <public type="style" name="Widget.DeviceDefault.Light.FastScroll" />
 
-  <public type="style" name="Theme.Quantum" />
-  <public type="style" name="Theme.Quantum.NoActionBar" />
+  <public type="style" name="TextAppearance.Quantum" />
+  <public type="style" name="TextAppearance.Quantum.DialogWindowTitle" />
+  <public type="style" name="TextAppearance.Quantum.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Large" />
+  <public type="style" name="TextAppearance.Quantum.Large.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Medium" />
+  <public type="style" name="TextAppearance.Quantum.Medium.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.SearchResult.Subtitle" />
+  <public type="style" name="TextAppearance.Quantum.SearchResult.Title" />
+  <public type="style" name="TextAppearance.Quantum.Small" />
+  <public type="style" name="TextAppearance.Quantum.Small.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.WindowTitle" />
 
+  <public type="style" name="TextAppearance.Quantum.Widget" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionBar.Menu" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionBar.Subtitle" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionBar.Subtitle.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionBar.Title" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionBar.Title.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionMode.Subtitle" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionMode.Subtitle.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionMode.Title" />
+  <public type="style" name="TextAppearance.Quantum.Widget.ActionMode.Title.Inverse" />
+  <public type="style" name="TextAppearance.Quantum.Widget.Button" />
+  <public type="style" name="TextAppearance.Quantum.Widget.DropDownHint" />
+  <public type="style" name="TextAppearance.Quantum.Widget.DropDownItem" />
+  <public type="style" name="TextAppearance.Quantum.Widget.EditText" />
+  <public type="style" name="TextAppearance.Quantum.Widget.IconMenu.Item" />
+  <public type="style" name="TextAppearance.Quantum.Widget.PopupMenu" />
+  <public type="style" name="TextAppearance.Quantum.Widget.PopupMenu.Large" />
+  <public type="style" name="TextAppearance.Quantum.Widget.PopupMenu.Small" />
+  <public type="style" name="TextAppearance.Quantum.Widget.TabWidget" />
+  <public type="style" name="TextAppearance.Quantum.Widget.TextView" />
+  <public type="style" name="TextAppearance.Quantum.Widget.TextView.PopupMenu" />
+  <public type="style" name="TextAppearance.Quantum.Widget.TextView.SpinnerItem" />
+
+  <public type="style" name="Theme.Quantum" />
+  <public type="style" name="Theme.Quantum.Dialog" />
+  <public type="style" name="Theme.Quantum.Dialog.MinWidth" />
+  <public type="style" name="Theme.Quantum.Dialog.NoActionBar" />
+  <public type="style" name="Theme.Quantum.Dialog.NoActionBar.MinWidth" />
+  <public type="style" name="Theme.Quantum.DialogWhenLarge" />
+  <public type="style" name="Theme.Quantum.DialogWhenLarge.NoActionBar" />
+  <public type="style" name="Theme.Quantum.InputMethod" />
+  <public type="style" name="Theme.Quantum.NoActionBar" />
+  <public type="style" name="Theme.Quantum.NoActionBar.Fullscreen" />
+  <public type="style" name="Theme.Quantum.NoActionBar.Overscan" />
+  <public type="style" name="Theme.Quantum.NoActionBar.TranslucentDecor" />
+  <public type="style" name="Theme.Quantum.Panel" />
+  <public type="style" name="Theme.Quantum.Wallpaper" />
+  <public type="style" name="Theme.Quantum.Wallpaper.NoTitleBar" />
+
+  <public type="style" name="Theme.Quantum.Light" />
+  <public type="style" name="Theme.Quantum.Light.DarkActionBar" />
+  <public type="style" name="Theme.Quantum.Light.Dialog" />
+  <public type="style" name="Theme.Quantum.Light.Dialog.MinWidth" />
+  <public type="style" name="Theme.Quantum.Light.Dialog.NoActionBar" />
+  <public type="style" name="Theme.Quantum.Light.Dialog.NoActionBar.MinWidth" />
+  <public type="style" name="Theme.Quantum.Light.DialogWhenLarge" />
+  <public type="style" name="Theme.Quantum.Light.DialogWhenLarge.NoActionBar" />
+  <public type="style" name="Theme.Quantum.Light.NoActionBar" />
+  <public type="style" name="Theme.Quantum.Light.NoActionBar.Fullscreen" />
+  <public type="style" name="Theme.Quantum.Light.NoActionBar.Overscan" />
+  <public type="style" name="Theme.Quantum.Light.NoActionBar.TranslucentDecor" />
+  <public type="style" name="Theme.Quantum.Light.Panel" />
+
+  <public type="style" name="Widget.Quantum" />
+  <public type="style" name="Widget.Quantum.ActionBar" />
+  <public type="style" name="Widget.Quantum.ActionBar.Solid" />
+  <public type="style" name="Widget.Quantum.ActionBar.TabBar" />
+  <public type="style" name="Widget.Quantum.ActionBar.TabText" />
+  <public type="style" name="Widget.Quantum.ActionBar.TabView" />
+  <public type="style" name="Widget.Quantum.ActionButton" />
+  <public type="style" name="Widget.Quantum.ActionButton.CloseMode" />
+  <public type="style" name="Widget.Quantum.ActionButton.Overflow" />
+  <public type="style" name="Widget.Quantum.ActionButton.TextButton" />
+  <public type="style" name="Widget.Quantum.ActionMode" />
+  <public type="style" name="Widget.Quantum.AutoCompleteTextView" />
   <public type="style" name="Widget.Quantum.Button" />
-  <public type="style" name="Widget.Quantum.Button.Small" />
   <public type="style" name="Widget.Quantum.Button.Borderless" />
   <public type="style" name="Widget.Quantum.Button.Borderless.Small" />
+  <public type="style" name="Widget.Quantum.Button.Inset" />
+  <public type="style" name="Widget.Quantum.Button.Small" />
+  <public type="style" name="Widget.Quantum.Button.Toggle" />
+  <public type="style" name="Widget.Quantum.CalendarView" />
+  <public type="style" name="Widget.Quantum.CheckedTextView" />
+  <public type="style" name="Widget.Quantum.CompoundButton.CheckBox" />
+  <public type="style" name="Widget.Quantum.CompoundButton.RadioButton" />
+  <public type="style" name="Widget.Quantum.CompoundButton.Star" />
+  <public type="style" name="Widget.Quantum.DatePicker" />
+  <public type="style" name="Widget.Quantum.DropDownItem" />
+  <public type="style" name="Widget.Quantum.DropDownItem.Spinner" />
+  <public type="style" name="Widget.Quantum.EditText" />
+  <public type="style" name="Widget.Quantum.ExpandableListView" />
+  <public type="style" name="Widget.Quantum.FastScroll" />
+  <public type="style" name="Widget.Quantum.FragmentBreadCrumbs" />
+  <public type="style" name="Widget.Quantum.GridView" />
+  <public type="style" name="Widget.Quantum.HorizontalScrollView" />
   <public type="style" name="Widget.Quantum.ImageButton" />
+  <public type="style" name="Widget.Quantum.ListPopupWindow" />
+  <public type="style" name="Widget.Quantum.ListView" />
+  <public type="style" name="Widget.Quantum.ListView.DropDown" />
+  <public type="style" name="Widget.Quantum.MediaRouteButton" />
+  <public type="style" name="Widget.Quantum.PopupMenu" />
+  <public type="style" name="Widget.Quantum.PopupWindow" />
+  <public type="style" name="Widget.Quantum.ProgressBar" />
+  <public type="style" name="Widget.Quantum.ProgressBar.Horizontal" />
+  <public type="style" name="Widget.Quantum.ProgressBar.Large" />
+  <public type="style" name="Widget.Quantum.ProgressBar.Small" />
+  <public type="style" name="Widget.Quantum.ProgressBar.Small.Title" />
+  <public type="style" name="Widget.Quantum.RatingBar" />
+  <public type="style" name="Widget.Quantum.RatingBar.Indicator" />
+  <public type="style" name="Widget.Quantum.RatingBar.Small" />
+  <public type="style" name="Widget.Quantum.ScrollView" />
+  <public type="style" name="Widget.Quantum.SeekBar" />
+  <public type="style" name="Widget.Quantum.Spinner" />
+  <public type="style" name="Widget.Quantum.Tab" />
+  <public type="style" name="Widget.Quantum.TabWidget" />
+  <public type="style" name="Widget.Quantum.TextView" />
+  <public type="style" name="Widget.Quantum.TextView.SpinnerItem" />
+  <public type="style" name="Widget.Quantum.WebTextView" />
+  <public type="style" name="Widget.Quantum.WebView" />
+
+  <public type="style" name="Widget.Quantum.Light" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.Solid" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.Solid.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabBar" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabBar.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabText" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabText.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabView" />
+  <public type="style" name="Widget.Quantum.Light.ActionBar.TabView.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ActionButton" />
+  <public type="style" name="Widget.Quantum.Light.ActionButton.CloseMode" />
+  <public type="style" name="Widget.Quantum.Light.ActionButton.Overflow" />
+  <public type="style" name="Widget.Quantum.Light.ActionMode.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ActionMode" />
+  <public type="style" name="Widget.Quantum.Light.AutoCompleteTextView" />
+  <public type="style" name="Widget.Quantum.Light.Button" />
+  <public type="style" name="Widget.Quantum.Light.Button.Borderless.Small" />
+  <public type="style" name="Widget.Quantum.Light.Button.Inset" />
+  <public type="style" name="Widget.Quantum.Light.Button.Small" />
+  <public type="style" name="Widget.Quantum.Light.Button.Toggle" />
+  <public type="style" name="Widget.Quantum.Light.CalendarView" />
+  <public type="style" name="Widget.Quantum.Light.CheckedTextView" />
+  <public type="style" name="Widget.Quantum.Light.CompoundButton.CheckBox" />
+  <public type="style" name="Widget.Quantum.Light.CompoundButton.RadioButton" />
+  <public type="style" name="Widget.Quantum.Light.CompoundButton.Star" />
+  <public type="style" name="Widget.Quantum.Light.DropDownItem" />
+  <public type="style" name="Widget.Quantum.Light.DropDownItem.Spinner" />
+  <public type="style" name="Widget.Quantum.Light.EditText" />
+  <public type="style" name="Widget.Quantum.Light.ExpandableListView" />
+  <public type="style" name="Widget.Quantum.Light.FastScroll" />
+  <public type="style" name="Widget.Quantum.Light.FragmentBreadCrumbs" />
+  <public type="style" name="Widget.Quantum.Light.GridView" />
+  <public type="style" name="Widget.Quantum.Light.HorizontalScrollView" />
+  <public type="style" name="Widget.Quantum.Light.ImageButton" />
+  <public type="style" name="Widget.Quantum.Light.ListPopupWindow" />
+  <public type="style" name="Widget.Quantum.Light.ListView" />
+  <public type="style" name="Widget.Quantum.Light.ListView.DropDown" />
+  <public type="style" name="Widget.Quantum.Light.MediaRouteButton" />
+  <public type="style" name="Widget.Quantum.Light.PopupMenu" />
+  <public type="style" name="Widget.Quantum.Light.PopupWindow" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Horizontal" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Large" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Large.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Small" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Small.Inverse" />
+  <public type="style" name="Widget.Quantum.Light.ProgressBar.Small.Title" />
+  <public type="style" name="Widget.Quantum.Light.RatingBar" />
+  <public type="style" name="Widget.Quantum.Light.RatingBar.Indicator" />
+  <public type="style" name="Widget.Quantum.Light.RatingBar.Small" />
+  <public type="style" name="Widget.Quantum.Light.ScrollView" />
+  <public type="style" name="Widget.Quantum.Light.SeekBar" />
+  <public type="style" name="Widget.Quantum.Light.Spinner" />
+  <public type="style" name="Widget.Quantum.Light.Tab" />
+  <public type="style" name="Widget.Quantum.Light.TabWidget" />
+  <public type="style" name="Widget.Quantum.Light.TextView" />
+  <public type="style" name="Widget.Quantum.Light.TextView.SpinnerItem" />
+  <public type="style" name="Widget.Quantum.Light.WebTextView" />
+  <public type="style" name="Widget.Quantum.Light.WebView" />
+
+  <public type="style" name="Quantum.ButtonBar.AlertDialog" />
+  <public type="style" name="Quantum.ButtonBar" />
+  <public type="style" name="Quantum.SegmentedButton" />
+
+  <public type="style" name="Quantum.Light.ButtonBar.AlertDialog" />
+  <public type="style" name="Quantum.Light.ButtonBar" />
+  <public type="style" name="Quantum.Light.SegmentedButton" />
 </resources>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index e8db03f..1a6eacd 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -2408,16 +2408,6 @@
     <style name="Animation.Holo.Dialog" parent="Animation.Dialog">
     </style>
 
-    <style name="Animation.Quantum" parent="Animation.Holo">
-    </style>
-
-    <style name="Animation.Quantum.Activity" parent="Animation.Holo.Activity">
-        <item name="activityOpenEnterAnimation">@null</item>
-        <item name="activityOpenExitAnimation">@null</item>
-        <item name="activityCloseEnterAnimation">@null</item>
-        <item name="activityCloseExitAnimation">@anim/fade_out</item>
-    </style>
-
     <!-- Dialog styles -->
 
     <style name="AlertDialog.Holo" parent="AlertDialog">
@@ -2534,13 +2524,8 @@
         <item name="android:contentDescription">@android:string/media_route_button_content_description</item>
     </style>
 
-    <style name="Widget.Holo.Light.MediaRouteButton">
-        <item name="android:background">?android:attr/selectableItemBackground</item>
+    <style name="Widget.Holo.Light.MediaRouteButton" parent="Widget.Holo.MediaRouteButton">
         <item name="android:externalRouteEnabledDrawable">@drawable/ic_media_route_holo_light</item>
-        <item name="android:minWidth">56dp</item>
-        <item name="android:minHeight">48dp</item>
-        <item name="android:focusable">true</item>
-        <item name="android:contentDescription">@android:string/media_route_button_content_description</item>
     </style>
 
     <!-- Keyguard PIN pad styles -->
@@ -2623,36 +2608,4 @@
     <style name="Widget.Holo.Light.FastScroll" parent="Widget.Holo.FastScroll">
     </style>
 
-    <!-- Begin Quantum styles -->
-
-    <style name="Widget.Quantum" parent="Widget.Holo.Light">
-    </style>
-
-    <style name="Widget.Quantum.Button" parent="Widget.Holo.Light.Button">
-        <item name="android:background">@android:drawable/btn_default_quantum</item>
-    </style>
-
-    <style name="Widget.Quantum.Button.Borderless">
-        <item name="android:background">?android:attr/selectableItemBackground</item>
-        <item name="android:paddingStart">4dip</item>
-        <item name="android:paddingEnd">4dip</item>
-    </style>
-
-    <style name="Widget.Quantum.Button.Borderless.Small">
-        <item name="android:textSize">14sp</item>
-    </style>
-
-    <style name="Widget.Quantum.Button.Small">
-        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
-        <item name="android:textColor">@android:color/primary_text_holo_light</item>
-        <item name="android:minHeight">48dip</item>
-        <item name="android:minWidth">48dip</item>
-    </style>
-
-    <style name="Widget.Quantum.Button.Inset">
-    </style>
-
-    <style name="Widget.Quantum.ImageButton" parent="Widget.Holo.Light.ImageButton">
-        <item name="android:background">@android:drawable/btn_default_quantum</item>
-    </style>
 </resources>
diff --git a/core/res/res/values/styles_device_defaults.xml b/core/res/res/values/styles_device_defaults.xml
index 512c9b8..4acafad 100644
--- a/core/res/res/values/styles_device_defaults.xml
+++ b/core/res/res/values/styles_device_defaults.xml
@@ -32,731 +32,262 @@
  -->
 <resources>
     <!-- Widget Styles -->
-    <style name="Widget.DeviceDefault" parent="Widget.Holo" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button" parent="Widget.Holo.Button" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button.Small" parent="Widget.Holo.Button.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button.Inset" parent="Widget.Holo.Button.Inset" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button.Toggle" parent="Widget.Holo.Button.Toggle" >
-
-    </style>
-    <style name="Widget.DeviceDefault.TextView" parent="Widget.Holo.TextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CheckedTextView" parent="Widget.Holo.CheckedTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.AutoCompleteTextView" parent="Widget.Holo.AutoCompleteTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CompoundButton.CheckBox" parent="Widget.Holo.CompoundButton.CheckBox" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ListView.DropDown" parent="Widget.Holo.ListView.DropDown" >
-
-    </style>
-    <style name="Widget.DeviceDefault.EditText" parent="Widget.Holo.EditText" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ExpandableListView" parent="Widget.Holo.ExpandableListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.GridView" parent="Widget.Holo.GridView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ImageButton" parent="Widget.Holo.ImageButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ListView" parent="Widget.Holo.ListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.PopupWindow" parent="Widget.Holo.PopupWindow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar" parent="Widget.Holo.ProgressBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Horizontal" parent="Widget.Holo.ProgressBar.Horizontal" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Small" parent="Widget.Holo.ProgressBar.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Small.Title" parent="Widget.Holo.ProgressBar.Small.Title" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Large" parent="Widget.Holo.ProgressBar.Large" >
-
-    </style>
-    <style name="Widget.DeviceDefault.SeekBar" parent="Widget.Holo.SeekBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.RatingBar" parent="Widget.Holo.RatingBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.RatingBar.Indicator" parent="Widget.Holo.RatingBar.Indicator" >
-
-    </style>
-    <style name="Widget.DeviceDefault.RatingBar.Small" parent="Widget.Holo.RatingBar.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CompoundButton.RadioButton" parent="Widget.Holo.CompoundButton.RadioButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ScrollView" parent="Widget.Holo.ScrollView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.HorizontalScrollView" parent="Widget.Holo.HorizontalScrollView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Spinner" parent="Widget.Holo.Spinner" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CompoundButton.Star" parent="Widget.Holo.CompoundButton.Star" >
-
-    </style>
-    <style name="Widget.DeviceDefault.TabWidget" parent="Widget.Holo.TabWidget" >
-
-    </style>
-    <style name="Widget.DeviceDefault.WebTextView" parent="Widget.Holo.WebTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.WebView" parent="Widget.Holo.WebView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.DropDownItem" parent="Widget.Holo.DropDownItem" >
-
-    </style>
-    <style name="Widget.DeviceDefault.DropDownItem.Spinner" parent="Widget.Holo.DropDownItem.Spinner" >
-
-    </style>
-    <style name="Widget.DeviceDefault.TextView.SpinnerItem" parent="Widget.Holo.TextView.SpinnerItem" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ListPopupWindow" parent="Widget.Holo.ListPopupWindow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.PopupMenu" parent="Widget.Holo.PopupMenu" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionButton" parent="Widget.Holo.ActionButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionButton.Overflow" parent="Widget.Holo.ActionButton.Overflow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionButton.TextButton" parent="Widget.Holo.ActionButton.TextButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionMode" parent="Widget.Holo.ActionMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionButton.CloseMode" parent="Widget.Holo.ActionButton.CloseMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionBar" parent="Widget.Holo.ActionBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button.Borderless" parent="Widget.Holo.Button.Borderless" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Tab" parent="Widget.Holo.Tab" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CalendarView" parent="Widget.Holo.CalendarView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.DatePicker" parent="Widget.Holo.DatePicker" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionBar.TabView" parent="Widget.Holo.ActionBar.TabView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionBar.TabText" parent="Widget.Holo.ActionBar.TabText" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionBar.TabBar" parent="Widget.Holo.ActionBar.TabBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.ActionBar.Solid" parent="Widget.Holo.ActionBar.Solid" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Button.Borderless.Small" parent="Widget.Holo.Button.Borderless.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.AbsListView" parent="Widget.Holo.AbsListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Spinner.DropDown.ActionBar" parent="Widget.Holo.Spinner.DropDown.ActionBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.PopupWindow.ActionMode" parent="Widget.Holo.PopupWindow.ActionMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.CompoundButton.Switch" parent="Widget.Holo.CompoundButton.Switch">
-
-    </style>
-    <style name="Widget.DeviceDefault.ExpandableListView.White" parent="Widget.Holo.ExpandableListView.White">
-
-    </style>
-    <style name="Widget.DeviceDefault.FastScroll" parent="Widget.Holo.FastScroll">
-
-    </style>
-    <style name="Widget.DeviceDefault.FragmentBreadCrumbs" parent="Widget.Holo.FragmentBreadCrumbs">
-
-    </style>
-    <style name="Widget.DeviceDefault.Gallery" parent="Widget.Holo.Gallery">
-
-    </style>
-    <style name="Widget.DeviceDefault.GestureOverlayView" parent="Widget.Holo.GestureOverlayView">
-
-    </style>
-    <style name="Widget.DeviceDefault.ImageWell" parent="Widget.Holo.ImageWell">
-
-    </style>
-    <style name="Widget.DeviceDefault.KeyboardView" parent="Widget.Holo.KeyboardView">
-
-    </style>
-    <style name="Widget.DeviceDefault.ListView.White" parent="Widget.Holo.ListView.White">
-
-    </style>
-    <style name="Widget.DeviceDefault.NumberPicker" parent="Widget.Holo.NumberPicker">
-
-    </style>
-    <style name="Widget.DeviceDefault.PreferenceFrameLayout" parent="Widget.Holo.PreferenceFrameLayout">
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Inverse" parent="Widget.Holo.ProgressBar.Inverse">
-
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Large.Inverse" parent="Widget.Holo.ProgressBar.Large.Inverse">
-
-    </style>
-    <style name="Widget.DeviceDefault.ProgressBar.Small.Inverse" parent="Widget.Holo.ProgressBar.Small.Inverse">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadge.WindowLarge" parent="Widget.Holo.QuickContactBadge.WindowLarge">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadge.WindowMedium" parent="Widget.Holo.QuickContactBadge.WindowMedium">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadge.WindowSmall" parent="Widget.Holo.QuickContactBadge.WindowSmall">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowLarge" parent="Widget.Holo.QuickContactBadgeSmall.WindowLarge">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowMedium" parent="Widget.Holo.QuickContactBadgeSmall.WindowMedium">
-
-    </style>
-    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowSmall" parent="Widget.Holo.QuickContactBadgeSmall.WindowSmall">
-
-    </style>
-    <style name="Widget.DeviceDefault.Spinner.DropDown" parent="Widget.Holo.Spinner.DropDown">
-
-    </style>
-    <style name="Widget.DeviceDefault.StackView" parent="Widget.Holo.StackView">
-
-    </style>
-    <style name="Widget.DeviceDefault.TextSelectHandle" parent="Widget.Holo.TextSelectHandle">
-
-    </style>
-    <style name="Widget.DeviceDefault.TextSuggestionsPopupWindow" parent="Widget.Holo.TextSuggestionsPopupWindow">
-
-    </style>
-    <style name="Widget.DeviceDefault.TextView.ListSeparator" parent="Widget.Holo.TextView.ListSeparator">
-
-    </style>
-    <style name="Widget.DeviceDefault.TimePicker" parent="Widget.Holo.TimePicker">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light" parent="Widget.Holo.Light" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button" parent="Widget.Holo.Light.Button" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button.Small" parent="Widget.Holo.Light.Button.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button.Inset" parent="Widget.Holo.Light.Button.Inset" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button.Toggle" parent="Widget.Holo.Light.Button.Toggle" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TextView" parent="Widget.Holo.Light.TextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.CheckedTextView" parent="Widget.Holo.Light.CheckedTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.AutoCompleteTextView" parent="Widget.Holo.Light.AutoCompleteTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.CompoundButton.CheckBox" parent="Widget.Holo.Light.CompoundButton.CheckBox" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ListView.DropDown" parent="Widget.Holo.Light.ListView.DropDown" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.EditText" parent="Widget.Holo.Light.EditText" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ExpandableListView" parent="Widget.Holo.Light.ExpandableListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.FastScroll" parent="Widget.Holo.Light.FastScroll">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.FragmentBreadCrumbs" parent="Widget.Holo.Light.FragmentBreadCrumbs">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.GridView" parent="Widget.Holo.Light.GridView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ImageButton" parent="Widget.Holo.Light.ImageButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ListView" parent="Widget.Holo.Light.ListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.PopupWindow" parent="Widget.Holo.Light.PopupWindow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar" parent="Widget.Holo.Light.ProgressBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Horizontal" parent="Widget.Holo.Light.ProgressBar.Horizontal" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Small" parent="Widget.Holo.Light.ProgressBar.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Small.Title" parent="Widget.Holo.Light.ProgressBar.Small.Title" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Large" parent="Widget.Holo.Light.ProgressBar.Large" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Inverse" parent="Widget.Holo.Light.ProgressBar.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Small.Inverse" parent="Widget.Holo.Light.ProgressBar.Small.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ProgressBar.Large.Inverse" parent="Widget.Holo.Light.ProgressBar.Large.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.SeekBar" parent="Widget.Holo.Light.SeekBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.RatingBar" parent="Widget.Holo.Light.RatingBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.RatingBar.Indicator" parent="Widget.Holo.Light.RatingBar.Indicator" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.RatingBar.Small" parent="Widget.Holo.Light.RatingBar.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.CompoundButton.RadioButton" parent="Widget.Holo.Light.CompoundButton.RadioButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ScrollView" parent="Widget.Holo.Light.ScrollView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.HorizontalScrollView" parent="Widget.Holo.Light.HorizontalScrollView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Spinner" parent="Widget.Holo.Light.Spinner" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.CompoundButton.Star" parent="Widget.Holo.Light.CompoundButton.Star" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TabWidget" parent="Widget.Holo.Light.TabWidget" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.WebTextView" parent="Widget.Holo.Light.WebTextView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.WebView" parent="Widget.Holo.Light.WebView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.DropDownItem" parent="Widget.Holo.Light.DropDownItem" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.DropDownItem.Spinner" parent="Widget.Holo.Light.DropDownItem.Spinner" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TextView.SpinnerItem" parent="Widget.Holo.Light.TextView.SpinnerItem" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ListPopupWindow" parent="Widget.Holo.Light.ListPopupWindow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.PopupMenu" parent="Widget.Holo.Light.PopupMenu" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Tab" parent="Widget.Holo.Light.Tab" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.CalendarView" parent="Widget.Holo.Light.CalendarView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button.Borderless.Small" parent="Widget.Holo.Light.Button.Borderless.Small" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionButton" parent="Widget.Holo.Light.ActionButton" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionButton.Overflow" parent="Widget.Holo.Light.ActionButton.Overflow" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionMode" parent="Widget.Holo.Light.ActionMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionButton.CloseMode" parent="Widget.Holo.Light.ActionButton.CloseMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar" parent="Widget.Holo.Light.ActionBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabView" parent="Widget.Holo.Light.ActionBar.TabView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabText" parent="Widget.Holo.Light.ActionBar.TabText" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabBar" parent="Widget.Holo.Light.ActionBar.TabBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.Solid" parent="Widget.Holo.Light.ActionBar.Solid" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.Solid.Inverse" parent="Widget.Holo.Light.ActionBar.Solid.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabBar.Inverse" parent="Widget.Holo.Light.ActionBar.TabBar.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabView.Inverse" parent="Widget.Holo.Light.ActionBar.TabView.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionBar.TabText.Inverse" parent="Widget.Holo.Light.ActionBar.TabText.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ActionMode.Inverse" parent="Widget.Holo.Light.ActionMode.Inverse" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.AbsListView" parent="Widget.Holo.Light.AbsListView" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Spinner.DropDown.ActionBar" parent="Widget.Holo.Light.Spinner.DropDown.ActionBar" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.PopupWindow.ActionMode" parent="Widget.Holo.Light.PopupWindow.ActionMode" >
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Button.Borderless" parent="Widget.Holo.Light.Button.Borderless">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.DatePicker" parent="Widget.Holo.Light.DatePicker">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ExpandableListView.White" parent="Widget.Holo.Light.ExpandableListView.White">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Gallery" parent="Widget.Holo.Light.Gallery">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.GestureOverlayView" parent="Widget.Holo.Light.GestureOverlayView">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ImageWell" parent="Widget.Holo.Light.ImageWell">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.ListView.White" parent="Widget.Holo.Light.ListView.White">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.NumberPicker" parent="Widget.Holo.Light.NumberPicker">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.Spinner.DropDown" parent="Widget.Holo.Light.Spinner.DropDown">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TextView.ListSeparator" parent="Widget.Holo.Light.TextView.ListSeparator">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TimePicker" parent="Widget.Holo.Light.TimePicker">
-
-    </style>
-    <style name="Widget.DeviceDefault.Light.TextSuggestionsPopupWindow" parent="Widget.Holo.Light.TextSuggestionsPopupWindow">
-
-    </style>
+    <style name="Widget.DeviceDefault" parent="Widget.Quantum"/>
+    <style name="Widget.DeviceDefault.Button" parent="Widget.Quantum.Button"/>
+    <style name="Widget.DeviceDefault.Button.Small" parent="Widget.Quantum.Button.Small"/>
+    <style name="Widget.DeviceDefault.Button.Inset" parent="Widget.Quantum.Button.Inset"/>
+    <style name="Widget.DeviceDefault.Button.Toggle" parent="Widget.Quantum.Button.Toggle"/>
+    <style name="Widget.DeviceDefault.TextView" parent="Widget.Quantum.TextView"/>
+    <style name="Widget.DeviceDefault.CheckedTextView" parent="Widget.Quantum.CheckedTextView"/>
+    <style name="Widget.DeviceDefault.AutoCompleteTextView" parent="Widget.Quantum.AutoCompleteTextView"/>
+    <style name="Widget.DeviceDefault.CompoundButton.CheckBox" parent="Widget.Quantum.CompoundButton.CheckBox"/>
+    <style name="Widget.DeviceDefault.ListView.DropDown" parent="Widget.Quantum.ListView.DropDown"/>
+    <style name="Widget.DeviceDefault.EditText" parent="Widget.Quantum.EditText"/>
+    <style name="Widget.DeviceDefault.ExpandableListView" parent="Widget.Quantum.ExpandableListView"/>
+    <style name="Widget.DeviceDefault.GridView" parent="Widget.Quantum.GridView"/>
+    <style name="Widget.DeviceDefault.ImageButton" parent="Widget.Quantum.ImageButton"/>
+    <style name="Widget.DeviceDefault.ListView" parent="Widget.Quantum.ListView"/>
+    <style name="Widget.DeviceDefault.PopupWindow" parent="Widget.Quantum.PopupWindow"/>
+    <style name="Widget.DeviceDefault.ProgressBar" parent="Widget.Quantum.ProgressBar"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Horizontal" parent="Widget.Quantum.ProgressBar.Horizontal"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Small" parent="Widget.Quantum.ProgressBar.Small"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Small.Title" parent="Widget.Quantum.ProgressBar.Small.Title"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Large" parent="Widget.Quantum.ProgressBar.Large"/>
+    <style name="Widget.DeviceDefault.SeekBar" parent="Widget.Quantum.SeekBar"/>
+    <style name="Widget.DeviceDefault.RatingBar" parent="Widget.Quantum.RatingBar"/>
+    <style name="Widget.DeviceDefault.RatingBar.Indicator" parent="Widget.Quantum.RatingBar.Indicator"/>
+    <style name="Widget.DeviceDefault.RatingBar.Small" parent="Widget.Quantum.RatingBar.Small"/>
+    <style name="Widget.DeviceDefault.CompoundButton.RadioButton" parent="Widget.Quantum.CompoundButton.RadioButton"/>
+    <style name="Widget.DeviceDefault.ScrollView" parent="Widget.Quantum.ScrollView"/>
+    <style name="Widget.DeviceDefault.HorizontalScrollView" parent="Widget.Quantum.HorizontalScrollView"/>
+    <style name="Widget.DeviceDefault.Spinner" parent="Widget.Quantum.Spinner"/>
+    <style name="Widget.DeviceDefault.CompoundButton.Star" parent="Widget.Quantum.CompoundButton.Star"/>
+    <style name="Widget.DeviceDefault.TabWidget" parent="Widget.Quantum.TabWidget"/>
+    <style name="Widget.DeviceDefault.WebTextView" parent="Widget.Quantum.WebTextView"/>
+    <style name="Widget.DeviceDefault.WebView" parent="Widget.Quantum.WebView"/>
+    <style name="Widget.DeviceDefault.DropDownItem" parent="Widget.Quantum.DropDownItem"/>
+    <style name="Widget.DeviceDefault.DropDownItem.Spinner" parent="Widget.Quantum.DropDownItem.Spinner"/>
+    <style name="Widget.DeviceDefault.TextView.SpinnerItem" parent="Widget.Quantum.TextView.SpinnerItem"/>
+    <style name="Widget.DeviceDefault.ListPopupWindow" parent="Widget.Quantum.ListPopupWindow"/>
+    <style name="Widget.DeviceDefault.PopupMenu" parent="Widget.Quantum.PopupMenu"/>
+    <style name="Widget.DeviceDefault.ActionButton" parent="Widget.Quantum.ActionButton"/>
+    <style name="Widget.DeviceDefault.ActionButton.Overflow" parent="Widget.Quantum.ActionButton.Overflow"/>
+    <style name="Widget.DeviceDefault.ActionButton.TextButton" parent="Widget.Quantum.ActionButton.TextButton"/>
+    <style name="Widget.DeviceDefault.ActionMode" parent="Widget.Quantum.ActionMode"/>
+    <style name="Widget.DeviceDefault.ActionButton.CloseMode" parent="Widget.Quantum.ActionButton.CloseMode"/>
+    <style name="Widget.DeviceDefault.ActionBar" parent="Widget.Quantum.ActionBar"/>
+    <style name="Widget.DeviceDefault.Button.Borderless" parent="Widget.Quantum.Button.Borderless"/>
+    <style name="Widget.DeviceDefault.Tab" parent="Widget.Quantum.Tab"/>
+    <style name="Widget.DeviceDefault.CalendarView" parent="Widget.Quantum.CalendarView"/>
+    <style name="Widget.DeviceDefault.DatePicker" parent="Widget.Quantum.DatePicker"/>
+    <style name="Widget.DeviceDefault.ActionBar.TabView" parent="Widget.Quantum.ActionBar.TabView"/>
+    <style name="Widget.DeviceDefault.ActionBar.TabText" parent="Widget.Quantum.ActionBar.TabText"/>
+    <style name="Widget.DeviceDefault.ActionBar.TabBar" parent="Widget.Quantum.ActionBar.TabBar"/>
+    <style name="Widget.DeviceDefault.ActionBar.Solid" parent="Widget.Quantum.ActionBar.Solid"/>
+    <style name="Widget.DeviceDefault.Button.Borderless.Small" parent="Widget.Quantum.Button.Borderless.Small"/>
+    <style name="Widget.DeviceDefault.AbsListView" parent="Widget.Quantum.AbsListView"/>
+    <style name="Widget.DeviceDefault.Spinner.DropDown.ActionBar" parent="Widget.Quantum.Spinner.DropDown.ActionBar"/>
+    <style name="Widget.DeviceDefault.PopupWindow.ActionMode" parent="Widget.Quantum.PopupWindow.ActionMode"/>
+    <style name="Widget.DeviceDefault.CompoundButton.Switch" parent="Widget.Quantum.CompoundButton.Switch"/>
+    <style name="Widget.DeviceDefault.ExpandableListView.White" parent="Widget.Quantum.ExpandableListView.White"/>
+    <style name="Widget.DeviceDefault.FastScroll" parent="Widget.Quantum.FastScroll"/>
+    <style name="Widget.DeviceDefault.FragmentBreadCrumbs" parent="Widget.Quantum.FragmentBreadCrumbs"/>
+    <style name="Widget.DeviceDefault.Gallery" parent="Widget.Quantum.Gallery"/>
+    <style name="Widget.DeviceDefault.GestureOverlayView" parent="Widget.Quantum.GestureOverlayView"/>
+    <style name="Widget.DeviceDefault.ImageWell" parent="Widget.Quantum.ImageWell"/>
+    <style name="Widget.DeviceDefault.KeyboardView" parent="Widget.Quantum.KeyboardView"/>
+    <style name="Widget.DeviceDefault.ListView.White" parent="Widget.Quantum.ListView.White"/>
+    <style name="Widget.DeviceDefault.NumberPicker" parent="Widget.Quantum.NumberPicker"/>
+    <style name="Widget.DeviceDefault.PreferenceFrameLayout" parent="Widget.Quantum.PreferenceFrameLayout"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Inverse" parent="Widget.Quantum.ProgressBar.Inverse"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Large.Inverse" parent="Widget.Quantum.ProgressBar.Large.Inverse"/>
+    <style name="Widget.DeviceDefault.ProgressBar.Small.Inverse" parent="Widget.Quantum.ProgressBar.Small.Inverse"/>
+    <style name="Widget.DeviceDefault.QuickContactBadge.WindowLarge" parent="Widget.Quantum.QuickContactBadge.WindowLarge"/>
+    <style name="Widget.DeviceDefault.QuickContactBadge.WindowMedium" parent="Widget.Quantum.QuickContactBadge.WindowMedium"/>
+    <style name="Widget.DeviceDefault.QuickContactBadge.WindowSmall" parent="Widget.Quantum.QuickContactBadge.WindowSmall"/>
+    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowLarge" parent="Widget.Quantum.QuickContactBadgeSmall.WindowLarge"/>
+    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowMedium" parent="Widget.Quantum.QuickContactBadgeSmall.WindowMedium"/>
+    <style name="Widget.DeviceDefault.QuickContactBadgeSmall.WindowSmall" parent="Widget.Quantum.QuickContactBadgeSmall.WindowSmall"/>
+    <style name="Widget.DeviceDefault.Spinner.DropDown" parent="Widget.Quantum.Spinner.DropDown"/>
+    <style name="Widget.DeviceDefault.StackView" parent="Widget.Quantum.StackView"/>
+    <style name="Widget.DeviceDefault.TextSelectHandle" parent="Widget.Quantum.TextSelectHandle"/>
+    <style name="Widget.DeviceDefault.TextSuggestionsPopupWindow" parent="Widget.Quantum.TextSuggestionsPopupWindow"/>
+    <style name="Widget.DeviceDefault.TextView.ListSeparator" parent="Widget.Quantum.TextView.ListSeparator"/>
+    <style name="Widget.DeviceDefault.TimePicker" parent="Widget.Quantum.TimePicker"/>
+    <style name="Widget.DeviceDefault.Light" parent="Widget.Quantum.Light"/>
+    <style name="Widget.DeviceDefault.Light.Button" parent="Widget.Quantum.Light.Button"/>
+    <style name="Widget.DeviceDefault.Light.Button.Small" parent="Widget.Quantum.Light.Button.Small"/>
+    <style name="Widget.DeviceDefault.Light.Button.Inset" parent="Widget.Quantum.Light.Button.Inset"/>
+    <style name="Widget.DeviceDefault.Light.Button.Toggle" parent="Widget.Quantum.Light.Button.Toggle"/>
+    <style name="Widget.DeviceDefault.Light.TextView" parent="Widget.Quantum.Light.TextView"/>
+    <style name="Widget.DeviceDefault.Light.CheckedTextView" parent="Widget.Quantum.Light.CheckedTextView"/>
+    <style name="Widget.DeviceDefault.Light.AutoCompleteTextView" parent="Widget.Quantum.Light.AutoCompleteTextView"/>
+    <style name="Widget.DeviceDefault.Light.CompoundButton.CheckBox" parent="Widget.Quantum.Light.CompoundButton.CheckBox"/>
+    <style name="Widget.DeviceDefault.Light.ListView.DropDown" parent="Widget.Quantum.Light.ListView.DropDown"/>
+    <style name="Widget.DeviceDefault.Light.EditText" parent="Widget.Quantum.Light.EditText"/>
+    <style name="Widget.DeviceDefault.Light.ExpandableListView" parent="Widget.Quantum.Light.ExpandableListView"/>
+    <style name="Widget.DeviceDefault.Light.FastScroll" parent="Widget.Quantum.Light.FastScroll"/>
+    <style name="Widget.DeviceDefault.Light.FragmentBreadCrumbs" parent="Widget.Quantum.Light.FragmentBreadCrumbs"/>
+    <style name="Widget.DeviceDefault.Light.GridView" parent="Widget.Quantum.Light.GridView"/>
+    <style name="Widget.DeviceDefault.Light.ImageButton" parent="Widget.Quantum.Light.ImageButton"/>
+    <style name="Widget.DeviceDefault.Light.ListView" parent="Widget.Quantum.Light.ListView"/>
+    <style name="Widget.DeviceDefault.Light.PopupWindow" parent="Widget.Quantum.Light.PopupWindow"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar" parent="Widget.Quantum.Light.ProgressBar"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Horizontal" parent="Widget.Quantum.Light.ProgressBar.Horizontal"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Small" parent="Widget.Quantum.Light.ProgressBar.Small"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Small.Title" parent="Widget.Quantum.Light.ProgressBar.Small.Title"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Large" parent="Widget.Quantum.Light.ProgressBar.Large"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Inverse" parent="Widget.Quantum.Light.ProgressBar.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Small.Inverse" parent="Widget.Quantum.Light.ProgressBar.Small.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ProgressBar.Large.Inverse" parent="Widget.Quantum.Light.ProgressBar.Large.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.SeekBar" parent="Widget.Quantum.Light.SeekBar"/>
+    <style name="Widget.DeviceDefault.Light.RatingBar" parent="Widget.Quantum.Light.RatingBar"/>
+    <style name="Widget.DeviceDefault.Light.RatingBar.Indicator" parent="Widget.Quantum.Light.RatingBar.Indicator"/>
+    <style name="Widget.DeviceDefault.Light.RatingBar.Small" parent="Widget.Quantum.Light.RatingBar.Small"/>
+    <style name="Widget.DeviceDefault.Light.CompoundButton.RadioButton" parent="Widget.Quantum.Light.CompoundButton.RadioButton"/>
+    <style name="Widget.DeviceDefault.Light.ScrollView" parent="Widget.Quantum.Light.ScrollView"/>
+    <style name="Widget.DeviceDefault.Light.HorizontalScrollView" parent="Widget.Quantum.Light.HorizontalScrollView"/>
+    <style name="Widget.DeviceDefault.Light.Spinner" parent="Widget.Quantum.Light.Spinner"/>
+    <style name="Widget.DeviceDefault.Light.CompoundButton.Star" parent="Widget.Quantum.Light.CompoundButton.Star"/>
+    <style name="Widget.DeviceDefault.Light.TabWidget" parent="Widget.Quantum.Light.TabWidget"/>
+    <style name="Widget.DeviceDefault.Light.WebTextView" parent="Widget.Quantum.Light.WebTextView"/>
+    <style name="Widget.DeviceDefault.Light.WebView" parent="Widget.Quantum.Light.WebView"/>
+    <style name="Widget.DeviceDefault.Light.DropDownItem" parent="Widget.Quantum.Light.DropDownItem"/>
+    <style name="Widget.DeviceDefault.Light.DropDownItem.Spinner" parent="Widget.Quantum.Light.DropDownItem.Spinner"/>
+    <style name="Widget.DeviceDefault.Light.TextView.SpinnerItem" parent="Widget.Quantum.Light.TextView.SpinnerItem"/>
+    <style name="Widget.DeviceDefault.Light.ListPopupWindow" parent="Widget.Quantum.Light.ListPopupWindow"/>
+    <style name="Widget.DeviceDefault.Light.PopupMenu" parent="Widget.Quantum.Light.PopupMenu"/>
+    <style name="Widget.DeviceDefault.Light.Tab" parent="Widget.Quantum.Light.Tab"/>
+    <style name="Widget.DeviceDefault.Light.CalendarView" parent="Widget.Quantum.Light.CalendarView"/>
+    <style name="Widget.DeviceDefault.Light.Button.Borderless.Small" parent="Widget.Quantum.Light.Button.Borderless.Small"/>
+    <style name="Widget.DeviceDefault.Light.ActionButton" parent="Widget.Quantum.Light.ActionButton"/>
+    <style name="Widget.DeviceDefault.Light.ActionButton.Overflow" parent="Widget.Quantum.Light.ActionButton.Overflow"/>
+    <style name="Widget.DeviceDefault.Light.ActionMode" parent="Widget.Quantum.Light.ActionMode"/>
+    <style name="Widget.DeviceDefault.Light.ActionButton.CloseMode" parent="Widget.Quantum.Light.ActionButton.CloseMode"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar" parent="Widget.Quantum.Light.ActionBar"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabView" parent="Widget.Quantum.Light.ActionBar.TabView"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabText" parent="Widget.Quantum.Light.ActionBar.TabText"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabBar" parent="Widget.Quantum.Light.ActionBar.TabBar"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.Solid" parent="Widget.Quantum.Light.ActionBar.Solid"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.Solid.Inverse" parent="Widget.Quantum.Light.ActionBar.Solid.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabBar.Inverse" parent="Widget.Quantum.Light.ActionBar.TabBar.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabView.Inverse" parent="Widget.Quantum.Light.ActionBar.TabView.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ActionBar.TabText.Inverse" parent="Widget.Quantum.Light.ActionBar.TabText.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.ActionMode.Inverse" parent="Widget.Quantum.Light.ActionMode.Inverse"/>
+    <style name="Widget.DeviceDefault.Light.AbsListView" parent="Widget.Quantum.Light.AbsListView"/>
+    <style name="Widget.DeviceDefault.Light.Spinner.DropDown.ActionBar" parent="Widget.Quantum.Light.Spinner.DropDown.ActionBar"/>
+    <style name="Widget.DeviceDefault.Light.PopupWindow.ActionMode" parent="Widget.Quantum.Light.PopupWindow.ActionMode"/>
+    <style name="Widget.DeviceDefault.Light.Button.Borderless" parent="Widget.Quantum.Light.Button.Borderless"/>
+    <style name="Widget.DeviceDefault.Light.DatePicker" parent="Widget.Quantum.Light.DatePicker"/>
+    <style name="Widget.DeviceDefault.Light.ExpandableListView.White" parent="Widget.Quantum.Light.ExpandableListView.White"/>
+    <style name="Widget.DeviceDefault.Light.Gallery" parent="Widget.Quantum.Light.Gallery"/>
+    <style name="Widget.DeviceDefault.Light.GestureOverlayView" parent="Widget.Quantum.Light.GestureOverlayView"/>
+    <style name="Widget.DeviceDefault.Light.ImageWell" parent="Widget.Quantum.Light.ImageWell"/>
+    <style name="Widget.DeviceDefault.Light.ListView.White" parent="Widget.Quantum.Light.ListView.White"/>
+    <style name="Widget.DeviceDefault.Light.NumberPicker" parent="Widget.Quantum.Light.NumberPicker"/>
+    <style name="Widget.DeviceDefault.Light.Spinner.DropDown" parent="Widget.Quantum.Light.Spinner.DropDown"/>
+    <style name="Widget.DeviceDefault.Light.TextView.ListSeparator" parent="Widget.Quantum.Light.TextView.ListSeparator"/>
+    <style name="Widget.DeviceDefault.Light.TimePicker" parent="Widget.Quantum.Light.TimePicker"/>
+    <style name="Widget.DeviceDefault.Light.TextSuggestionsPopupWindow" parent="Widget.Quantum.Light.TextSuggestionsPopupWindow"/>
 
 
     <!-- Text Appearance Styles -->
-    <style name="TextAppearance.DeviceDefault" parent="TextAppearance.Holo" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Inverse" parent="TextAppearance.Holo.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Large" parent="TextAppearance.Holo.Large" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Large.Inverse" parent="TextAppearance.Holo.Large.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Medium" parent="TextAppearance.Holo.Medium" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Medium.Inverse" parent="TextAppearance.Holo.Medium.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Small" parent="TextAppearance.Holo.Small" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Small.Inverse" parent="TextAppearance.Holo.Small.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.SearchResult.Title" parent="TextAppearance.Holo.SearchResult.Title" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.SearchResult.Subtitle" parent="TextAppearance.Holo.SearchResult.Subtitle" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget" parent="TextAppearance.Holo.Widget" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.Button" parent="TextAppearance.Holo.Widget.Button" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.IconMenu.Item" parent="TextAppearance.Holo.Widget.IconMenu.Item" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.TabWidget" parent="TextAppearance.Holo.Widget.TabWidget" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.TextView" parent="TextAppearance.Holo.Widget.TextView" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.TextView.PopupMenu" parent="TextAppearance.Holo.Widget.TextView.PopupMenu" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.DropDownHint" parent="TextAppearance.Holo.Widget.DropDownHint" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.DropDownItem" parent="TextAppearance.Holo.Widget.DropDownItem" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.TextView.SpinnerItem" parent="TextAppearance.Holo.Widget.TextView.SpinnerItem" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.EditText" parent="TextAppearance.Holo.Widget.EditText" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu" parent="TextAppearance.Holo.Widget.PopupMenu" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu.Large" parent="TextAppearance.Holo.Widget.PopupMenu.Large" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu.Small" parent="TextAppearance.Holo.Widget.PopupMenu.Small" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Title" parent="TextAppearance.Holo.Widget.ActionBar.Title" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Subtitle" parent="TextAppearance.Holo.Widget.ActionBar.Subtitle" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Title" parent="TextAppearance.Holo.Widget.ActionMode.Title" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Subtitle" parent="TextAppearance.Holo.Widget.ActionMode.Subtitle" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.WindowTitle" parent="TextAppearance.Holo.WindowTitle" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.DialogWindowTitle" parent="TextAppearance.Holo.DialogWindowTitle" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Title.Inverse" parent="TextAppearance.Holo.Widget.ActionBar.Title.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Subtitle.Inverse" parent="TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Title.Inverse" parent="TextAppearance.Holo.Widget.ActionMode.Title.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Subtitle.Inverse" parent="TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Menu" parent="TextAppearance.Holo.Widget.ActionBar.Menu" >
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light" parent="TextAppearance.Holo.Light">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Inverse" parent="TextAppearance.Holo.Light.Inverse">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Large" parent="TextAppearance.Holo.Light.Large">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Large.Inverse" parent="TextAppearance.Holo.Light.Large.Inverse">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Medium" parent="TextAppearance.Holo.Light.Medium">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Medium.Inverse" parent="TextAppearance.Holo.Light.Medium.Inverse">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.SearchResult.Subtitle" parent="TextAppearance.Holo.Light.SearchResult.Subtitle">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.SearchResult.Title" parent="TextAppearance.Holo.Light.SearchResult.Title">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Small" parent="TextAppearance.Holo.Light.Small">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Small.Inverse" parent="TextAppearance.Holo.Light.Small.Inverse">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Widget.Button" parent="TextAppearance.Holo.Light.Widget.Button">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Widget.PopupMenu.Large" parent="TextAppearance.Holo.Light.Widget.PopupMenu.Large">
-
-    </style>
-    <style name="TextAppearance.DeviceDefault.Light.Widget.PopupMenu.Small" parent="TextAppearance.Holo.Light.Widget.PopupMenu.Small">
-
-    </style>
+    <style name="TextAppearance.DeviceDefault" parent="TextAppearance.Quantum"/>
+    <style name="TextAppearance.DeviceDefault.Inverse" parent="TextAppearance.Quantum.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Large" parent="TextAppearance.Quantum.Large"/>
+    <style name="TextAppearance.DeviceDefault.Large.Inverse" parent="TextAppearance.Quantum.Large.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Medium" parent="TextAppearance.Quantum.Medium"/>
+    <style name="TextAppearance.DeviceDefault.Medium.Inverse" parent="TextAppearance.Quantum.Medium.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Small" parent="TextAppearance.Quantum.Small"/>
+    <style name="TextAppearance.DeviceDefault.Small.Inverse" parent="TextAppearance.Quantum.Small.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.SearchResult.Title" parent="TextAppearance.Quantum.SearchResult.Title"/>
+    <style name="TextAppearance.DeviceDefault.SearchResult.Subtitle" parent="TextAppearance.Quantum.SearchResult.Subtitle"/>
+    <style name="TextAppearance.DeviceDefault.Widget" parent="TextAppearance.Quantum.Widget"/>
+    <style name="TextAppearance.DeviceDefault.Widget.Button" parent="TextAppearance.Quantum.Widget.Button"/>
+    <style name="TextAppearance.DeviceDefault.Widget.IconMenu.Item" parent="TextAppearance.Quantum.Widget.IconMenu.Item"/>
+    <style name="TextAppearance.DeviceDefault.Widget.TabWidget" parent="TextAppearance.Quantum.Widget.TabWidget"/>
+    <style name="TextAppearance.DeviceDefault.Widget.TextView" parent="TextAppearance.Quantum.Widget.TextView"/>
+    <style name="TextAppearance.DeviceDefault.Widget.TextView.PopupMenu" parent="TextAppearance.Quantum.Widget.TextView.PopupMenu"/>
+    <style name="TextAppearance.DeviceDefault.Widget.DropDownHint" parent="TextAppearance.Quantum.Widget.DropDownHint"/>
+    <style name="TextAppearance.DeviceDefault.Widget.DropDownItem" parent="TextAppearance.Quantum.Widget.DropDownItem"/>
+    <style name="TextAppearance.DeviceDefault.Widget.TextView.SpinnerItem" parent="TextAppearance.Quantum.Widget.TextView.SpinnerItem"/>
+    <style name="TextAppearance.DeviceDefault.Widget.EditText" parent="TextAppearance.Quantum.Widget.EditText"/>
+    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu" parent="TextAppearance.Quantum.Widget.PopupMenu"/>
+    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu.Large" parent="TextAppearance.Quantum.Widget.PopupMenu.Large"/>
+    <style name="TextAppearance.DeviceDefault.Widget.PopupMenu.Small" parent="TextAppearance.Quantum.Widget.PopupMenu.Small"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Title" parent="TextAppearance.Quantum.Widget.ActionBar.Title"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Subtitle" parent="TextAppearance.Quantum.Widget.ActionBar.Subtitle"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Title" parent="TextAppearance.Quantum.Widget.ActionMode.Title"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Subtitle" parent="TextAppearance.Quantum.Widget.ActionMode.Subtitle"/>
+    <style name="TextAppearance.DeviceDefault.WindowTitle" parent="TextAppearance.Quantum.WindowTitle"/>
+    <style name="TextAppearance.DeviceDefault.DialogWindowTitle" parent="TextAppearance.Quantum.DialogWindowTitle"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Title.Inverse" parent="TextAppearance.Quantum.Widget.ActionBar.Title.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Subtitle.Inverse" parent="TextAppearance.Quantum.Widget.ActionBar.Subtitle.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Title.Inverse" parent="TextAppearance.Quantum.Widget.ActionMode.Title.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionMode.Subtitle.Inverse" parent="TextAppearance.Quantum.Widget.ActionMode.Subtitle.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Widget.ActionBar.Menu" parent="TextAppearance.Quantum.Widget.ActionBar.Menu"/>
+    <style name="TextAppearance.DeviceDefault.Light" parent="TextAppearance.Quantum.Light"/>
+    <style name="TextAppearance.DeviceDefault.Light.Inverse" parent="TextAppearance.Quantum.Light.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Light.Large" parent="TextAppearance.Quantum.Light.Large"/>
+    <style name="TextAppearance.DeviceDefault.Light.Large.Inverse" parent="TextAppearance.Quantum.Light.Large.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Light.Medium" parent="TextAppearance.Quantum.Light.Medium"/>
+    <style name="TextAppearance.DeviceDefault.Light.Medium.Inverse" parent="TextAppearance.Quantum.Light.Medium.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Light.SearchResult.Subtitle" parent="TextAppearance.Quantum.Light.SearchResult.Subtitle"/>
+    <style name="TextAppearance.DeviceDefault.Light.SearchResult.Title" parent="TextAppearance.Quantum.Light.SearchResult.Title"/>
+    <style name="TextAppearance.DeviceDefault.Light.Small" parent="TextAppearance.Quantum.Light.Small"/>
+    <style name="TextAppearance.DeviceDefault.Light.Small.Inverse" parent="TextAppearance.Quantum.Light.Small.Inverse"/>
+    <style name="TextAppearance.DeviceDefault.Light.Widget.Button" parent="TextAppearance.Quantum.Light.Widget.Button"/>
+    <style name="TextAppearance.DeviceDefault.Light.Widget.PopupMenu.Large" parent="TextAppearance.Quantum.Light.Widget.PopupMenu.Large"/>
+    <style name="TextAppearance.DeviceDefault.Light.Widget.PopupMenu.Small" parent="TextAppearance.Quantum.Light.Widget.PopupMenu.Small"/>
 
 
     <!-- Preference Styles -->
-    <style name="Preference.DeviceDefault" parent="Preference.Holo">
-
-    </style>
-    <style name="Preference.DeviceDefault.Category" parent="Preference.Holo.Category">
-
-    </style>
-    <style name="Preference.DeviceDefault.CheckBoxPreference" parent="Preference.Holo.CheckBoxPreference">
-
-    </style>
-    <style name="Preference.DeviceDefault.DialogPreference" parent="Preference.Holo.DialogPreference">
-
-    </style>
-    <style name="Preference.DeviceDefault.DialogPreference.EditTextPreference" parent="Preference.Holo.DialogPreference.EditTextPreference">
-
-    </style>
-    <style name="Preference.DeviceDefault.DialogPreference.YesNoPreference" parent="Preference.Holo.DialogPreference.YesNoPreference">
-
-    </style>
-    <style name="Preference.DeviceDefault.Information" parent="Preference.Holo.Information">
-
-    </style>
-    <style name="Preference.DeviceDefault.PreferenceScreen" parent="Preference.Holo.PreferenceScreen">
-
-    </style>
-    <style name="Preference.DeviceDefault.RingtonePreference" parent="Preference.Holo.RingtonePreference">
-
-    </style>
-    <style name="Preference.DeviceDefault.SwitchPreference" parent="Preference.Holo.SwitchPreference">
-
-    </style>
+    <style name="Preference.DeviceDefault" parent="Preference.Quantum"/>
+    <style name="Preference.DeviceDefault.Category" parent="Preference.Quantum.Category"/>
+    <style name="Preference.DeviceDefault.CheckBoxPreference" parent="Preference.Quantum.CheckBoxPreference"/>
+    <style name="Preference.DeviceDefault.DialogPreference" parent="Preference.Quantum.DialogPreference"/>
+    <style name="Preference.DeviceDefault.DialogPreference.EditTextPreference" parent="Preference.Quantum.DialogPreference.EditTextPreference"/>
+    <style name="Preference.DeviceDefault.DialogPreference.YesNoPreference" parent="Preference.Quantum.DialogPreference.YesNoPreference"/>
+    <style name="Preference.DeviceDefault.Information" parent="Preference.Quantum.Information"/>
+    <style name="Preference.DeviceDefault.PreferenceScreen" parent="Preference.Quantum.PreferenceScreen"/>
+    <style name="Preference.DeviceDefault.RingtonePreference" parent="Preference.Quantum.RingtonePreference"/>
+    <style name="Preference.DeviceDefault.SwitchPreference" parent="Preference.Quantum.SwitchPreference"/>
 
 
     <!-- AlertDialog Styles -->
-    <style name="AlertDialog.DeviceDefault" parent="AlertDialog.Holo">
-
-    </style>
-    <style name="AlertDialog.DeviceDefault.Light" parent="AlertDialog.Holo.Light" >
-
-    </style>
+    <style name="AlertDialog.DeviceDefault" parent="AlertDialog.Quantum"/>
+    <style name="AlertDialog.DeviceDefault.Light" parent="AlertDialog.Quantum.Light"/>
 
     <!-- Animation Styles -->
-    <style name="Animation.DeviceDefault.Activity" parent="Animation.Holo.Activity">
-
-    </style>
-    <style name="Animation.DeviceDefault.Dialog" parent="Animation.Holo.Dialog">
-
-    </style>
+    <style name="Animation.DeviceDefault.Activity" parent="Animation.Quantum.Activity"/>
+    <style name="Animation.DeviceDefault.Dialog" parent="Animation.Quantum.Dialog"/>
 
 
     <!-- DialogWindowTitle Styles -->
-    <style name="DialogWindowTitle.DeviceDefault" parent="DialogWindowTitle.Holo">
-
-    </style>
-    <style name="DialogWindowTitle.DeviceDefault.Light" parent="DialogWindowTitle.Holo.Light">
-
-    </style>
+    <style name="DialogWindowTitle.DeviceDefault" parent="DialogWindowTitle.Quantum"/>
+    <style name="DialogWindowTitle.DeviceDefault.Light" parent="DialogWindowTitle.Quantum.Light"/>
 
 
     <!-- WindowTitle Styles -->
-    <style name="WindowTitle.DeviceDefault" parent="WindowTitle.Holo">
-
-    </style>
-    <style name="WindowTitleBackground.DeviceDefault" parent="WindowTitleBackground.Holo">
-
-    </style>
+    <style name="WindowTitle.DeviceDefault" parent="WindowTitle.Quantum"/>
+    <style name="WindowTitleBackground.DeviceDefault" parent="WindowTitleBackground.Quantum"/>
 
 
     <!-- Other Styles -->
-    <style name="DeviceDefault.ButtonBar" parent="Holo.ButtonBar" >
+    <style name="DeviceDefault.ButtonBar" parent="Quantum.ButtonBar"/>
+    <style name="DeviceDefault.ButtonBar.AlertDialog" parent="Quantum.ButtonBar.AlertDialog"/>
+    <style name="DeviceDefault.SegmentedButton" parent="Quantum.SegmentedButton"/>
+    <style name="DeviceDefault.Light.ButtonBar" parent="Quantum.Light.ButtonBar"/>
+    <style name="DeviceDefault.Light.ButtonBar.AlertDialog" parent="Quantum.Light.ButtonBar.AlertDialog"/>
+    <style name="DeviceDefault.Light.SegmentedButton" parent="Quantum.Light.SegmentedButton"/>
 
-    </style>
-    <style name="DeviceDefault.ButtonBar.AlertDialog" parent="Holo.ButtonBar.AlertDialog" >
+    <style name="Widget.DeviceDefault.MediaRouteButton" parent="Widget.Quantum.MediaRouteButton" />
+    <style name="Widget.DeviceDefault.Light.MediaRouteButton" parent="Widget.Quantum.Light.MediaRouteButton" />
 
-    </style>
-    <style name="DeviceDefault.SegmentedButton" parent="Holo.SegmentedButton" >
-
-    </style>
-    <style name="DeviceDefault.Light.ButtonBar" parent="Holo.Light.ButtonBar" >
-
-    </style>
-    <style name="DeviceDefault.Light.ButtonBar.AlertDialog" parent="Holo.Light.ButtonBar.AlertDialog" >
-
-    </style>
-    <style name="DeviceDefault.Light.SegmentedButton" parent="Holo.Light.SegmentedButton" >
-
-    </style>
-
-    <style name="Widget.DeviceDefault.MediaRouteButton" parent="Widget.Holo.MediaRouteButton" />
-    <style name="Widget.DeviceDefault.Light.MediaRouteButton" parent="Widget.Holo.Light.MediaRouteButton" />
-
-    <style name="TextAppearance.DeviceDefault.TimePicker.TimeLabel" parent="TextAppearance.Holo.TimePicker.TimeLabel">
-    </style>
-
-    <style name="TextAppearance.DeviceDefault.Light.TimePicker.TimeLabel" parent="TextAppearance.Holo.Light.TimePicker.TimeLabel">
-    </style>
-
-    <style name="TextAppearance.DeviceDefault.TimePicker.AmPmLabel" parent="TextAppearance.Holo.TimePicker.AmPmLabel">
-    </style>
-
-    <style name="TextAppearance.DeviceDefault.Light.TimePicker.AmPmLabel" parent="TextAppearance.Holo.Light.TimePicker.AmPmLabel">
-    </style>
-
-    <style name="Theme.DeviceDefault.Dialog.TimePicker" parent="Theme.Holo.Dialog.TimePicker">
-    </style>
-
-    <style name="Theme.DeviceDefault.Light.Dialog.TimePicker" parent="Theme.Holo.Light.Dialog.TimePicker">
-    </style>
-
+    <style name="TextAppearance.DeviceDefault.TimePicker.TimeLabel" parent="TextAppearance.Quantum.TimePicker.TimeLabel"/>
+    <style name="TextAppearance.DeviceDefault.Light.TimePicker.TimeLabel" parent="TextAppearance.Quantum.Light.TimePicker.TimeLabel"/>
+    <style name="TextAppearance.DeviceDefault.TimePicker.AmPmLabel" parent="TextAppearance.Quantum.TimePicker.AmPmLabel"/>
+    <style name="TextAppearance.DeviceDefault.Light.TimePicker.AmPmLabel" parent="TextAppearance.Quantum.Light.TimePicker.AmPmLabel"/>
+    <style name="Theme.DeviceDefault.Dialog.TimePicker" parent="Theme.Quantum.Dialog.TimePicker"/>
+    <style name="Theme.DeviceDefault.Light.Dialog.TimePicker" parent="Theme.Quantum.Light.Dialog.TimePicker"/>
 </resources>
diff --git a/core/res/res/values/styles_micro.xml b/core/res/res/values/styles_micro.xml
new file mode 100644
index 0000000..2fd283e
--- /dev/null
+++ b/core/res/res/values/styles_micro.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <style name="Widget.Micro" parent="Widget.Holo" />
+
+    <style name="Widget.Micro.TextView">
+        <item name="android:fontFamily">sans-serif-condensed</item>
+    </style>
+</resources>
diff --git a/core/res/res/values/styles_quantum.xml b/core/res/res/values/styles_quantum.xml
new file mode 100644
index 0000000..cbf11cf
--- /dev/null
+++ b/core/res/res/values/styles_quantum.xml
@@ -0,0 +1,1242 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!--
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Quantum themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see styles_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+ -->
+<resources>
+    <!-- Preference styles -->
+    <eat-comment />
+
+    <style name="Preference.Quantum">
+        <item name="android:layout">@android:layout/preference_holo</item>
+    </style>
+
+    <style name="PreferenceFragment.Quantum">
+        <item name="android:paddingStart">@dimen/preference_fragment_padding_side</item>
+        <item name="android:paddingEnd">@dimen/preference_fragment_padding_side</item>
+    </style>
+
+    <style name="Preference.Quantum.Information">
+        <item name="android:layout">@android:layout/preference_information_holo</item>
+        <item name="android:enabled">false</item>
+        <item name="android:shouldDisableView">false</item>
+    </style>
+
+    <style name="Preference.Quantum.Category">
+        <item name="android:layout">@android:layout/preference_category_holo</item>
+        <!-- The title should not dim if the category is disabled, instead only the preference children should dim. -->
+        <item name="android:shouldDisableView">false</item>
+        <item name="android:selectable">false</item>
+    </style>
+
+    <style name="Preference.Quantum.CheckBoxPreference">
+        <item name="android:widgetLayout">@android:layout/preference_widget_checkbox</item>
+    </style>
+
+    <style name="Preference.Quantum.SwitchPreference">
+        <item name="android:widgetLayout">@android:layout/preference_widget_switch</item>
+        <item name="android:switchTextOn">@android:string/capital_on</item>
+        <item name="android:switchTextOff">@android:string/capital_off</item>
+    </style>
+
+    <style name="Preference.Quantum.PreferenceScreen"/>
+
+    <style name="Preference.Quantum.DialogPreference">
+        <item name="android:positiveButtonText">@android:string/ok</item>
+        <item name="android:negativeButtonText">@android:string/cancel</item>
+    </style>
+
+    <style name="Preference.Quantum.DialogPreference.YesNoPreference">
+        <item name="android:positiveButtonText">@android:string/yes</item>
+        <item name="android:negativeButtonText">@android:string/no</item>
+    </style>
+
+    <style name="Preference.Quantum.DialogPreference.EditTextPreference">
+        <item name="android:dialogLayout">@android:layout/preference_dialog_edittext</item>
+    </style>
+
+    <style name="Preference.Quantum.RingtonePreference">
+        <item name="android:ringtoneType">ringtone</item>
+        <item name="android:showSilent">true</item>
+        <item name="android:showDefault">true</item>
+    </style>
+
+    <!-- Begin Quantum theme styles -->
+
+    <!-- Text Styles -->
+    <style name="TextAppearance.Quantum" parent="TextAppearance"/>
+
+    <style name="TextAppearance.Quantum.Inverse" parent="TextAppearance.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Large" parent="TextAppearance.Large"/>
+
+    <style name="TextAppearance.Quantum.Medium" parent="TextAppearance.Medium"/>
+
+    <style name="TextAppearance.Quantum.Small" parent="TextAppearance.Small"/>
+
+    <style name="TextAppearance.Quantum.Large.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Medium.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Small.Inverse">
+        <item name="android:textColor">?textColorSecondaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.SearchResult">
+        <item name="android:textStyle">normal</item>
+        <item name="android:textColor">?textColorPrimary</item>
+        <item name="android:textColorHint">?textColorHint</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.SearchResult.Title">
+         <item name="android:textSize">18sp</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.SearchResult.Subtitle">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">?textColorSecondary</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget" parent="TextAppearance.Widget"/>
+
+    <style name="TextAppearance.Quantum.Widget.Button" parent="TextAppearance.Quantum.Small.Inverse">
+        <item name="android:textColor">@android:color/primary_text_light_nodisable</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.IconMenu.Item" parent="TextAppearance.Quantum.Small">
+        <item name="android:textColor">?textColorPrimary</item>
+    </style>
+
+    <!-- This style is for smaller screens; values-xlarge defines a version
+         for larger screens. -->
+    <style name="TextAppearance.Quantum.Widget.TabWidget">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">normal</item>
+        <item name="android:textColor">@android:color/tab_indicator_text</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.TextView">
+        <item name="android:textColor">?textColorPrimaryDisableOnly</item>
+        <item name="android:textColorHint">?textColorHint</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.TextView.PopupMenu">
+        <item name="android:textSize">18sp</item>
+        <item name="android:textColor">?textColorPrimaryDisableOnly</item>
+        <item name="android:textColorHint">?textColorHint</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.DropDownHint">
+        <item name="android:textColor">?textColorPrimary</item>
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.DropDownItem">
+        <item name="android:textColor">?textColorPrimaryDisableOnly</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.TextView.SpinnerItem">
+        <item name="android:textColor">?textColorPrimaryDisableOnly</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.EditText">
+        <item name="android:textColor">@android:color/bright_foreground_light</item>
+        <item name="android:textColorHint">@android:color/hint_foreground_holo_light</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.PopupMenu" parent="TextAppearance.Widget.PopupMenu">
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.PopupMenu.Large">
+        <item name="android:textSize">18sp</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.PopupMenu.Small">
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionBar.Title"
+           parent="TextAppearance.Quantum.Medium">
+        <item name="android:textSize">@android:dimen/action_bar_title_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionBar.Subtitle"
+           parent="TextAppearance.Quantum.Small">
+        <item name="android:textSize">@android:dimen/action_bar_subtitle_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionBar.Title.Inverse"
+           parent="TextAppearance.Quantum.Medium.Inverse">
+        <item name="android:textSize">@android:dimen/action_bar_title_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionBar.Subtitle.Inverse"
+           parent="TextAppearance.Quantum.Small.Inverse">
+        <item name="android:textSize">@android:dimen/action_bar_subtitle_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionBar.Menu"
+           parent="TextAppearance.Quantum.Small">
+        <item name="android:textSize">12sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">?android:attr/actionMenuTextColor</item>
+        <item name="android:textAllCaps">@android:bool/config_actionMenuItemAllCaps</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionMode"/>
+
+    <style name="TextAppearance.Quantum.Widget.ActionMode.Title"
+           parent="TextAppearance.Quantum.Medium">
+        <item name="android:textSize">@android:dimen/action_bar_title_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionMode.Subtitle"
+           parent="TextAppearance.Quantum.Small">
+        <item name="android:textSize">@android:dimen/action_bar_subtitle_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionMode.Title.Inverse"
+           parent="TextAppearance.Quantum.Medium.Inverse">
+        <item name="android:textSize">@android:dimen/action_bar_title_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.ActionMode.Subtitle.Inverse"
+           parent="TextAppearance.Quantum.Small.Inverse">
+        <item name="android:textSize">@android:dimen/action_bar_subtitle_text_size</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Widget.Switch" parent="TextAppearance.Quantum.Small">
+        <!-- Switch thumb asset presents a dark background. -->
+        <item name="android:textColor">@android:color/secondary_text_holo_dark</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Widget.Switch" parent="TextAppearance.Quantum.Small">
+        <!-- Switch thumb asset presents a dark background. -->
+        <item name="android:textColor">@android:color/primary_text_holo_dark</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.WindowTitle">
+        <item name="android:textColor">#fff</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.DialogWindowTitle">
+        <item name="android:textSize">22sp</item>
+        <item name="android:textColor">@android:color/holo_blue_light</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.CalendarViewWeekDayView" parent="TextAppearance.Small.CalendarViewWeekDayView">
+        <item name="android:textColor">#505050</item>
+    </style>
+
+    <!-- Light text styles -->
+    <style name="TextAppearance.Quantum.Light" parent="TextAppearance.Quantum"/>
+
+    <style name="TextAppearance.Quantum.Light.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Large" parent="TextAppearance.Quantum.Large"/>
+
+    <style name="TextAppearance.Quantum.Light.Medium" parent="TextAppearance.Quantum.Medium"/>
+
+    <style name="TextAppearance.Quantum.Light.Small" parent="TextAppearance.Quantum.Small"/>
+
+    <style name="TextAppearance.Quantum.Light.Large.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Medium.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Small.Inverse">
+        <item name="android:textColor">?textColorPrimaryInverse</item>
+        <item name="android:textColorHint">?textColorHintInverse</item>
+        <item name="android:textColorHighlight">?textColorHighlightInverse</item>
+        <item name="android:textColorLink">?textColorLinkInverse</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.SearchResult" parent="TextAppearance.Quantum.SearchResult">
+        <item name="android:textColor">?textColorPrimary</item>
+        <item name="android:textColorHint">?textColorHint</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.SearchResult.Title">
+        <item name="android:textSize">18sp</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.SearchResult.Subtitle">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">?textColorSecondary</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Widget" parent="TextAppearance.Widget"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.Button"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.EditText">
+        <item name="android:textColor">@android:color/bright_foreground_dark</item>
+        <item name="android:textColorHint">@android:color/hint_foreground_holo_dark</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.Widget.PopupMenu" parent="TextAppearance.Quantum.Widget.PopupMenu"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.PopupMenu.Large" parent="TextAppearance.Quantum.Widget.PopupMenu.Large"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.PopupMenu.Small" parent="TextAppearance.Quantum.Widget.PopupMenu.Small"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.DropDownHint" parent="TextAppearance.Quantum.Widget.DropDownHint"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.ActionMode.Title" parent="TextAppearance.Widget.ActionMode.Title"/>
+
+    <style name="TextAppearance.Quantum.Light.Widget.ActionMode.Subtitle" parent="TextAppearance.Widget.ActionMode.Subtitle"/>
+
+    <style name="TextAppearance.Quantum.Light.WindowTitle">
+        <item name="android:textColor">#fff</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.DialogWindowTitle">
+        <item name="android:textSize">22sp</item>
+        <item name="android:textColor">@android:color/holo_blue_light</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.CalendarViewWeekDayView" parent="TextAppearance.Small.CalendarViewWeekDayView"/>
+
+    <!-- Widget Styles -->
+
+    <style name="Widget.Quantum" parent="Widget"/>
+
+    <style name="Quantum" />
+    <style name="Quantum.Light" />
+
+    <style name="Widget.Quantum.Button" parent="Widget.Button">
+        <item name="android:background">@android:drawable/btn_default_holo_dark</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
+        <item name="android:textColor">@android:color/primary_text_holo_dark</item>
+        <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">64dip</item>
+    </style>
+
+    <style name="Widget.Quantum.StackView">
+        <item name="android:resOutColor">@android:color/holo_blue_light</item>
+        <item name="android:clickColor">@android:color/holo_blue_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Button.Borderless">
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+        <item name="android:paddingStart">4dip</item>
+        <item name="android:paddingEnd">4dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Button.Borderless.Small">
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="Widget.Quantum.Button.Small">
+        <item name="android:background">@android:drawable/btn_default_holo_dark</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:textColor">@android:color/primary_text_holo_dark</item>
+        <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">48dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Button.Inset">
+        <item name="android:background">@android:drawable/button_inset</item>
+    </style>
+
+    <style name="Widget.Quantum.Button.Toggle">
+        <item name="android:background">@android:drawable/btn_toggle_holo_dark</item>
+        <item name="android:textOn">@android:string/capital_on</item>
+        <item name="android:textOff">@android:string/capital_off</item>
+        <item name="android:disabledAlpha">?android:attr/disabledAlpha</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:minHeight">48dip</item>
+    </style>
+
+    <style name="Quantum.ButtonBar" parent="ButtonBar">
+        <item name="android:paddingTop">0dip</item>
+        <item name="android:paddingStart">0dip</item>
+        <item name="android:paddingEnd">0dip</item>
+        <item name="android:paddingBottom">0dip</item>
+        <item name="divider">?android:attr/dividerVertical</item>
+        <item name="showDividers">middle</item>
+        <item name="dividerPadding">12dip</item>
+        <item name="background">@null</item>
+    </style>
+
+    <style name="Quantum.SegmentedButton" parent="SegmentedButton">
+        <item name="android:background">@android:drawable/btn_group_holo_dark</item>
+    </style>
+
+    <style name="Quantum.ButtonBar.AlertDialog">
+        <item name="android:background">@null</item>
+        <item name="android:dividerPadding">0dp</item>
+    </style>
+
+    <style name="Widget.Quantum.TextView" parent="Widget.TextView"/>
+
+    <style name="Widget.Quantum.CheckedTextView" parent="Widget.CheckedTextView"/>
+
+    <style name="Widget.Quantum.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
+        <item name="android:background">@android:drawable/list_section_divider_holo_dark</item>
+        <item name="android:textAllCaps">true</item>
+    </style>
+
+    <style name="Widget.Quantum.TextSelectHandle" parent="Widget.TextSelectHandle"/>
+
+    <style name="Widget.Quantum.TextSuggestionsPopupWindow" parent="Widget.TextSuggestionsPopupWindow"/>
+
+    <style name="Widget.Quantum.AbsListView" parent="Widget.AbsListView"/>
+
+    <style name="Widget.Quantum.AutoCompleteTextView" parent="Widget.AutoCompleteTextView">
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
+        <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.CompoundButton" parent="Widget.CompoundButton"/>
+
+    <style name="Widget.Quantum.CompoundButton.CheckBox" parent="Widget.CompoundButton.CheckBox"/>
+
+    <style name="Widget.Quantum.ListView.DropDown"/>
+
+    <style name="Widget.Quantum.EditText" parent="Widget.EditText"/>
+
+    <style name="Widget.Quantum.ExpandableListView" parent="Widget.Quantum.ListView">
+        <item name="android:groupIndicator">@android:drawable/expander_group_holo_dark</item>
+        <item name="android:indicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="android:indicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="android:childDivider">?android:attr/listDivider</item>
+    </style>
+
+    <style name="Widget.Quantum.ExpandableListView.White"/>
+
+    <style name="Widget.Quantum.FragmentBreadCrumbs" parent="Widget.FragmentBreadCrumbs"/>
+
+    <style name="Widget.Quantum.Gallery" parent="Widget.Gallery"/>
+
+    <style name="Widget.Quantum.GestureOverlayView" parent="Widget.GestureOverlayView"/>
+
+    <style name="Widget.Quantum.GridView" parent="Widget.GridView">
+        <item name="android:listSelector">?android:attr/selectableItemBackground</item>
+    </style>
+
+    <style name="Widget.Quantum.CalendarView" parent="Widget.CalendarView">
+        <item name="android:selectedWeekBackgroundColor">#330099FF</item>
+        <item name="android:focusedMonthDateColor">#FFFFFFFF</item>
+        <item name="android:unfocusedMonthDateColor">#66FFFFFF</item>
+        <item name="android:weekNumberColor">#33FFFFFF</item>
+        <item name="android:weekSeparatorLineColor">#19FFFFFF</item>
+        <item name="android:selectedDateVerticalBar">@android:drawable/day_picker_week_view_dayline_holo</item>
+        <item name="android:weekDayTextAppearance">@android:style/TextAppearance.Quantum.CalendarViewWeekDayView</item>
+    </style>
+
+    <style name="Widget.Quantum.ImageButton" parent="Widget.ImageButton">
+        <item name="android:background">@android:drawable/btn_default_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.NumberPicker" parent="Widget.NumberPicker">
+        <item name="android:internalLayout">@android:layout/number_picker_with_selector_wheel</item>
+        <item name="android:solidColor">@android:color/transparent</item>
+        <item name="android:selectionDivider">@android:drawable/numberpicker_selection_divider</item>
+        <item name="android:selectionDividerHeight">2dip</item>
+        <item name="android:selectionDividersDistance">48dip</item>
+        <item name="android:internalMinWidth">64dip</item>
+        <item name="android:internalMaxHeight">180dip</item>
+        <item name="virtualButtonPressedDrawable">?android:attr/selectableItemBackground</item>
+    </style>
+
+    <style name="Widget.Quantum.TimePicker" parent="Widget.TimePicker">
+        <item name="android:legacyLayout">@android:layout/time_picker_legacy_holo</item>
+        <item name="android:internalLayout">@android:layout/time_picker_holo</item>
+        <item name="android:disabledColor">@android:color/timepicker_default_disabled_color_holo_dark</item>
+        <item name="android:headerSelectedTextColor">@android:color/holo_blue_light</item>
+        <item name="android:headerUnselectedTextColor">@android:color/timepicker_default_text_color_holo_dark</item>
+        <item name="android:headerBackgroundColor">@android:color/timepicker_default_background_holo_dark</item>
+        <item name="android:numbersTextColor">@android:color/timepicker_default_text_color_holo_dark</item>
+        <item name="android:numbersBackgroundColor">@android:color/timepicker_default_background_holo_dark</item>
+        <item name="android:amPmTextColor">@android:color/timepicker_default_text_color_holo_dark</item>
+        <item name="android:amPmUnselectedBackgroundColor">@android:color/timepicker_default_background_holo_dark</item>
+        <item name="android:amPmSelectedBackgroundColor">@android:color/holo_blue_light</item>
+        <item name="android:numbersSelectorColor">@android:color/holo_blue_light</item>
+    </style>
+
+    <style name="Widget.Quantum.DatePicker" parent="Widget.DatePicker">
+        <item name="android:internalLayout">@android:layout/date_picker_holo</item>
+        <item name="android:calendarViewShown">true</item>
+    </style>
+
+    <style name="Widget.Quantum.ActivityChooserView" parent="Widget.ActivityChooserView"/>
+
+    <style name="Widget.Quantum.ImageWell" parent="Widget.ImageWell"/>
+
+    <style name="Widget.Quantum.ListView" parent="Widget.ListView">
+        <item name="android:divider">?android:attr/listDivider</item>
+        <item name="android:listSelector">?android:attr/listChoiceBackgroundIndicator</item>
+    </style>
+
+    <style name="Widget.Quantum.ListView.White"/>
+
+    <style name="Widget.Quantum.PopupWindow" parent="Widget.PopupWindow"/>
+
+    <style name="Widget.Quantum.PopupWindow.ActionMode">
+        <item name="android:popupBackground">@android:color/black</item>
+        <item name="android:popupAnimationStyle">@android:style/Animation.PopupWindow.ActionMode</item>
+    </style>
+
+    <style name="Widget.Quantum.ProgressBar" parent="Widget.ProgressBar">
+        <item name="android:indeterminateDrawable">@android:drawable/progress_medium_holo</item>
+    </style>
+
+    <style name="Widget.Quantum.ProgressBar.Horizontal" parent="Widget.ProgressBar.Horizontal">
+        <item name="android:progressDrawable">@android:drawable/progress_horizontal_holo_dark</item>
+        <item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal_holo</item>
+        <item name="android:minHeight">16dip</item>
+        <item name="android:maxHeight">16dip</item>
+    </style>
+
+    <style name="Widget.Quantum.ProgressBar.Small" parent="Widget.ProgressBar.Small">
+        <item name="android:indeterminateDrawable">@android:drawable/progress_small_holo</item>
+    </style>
+
+    <style name="Widget.Quantum.ProgressBar.Small.Title"/>
+
+    <style name="Widget.Quantum.ProgressBar.Large" parent="Widget.ProgressBar.Large">
+        <item name="android:indeterminateDrawable">@android:drawable/progress_large_holo</item>
+    </style>
+
+    <style name="Widget.Quantum.ProgressBar.Inverse"/>
+
+    <style name="Widget.Quantum.ProgressBar.Small.Inverse"/>
+
+    <style name="Widget.Quantum.ProgressBar.Large.Inverse"/>
+
+    <style name="Widget.Quantum.SeekBar">
+        <item name="android:indeterminateOnly">false</item>
+        <item name="android:progressDrawable">@android:drawable/scrubber_progress_horizontal_holo_dark</item>
+        <item name="android:indeterminateDrawable">@android:drawable/scrubber_progress_horizontal_holo_dark</item>
+        <item name="android:minHeight">13dip</item>
+        <item name="android:maxHeight">13dip</item>
+        <item name="android:thumb">@android:drawable/scrubber_control_selector_holo</item>
+        <item name="android:thumbOffset">16dip</item>
+        <item name="android:focusable">true</item>
+        <item name="android:paddingStart">16dip</item>
+        <item name="android:paddingEnd">16dip</item>
+        <item name="android:mirrorForRtl">true</item>
+    </style>
+
+    <style name="Widget.Quantum.RatingBar" parent="Widget.RatingBar">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_full_holo_dark</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_full_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.RatingBar.Indicator" parent="Widget.RatingBar.Indicator">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_holo_dark</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_holo_dark</item>
+        <item name="android:minHeight">35dip</item>
+        <item name="android:maxHeight">35dip</item>
+    </style>
+
+    <style name="Widget.Quantum.RatingBar.Small" parent="Widget.RatingBar.Small">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_small_holo_dark</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_small_holo_dark</item>
+        <item name="android:minHeight">16dip</item>
+        <item name="android:maxHeight">16dip</item>
+    </style>
+
+    <style name="Widget.Quantum.CompoundButton.RadioButton" parent="Widget.CompoundButton.RadioButton"/>
+
+    <style name="Widget.Quantum.ScrollView" parent="Widget.ScrollView"/>
+
+    <style name="Widget.Quantum.HorizontalScrollView" parent="Widget.HorizontalScrollView"/>
+
+    <style name="Widget.Quantum.Spinner" parent="Widget.Spinner.DropDown">
+        <item name="android:background">@android:drawable/spinner_background_holo_dark</item>
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
+        <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
+        <item name="android:dropDownVerticalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownWidth">wrap_content</item>
+        <item name="android:popupPromptView">@android:layout/simple_dropdown_hint</item>
+        <item name="android:gravity">start|center_vertical</item>
+        <item name="android:disableChildrenWhenDisabled">true</item>
+    </style>
+
+    <style name="Widget.Quantum.Spinner.DropDown"/>
+
+    <style name="Widget.Quantum.Spinner.DropDown.ActionBar">
+        <item name="android:background">@android:drawable/spinner_ab_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.CompoundButton.Star" parent="Widget.CompoundButton.Star">
+        <item name="android:button">@android:drawable/btn_star_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.TabWidget" parent="Widget.TabWidget">
+        <item name="android:tabStripLeft">@null</item>
+        <item name="android:tabStripRight">@null</item>
+        <item name="android:tabStripEnabled">false</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:showDividers">middle</item>
+        <item name="android:dividerPadding">8dip</item>
+        <item name="android:measureWithLargestChild">true</item>
+        <item name="android:tabLayout">@android:layout/tab_indicator_holo</item>
+    </style>
+
+    <style name="Widget.Quantum.Tab" parent="Widget.Quantum.ActionBar.TabView">
+        <item name="android:background">@android:drawable/tab_indicator_holo</item>
+        <item name="android:layout_width">0dip</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:minWidth">80dip</item>
+    </style>
+
+    <style name="Widget.Quantum.TabText" parent="Widget.Quantum.ActionBar.TabText">
+        <item name="android:maxWidth">180dip</item>
+    </style>
+
+    <style name="Widget.Quantum.WebTextView" parent="Widget.WebTextView"/>
+
+    <style name="Widget.Quantum.WebView" parent="Widget.WebView"/>
+
+    <style name="Widget.Quantum.DropDownItem" parent="Widget.DropDownItem">
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.Widget.DropDownItem</item>
+        <item name="android:paddingStart">8dp</item>
+        <item name="android:paddingEnd">8dp</item>
+    </style>
+
+    <style name="Widget.Quantum.DropDownItem.Spinner"/>
+
+    <style name="Widget.Quantum.TextView.SpinnerItem" parent="Widget.TextView.SpinnerItem">
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.Widget.TextView.SpinnerItem</item>
+        <item name="android:paddingStart">8dp</item>
+        <item name="android:paddingEnd">8dp</item>
+    </style>
+
+    <style name="Widget.Quantum.KeyboardView" parent="Widget.KeyboardView"/>
+
+    <style name="Widget.Quantum.QuickContactBadge.WindowSmall" parent="Widget.QuickContactBadge.WindowSmall"/>
+
+    <style name="Widget.Quantum.QuickContactBadge.WindowMedium" parent="Widget.QuickContactBadge.WindowMedium"/>
+
+    <style name="Widget.Quantum.QuickContactBadge.WindowLarge" parent="Widget.QuickContactBadge.WindowLarge"/>
+
+    <style name="Widget.Quantum.QuickContactBadgeSmall.WindowSmall" parent="Widget.QuickContactBadgeSmall.WindowSmall"/>
+
+    <style name="Widget.Quantum.QuickContactBadgeSmall.WindowMedium" parent="Widget.QuickContactBadgeSmall.WindowMedium"/>
+
+    <style name="Widget.Quantum.QuickContactBadgeSmall.WindowLarge" parent="Widget.QuickContactBadgeSmall.WindowLarge"/>
+
+    <style name="Widget.Quantum.ListPopupWindow" parent="Widget.ListPopupWindow">
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
+        <item name="android:popupBackground">@android:drawable/menu_panel_holo_dark</item>
+        <item name="android:dropDownVerticalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownWidth">wrap_content</item>
+    </style>
+
+    <style name="Widget.Quantum.PopupMenu" parent="Widget.Quantum.ListPopupWindow"/>
+
+    <style name="Widget.Quantum.ButtonBar">
+        <item name="android:divider">?android:attr/dividerVertical</item>
+    </style>
+
+    <style name="Widget.Quantum.ButtonBar.Button"/>
+
+    <style name="Widget.Quantum.ActionButton" parent="Widget.ActionButton">
+        <item name="android:minWidth">@android:dimen/action_button_min_width</item>
+        <item name="android:gravity">center</item>
+        <item name="android:paddingStart">12dip</item>
+        <item name="android:paddingEnd">12dip</item>
+        <item name="android:scaleType">center</item>
+        <item name="android:maxLines">2</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionButton.Overflow">
+        <item name="android:src">@android:drawable/ic_menu_moreoverflow_holo_dark</item>
+        <item name="android:background">?android:attr/actionBarItemBackground</item>
+        <item name="android:contentDescription">@string/action_menu_overflow_description</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionButton.TextButton" parent="Widget.Quantum.ButtonBar.Button"/>
+
+    <style name="Widget.Quantum.ActionBar.TabView" parent="Widget.ActionBar.TabView">
+        <item name="android:background">@drawable/tab_indicator_ab_holo</item>
+        <item name="android:paddingStart">16dip</item>
+        <item name="android:paddingEnd">16dip</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionBar.TabBar" parent="Widget.ActionBar.TabBar">
+        <item name="android:divider">?android:attr/actionBarDivider</item>
+        <item name="android:showDividers">middle</item>
+        <item name="android:dividerPadding">12dip</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionBar.TabText" parent="Widget.ActionBar.TabText">
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.Medium</item>
+        <item name="android:textColor">?android:attr/textColorPrimary</item>
+        <item name="android:textSize">12sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textAllCaps">true</item>
+        <item name="android:ellipsize">marquee</item>
+        <item name="android:maxLines">2</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionMode" parent="Widget.ActionMode">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Subtitle</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionButton.CloseMode">
+        <item name="android:background">@drawable/btn_cab_done_holo_dark</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionBar" parent="Widget.ActionBar">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Subtitle</item>
+        <item name="android:background">@android:drawable/ab_transparent_dark_holo</item>
+        <item name="android:backgroundStacked">@android:drawable/ab_stacked_transparent_dark_holo</item>
+        <item name="android:backgroundSplit">@android:drawable/ab_bottom_transparent_dark_holo</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:progressBarStyle">@android:style/Widget.Quantum.ProgressBar.Horizontal</item>
+        <item name="android:indeterminateProgressStyle">@android:style/Widget.Quantum.ProgressBar</item>
+        <item name="android:progressBarPadding">32dip</item>
+        <item name="android:itemPadding">8dip</item>
+    </style>
+
+    <style name="Widget.Quantum.ActionBar.Solid">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Subtitle</item>
+        <item name="android:background">@android:drawable/ab_solid_dark_holo</item>
+        <item name="android:backgroundStacked">@android:drawable/ab_stacked_solid_dark_holo</item>
+        <item name="android:backgroundSplit">@android:drawable/ab_bottom_solid_dark_holo</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:progressBarStyle">@android:style/Widget.Quantum.ProgressBar.Horizontal</item>
+        <item name="android:indeterminateProgressStyle">@android:style/Widget.Quantum.ProgressBar</item>
+        <item name="android:progressBarPadding">32dip</item>
+        <item name="android:itemPadding">8dip</item>
+    </style>
+
+    <style name="Widget.Quantum.CompoundButton.Switch">
+        <item name="android:track">@android:drawable/switch_track_holo_dark</item>
+        <item name="android:thumb">@android:drawable/switch_inner_holo_dark</item>
+        <item name="android:switchTextAppearance">@android:style/TextAppearance.Quantum.Widget.Switch</item>
+        <item name="android:textOn">@android:string/capital_on</item>
+        <item name="android:textOff">@android:string/capital_off</item>
+        <item name="android:thumbTextPadding">12dip</item>
+        <item name="android:switchMinWidth">96dip</item>
+        <item name="android:switchPadding">16dip</item>
+    </style>
+
+    <!-- Light widget styles -->
+
+    <style name="Widget.Quantum.Light"/>
+
+    <style name="Widget.Quantum.Light.Button" parent="Widget.Button">
+        <item name="android:background">@android:drawable/btn_default_holo_light</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceMediumInverse</item>
+        <item name="android:textColor">@android:color/primary_text_holo_light</item>
+        <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">64dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.Button.Borderless">
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+        <item name="android:paddingStart">4dip</item>
+        <item name="android:paddingEnd">4dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.Button.Borderless.Small">
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.Button.Small">
+        <item name="android:background">@android:drawable/btn_default_holo_light</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:textColor">@android:color/primary_text_holo_light</item>
+        <item name="android:minHeight">48dip</item>
+        <item name="android:minWidth">48dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.Button.Inset"/>
+
+    <style name="Widget.Quantum.Light.Button.Toggle">
+        <item name="android:background">@android:drawable/btn_toggle_holo_light</item>
+        <item name="android:textOn">@android:string/capital_on</item>
+        <item name="android:textOff">@android:string/capital_off</item>
+        <item name="android:disabledAlpha">?android:attr/disabledAlpha</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:minHeight">48dip</item>
+    </style>
+
+    <style name="Quantum.Light.ButtonBar" parent="Quantum.ButtonBar"/>
+
+    <style name="Quantum.Light.ButtonBar.AlertDialog">
+        <item name="android:background">@null</item>
+        <item name="android:dividerPadding">0dp</item>
+    </style>
+
+    <style name="Quantum.Light.SegmentedButton" parent="SegmentedButton">
+        <item name="android:background">@android:drawable/btn_group_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.TextView" parent="Widget.TextView"/>
+
+    <style name="Widget.Quantum.Light.CheckedTextView" parent="Widget.CheckedTextView"/>
+
+    <style name="Widget.Quantum.Light.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
+        <item name="android:background">@android:drawable/list_section_divider_holo_light</item>
+        <item name="android:textAllCaps">true</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.TextSelectHandle" parent="Widget.TextSelectHandle"/>
+
+   <style name="Widget.Quantum.Light.TextSuggestionsPopupWindow" parent="Widget.TextSuggestionsPopupWindow"/>
+
+    <style name="Widget.Quantum.Light.AbsListView" parent="Widget.AbsListView"/>
+
+    <style name="Widget.Quantum.Light.AutoCompleteTextView" parent="Widget.AutoCompleteTextView">
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_light</item>
+        <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.CompoundButton.CheckBox" parent="Widget.CompoundButton.CheckBox"/>
+
+    <style name="Widget.Quantum.Light.ListView.DropDown"/>
+
+    <style name="Widget.Quantum.Light.EditText" parent="Widget.Quantum.EditText"/>
+
+    <style name="Widget.Quantum.Light.ExpandableListView" parent="Widget.Quantum.Light.ListView">
+        <item name="android:groupIndicator">@android:drawable/expander_group_holo_light</item>
+        <item name="android:indicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="android:indicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="android:childDivider">?android:attr/listDivider</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ExpandableListView.White"/>
+
+    <style name="Widget.Quantum.Light.FragmentBreadCrumbs" parent="Widget.FragmentBreadCrumbs"/>
+
+    <style name="Widget.Quantum.Light.Gallery" parent="Widget.Gallery"/>
+
+    <style name="Widget.Quantum.Light.GestureOverlayView" parent="Widget.GestureOverlayView"/>
+
+    <style name="Widget.Quantum.Light.GridView" parent="Widget.Quantum.GridView"/>
+
+    <style name="Widget.Quantum.Light.ImageButton" parent="Widget.Quantum.ImageButton">
+        <item name="android:background">@android:drawable/btn_default_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.CalendarView" parent="Widget.CalendarView">
+        <item name="android:selectedWeekBackgroundColor">#330066ff</item>
+        <item name="android:focusedMonthDateColor">#FF000000</item>
+        <item name="android:unfocusedMonthDateColor">#7F08002B</item>
+        <item name="android:weekNumberColor">#7F080021</item>
+        <item name="android:weekSeparatorLineColor">#7F08002A</item>
+        <item name="android:weekDayTextAppearance">@android:style/TextAppearance.Quantum.Light.CalendarViewWeekDayView</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.NumberPicker" parent="Widget.Quantum.NumberPicker"/>
+
+    <style name="Widget.Quantum.Light.TimePicker" parent="Widget.TimePicker">
+        <item name="android:legacyLayout">@android:layout/time_picker_legacy_holo</item>
+        <item name="android:internalLayout">@android:layout/time_picker_holo</item>
+        <item name="android:disabledColor">@android:color/timepicker_default_disabled_color_holo_light</item>
+        <item name="android:headerSelectedTextColor">@android:color/holo_blue_light</item>
+        <item name="android:headerUnselectedTextColor">@android:color/timepicker_default_text_color_holo_light</item>
+        <item name="android:headerBackgroundColor">@android:color/timepicker_default_background_holo_light</item>
+        <item name="android:numbersTextColor">@android:color/timepicker_default_text_color_holo_light</item>
+        <item name="android:numbersBackgroundColor">@android:color/timepicker_default_background_holo_light</item>
+        <item name="android:amPmTextColor">@android:color/timepicker_default_text_color_holo_light</item>
+        <item name="android:amPmUnselectedBackgroundColor">@android:color/timepicker_default_background_holo_light</item>
+        <item name="android:amPmSelectedBackgroundColor">@android:color/holo_blue_light</item>
+        <item name="android:numbersSelectorColor">@android:color/holo_blue_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.DatePicker" parent="Widget.Quantum.DatePicker"/>
+
+    <style name="Widget.Quantum.Light.ActivityChooserView" parent="Widget.Quantum.ActivityChooserView">
+        <item name="android:background">@android:drawable/ab_share_pack_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ImageWell" parent="Widget.ImageWell"/>
+
+    <style name="Widget.Quantum.Light.ListView" parent="Widget.Quantum.ListView"/>
+
+    <style name="Widget.Quantum.Light.ListView.White"/>
+
+    <style name="Widget.Quantum.Light.PopupWindow" parent="Widget.PopupWindow"/>
+
+    <style name="Widget.Quantum.Light.PopupWindow.ActionMode">
+        <item name="android:popupBackground">@android:color/white</item>
+        <item name="android:popupAnimationStyle">@android:style/Animation.PopupWindow.ActionMode</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ProgressBar" parent="Widget.Quantum.ProgressBar"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Horizontal" parent="Widget.Quantum.ProgressBar.Horizontal">
+        <item name="android:progressDrawable">@android:drawable/progress_horizontal_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Small" parent="Widget.Quantum.ProgressBar.Small"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Small.Title" parent="Widget.Quantum.ProgressBar.Small.Title"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Large" parent="Widget.Quantum.ProgressBar.Large"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Inverse" parent="Widget.Quantum.ProgressBar.Inverse"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Small.Inverse" parent="Widget.Quantum.ProgressBar.Small.Inverse"/>
+
+    <style name="Widget.Quantum.Light.ProgressBar.Large.Inverse" parent="Widget.Quantum.ProgressBar.Large.Inverse"/>
+
+    <style name="Widget.Quantum.Light.SeekBar" parent="Widget.Quantum.SeekBar">
+        <item name="android:progressDrawable">@android:drawable/scrubber_progress_horizontal_holo_light</item>
+        <item name="android:indeterminateDrawable">@android:drawable/scrubber_progress_horizontal_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.RatingBar" parent="Widget.RatingBar">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_full_holo_light</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_full_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.RatingBar.Indicator" parent="Widget.RatingBar.Indicator">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_holo_light</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_holo_light</item>
+        <item name="android:minHeight">35dip</item>
+        <item name="android:maxHeight">35dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.RatingBar.Small" parent="Widget.RatingBar.Small">
+        <item name="android:progressDrawable">@android:drawable/ratingbar_small_holo_light</item>
+        <item name="android:indeterminateDrawable">@android:drawable/ratingbar_small_holo_light</item>
+        <item name="android:minHeight">16dip</item>
+        <item name="android:maxHeight">16dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.CompoundButton.RadioButton" parent="Widget.CompoundButton.RadioButton"/>
+
+    <style name="Widget.Quantum.Light.ScrollView" parent="Widget.ScrollView"/>
+
+    <style name="Widget.Quantum.Light.HorizontalScrollView" parent="Widget.HorizontalScrollView"/>
+
+    <style name="Widget.Quantum.Light.Spinner" parent="Widget.Quantum.Spinner">
+        <item name="android:background">@android:drawable/spinner_background_holo_light</item>
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_light</item>
+        <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
+        <item name="android:dropDownVerticalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownWidth">wrap_content</item>
+        <item name="android:popupPromptView">@android:layout/simple_dropdown_hint</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.Spinner.DropDown"/>
+
+    <style name="Widget.Quantum.Light.Spinner.DropDown.ActionBar">
+        <item name="android:background">@android:drawable/spinner_ab_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.CompoundButton.Star" parent="Widget.CompoundButton.Star">
+        <item name="android:button">@android:drawable/btn_star_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.TabWidget" parent="Widget.Quantum.TabWidget"/>
+
+    <style name="Widget.Quantum.Light.WebTextView" parent="Widget.WebTextView"/>
+
+    <style name="Widget.Quantum.Light.WebView" parent="Widget.WebView"/>
+
+    <style name="Widget.Quantum.Light.DropDownItem" parent="Widget.Quantum.DropDownItem"/>
+
+    <style name="Widget.Quantum.Light.DropDownItem.Spinner"/>
+
+    <style name="Widget.Quantum.Light.TextView.SpinnerItem" parent="Widget.Quantum.TextView.SpinnerItem"/>
+
+    <style name="Widget.Quantum.Light.KeyboardView" parent="Widget.KeyboardView"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadge.WindowSmall" parent="Widget.QuickContactBadge.WindowSmall"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadge.WindowMedium" parent="Widget.QuickContactBadge.WindowMedium"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadge.WindowLarge" parent="Widget.QuickContactBadge.WindowLarge"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadgeSmall.WindowSmall" parent="Widget.QuickContactBadgeSmall.WindowSmall"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadgeSmall.WindowMedium" parent="Widget.QuickContactBadgeSmall.WindowMedium"/>
+
+    <style name="Widget.Quantum.Light.QuickContactBadgeSmall.WindowLarge" parent="Widget.QuickContactBadgeSmall.WindowLarge"/>
+
+    <style name="Widget.Quantum.Light.ListPopupWindow" parent="Widget.ListPopupWindow">
+        <item name="android:dropDownSelector">@android:drawable/list_selector_holo_light</item>
+        <item name="android:popupBackground">@android:drawable/menu_panel_holo_light</item>
+        <item name="android:dropDownVerticalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownWidth">wrap_content</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.PopupMenu" parent="Widget.Quantum.Light.ListPopupWindow"/>
+
+    <style name="Widget.Quantum.Light.ActionButton" parent="Widget.Quantum.ActionButton"/>
+
+    <style name="Widget.Quantum.Light.ActionButton.Overflow">
+        <item name="android:src">@android:drawable/ic_menu_moreoverflow_holo_light</item>
+        <item name="android:contentDescription">@string/action_menu_overflow_description</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabView" parent="Widget.Quantum.ActionBar.TabView"/>
+
+    <style name="Widget.Quantum.Light.Tab" parent="Widget.Quantum.Light.ActionBar.TabView">
+        <item name="android:background">@android:drawable/tab_indicator_holo</item>
+        <item name="android:layout_width">0dip</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:minWidth">80dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabBar" parent="Widget.Quantum.ActionBar.TabBar"/>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabText" parent="Widget.Quantum.ActionBar.TabText"/>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabView.Inverse"/>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabBar.Inverse"/>
+
+    <style name="Widget.Quantum.Light.ActionBar.TabText.Inverse">
+        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionMode" parent="Widget.Quantum.ActionMode">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Subtitle</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionMode.Inverse" parent="Widget.ActionMode">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Title.Inverse</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionMode.Subtitle.Inverse</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionButton.CloseMode">
+        <item name="android:background">@drawable/btn_cab_done_holo_light</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionBar" parent="Widget.Quantum.ActionBar">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Subtitle</item>
+        <item name="android:background">@android:drawable/ab_transparent_light_holo</item>
+        <item name="android:backgroundStacked">@android:drawable/ab_stacked_transparent_light_holo</item>
+        <item name="android:backgroundSplit">@android:drawable/ab_bottom_transparent_light_holo</item>
+        <item name="android:homeAsUpIndicator">@android:drawable/ic_ab_back_holo_light</item>
+        <item name="android:progressBarStyle">@android:style/Widget.Quantum.Light.ProgressBar.Horizontal</item>
+        <item name="android:indeterminateProgressStyle">@android:style/Widget.Quantum.Light.ProgressBar</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionBar.Solid">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Title</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Subtitle</item>
+        <item name="android:background">@android:drawable/ab_solid_light_holo</item>
+        <item name="android:backgroundStacked">@android:drawable/ab_stacked_solid_light_holo</item>
+        <item name="android:backgroundSplit">@android:drawable/ab_bottom_solid_light_holo</item>
+        <item name="android:divider">?android:attr/dividerVertical</item>
+        <item name="android:progressBarStyle">@android:style/Widget.Quantum.Light.ProgressBar.Horizontal</item>
+        <item name="android:indeterminateProgressStyle">@android:style/Widget.Quantum.Light.ProgressBar</item>
+        <item name="android:progressBarPadding">32dip</item>
+        <item name="android:itemPadding">8dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.ActionBar.Solid.Inverse">
+        <item name="android:titleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Title.Inverse</item>
+        <item name="android:subtitleTextStyle">@android:style/TextAppearance.Quantum.Widget.ActionBar.Subtitle.Inverse</item>
+        <item name="android:background">@android:drawable/ab_solid_dark_holo</item>
+        <item name="android:backgroundStacked">@android:drawable/ab_stacked_solid_dark_holo</item>
+        <item name="android:backgroundSplit">@android:drawable/ab_bottom_solid_inverse_holo</item>
+        <item name="android:divider">@android:drawable/list_divider_holo_dark</item>
+        <item name="android:progressBarStyle">@android:style/Widget.Quantum.ProgressBar.Horizontal</item>
+        <item name="android:indeterminateProgressStyle">@android:style/Widget.Quantum.ProgressBar</item>
+        <item name="android:progressBarPadding">32dip</item>
+        <item name="android:itemPadding">8dip</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.CompoundButton.Switch" parent="Widget.CompoundButton.Switch">
+        <item name="android:track">@android:drawable/switch_track_holo_light</item>
+        <item name="android:thumb">@android:drawable/switch_inner_holo_light</item>
+        <item name="android:switchTextAppearance">@android:style/TextAppearance.Quantum.Light.Widget.Switch</item>
+        <item name="android:textOn">@android:string/capital_on</item>
+        <item name="android:textOff">@android:string/capital_off</item>
+        <item name="android:thumbTextPadding">12dip</item>
+        <item name="android:switchMinWidth">96dip</item>
+        <item name="android:switchPadding">16dip</item>
+    </style>
+
+    <!-- Animation Styles -->
+
+    <style name="Animation.Quantum" parent="Animation"/>
+
+    <style name="Animation.Quantum.Activity" parent="Animation.Activity"/>
+
+    <style name="Animation.Quantum.Dialog" parent="Animation.Dialog"/>
+
+    <!-- Dialog styles -->
+
+    <style name="AlertDialog.Quantum" parent="AlertDialog">
+        <item name="fullDark">@android:drawable/dialog_full_holo_dark</item>
+        <item name="topDark">@android:drawable/dialog_top_holo_dark</item>
+        <item name="centerDark">@android:drawable/dialog_middle_holo_dark</item>
+        <item name="bottomDark">@android:drawable/dialog_bottom_holo_dark</item>
+        <item name="fullBright">@android:drawable/dialog_full_holo_dark</item>
+        <item name="topBright">@android:drawable/dialog_top_holo_dark</item>
+        <item name="centerBright">@android:drawable/dialog_middle_holo_dark</item>
+        <item name="bottomBright">@android:drawable/dialog_bottom_holo_dark</item>
+        <item name="bottomMedium">@android:drawable/dialog_bottom_holo_dark</item>
+        <item name="centerMedium">@android:drawable/dialog_middle_holo_dark</item>
+        <item name="layout">@android:layout/alert_dialog_holo</item>
+        <item name="listLayout">@android:layout/select_dialog_holo</item>
+        <item name="progressLayout">@android:layout/progress_dialog_holo</item>
+        <item name="horizontalProgressLayout">@android:layout/alert_dialog_progress_holo</item>
+        <item name="listItemLayout">@android:layout/select_dialog_item_holo</item>
+        <item name="multiChoiceItemLayout">@android:layout/select_dialog_multichoice_holo</item>
+        <item name="singleChoiceItemLayout">@android:layout/select_dialog_singlechoice_holo</item>
+    </style>
+
+    <style name="AlertDialog.Quantum.Light">
+        <item name="fullDark">@android:drawable/dialog_full_holo_light</item>
+        <item name="topDark">@android:drawable/dialog_top_holo_light</item>
+        <item name="centerDark">@android:drawable/dialog_middle_holo_light</item>
+        <item name="bottomDark">@android:drawable/dialog_bottom_holo_light</item>
+        <item name="fullBright">@android:drawable/dialog_full_holo_light</item>
+        <item name="topBright">@android:drawable/dialog_top_holo_light</item>
+        <item name="centerBright">@android:drawable/dialog_middle_holo_light</item>
+        <item name="bottomBright">@android:drawable/dialog_bottom_holo_light</item>
+        <item name="bottomMedium">@android:drawable/dialog_bottom_holo_light</item>
+        <item name="centerMedium">@android:drawable/dialog_middle_holo_light</item>
+    </style>
+
+    <!-- Window title -->
+    <style name="WindowTitleBackground.Quantum">
+        <item name="android:background">@null</item>
+    </style>
+
+    <style name="WindowTitle.Quantum">
+        <item name="android:singleLine">true</item>
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.WindowTitle</item>
+        <item name="android:shadowColor">#BB000000</item>
+        <item name="android:shadowRadius">2.75</item>
+    </style>
+
+    <style name="DialogWindowTitle.Quantum">
+        <item name="android:maxLines">1</item>
+        <item name="android:scrollHorizontally">true</item>
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.DialogWindowTitle</item>
+    </style>
+
+    <style name="DialogWindowTitle.Quantum.Light">
+        <item name="android:maxLines">1</item>
+        <item name="android:scrollHorizontally">true</item>
+        <item name="android:textAppearance">@style/TextAppearance.Quantum.Light.DialogWindowTitle</item>
+    </style>
+
+    <style name="Widget.Quantum.PreferenceFrameLayout">
+        <item name="android:borderTop">0dip</item>
+        <item name="android:borderBottom">@dimen/preference_fragment_padding_bottom</item>
+        <item name="android:borderLeft">?attr/preferenceFragmentPaddingSide</item>
+        <item name="android:borderRight">?attr/preferenceFragmentPaddingSide</item>
+    </style>
+
+    <style name="Widget.Quantum.MediaRouteButton">
+        <item name="android:background">?android:attr/selectableItemBackground</item>
+        <item name="android:externalRouteEnabledDrawable">@drawable/ic_media_route_holo_dark</item>
+        <item name="android:minWidth">56dp</item>
+        <item name="android:minHeight">48dp</item>
+        <item name="android:focusable">true</item>
+        <item name="android:contentDescription">@android:string/media_route_button_content_description</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.MediaRouteButton" parent="Widget.Quantum.MediaRouteButton">
+        <item name="android:externalRouteEnabledDrawable">@drawable/ic_media_route_holo_light</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.TimePicker.TimeLabel" parent="TextAppearance.Quantum">
+        <item name="android:textSize">@dimen/timepicker_time_label_size</item>
+        <item name="android:textColor">@android:color/timepicker_default_text_color_holo_dark</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.TimePicker.AmPmLabel" parent="TextAppearance.Quantum">
+        <item name="android:textSize">@dimen/timepicker_ampm_label_size</item>
+        <item name="android:textAllCaps">true</item>
+        <item name="android:textColor">@android:color/timepicker_default_text_color_holo_dark</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.TimePicker.TimeLabel" parent="TextAppearance.Quantum.Light">
+        <item name="android:textSize">@dimen/timepicker_time_label_size</item>
+        <item name="android:textColor">@color/timepicker_default_text_color_holo_light</item>
+    </style>
+
+    <style name="TextAppearance.Quantum.Light.TimePicker.AmPmLabel" parent="TextAppearance.Quantum.Light">
+        <item name="android:textSize">@dimen/timepicker_ampm_label_size</item>
+        <item name="android:textAllCaps">true</item>
+        <item name="android:textColor">@color/timepicker_default_text_color_holo_light</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+
+    <style name="Widget.Quantum.FastScroll" parent="Widget.FastScroll">
+        <item name="android:thumbMinWidth">0dp</item>
+        <item name="android:thumbMinHeight">0dp</item>
+    </style>
+
+    <style name="Widget.Quantum.Light.FastScroll" parent="Widget.Quantum.FastScroll"/>
+
+</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 7197203..76fbded 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -1926,28 +1926,4 @@
         <item name="android:windowNoTitle">true</item>
     </style>
 
-    <!-- Default Quantum Paper theme. -->
-    <style name="Theme.Quantum" parent="@android:style/Theme.Holo.Light">
-        <item name="android:windowContentTransitions">true</item>
-        <item name="android:windowAnimationStyle">@android:style/Animation.Quantum.Activity</item>
-
-        <!-- Button styles -->
-        <item name="buttonStyle">@android:style/Widget.Quantum.Button</item>
-
-        <item name="buttonStyleSmall">@android:style/Widget.Quantum.Button.Small</item>
-        <item name="buttonStyleInset">@android:style/Widget.Quantum.Button.Inset</item>
-
-        <item name="selectableItemBackground">@android:drawable/item_background_quantum</item>
-        <item name="borderlessButtonStyle">@android:style/Widget.Quantum.Button.Borderless</item>
-
-        <!-- Widget styles -->
-        <item name="imageButtonStyle">@android:style/Widget.Quantum.ImageButton</item>
-    </style>
-
-    <!-- Variant of the Quantum Paper theme with no action bar. -->
-    <style name="Theme.Quantum.NoActionBar">
-        <item name="android:windowActionBar">false</item>
-        <item name="android:windowNoTitle">true</item>
-    </style>
-
 </resources>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 19556a1..8dac95c 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -32,24 +32,24 @@
  -->
 <resources>
 
-    <!-- The default theme for apps that target API level 14 and higher.
+    <!-- The default theme for apps that target API level 20 and higher.
          <p>The DeviceDefault themes are aliases for a specific device’s native look and feel. The
          DeviceDefault theme family and widget style family offer ways for you to target your app
          to a device’s native theme with all device customizations intact.</p>
-         <p>For example, when you set your app's {@code targetSdkVersion} to 14 or higher, this
+         <p>For example, when you set your app's {@code targetSdkVersion} to 20 or higher, this
          theme is applied to your application by default. As such, your app might appear with the
-         {@link #Theme_Holo Holo} styles on one device, but with a different set of styles on
+         {@link #Theme_Quantum_Light Quantum.Light} styles on one device, but with a different set of styles on
          another device. This is great if you want your app to fit with the device's native look and
          feel. If, however, you prefer to keep your UI style the same across all devices, you should
-         apply a specific theme such as {@link #Theme_Holo Holo} or one of your own design. For more
-         information, read <a
-         href="http://android-developers.blogspot.com/2012/01/holo-everywhere.html">Holo
+         apply a specific theme such as {@link #Theme_Quantum_Light Quantum.Light} or one of your own design.
+         For more information, read <a
+         href="http://android-developers.blogspot.com/20XX/XX/quantum-everywhere.html">Quantum.Light
          Everywhere</a>.</p>
          <p>Styles used by the DeviceDefault theme are named using the convention
          Type.DeviceDefault.Etc (for example, {@code Widget.DeviceDefault.Button} and
          {@code TextAppearance.DeviceDefault.Widget.PopupMenu.Large}).</p>
           -->
-    <style name="Theme.DeviceDefault" parent="Theme.Holo" >
+    <style name="Theme.DeviceDefault" parent="Theme.Quantum" >
         <!-- Text styles -->
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault</item>
         <item name="textAppearanceInverse">@android:style/TextAppearance.DeviceDefault.Inverse</item>
@@ -210,29 +210,29 @@
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar -->
-    <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Holo.NoActionBar" >
+    <style name="Theme.DeviceDefault.NoActionBar" parent="Theme.Quantum.NoActionBar" >
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar.  This theme
          sets {@link android.R.attr#windowFullscreen} to true.  -->
-    <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Holo.NoActionBar.Fullscreen" >
+    <style name="Theme.DeviceDefault.NoActionBar.Fullscreen" parent="Theme.Quantum.NoActionBar.Fullscreen" >
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with no action bar and no status bar and
     extending in to overscan region.  This theme
     sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
     to true. -->
-    <style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Holo.NoActionBar.Overscan" >
+    <style name="Theme.DeviceDefault.NoActionBar.Overscan" parent="Theme.Quantum.NoActionBar.Overscan" >
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} that has no title bar and translucent
          system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
          {@link android.R.attr#windowTranslucentNavigation} to true. -->
-    <style name="Theme.DeviceDefault.NoActionBar.TranslucentDecor" parent="Theme.Holo.NoActionBar.TranslucentDecor" >
+    <style name="Theme.DeviceDefault.NoActionBar.TranslucentDecor" parent="Theme.Quantum.NoActionBar.TranslucentDecor" >
     </style>
 
     <!-- Variant of {@link #Theme_DeviceDefault} with a light-colored style -->
-    <style name="Theme.DeviceDefault.Light" parent="Theme.Holo.Light" >
+    <style name="Theme.DeviceDefault.Light" parent="Theme.Quantum.Light" >
         <!-- Text styles -->
         <item name="textAppearance">@android:style/TextAppearance.DeviceDefault.Light</item>
         <item name="textAppearanceInverse">@android:style/TextAppearance.DeviceDefault.Light.Inverse</item>
@@ -387,29 +387,29 @@
         <item name="mediaRouteButtonStyle">@android:style/Widget.DeviceDefault.Light.MediaRouteButton</item>
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Holo.Light.NoActionBar" >
+    <style name="Theme.DeviceDefault.Light.NoActionBar" parent="Theme.Quantum.Light.NoActionBar" >
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar.
          This theme sets {@link android.R.attr#windowFullscreen} to true.  -->
-    <style name="Theme.DeviceDefault.Light.NoActionBar.Fullscreen" parent="Theme.Holo.Light.NoActionBar.Fullscreen" >
+    <style name="Theme.DeviceDefault.Light.NoActionBar.Fullscreen" parent="Theme.Quantum.Light.NoActionBar.Fullscreen" >
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light} with no action bar and no status bar
     and extending in to overscan region.  This theme
     sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
     to true. -->
     <style name="Theme.DeviceDefault.Light.NoActionBar.Overscan"
-           parent="Theme.Holo.Light.NoActionBar.Overscan" >
+           parent="Theme.Quantum.Light.NoActionBar.Overscan" >
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light} that has no title bar and translucent
          system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
          {@link android.R.attr#windowTranslucentNavigation} to true. -->
     <style name="Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor"
-           parent="Theme.Holo.Light.NoActionBar.TranslucentDecor" >
+           parent="Theme.Quantum.Light.NoActionBar.TranslucentDecor" >
     </style>
     <!-- DeviceDefault theme for dialog windows and activities. This changes the window to be
     floating (not fill the entire screen), and puts a frame around its contents. You can set this
     theme on an activity if you would like to make an activity that looks like a Dialog. -->
-    <style name="Theme.DeviceDefault.Dialog" parent="Theme.Holo.Dialog" >
+    <style name="Theme.DeviceDefault.Dialog" parent="Theme.Quantum.Dialog" >
         <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault</item>
         <item name="android:windowAnimationStyle">@android:style/Animation.DeviceDefault.Dialog</item>
 
@@ -421,16 +421,16 @@
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} that has a nice minimum width for a
     regular dialog. -->
-    <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Holo.Dialog.MinWidth" >
+    <style name="Theme.DeviceDefault.Dialog.MinWidth" parent="Theme.Quantum.Dialog.MinWidth" >
 
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog} without an action bar -->
-    <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Holo.Dialog.NoActionBar" >
+    <style name="Theme.DeviceDefault.Dialog.NoActionBar" parent="Theme.Quantum.Dialog.NoActionBar" >
 
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Dialog_NoActionBar} that has a nice minimum width
     for a regular dialog. -->
-    <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Holo.Dialog.NoActionBar.MinWidth" >
+    <style name="Theme.DeviceDefault.Dialog.NoActionBar.MinWidth" parent="Theme.Quantum.Dialog.NoActionBar.MinWidth" >
 
     </style>
 
@@ -453,7 +453,7 @@
     <!-- DeviceDefault light theme for dialog windows and activities. This changes the window to be
     floating (not fill the entire screen), and puts a frame around its contents. You can set this
     theme on an activity if you would like to make an activity that looks like a Dialog.-->
-    <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Holo.Light.Dialog" >
+    <style name="Theme.DeviceDefault.Light.Dialog" parent="Theme.Quantum.Light.Dialog" >
         <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault.Light</item>
         <item name="android:windowAnimationStyle">@android:style/Animation.DeviceDefault.Dialog</item>
 
@@ -465,16 +465,16 @@
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} that has a nice minimum width for a
     regular dialog. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.MinWidth" parent="Theme.Holo.Light.Dialog.MinWidth" >
+    <style name="Theme.DeviceDefault.Light.Dialog.MinWidth" parent="Theme.Quantum.Light.Dialog.MinWidth" >
 
     </style>
      <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog} without an action bar -->
-    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar" parent="Theme.Holo.Light.Dialog.NoActionBar" >
+    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar" parent="Theme.Quantum.Light.Dialog.NoActionBar" >
 
     </style>
     <!-- Variant of {@link #Theme_DeviceDefault_Light_Dialog_NoActionBar} that has a nice minimum
     width for a regular dialog. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar.MinWidth" parent="Theme.Holo.Light.Dialog.NoActionBar.MinWidth" >
+    <style name="Theme.DeviceDefault.Light.Dialog.NoActionBar.MinWidth" parent="Theme.Quantum.Light.Dialog.NoActionBar.MinWidth" >
 
     </style>
 
@@ -496,65 +496,65 @@
 
     <!-- DeviceDefault theme for a window that will be displayed either full-screen on smaller
     screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
-    <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Holo.DialogWhenLarge" >
+    <style name="Theme.DeviceDefault.DialogWhenLarge" parent="Theme.Quantum.DialogWhenLarge" >
 
     </style>
     <!-- DeviceDefault theme for a window without an action bar that will be displayed either
     full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
     xlarge). -->
-    <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Holo.DialogWhenLarge.NoActionBar" >
+    <style name="Theme.DeviceDefault.DialogWhenLarge.NoActionBar" parent="Theme.Quantum.DialogWhenLarge.NoActionBar" >
 
     </style>
     <!-- DeviceDefault light theme for a window that will be displayed either full-screen on smaller
     screens (small, normal) or as a dialog on larger screens (large, xlarge). -->
-    <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Holo.Light.DialogWhenLarge" >
+    <style name="Theme.DeviceDefault.Light.DialogWhenLarge" parent="Theme.Quantum.Light.DialogWhenLarge" >
 
     </style>
     <!-- DeviceDefault light theme for a window without an action bar that will be displayed either
     full-screen on smaller screens (small, normal) or as a dialog on larger screens (large,
     xlarge). -->
-    <style name="Theme.DeviceDefault.Light.DialogWhenLarge.NoActionBar" parent="Theme.Holo.Light.DialogWhenLarge.NoActionBar" >
+    <style name="Theme.DeviceDefault.Light.DialogWhenLarge.NoActionBar" parent="Theme.Quantum.Light.DialogWhenLarge.NoActionBar" >
 
     </style>
 
     <!-- DeviceDefault theme for a presentation window on a secondary display. -->
-    <style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Holo.Dialog.Presentation">
+    <style name="Theme.DeviceDefault.Dialog.Presentation" parent="Theme.Quantum.Dialog.Presentation">
     </style>
 
     <!-- DeviceDefault light theme for a presentation window on a secondary display. -->
-    <style name="Theme.DeviceDefault.Light.Dialog.Presentation" parent="Theme.Holo.Light.Dialog.Presentation">
+    <style name="Theme.DeviceDefault.Light.Dialog.Presentation" parent="Theme.Quantum.Light.Dialog.Presentation">
     </style>
 
     <!-- DeviceDefault theme for panel windows. This removes all extraneous window
     decorations, so you basically have an empty rectangle in which to place your content. It makes
     the window floating, with a transparent background, and turns off dimming behind the window. -->
-    <style name="Theme.DeviceDefault.Panel" parent="Theme.Holo.Panel" >
+    <style name="Theme.DeviceDefault.Panel" parent="Theme.Quantum.Panel" >
 
     </style>
     <!-- DeviceDefault light theme for panel windows. This removes all extraneous window
     decorations, so you basically have an empty rectangle in which to place your content. It makes
     the window floating, with a transparent background, and turns off dimming behind the window. -->
-    <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Holo.Light.Panel" >
+    <style name="Theme.DeviceDefault.Light.Panel" parent="Theme.Quantum.Light.Panel" >
 
     </style>
     <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
     behind them. -->
-    <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Holo.Wallpaper" >
+    <style name="Theme.DeviceDefault.Wallpaper" parent="Theme.Quantum.Wallpaper" >
 
     </style>
     <!-- DeviceDefault theme for windows that want to have the user's selected wallpaper appear
     behind them and without an action bar. -->
-    <style name="Theme.DeviceDefault.Wallpaper.NoTitleBar" parent="Theme.Holo.Wallpaper.NoTitleBar" >
+    <style name="Theme.DeviceDefault.Wallpaper.NoTitleBar" parent="Theme.Quantum.Wallpaper.NoTitleBar" >
 
     </style>
     <!-- DeviceDefault style for input methods, which is used by the
          {@link android.inputmethodservice.InputMethodService} class.-->
-    <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Holo.InputMethod" >
+    <style name="Theme.DeviceDefault.InputMethod" parent="Theme.Quantum.InputMethod" >
 
     </style>
     <!-- Variant of the DeviceDefault (light) theme that has a solid (opaque) action bar with an
     inverse color profile. -->
-    <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Holo.Light.DarkActionBar" >
+    <style name="Theme.DeviceDefault.Light.DarkActionBar" parent="Theme.Quantum.Light.DarkActionBar" >
         <item name="android:actionBarStyle">@android:style/Widget.DeviceDefault.Light.ActionBar.Solid.Inverse</item>
 
         <item name="actionDropDownStyle">@android:style/Widget.DeviceDefault.Spinner.DropDown.ActionBar</item>
@@ -569,20 +569,20 @@
 
     </style>
 
-    <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Holo.Dialog.Alert">
+    <style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Quantum.Dialog.Alert">
         <item name="windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault</item>
     </style>
-    <style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Holo.Light.Dialog.Alert">
+    <style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Quantum.Light.Dialog.Alert">
         <item name="windowTitleStyle">@android:style/DialogWindowTitle.DeviceDefault.Light</item>
     </style>
-    <style name="Theme.DeviceDefault.SearchBar" parent="Theme.Holo.SearchBar">
+    <style name="Theme.DeviceDefault.SearchBar" parent="Theme.Quantum.SearchBar">
 
     </style>
-    <style name="Theme.DeviceDefault.Light.SearchBar" parent="Theme.Holo.Light.SearchBar">
+    <style name="Theme.DeviceDefault.Light.SearchBar" parent="Theme.Quantum.Light.SearchBar">
 
     </style>
 
-    <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Holo.Dialog.NoFrame">
+    <style name="Theme.DeviceDefault.Dialog.NoFrame" parent="Theme.Quantum.Dialog.NoFrame">
     </style>
 
 </resources>
diff --git a/core/res/res/values/themes_micro.xml b/core/res/res/values/themes_micro.xml
new file mode 100644
index 0000000..be5fa99
--- /dev/null
+++ b/core/res/res/values/themes_micro.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<resources>
+    <style name="Theme.Micro" parent="Theme.Holo" />
+
+    <style name="Theme.Micro.Light" parent="Theme.Holo.Light"/>
+    <style name="Theme.Micro.Light.NoActionBar" parent="Theme.Holo.Light.NoActionBar">
+        <item name="textViewStyle">@android:style/Widget.Micro.TextView</item>
+    </style>
+    <style name="Theme.Micro.Light.DarkActionBar" parent="Theme.Holo.Light.DarkActionBar">
+        <item name="textViewStyle">@android:style/Widget.Micro.TextView</item>
+    </style>
+
+</resources>
diff --git a/core/res/res/values/themes_quantum.xml b/core/res/res/values/themes_quantum.xml
new file mode 100644
index 0000000..0a197b9
--- /dev/null
+++ b/core/res/res/values/themes_quantum.xml
@@ -0,0 +1,1114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!--
+===============================================================
+                        PLEASE READ
+===============================================================
+
+The Quantum themes must not be modified in order to pass CTS.
+Many related themes and styles depend on other values defined in this file.
+If you would like to provide custom themes and styles for your device,
+please see themes_device_defaults.xml.
+
+===============================================================
+                        PLEASE READ
+===============================================================
+ -->
+<resources>
+
+    <!-- Quantum Paper theme (dark version).
+         <p>If you want to ensure that your
+         app consistently uses the Quantum theme at all times, you must explicitly declare it in your
+         manifest. For example, {@code &lt;application android:theme="@android:style/Theme.Quantum"&gt;}.
+
+         <p>Styles used by the Quantum theme are named using the convention Type.Quantum.Etc
+         (for example, {@code Widget.Quantum.Button} and {@code
+         TextAppearance.Quantum.Widget.PopupMenu.Large}).
+         Specific resources used by Quantum are named using the convention @type/foo_bar_baz_quantum
+         with trailing _dark or _light specifiers if they are not shared between both light and
+         dark versions of the theme. -->
+    <style name="Theme.Quantum">
+        <item name="colorForeground">@android:color/bright_foreground_holo_dark</item>
+        <item name="colorForegroundInverse">@android:color/bright_foreground_inverse_holo_dark</item>
+        <item name="colorBackground">@android:color/background_holo_dark</item>
+        <item name="colorBackgroundCacheHint">@android:drawable/background_cache_hint_selector_holo_dark</item>
+        <item name="disabledAlpha">0.5</item>
+        <item name="backgroundDimAmount">0.6</item>
+
+        <item name="colorPressedHighlight">@color/holo_gray_light</item>
+        <item name="colorLongPressedHighlight">@color/holo_gray_bright</item>
+        <item name="colorFocusedHighlight">@color/holo_blue_dark</item>
+        <item name="colorMultiSelectHighlight">@color/holo_green_light</item>
+        <item name="colorActivatedHighlight">@color/holo_blue_dark</item>
+
+        <!-- Text styles -->
+        <item name="textAppearance">@android:style/TextAppearance.Quantum</item>
+        <item name="textAppearanceInverse">@android:style/TextAppearance.Quantum.Inverse</item>
+
+        <item name="textColorPrimary">@android:color/primary_text_holo_dark</item>
+        <item name="textColorSecondary">@android:color/secondary_text_holo_dark</item>
+        <item name="textColorTertiary">@android:color/tertiary_text_holo_dark</item>
+        <item name="textColorPrimaryInverse">@android:color/primary_text_holo_light</item>
+        <item name="textColorSecondaryInverse">@android:color/secondary_text_holo_light</item>
+        <item name="textColorTertiaryInverse">@android:color/tertiary_text_holo_light</item>
+        <item name="textColorPrimaryDisableOnly">@android:color/primary_text_disable_only_holo_dark</item>
+        <item name="textColorPrimaryInverseDisableOnly">@android:color/primary_text_disable_only_holo_light</item>
+        <item name="textColorPrimaryNoDisable">@android:color/primary_text_nodisable_holo_dark</item>
+        <item name="textColorSecondaryNoDisable">@android:color/secondary_text_nodisable_holo_dark</item>
+        <item name="textColorPrimaryInverseNoDisable">@android:color/primary_text_nodisable_holo_light</item>
+        <item name="textColorSecondaryInverseNoDisable">@android:color/secondary_text_nodisable_holo_light</item>
+        <item name="textColorHint">@android:color/hint_foreground_holo_dark</item>
+        <item name="textColorHintInverse">@android:color/hint_foreground_holo_light</item>
+        <item name="textColorSearchUrl">@android:color/search_url_text_holo</item>
+        <item name="textColorHighlight">@android:color/highlighted_text_holo_dark</item>
+        <item name="textColorHighlightInverse">@android:color/highlighted_text_holo_light</item>
+        <item name="textColorLink">@android:color/holo_blue_light</item>
+        <item name="textColorLinkInverse">@android:color/holo_blue_light</item>
+        <item name="textColorAlertDialogListItem">@android:color/primary_text_holo_dark</item>
+
+        <item name="textAppearanceLarge">@android:style/TextAppearance.Quantum.Large</item>
+        <item name="textAppearanceMedium">@android:style/TextAppearance.Quantum.Medium</item>
+        <item name="textAppearanceSmall">@android:style/TextAppearance.Quantum.Small</item>
+        <item name="textAppearanceLargeInverse">@android:style/TextAppearance.Quantum.Large.Inverse</item>
+        <item name="textAppearanceMediumInverse">@android:style/TextAppearance.Quantum.Medium.Inverse</item>
+        <item name="textAppearanceSmallInverse">@android:style/TextAppearance.Quantum.Small.Inverse</item>
+        <item name="textAppearanceSearchResultTitle">@android:style/TextAppearance.Quantum.SearchResult.Title</item>
+        <item name="textAppearanceSearchResultSubtitle">@android:style/TextAppearance.Quantum.SearchResult.Subtitle</item>
+
+        <item name="textAppearanceButton">@android:style/TextAppearance.Quantum.Widget.Button</item>
+
+        <item name="editTextColor">?android:attr/textColorPrimary</item>
+        <item name="editTextBackground">@android:drawable/edit_text_holo_dark</item>
+
+        <item name="candidatesTextStyleSpans">@android:string/candidates_style</item>
+
+        <item name="textCheckMark">@android:drawable/indicator_check_mark_dark</item>
+        <item name="textCheckMarkInverse">@android:drawable/indicator_check_mark_light</item>
+
+        <item name="textAppearanceLargePopupMenu">@android:style/TextAppearance.Quantum.Widget.PopupMenu.Large</item>
+        <item name="textAppearanceSmallPopupMenu">@android:style/TextAppearance.Quantum.Widget.PopupMenu.Small</item>
+
+        <!-- Button styles -->
+        <item name="buttonStyle">@android:style/Widget.Quantum.Button</item>
+
+        <item name="buttonStyleSmall">@android:style/Widget.Quantum.Button.Small</item>
+        <item name="buttonStyleInset">@android:style/Widget.Quantum.Button.Inset</item>
+
+        <item name="buttonStyleToggle">@android:style/Widget.Quantum.Button.Toggle</item>
+        <item name="switchStyle">@android:style/Widget.Quantum.CompoundButton.Switch</item>
+        <item name="mediaRouteButtonStyle">@android:style/Widget.Quantum.MediaRouteButton</item>
+
+        <item name="selectableItemBackground">@android:drawable/item_background_holo_dark</item>
+        <item name="borderlessButtonStyle">@android:style/Widget.Quantum.Button.Borderless</item>
+        <item name="homeAsUpIndicator">@android:drawable/ic_ab_back_holo_dark</item>
+
+        <!-- List attributes -->
+        <item name="listPreferredItemHeight">64dip</item>
+        <item name="listPreferredItemHeightSmall">48dip</item>
+        <item name="listPreferredItemHeightLarge">80dip</item>
+        <item name="dropdownListPreferredItemHeight">?android:attr/listPreferredItemHeightSmall</item>
+        <item name="textAppearanceListItemSmall">?android:attr/textAppearanceMedium</item>
+        <item name="listPreferredItemPaddingLeft">8dip</item>
+        <item name="listPreferredItemPaddingRight">8dip</item>
+        <item name="listPreferredItemPaddingStart">8dip</item>
+        <item name="listPreferredItemPaddingEnd">8dip</item>
+
+        <!-- @hide -->
+        <item name="searchResultListItemHeight">58dip</item>
+        <item name="listDivider">@drawable/list_divider_holo_dark</item>
+        <item name="listSeparatorTextViewStyle">@android:style/Widget.Quantum.TextView.ListSeparator</item>
+
+        <item name="listChoiceIndicatorSingle">@android:drawable/btn_radio_holo_dark</item>
+        <item name="listChoiceIndicatorMultiple">@android:drawable/btn_check_holo_dark</item>
+
+        <item name="listChoiceBackgroundIndicator">@android:drawable/list_selector_holo_dark</item>
+
+        <item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_dark</item>
+
+        <item name="listDividerAlertDialog">@android:drawable/list_divider_holo_dark</item>
+
+        <item name="expandableListPreferredItemPaddingLeft">40dip</item>
+        <item name="expandableListPreferredChildPaddingLeft">?android:attr/expandableListPreferredItemPaddingLeft</item>
+
+        <item name="expandableListPreferredItemIndicatorLeft">3dip</item>
+        <item name="expandableListPreferredItemIndicatorRight">0dip</item>
+        <item name="expandableListPreferredChildIndicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_dark</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_dark</item>
+
+        <!-- Gallery attributes -->
+        <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
+
+        <!-- Window attributes -->
+        <item name="windowFrame">@null</item>
+        <item name="windowNoTitle">false</item>
+        <item name="windowFullscreen">false</item>
+        <item name="windowOverscan">false</item>
+        <item name="windowIsFloating">false</item>
+        <item name="windowContentOverlay">@null</item>
+        <item name="windowShowWallpaper">false</item>
+        <item name="windowTitleStyle">@android:style/WindowTitle.Quantum</item>
+        <item name="windowTitleSize">25dip</item>
+        <item name="windowTitleBackgroundStyle">@android:style/WindowTitleBackground.Quantum</item>
+        <item name="windowContentTransitions">true</item>
+        <item name="windowAnimationStyle">@android:style/Animation.Quantum.Activity</item>
+        <item name="windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
+        <item name="windowActionBar">true</item>
+        <item name="windowActionModeOverlay">false</item>
+
+        <!-- Dialog attributes -->
+        <item name="dialogTheme">@android:style/Theme.Quantum.Dialog</item>
+        <item name="dialogTitleIconsDecorLayout">@layout/dialog_title_icons_holo</item>
+        <item name="dialogCustomTitleDecorLayout">@layout/dialog_custom_title_holo</item>
+        <item name="dialogTitleDecorLayout">@layout/dialog_title_holo</item>
+
+        <!-- AlertDialog attributes -->
+        <item name="alertDialogTheme">@android:style/Theme.Quantum.Dialog.Alert</item>
+        <item name="alertDialogStyle">@android:style/AlertDialog.Quantum</item>
+        <item name="alertDialogCenterButtons">false</item>
+        <item name="alertDialogIcon">@android:drawable/ic_dialog_alert_holo_dark</item>
+
+        <!-- Presentation attributes -->
+        <item name="presentationTheme">@android:style/Theme.Quantum.Dialog.Presentation</item>
+
+        <!-- Toast attributes -->
+        <item name="toastFrameBackground">@android:drawable/toast_frame</item>
+
+        <!-- Panel attributes -->
+        <item name="panelBackground">@android:drawable/menu_hardkey_panel_holo_dark</item>
+        <item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
+        <!-- These three attributes do not seems to be used by the framework. Declared public though -->
+        <item name="panelColorBackground">#000</item>
+        <item name="panelColorForeground">?android:attr/textColorPrimary</item>
+        <item name="panelTextAppearance">?android:attr/textAppearance</item>
+
+        <item name="panelMenuIsCompact">true</item>
+        <item name="panelMenuListWidth">250dip</item>
+        <item name="panelMenuListTheme">@android:style/Theme.Quantum.CompactMenu</item>
+
+        <!-- Scrollbar attributes -->
+        <item name="scrollbarFadeDuration">250</item>
+        <item name="scrollbarDefaultDelayBeforeFade">300</item>
+        <item name="scrollbarSize">10dip</item>
+        <item name="scrollbarThumbHorizontal">@android:drawable/scrollbar_handle_holo_dark</item>
+        <item name="scrollbarThumbVertical">@android:drawable/scrollbar_handle_holo_dark</item>
+        <item name="scrollbarTrackHorizontal">@null</item>
+        <item name="scrollbarTrackVertical">@null</item>
+
+        <!-- Text selection handle attributes -->
+        <item name="textSelectHandleLeft">@android:drawable/text_select_handle_left</item>
+        <item name="textSelectHandleRight">@android:drawable/text_select_handle_right</item>
+        <item name="textSelectHandle">@android:drawable/text_select_handle_middle</item>
+        <item name="textSelectHandleWindowStyle">@android:style/Widget.Quantum.TextSelectHandle</item>
+        <item name="textSuggestionsWindowStyle">@android:style/Widget.Quantum.TextSuggestionsPopupWindow</item>
+        <item name="textCursorDrawable">@android:drawable/text_cursor_holo_dark</item>
+
+        <!-- Widget styles -->
+        <item name="absListViewStyle">@android:style/Widget.Quantum.AbsListView</item>
+        <item name="autoCompleteTextViewStyle">@android:style/Widget.Quantum.AutoCompleteTextView</item>
+        <item name="checkboxStyle">@android:style/Widget.Quantum.CompoundButton.CheckBox</item>
+        <item name="checkedTextViewStyle">@android:style/Widget.Quantum.CheckedTextView</item>
+        <item name="dropDownListViewStyle">@android:style/Widget.Quantum.ListView.DropDown</item>
+        <item name="editTextStyle">@android:style/Widget.Quantum.EditText</item>
+        <item name="expandableListViewStyle">@android:style/Widget.Quantum.ExpandableListView</item>
+        <item name="expandableListViewWhiteStyle">@android:style/Widget.Quantum.ExpandableListView.White</item>
+        <item name="fastScrollStyle">@android:style/Widget.Quantum.FastScroll</item>
+        <item name="galleryStyle">@android:style/Widget.Quantum.Gallery</item>
+        <item name="gestureOverlayViewStyle">@android:style/Widget.Quantum.GestureOverlayView</item>
+        <item name="gridViewStyle">@android:style/Widget.Quantum.GridView</item>
+        <item name="imageButtonStyle">@android:style/Widget.Quantum.ImageButton</item>
+        <item name="imageWellStyle">@android:style/Widget.Quantum.ImageWell</item>
+        <item name="listViewStyle">@android:style/Widget.Quantum.ListView</item>
+        <item name="listViewWhiteStyle">@android:style/Widget.Quantum.ListView.White</item>
+        <item name="popupWindowStyle">@android:style/Widget.Quantum.PopupWindow</item>
+        <item name="progressBarStyle">@android:style/Widget.Quantum.ProgressBar</item>
+        <item name="progressBarStyleHorizontal">@android:style/Widget.Quantum.ProgressBar.Horizontal</item>
+        <item name="progressBarStyleSmall">@android:style/Widget.Quantum.ProgressBar.Small</item>
+        <item name="progressBarStyleSmallTitle">@android:style/Widget.Quantum.ProgressBar.Small.Title</item>
+        <item name="progressBarStyleLarge">@android:style/Widget.Quantum.ProgressBar.Large</item>
+        <item name="progressBarStyleInverse">@android:style/Widget.Quantum.ProgressBar.Inverse</item>
+        <item name="progressBarStyleSmallInverse">@android:style/Widget.Quantum.ProgressBar.Small.Inverse</item>
+        <item name="progressBarStyleLargeInverse">@android:style/Widget.Quantum.ProgressBar.Large.Inverse</item>
+        <item name="seekBarStyle">@android:style/Widget.Quantum.SeekBar</item>
+        <item name="ratingBarStyle">@android:style/Widget.Quantum.RatingBar</item>
+        <item name="ratingBarStyleIndicator">@android:style/Widget.Quantum.RatingBar.Indicator</item>
+        <item name="ratingBarStyleSmall">@android:style/Widget.Quantum.RatingBar.Small</item>
+        <item name="radioButtonStyle">@android:style/Widget.Quantum.CompoundButton.RadioButton</item>
+        <item name="scrollViewStyle">@android:style/Widget.Quantum.ScrollView</item>
+        <item name="horizontalScrollViewStyle">@android:style/Widget.Quantum.HorizontalScrollView</item>
+        <item name="spinnerStyle">?android:attr/dropDownSpinnerStyle</item>
+        <item name="dropDownSpinnerStyle">@android:style/Widget.Quantum.Spinner.DropDown</item>
+        <item name="starStyle">@android:style/Widget.Quantum.CompoundButton.Star</item>
+        <item name="tabWidgetStyle">@android:style/Widget.Quantum.TabWidget</item>
+        <item name="textViewStyle">@android:style/Widget.Quantum.TextView</item>
+        <item name="errorMessageBackground">@android:drawable/popup_inline_error_holo_dark</item>
+        <item name="errorMessageAboveBackground">@android:drawable/popup_inline_error_above_holo_dark</item>
+        <item name="webTextViewStyle">@android:style/Widget.Quantum.WebTextView</item>
+        <item name="webViewStyle">@android:style/Widget.Quantum.WebView</item>
+        <item name="dropDownItemStyle">@android:style/Widget.Quantum.DropDownItem</item>
+        <item name="spinnerDropDownItemStyle">@android:style/Widget.Quantum.DropDownItem.Spinner</item>
+        <item name="spinnerItemStyle">@android:style/Widget.Quantum.TextView.SpinnerItem</item>
+        <item name="dropDownHintAppearance">@android:style/TextAppearance.Quantum.Widget.DropDownHint</item>
+        <item name="keyboardViewStyle">@android:style/Widget.Quantum.KeyboardView</item>
+        <item name="quickContactBadgeStyleWindowSmall">@android:style/Widget.Quantum.QuickContactBadge.WindowSmall</item>
+        <item name="quickContactBadgeStyleWindowMedium">@android:style/Widget.Quantum.QuickContactBadge.WindowMedium</item>
+        <item name="quickContactBadgeStyleWindowLarge">@android:style/Widget.Quantum.QuickContactBadge.WindowLarge</item>
+        <item name="quickContactBadgeStyleSmallWindowSmall">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowSmall</item>
+        <item name="quickContactBadgeStyleSmallWindowMedium">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowMedium</item>
+        <item name="quickContactBadgeStyleSmallWindowLarge">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowLarge</item>
+        <item name="listPopupWindowStyle">@android:style/Widget.Quantum.ListPopupWindow</item>
+        <item name="popupMenuStyle">@android:style/Widget.Quantum.PopupMenu</item>
+        <item name="stackViewStyle">@android:style/Widget.Quantum.StackView</item>
+        <item name="activityChooserViewStyle">@android:style/Widget.Quantum.ActivityChooserView</item>
+        <item name="fragmentBreadCrumbsStyle">@android:style/Widget.Quantum.FragmentBreadCrumbs</item>
+
+        <!-- Preference styles -->
+        <item name="preferenceScreenStyle">@android:style/Preference.Quantum.PreferenceScreen</item>
+        <item name="preferenceFragmentStyle">@style/PreferenceFragment.Quantum</item>
+        <item name="preferenceCategoryStyle">@android:style/Preference.Quantum.Category</item>
+        <item name="preferenceStyle">@android:style/Preference.Quantum</item>
+        <item name="preferenceInformationStyle">@android:style/Preference.Quantum.Information</item>
+        <item name="checkBoxPreferenceStyle">@android:style/Preference.Quantum.CheckBoxPreference</item>
+        <item name="switchPreferenceStyle">@android:style/Preference.Quantum.SwitchPreference</item>
+        <item name="yesNoPreferenceStyle">@android:style/Preference.Quantum.DialogPreference.YesNoPreference</item>
+        <item name="dialogPreferenceStyle">@android:style/Preference.Quantum.DialogPreference</item>
+        <item name="editTextPreferenceStyle">@android:style/Preference.Quantum.DialogPreference.EditTextPreference</item>
+        <item name="ringtonePreferenceStyle">@android:style/Preference.Quantum.RingtonePreference</item>
+        <item name="preferenceLayoutChild">@android:layout/preference_child_holo</item>
+        <item name="detailsElementBackground">@android:drawable/panel_bg_holo_dark</item>
+
+        <!-- Search widget styles -->
+        <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
+
+        <!-- Action bar styles -->
+        <item name="actionDropDownStyle">@android:style/Widget.Quantum.Spinner.DropDown.ActionBar</item>
+        <item name="actionButtonStyle">@android:style/Widget.Quantum.ActionButton</item>
+        <item name="actionOverflowButtonStyle">@android:style/Widget.Quantum.ActionButton.Overflow</item>
+        <item name="actionModeBackground">@android:drawable/cab_background_top_holo_dark</item>
+        <item name="actionModeSplitBackground">@android:drawable/cab_background_bottom_holo_dark</item>
+        <item name="actionModeCloseDrawable">@android:drawable/ic_cab_done_holo_dark</item>
+        <item name="actionBarTabStyle">@style/Widget.Quantum.ActionBar.TabView</item>
+        <item name="actionBarTabBarStyle">@style/Widget.Quantum.ActionBar.TabBar</item>
+        <item name="actionBarTabTextStyle">@style/Widget.Quantum.ActionBar.TabText</item>
+        <item name="actionModeStyle">@style/Widget.Quantum.ActionMode</item>
+        <item name="actionModeCloseButtonStyle">@style/Widget.Quantum.ActionButton.CloseMode</item>
+        <item name="actionBarStyle">@android:style/Widget.Quantum.ActionBar</item>
+        <item name="actionBarSize">@dimen/action_bar_default_height</item>
+        <item name="actionModePopupWindowStyle">@android:style/Widget.Quantum.PopupWindow.ActionMode</item>
+        <item name="actionBarWidgetTheme">@null</item>
+
+        <item name="actionModeCutDrawable">@android:drawable/ic_menu_cut_holo_dark</item>
+        <item name="actionModeCopyDrawable">@android:drawable/ic_menu_copy_holo_dark</item>
+        <item name="actionModePasteDrawable">@android:drawable/ic_menu_paste_holo_dark</item>
+        <item name="actionModeSelectAllDrawable">@android:drawable/ic_menu_selectall_holo_dark</item>
+        <item name="actionModeShareDrawable">@android:drawable/ic_menu_share_holo_dark</item>
+        <item name="actionModeFindDrawable">@android:drawable/ic_menu_find_holo_dark</item>
+        <item name="actionModeWebSearchDrawable">@android:drawable/ic_menu_search_holo_dark</item>
+
+        <item name="dividerVertical">?android:attr/listDivider</item>
+        <item name="dividerHorizontal">?android:attr/listDivider</item>
+        <item name="buttonBarStyle">@android:style/Quantum.ButtonBar</item>
+        <item name="buttonBarButtonStyle">?android:attr/borderlessButtonStyle</item>
+        <item name="segmentedButtonStyle">@android:style/Quantum.SegmentedButton</item>
+
+        <!-- SearchView attributes -->
+        <item name="searchDropdownBackground">@android:drawable/search_dropdown_dark</item>
+
+        <item name="searchDialogTheme">@style/Theme.Quantum.SearchBar</item>
+
+        <!-- PreferenceFrameLayout attributes -->
+        <item name="preferenceFrameLayoutStyle">@android:style/Widget.Quantum.PreferenceFrameLayout</item>
+
+        <!-- NumberPicker style-->
+        <item name="numberPickerStyle">@style/Widget.Quantum.NumberPicker</item>
+
+        <!-- CalendarView style-->
+        <item name="calendarViewStyle">@style/Widget.Quantum.CalendarView</item>
+
+        <!-- TimePicker style -->
+        <item name="timePickerStyle">@style/Widget.Quantum.TimePicker</item>
+
+        <!-- TimePicker background color -->
+        <item name="timePickerHeaderBackgroundColor">@android:color/timepicker_default_background_holo_dark</item>
+
+        <!-- TimePicker Header time label text appearance -->
+        <item name="timePickerHeaderTimeLabelTextAppearance">@style/TextAppearance.Quantum.TimePicker.TimeLabel</item>
+
+        <!-- TimePicker Header am pm label text appearance -->
+        <item name="timePickerHeaderAmPmLabelTextAppearance">@style/TextAppearance.Quantum.TimePicker.AmPmLabel</item>
+
+        <!-- TimePicker dialog theme -->
+        <item name="timePickerDialogTheme">@android:style/Theme.Quantum.Dialog.TimePicker</item>
+
+        <!-- DatePicker style -->
+        <item name="datePickerStyle">@style/Widget.Quantum.DatePicker</item>
+
+        <item name="fastScrollThumbDrawable">@android:drawable/fastscroll_thumb_holo</item>
+        <item name="fastScrollPreviewBackgroundLeft">@android:drawable/fastscroll_label_left_holo_dark</item>
+        <item name="fastScrollPreviewBackgroundRight">@android:drawable/fastscroll_label_right_holo_dark</item>
+        <item name="fastScrollTrackDrawable">@android:drawable/fastscroll_track_holo_dark</item>
+        <item name="fastScrollOverlayPosition">atThumb</item>
+
+    </style>
+
+    <!-- Quantum Paper theme (light version). -->
+    <style name="Theme.Quantum.Light" parent="Theme.Light">
+        <item name="colorForeground">@android:color/bright_foreground_holo_light</item>
+        <item name="colorForegroundInverse">@android:color/bright_foreground_inverse_holo_light</item>
+        <item name="colorBackground">@android:color/background_holo_light</item>
+        <item name="colorBackgroundCacheHint">@android:drawable/background_cache_hint_selector_holo_light</item>
+        <item name="disabledAlpha">0.5</item>
+        <item name="backgroundDimAmount">0.6</item>
+
+        <item name="colorPressedHighlight">@color/holo_gray_light</item>
+        <item name="colorLongPressedHighlight">@color/holo_gray_bright</item>
+        <item name="colorFocusedHighlight">@color/holo_blue_dark</item>
+        <item name="colorMultiSelectHighlight">@color/holo_green_light</item>
+        <item name="colorActivatedHighlight">@color/holo_blue_dark</item>
+
+        <!-- Text styles -->
+        <item name="textAppearance">@android:style/TextAppearance.Quantum.Light</item>
+        <item name="textAppearanceInverse">@android:style/TextAppearance.Quantum.Light.Inverse</item>
+
+        <item name="textColorPrimary">@android:color/primary_text_holo_light</item>
+        <item name="textColorSecondary">@android:color/secondary_text_holo_light</item>
+        <item name="textColorTertiary">@android:color/tertiary_text_holo_light</item>
+        <item name="textColorPrimaryInverse">@android:color/primary_text_holo_dark</item>
+        <item name="textColorSecondaryInverse">@android:color/secondary_text_holo_dark</item>
+        <item name="textColorTertiaryInverse">@android:color/tertiary_text_holo_dark</item>
+        <item name="textColorPrimaryDisableOnly">@android:color/primary_text_disable_only_holo_light</item>
+        <item name="textColorPrimaryInverseDisableOnly">@android:color/primary_text_disable_only_holo_dark</item>
+        <item name="textColorPrimaryNoDisable">@android:color/primary_text_nodisable_holo_light</item>
+        <item name="textColorSecondaryNoDisable">@android:color/secondary_text_nodisable_holo_light</item>
+        <item name="textColorPrimaryInverseNoDisable">@android:color/primary_text_nodisable_holo_dark</item>
+        <item name="textColorSecondaryInverseNoDisable">@android:color/secondary_text_nodisable_holo_dark</item>
+        <item name="textColorHint">@android:color/hint_foreground_holo_light</item>
+        <item name="textColorHintInverse">@android:color/hint_foreground_holo_dark</item>
+        <item name="textColorSearchUrl">@android:color/search_url_text_holo</item>
+        <item name="textColorHighlight">@android:color/highlighted_text_holo_light</item>
+        <item name="textColorHighlightInverse">@android:color/highlighted_text_holo_dark</item>
+        <item name="textColorLink">@android:color/holo_blue_light</item>
+        <item name="textColorLinkInverse">@android:color/holo_blue_light</item>
+        <item name="textColorAlertDialogListItem">@android:color/primary_text_holo_light</item>
+
+        <item name="textAppearanceLarge">@android:style/TextAppearance.Quantum.Light.Large</item>
+        <item name="textAppearanceMedium">@android:style/TextAppearance.Quantum.Light.Medium</item>
+        <item name="textAppearanceSmall">@android:style/TextAppearance.Quantum.Light.Small</item>
+        <item name="textAppearanceLargeInverse">@android:style/TextAppearance.Quantum.Light.Large.Inverse</item>
+        <item name="textAppearanceMediumInverse">@android:style/TextAppearance.Quantum.Light.Medium.Inverse</item>
+        <item name="textAppearanceSmallInverse">@android:style/TextAppearance.Quantum.Light.Small.Inverse</item>
+        <item name="textAppearanceSearchResultTitle">@android:style/TextAppearance.Quantum.Light.SearchResult.Title</item>
+        <item name="textAppearanceSearchResultSubtitle">@android:style/TextAppearance.Quantum.Light.SearchResult.Subtitle</item>
+
+        <item name="textAppearanceButton">@android:style/TextAppearance.Quantum.Light.Widget.Button</item>
+
+        <item name="editTextColor">?android:attr/textColorPrimary</item>
+        <item name="editTextBackground">@android:drawable/edit_text_holo_light</item>
+
+        <item name="candidatesTextStyleSpans">@android:string/candidates_style</item>
+
+        <item name="textCheckMark">@android:drawable/indicator_check_mark_light</item>
+        <item name="textCheckMarkInverse">@android:drawable/indicator_check_mark_dark</item>
+
+        <item name="textAppearanceLargePopupMenu">@android:style/TextAppearance.Quantum.Light.Widget.PopupMenu.Large</item>
+        <item name="textAppearanceSmallPopupMenu">@android:style/TextAppearance.Quantum.Light.Widget.PopupMenu.Small</item>
+
+        <!-- Button styles -->
+        <item name="buttonStyle">@android:style/Widget.Quantum.Light.Button</item>
+
+        <item name="buttonStyleSmall">@android:style/Widget.Quantum.Light.Button.Small</item>
+        <item name="buttonStyleInset">@android:style/Widget.Quantum.Light.Button.Inset</item>
+
+        <item name="buttonStyleToggle">@android:style/Widget.Quantum.Light.Button.Toggle</item>
+        <item name="switchStyle">@android:style/Widget.Quantum.Light.CompoundButton.Switch</item>
+        <item name="mediaRouteButtonStyle">@android:style/Widget.Quantum.Light.MediaRouteButton</item>
+
+        <item name="selectableItemBackground">@android:drawable/item_background_holo_light</item>
+        <item name="borderlessButtonStyle">@android:style/Widget.Quantum.Light.Button.Borderless</item>
+        <item name="homeAsUpIndicator">@android:drawable/ic_ab_back_holo_light</item>
+
+        <!-- List attributes -->
+        <item name="listPreferredItemHeight">64dip</item>
+        <item name="listPreferredItemHeightSmall">48dip</item>
+        <item name="listPreferredItemHeightLarge">80dip</item>
+        <item name="dropdownListPreferredItemHeight">?android:attr/listPreferredItemHeightSmall</item>
+        <item name="textAppearanceListItemSmall">?android:attr/textAppearanceMedium</item>
+        <item name="listPreferredItemPaddingLeft">8dip</item>
+        <item name="listPreferredItemPaddingRight">8dip</item>
+        <item name="listPreferredItemPaddingStart">8dip</item>
+        <item name="listPreferredItemPaddingEnd">8dip</item>
+
+        <!-- @hide -->
+        <item name="searchResultListItemHeight">58dip</item>
+        <item name="listDivider">@drawable/list_divider_holo_light</item>
+        <item name="listSeparatorTextViewStyle">@android:style/Widget.Quantum.Light.TextView.ListSeparator</item>
+
+        <item name="listChoiceIndicatorSingle">@android:drawable/btn_radio_holo_light</item>
+        <item name="listChoiceIndicatorMultiple">@android:drawable/btn_check_holo_light</item>
+
+        <item name="listChoiceBackgroundIndicator">@android:drawable/list_selector_holo_light</item>
+
+        <item name="activatedBackgroundIndicator">@android:drawable/activated_background_holo_light</item>
+
+        <item name="expandableListPreferredItemPaddingLeft">40dip</item>
+        <item name="expandableListPreferredChildPaddingLeft">?android:attr/expandableListPreferredItemPaddingLeft</item>
+
+        <item name="expandableListPreferredItemIndicatorLeft">3dip</item>
+        <item name="expandableListPreferredItemIndicatorRight">0dip</item>
+        <item name="expandableListPreferredChildIndicatorLeft">?android:attr/expandableListPreferredItemIndicatorLeft</item>
+        <item name="expandableListPreferredChildIndicatorRight">?android:attr/expandableListPreferredItemIndicatorRight</item>
+
+        <item name="listDividerAlertDialog">@android:drawable/list_divider_holo_light</item>
+        <item name="findOnPageNextDrawable">@android:drawable/ic_find_next_holo_light</item>
+        <item name="findOnPagePreviousDrawable">@android:drawable/ic_find_previous_holo_light</item>
+
+        <!-- Gallery attributes -->
+        <item name="galleryItemBackground">@android:drawable/gallery_item_background</item>
+
+        <!-- Window attributes -->
+        <item name="windowFrame">@null</item>
+        <item name="windowNoTitle">false</item>
+        <item name="windowFullscreen">false</item>
+        <item name="windowOverscan">false</item>
+        <item name="windowIsFloating">false</item>
+        <item name="android:windowContentOverlay">@android:drawable/ab_solid_shadow_holo</item>
+        <item name="windowShowWallpaper">false</item>
+        <item name="windowTitleStyle">@android:style/WindowTitle.Quantum</item>
+        <item name="windowTitleSize">25dip</item>
+        <item name="windowTitleBackgroundStyle">@android:style/WindowTitleBackground.Quantum</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.Quantum.Activity</item>
+        <item name="android:windowSoftInputMode">stateUnspecified|adjustUnspecified</item>
+        <item name="windowActionBar">true</item>
+        <item name="windowActionModeOverlay">false</item>
+
+        <!-- Dialog attributes -->
+        <item name="dialogTheme">@android:style/Theme.Quantum.Light.Dialog</item>
+        <item name="dialogTitleIconsDecorLayout">@layout/dialog_title_icons_holo</item>
+        <item name="dialogCustomTitleDecorLayout">@layout/dialog_custom_title_holo</item>
+        <item name="dialogTitleDecorLayout">@layout/dialog_title_holo</item>
+
+        <!-- AlertDialog attributes -->
+        <item name="alertDialogTheme">@android:style/Theme.Quantum.Light.Dialog.Alert</item>
+        <item name="alertDialogStyle">@android:style/AlertDialog.Quantum.Light</item>
+        <item name="alertDialogCenterButtons">false</item>
+        <item name="alertDialogIcon">@android:drawable/ic_dialog_alert_holo_light</item>
+
+        <!-- Presentation attributes -->
+        <item name="presentationTheme">@android:style/Theme.Quantum.Light.Dialog.Presentation</item>
+
+        <!-- Toast attributes -->
+        <item name="toastFrameBackground">@android:drawable/toast_frame</item>
+
+        <!-- Panel attributes -->
+        <item name="panelBackground">@android:drawable/menu_hardkey_panel_holo_light</item>
+        <item name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>
+        <!-- These three attributes do not seems to be used by the framework. Declared public though -->
+        <item name="panelColorBackground">#000</item>
+        <item name="panelColorForeground">?android:attr/textColorPrimary</item>
+        <item name="panelTextAppearance">?android:attr/textAppearance</item>
+
+        <item name="panelMenuIsCompact">true</item>
+        <item name="panelMenuListWidth">250dip</item>
+        <item name="panelMenuListTheme">@android:style/Theme.Quantum.Light.CompactMenu</item>
+
+        <!-- Scrollbar attributes -->
+        <item name="scrollbarFadeDuration">250</item>
+        <item name="scrollbarDefaultDelayBeforeFade">300</item>
+        <item name="scrollbarSize">10dip</item>
+        <item name="scrollbarThumbHorizontal">@android:drawable/scrollbar_handle_holo_light</item>
+        <item name="scrollbarThumbVertical">@android:drawable/scrollbar_handle_holo_light</item>
+        <item name="scrollbarTrackHorizontal">@null</item>
+        <item name="scrollbarTrackVertical">@null</item>
+
+        <!-- Text selection handle attributes -->
+        <item name="textSelectHandleLeft">@android:drawable/text_select_handle_left</item>
+        <item name="textSelectHandleRight">@android:drawable/text_select_handle_right</item>
+        <item name="textSelectHandle">@android:drawable/text_select_handle_middle</item>
+        <item name="textSelectHandleWindowStyle">@android:style/Widget.Quantum.TextSelectHandle</item>
+        <item name="textSuggestionsWindowStyle">@android:style/Widget.Quantum.Light.TextSuggestionsPopupWindow</item>
+        <item name="textCursorDrawable">@android:drawable/text_cursor_holo_light</item>
+
+        <!-- Widget styles -->
+        <item name="absListViewStyle">@android:style/Widget.Quantum.Light.AbsListView</item>
+        <item name="autoCompleteTextViewStyle">@android:style/Widget.Quantum.Light.AutoCompleteTextView</item>
+        <item name="checkboxStyle">@android:style/Widget.Quantum.Light.CompoundButton.CheckBox</item>
+        <item name="checkedTextViewStyle">@android:style/Widget.Quantum.Light.CheckedTextView</item>
+        <item name="dropDownListViewStyle">@android:style/Widget.Quantum.ListView.DropDown</item>
+        <item name="editTextStyle">@android:style/Widget.Quantum.Light.EditText</item>
+        <item name="expandableListViewStyle">@android:style/Widget.Quantum.Light.ExpandableListView</item>
+        <item name="expandableListViewWhiteStyle">@android:style/Widget.Quantum.Light.ExpandableListView.White</item>
+        <item name="fastScrollStyle">@android:style/Widget.Quantum.Light.FastScroll</item>
+        <item name="galleryStyle">@android:style/Widget.Quantum.Light.Gallery</item>
+        <item name="gestureOverlayViewStyle">@android:style/Widget.Quantum.Light.GestureOverlayView</item>
+        <item name="gridViewStyle">@android:style/Widget.Quantum.Light.GridView</item>
+        <item name="imageButtonStyle">@android:style/Widget.Quantum.Light.ImageButton</item>
+        <item name="imageWellStyle">@android:style/Widget.Quantum.Light.ImageWell</item>
+        <item name="listViewStyle">@android:style/Widget.Quantum.Light.ListView</item>
+        <item name="listViewWhiteStyle">@android:style/Widget.Quantum.Light.ListView.White</item>
+        <item name="popupWindowStyle">@android:style/Widget.Quantum.Light.PopupWindow</item>
+        <item name="progressBarStyle">@android:style/Widget.Quantum.Light.ProgressBar</item>
+        <item name="progressBarStyleHorizontal">@android:style/Widget.Quantum.Light.ProgressBar.Horizontal</item>
+        <item name="progressBarStyleSmall">@android:style/Widget.Quantum.Light.ProgressBar.Small</item>
+        <item name="progressBarStyleSmallTitle">@android:style/Widget.Quantum.Light.ProgressBar.Small.Title</item>
+        <item name="progressBarStyleLarge">@android:style/Widget.Quantum.Light.ProgressBar.Large</item>
+        <item name="progressBarStyleInverse">@android:style/Widget.Quantum.Light.ProgressBar.Inverse</item>
+        <item name="progressBarStyleSmallInverse">@android:style/Widget.Quantum.Light.ProgressBar.Small.Inverse</item>
+        <item name="progressBarStyleLargeInverse">@android:style/Widget.Quantum.Light.ProgressBar.Large.Inverse</item>
+        <item name="seekBarStyle">@android:style/Widget.Quantum.Light.SeekBar</item>
+        <item name="ratingBarStyle">@android:style/Widget.Quantum.Light.RatingBar</item>
+        <item name="ratingBarStyleIndicator">@android:style/Widget.Quantum.Light.RatingBar.Indicator</item>
+        <item name="ratingBarStyleSmall">@android:style/Widget.Quantum.Light.RatingBar.Small</item>
+        <item name="radioButtonStyle">@android:style/Widget.Quantum.Light.CompoundButton.RadioButton</item>
+        <item name="scrollViewStyle">@android:style/Widget.Quantum.Light.ScrollView</item>
+        <item name="horizontalScrollViewStyle">@android:style/Widget.Quantum.Light.HorizontalScrollView</item>
+        <item name="spinnerStyle">?android:attr/dropDownSpinnerStyle</item>
+        <item name="dropDownSpinnerStyle">@android:style/Widget.Quantum.Light.Spinner.DropDown</item>
+        <item name="starStyle">@android:style/Widget.Quantum.Light.CompoundButton.Star</item>
+        <item name="tabWidgetStyle">@android:style/Widget.Quantum.Light.TabWidget</item>
+        <item name="textViewStyle">@android:style/Widget.Quantum.Light.TextView</item>
+        <item name="errorMessageBackground">@android:drawable/popup_inline_error_holo_light</item>
+        <item name="errorMessageAboveBackground">@android:drawable/popup_inline_error_above_holo_light</item>
+        <item name="webTextViewStyle">@android:style/Widget.Quantum.Light.WebTextView</item>
+        <item name="webViewStyle">@android:style/Widget.Quantum.Light.WebView</item>
+        <item name="dropDownItemStyle">@android:style/Widget.Quantum.Light.DropDownItem</item>
+        <item name="spinnerDropDownItemStyle">@android:style/Widget.Quantum.Light.DropDownItem.Spinner</item>
+        <item name="spinnerItemStyle">@android:style/Widget.Quantum.TextView.SpinnerItem</item>
+        <item name="dropDownHintAppearance">@android:style/TextAppearance.Quantum.Widget.DropDownHint</item>
+        <item name="keyboardViewStyle">@android:style/Widget.Quantum.KeyboardView</item>
+        <item name="quickContactBadgeStyleWindowSmall">@android:style/Widget.Quantum.QuickContactBadge.WindowSmall</item>
+        <item name="quickContactBadgeStyleWindowMedium">@android:style/Widget.Quantum.QuickContactBadge.WindowMedium</item>
+        <item name="quickContactBadgeStyleWindowLarge">@android:style/Widget.Quantum.QuickContactBadge.WindowLarge</item>
+        <item name="quickContactBadgeStyleSmallWindowSmall">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowSmall</item>
+        <item name="quickContactBadgeStyleSmallWindowMedium">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowMedium</item>
+        <item name="quickContactBadgeStyleSmallWindowLarge">@android:style/Widget.Quantum.QuickContactBadgeSmall.WindowLarge</item>
+        <item name="listPopupWindowStyle">@android:style/Widget.Quantum.Light.ListPopupWindow</item>
+        <item name="popupMenuStyle">@android:style/Widget.Quantum.Light.PopupMenu</item>
+        <item name="stackViewStyle">@android:style/Widget.Quantum.StackView</item>
+        <item name="activityChooserViewStyle">@android:style/Widget.Quantum.Light.ActivityChooserView</item>
+        <item name="fragmentBreadCrumbsStyle">@android:style/Widget.Quantum.Light.FragmentBreadCrumbs</item>
+
+        <!-- Preference styles -->
+        <item name="preferenceScreenStyle">@android:style/Preference.Quantum.PreferenceScreen</item>
+        <item name="preferenceFragmentStyle">@style/PreferenceFragment.Quantum</item>
+        <item name="preferenceCategoryStyle">@android:style/Preference.Quantum.Category</item>
+        <item name="preferenceStyle">@android:style/Preference.Quantum</item>
+        <item name="preferenceInformationStyle">@android:style/Preference.Quantum.Information</item>
+        <item name="checkBoxPreferenceStyle">@android:style/Preference.Quantum.CheckBoxPreference</item>
+        <item name="switchPreferenceStyle">@android:style/Preference.Quantum.SwitchPreference</item>
+        <item name="yesNoPreferenceStyle">@android:style/Preference.Quantum.DialogPreference.YesNoPreference</item>
+        <item name="dialogPreferenceStyle">@android:style/Preference.Quantum.DialogPreference</item>
+        <item name="editTextPreferenceStyle">@android:style/Preference.Quantum.DialogPreference.EditTextPreference</item>
+        <item name="ringtonePreferenceStyle">@android:style/Preference.Quantum.RingtonePreference</item>
+        <item name="preferenceLayoutChild">@android:layout/preference_child_holo</item>
+        <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item>
+
+        <!-- PreferenceFrameLayout attributes -->
+        <item name="preferenceFrameLayoutStyle">@android:style/Widget.Quantum.PreferenceFrameLayout</item>
+
+        <!-- Search widget styles -->
+        <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item>
+
+        <!-- Action bar styles -->
+        <item name="actionDropDownStyle">@android:style/Widget.Quantum.Light.Spinner.DropDown.ActionBar</item>
+        <item name="actionButtonStyle">@android:style/Widget.Quantum.Light.ActionButton</item>
+        <item name="actionOverflowButtonStyle">@android:style/Widget.Quantum.Light.ActionButton.Overflow</item>
+        <item name="actionModeBackground">@android:drawable/cab_background_top_holo_light</item>
+        <item name="actionModeSplitBackground">@android:drawable/cab_background_bottom_holo_light</item>
+        <item name="actionModeCloseDrawable">@android:drawable/ic_cab_done_holo_light</item>
+        <item name="actionBarTabStyle">@style/Widget.Quantum.Light.ActionBar.TabView</item>
+        <item name="actionBarTabBarStyle">@style/Widget.Quantum.Light.ActionBar.TabBar</item>
+        <item name="actionBarTabTextStyle">@style/Widget.Quantum.Light.ActionBar.TabText</item>
+        <item name="actionModeStyle">@style/Widget.Quantum.Light.ActionMode</item>
+        <item name="actionModeCloseButtonStyle">@style/Widget.Quantum.Light.ActionButton.CloseMode</item>
+        <item name="android:actionBarStyle">@android:style/Widget.Quantum.Light.ActionBar.Solid</item>
+        <item name="actionBarSize">@dimen/action_bar_default_height</item>
+        <item name="actionModePopupWindowStyle">@android:style/Widget.Quantum.Light.PopupWindow.ActionMode</item>
+        <item name="actionBarWidgetTheme">@null</item>
+
+        <item name="actionModeCutDrawable">@android:drawable/ic_menu_cut_holo_light</item>
+        <item name="actionModeCopyDrawable">@android:drawable/ic_menu_copy_holo_light</item>
+        <item name="actionModePasteDrawable">@android:drawable/ic_menu_paste_holo_light</item>
+        <item name="actionModeSelectAllDrawable">@android:drawable/ic_menu_selectall_holo_light</item>
+        <item name="actionModeShareDrawable">@android:drawable/ic_menu_share_holo_light</item>
+        <item name="actionModeFindDrawable">@android:drawable/ic_menu_find_holo_light</item>
+        <item name="actionModeWebSearchDrawable">@android:drawable/ic_menu_search_holo_light</item>
+
+        <item name="dividerVertical">?android:attr/listDivider</item>
+        <item name="dividerHorizontal">?android:attr/listDivider</item>
+        <item name="buttonBarStyle">@android:style/Quantum.Light.ButtonBar</item>
+        <item name="buttonBarButtonStyle">?android:attr/borderlessButtonStyle</item>
+        <item name="segmentedButtonStyle">@android:style/Quantum.Light.SegmentedButton</item>
+
+        <!-- SearchView attributes -->
+        <item name="searchDropdownBackground">@android:drawable/search_dropdown_light</item>
+
+        <item name="searchDialogTheme">@style/Theme.Quantum.Light.SearchBar</item>
+
+        <!-- NumberPicker style-->
+        <item name="numberPickerStyle">@style/Widget.Quantum.Light.NumberPicker</item>
+
+        <!-- CalendarView style-->
+        <item name="calendarViewStyle">@style/Widget.Quantum.Light.CalendarView</item>
+
+        <!-- TimePicker style -->
+        <item name="timePickerStyle">@style/Widget.Quantum.Light.TimePicker</item>
+
+        <!-- TimePicker Header background color -->
+        <item name="timePickerHeaderBackgroundColor">@android:color/timepicker_default_background_holo_light</item>
+
+        <!-- TimePicker Header time label text appearance -->
+        <item name="timePickerHeaderTimeLabelTextAppearance">@style/TextAppearance.Quantum.Light.TimePicker.TimeLabel</item>
+
+        <!-- TimePicker Header am pm label text appearance -->
+        <item name="timePickerHeaderAmPmLabelTextAppearance">@style/TextAppearance.Quantum.Light.TimePicker.AmPmLabel</item>
+
+        <!-- TimePicker dialog theme -->
+        <item name="timePickerDialogTheme">@android:style/Theme.Quantum.Light.Dialog.TimePicker</item>
+
+        <!-- DatePicker style -->
+        <item name="datePickerStyle">@style/Widget.Quantum.Light.DatePicker</item>
+
+        <item name="fastScrollThumbDrawable">@android:drawable/fastscroll_thumb_holo</item>
+        <item name="fastScrollPreviewBackgroundLeft">@android:drawable/fastscroll_label_left_holo_light</item>
+        <item name="fastScrollPreviewBackgroundRight">@android:drawable/fastscroll_label_right_holo_light</item>
+        <item name="fastScrollTrackDrawable">@android:drawable/fastscroll_track_holo_light</item>
+        <item name="fastScrollOverlayPosition">atThumb</item>
+
+    </style>
+
+    <!-- Variant of the quantum (light) theme that has a solid (opaque) action bar
+         with an inverse color profile. The dark action bar sharply stands out against
+         the light content. -->
+    <style name="Theme.Quantum.Light.DarkActionBar">
+        <item name="android:windowContentOverlay">@android:drawable/ab_solid_shadow_holo</item>
+        <item name="android:actionBarStyle">@android:style/Widget.Quantum.Light.ActionBar.Solid.Inverse</item>
+        <item name="actionBarWidgetTheme">@android:style/Theme.Quantum</item>
+
+        <item name="actionDropDownStyle">@android:style/Widget.Quantum.Spinner.DropDown.ActionBar</item>
+        <item name="actionButtonStyle">@android:style/Widget.Quantum.ActionButton</item>
+        <item name="actionOverflowButtonStyle">@android:style/Widget.Quantum.ActionButton.Overflow</item>
+        <item name="actionModeBackground">@android:drawable/cab_background_top_holo_dark</item>
+        <item name="actionModeSplitBackground">@android:drawable/cab_background_bottom_holo_dark</item>
+        <item name="actionModeCloseDrawable">@android:drawable/ic_cab_done_holo_dark</item>
+        <item name="homeAsUpIndicator">@android:drawable/ic_ab_back_holo_dark</item>
+        <item name="actionBarTabStyle">@style/Widget.Quantum.Light.ActionBar.TabView.Inverse</item>
+        <item name="actionBarTabBarStyle">@style/Widget.Quantum.Light.ActionBar.TabBar.Inverse</item>
+        <item name="actionBarTabTextStyle">@style/Widget.Quantum.Light.ActionBar.TabText.Inverse</item>
+        <item name="actionBarDivider">@android:drawable/list_divider_holo_dark</item>
+        <item name="actionBarItemBackground">@android:drawable/item_background_holo_dark</item>
+        <item name="actionMenuTextColor">?android:attr/textColorPrimaryInverse</item>
+        <item name="actionModeStyle">@style/Widget.Quantum.Light.ActionMode.Inverse</item>
+        <item name="actionModeCloseButtonStyle">@style/Widget.Quantum.ActionButton.CloseMode</item>
+        <item name="actionModePopupWindowStyle">@android:style/Widget.Quantum.PopupWindow.ActionMode</item>
+
+        <item name="actionModeCutDrawable">@android:drawable/ic_menu_cut_holo_dark</item>
+        <item name="actionModeCopyDrawable">@android:drawable/ic_menu_copy_holo_dark</item>
+        <item name="actionModePasteDrawable">@android:drawable/ic_menu_paste_holo_dark</item>
+        <item name="actionModeSelectAllDrawable">@android:drawable/ic_menu_selectall_holo_dark</item>
+        <item name="actionModeShareDrawable">@android:drawable/ic_menu_share_holo_dark</item>
+        <item name="actionModeFindDrawable">@android:drawable/ic_menu_find_holo_dark</item>
+        <item name="actionModeWebSearchDrawable">@android:drawable/ic_menu_search_holo_dark</item>
+    </style>
+
+    <!-- Variant of the quantum (dark) theme with no action bar. -->
+    <style name="Theme.Quantum.NoActionBar">
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Variant of the quantum (dark) theme that has no title bar and fills
+         the entire screen.  This theme
+         sets {@link android.R.attr#windowFullscreen} to true.  -->
+    <style name="Theme.Quantum.NoActionBar.Fullscreen">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Variant of the quantum (dark) theme that has no title bar and fills
+         the entire screen and extends into the display overscan region.  This theme
+         sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
+         to true. -->
+    <style name="Theme.Quantum.NoActionBar.Overscan">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowOverscan">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Variant of the quantum (dark) theme that has no title bar and translucent
+         system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
+         {@link android.R.attr#windowTranslucentNavigation} to true. -->
+    <style name="Theme.Quantum.NoActionBar.TranslucentDecor">
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:windowTranslucentNavigation">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Variant of the quantum (light) theme with no action bar. -->
+    <style name="Theme.Quantum.Light.NoActionBar">
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Variant of the quantum (light) theme that has no title bar and fills
+         the entire screen.  This theme
+         sets {@link android.R.attr#windowFullscreen} to true.  -->
+    <style name="Theme.Quantum.Light.NoActionBar.Fullscreen">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Variant of the quantum (light) theme that has no title bar and fills
+         the entire screen and extends into the display overscan region.  This theme
+         sets {@link android.R.attr#windowFullscreen} and {@link android.R.attr#windowOverscan}
+         to true. -->
+    <style name="Theme.Quantum.Light.NoActionBar.Overscan">
+        <item name="android:windowFullscreen">true</item>
+        <item name="android:windowOverscan">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Variant of the quantum (light) theme that has no title bar and translucent
+         system decor.  This theme sets {@link android.R.attr#windowTranslucentStatus} and
+         {@link android.R.attr#windowTranslucentNavigation} to true. -->
+    <style name="Theme.Quantum.Light.NoActionBar.TranslucentDecor">
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:windowTranslucentNavigation">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Default quantum dark theme for panel windows.  This removes all extraneous
+         window decorations, so you basically have an empty rectangle in which
+         to place your content.  It makes the window floating, with a transparent
+         background, and turns off dimming behind the window. -->
+    <style name="Theme.Quantum.Panel">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:backgroundDimEnabled">false</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Default quantum light theme for panel windows.  This removes all extraneous
+         window decorations, so you basically have an empty rectangle in which
+         to place your content.  It makes the window floating, with a transparent
+         background, and turns off dimming behind the window. -->
+    <style name="Theme.Quantum.Light.Panel">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:backgroundDimEnabled">false</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Default theme for quantum style input methods, which is used by the
+         {@link android.inputmethodservice.InputMethodService} class.
+         this inherits from Theme.Panel, but sets up IME appropriate animations
+         and a few custom attributes. -->
+    <style name="Theme.Quantum.InputMethod" parent="Theme.Quantum.Light.Panel">
+        <item name="android:windowAnimationStyle">@android:style/Animation.InputMethod</item>
+        <item name="android:imeFullscreenBackground">@android:drawable/screen_background_selector_light</item>
+        <item name="android:imeExtractEnterAnimation">@android:anim/input_method_extract_enter</item>
+        <item name="android:imeExtractExitAnimation">@android:anim/input_method_extract_exit</item>
+    </style>
+
+    <!-- Theme for the search input bar. -->
+
+    <style name="Theme.Quantum.SearchBar" parent="Theme.Quantum.Panel">
+        <item name="actionModeBackground">@android:drawable/cab_background_top_holo_dark</item>
+        <item name="actionModeSplitBackground">@android:drawable/cab_background_bottom_holo_light</item>
+    </style>
+
+    <style name="Theme.Quantum.Light.SearchBar" parent="Theme.Quantum.Light.Panel">
+        <item name="actionModeBackground">@android:drawable/cab_background_top_holo_light</item>
+        <item name="actionModeSplitBackground">@android:drawable/cab_background_bottom_holo_light</item>
+    </style>
+
+    <!-- Menu Themes -->
+    <eat-comment />
+
+    <style name="Theme.Quantum.CompactMenu">
+        <!-- Menu/item attributes -->
+        <item name="android:itemTextAppearance">?android:attr/textAppearanceMedium</item>
+        <item name="android:listViewStyle">@android:style/Widget.Quantum.ListView</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.DropDownUp</item>
+        <item name="android:background">@null</item>
+    </style>
+
+    <style name="Theme.Quantum.Light.CompactMenu">
+        <!-- Menu/item attributes -->
+        <item name="android:itemTextAppearance">?android:attr/textAppearanceMedium</item>
+        <item name="android:listViewStyle">@android:style/Widget.Quantum.Light.ListView</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.DropDownUp</item>
+        <item name="android:background">@null</item>
+    </style>
+
+    <!-- Dialog themes for Quantum -->
+    <eat-comment />
+
+    <!-- Quantum theme for dialog windows and activities, which is used by the
+         {@link android.app.Dialog} class.  This changes the window to be
+         floating (not fill the entire screen), and puts a frame around its
+         contents.  You can set this theme on an activity if you would like to
+         make an activity that looks like a Dialog. -->
+    <style name="Theme.Quantum.Dialog">
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.Quantum</item>
+        <item name="android:windowBackground">@android:drawable/dialog_full_holo_dark</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.Quantum.Dialog</item>
+        <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowActionModeOverlay">true</item>
+        <item name="android:windowCloseOnTouchOutside">@bool/config_closeDialogWhenTouchOutside</item>
+
+        <item name="android:colorBackgroundCacheHint">@null</item>
+
+        <item name="android:buttonBarStyle">@android:style/Quantum.ButtonBar.AlertDialog</item>
+        <item name="borderlessButtonStyle">@android:style/Widget.Quantum.Button.Borderless.Small</item>
+
+        <item name="textAppearance">@android:style/TextAppearance.Quantum</item>
+        <item name="textAppearanceInverse">@android:style/TextAppearance.Quantum.Inverse</item>
+
+        <item name="listPreferredItemPaddingLeft">16dip</item>
+        <item name="listPreferredItemPaddingRight">16dip</item>
+        <item name="listPreferredItemPaddingStart">16dip</item>
+        <item name="listPreferredItemPaddingEnd">16dip</item>
+
+        <item name="preferencePanelStyle">@style/PreferencePanel.Dialog</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog that has a nice minimum width for
+         a regular dialog. -->
+    <style name="Theme.Quantum.Dialog.MinWidth">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog that does not include a title bar. -->
+    <style name="Theme.Quantum.Dialog.NoActionBar">
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog.NoActionBar that has a nice minimum width for
+         a regular dialog. -->
+    <style name="Theme.Quantum.Dialog.NoActionBar.MinWidth">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog that has a fixed size. -->
+    <style name="Theme.Quantum.Dialog.FixedSize">
+        <item name="windowFixedWidthMajor">@android:dimen/dialog_fixed_width_major</item>
+        <item name="windowFixedWidthMinor">@android:dimen/dialog_fixed_width_minor</item>
+        <item name="windowFixedHeightMajor">@android:dimen/dialog_fixed_height_major</item>
+        <item name="windowFixedHeightMinor">@android:dimen/dialog_fixed_height_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog.NoActionBar that has a fixed size. -->
+    <style name="Theme.Quantum.Dialog.NoActionBar.FixedSize">
+        <item name="windowFixedWidthMajor">@android:dimen/dialog_fixed_width_major</item>
+        <item name="windowFixedWidthMinor">@android:dimen/dialog_fixed_width_minor</item>
+        <item name="windowFixedHeightMajor">@android:dimen/dialog_fixed_height_major</item>
+        <item name="windowFixedHeightMinor">@android:dimen/dialog_fixed_height_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Dialog that does not include a frame (or background).
+         The view hierarchy of the dialog is responsible for drawing all of
+         its pixels. -->
+    <style name="Theme.Quantum.Dialog.NoFrame">
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="android:windowFrame">@null</item>
+        <item name="windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@null</item>
+        <item name="android:backgroundDimEnabled">false</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:windowCloseOnTouchOutside">false</item>
+    </style>
+
+    <!-- Quantum theme for alert dialog windows, which is used by the
+         {@link android.app.AlertDialog} class.  This is basically a dialog
+         but sets the background to empty so it can do two-tone backgrounds.
+         For applications targeting Honeycomb or newer, this is the default
+         AlertDialog theme. -->
+    <style name="Theme.Quantum.Dialog.Alert">
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="windowTitleStyle">@android:style/DialogWindowTitle.Quantum</item>
+        <item name="windowContentOverlay">@null</item>
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Quantum theme for the TimePicker dialog windows, which is used by the
+         {@link android.app.TimePickerDialog} class. -->
+    <style name="Theme.Quantum.Dialog.TimePicker">
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="windowTitleStyle">@android:style/DialogWindowTitle.Quantum</item>
+        <item name="windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Theme for a window that will be displayed either full-screen on
+         smaller screens (small, normal) or as a dialog on larger screens
+         (large, xlarge). -->
+    <style name="Theme.Quantum.DialogWhenLarge" parent="@android:style/Theme.Quantum">
+    </style>
+
+    <!-- Theme for a window without a title bar that will be displayed either
+         full-screen on smaller screens (small, normal) or as a dialog on larger screens
+         (large, xlarge). -->
+    <style name="Theme.Quantum.DialogWhenLarge.NoActionBar" parent="@android:style/Theme.Quantum.NoActionBar">
+    </style>
+
+    <!-- Theme for a presentation window on a secondary display. -->
+    <style name="Theme.Quantum.Dialog.Presentation" parent="@android:style/Theme.Quantum.NoActionBar.Fullscreen">
+    </style>
+
+    <!-- Light quantum dialog themes -->
+
+    <!-- Quantum light theme for dialog windows and activities, which is used by the
+         {@link android.app.Dialog} class.  This changes the window to be
+         floating (not fill the entire screen), and puts a frame around its
+         contents.  You can set this theme on an activity if you would like to
+         make an activity that looks like a Dialog. -->
+    <style name="Theme.Quantum.Light.Dialog">
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowTitleStyle">@android:style/DialogWindowTitle.Quantum.Light</item>
+        <item name="android:windowBackground">@android:drawable/dialog_full_holo_light</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.Quantum.Dialog</item>
+        <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowActionModeOverlay">true</item>
+        <item name="android:windowCloseOnTouchOutside">@bool/config_closeDialogWhenTouchOutside</item>
+
+        <item name="android:colorBackgroundCacheHint">@null</item>
+
+        <item name="android:buttonBarStyle">@android:style/Quantum.Light.ButtonBar.AlertDialog</item>
+        <item name="borderlessButtonStyle">@android:style/Widget.Quantum.Light.Button.Borderless.Small</item>
+
+        <item name="textAppearance">@android:style/TextAppearance.Quantum.Light</item>
+        <item name="textAppearanceInverse">@android:style/TextAppearance.Quantum.Light.Inverse</item>
+
+        <item name="listPreferredItemPaddingLeft">16dip</item>
+        <item name="listPreferredItemPaddingRight">16dip</item>
+        <item name="listPreferredItemPaddingStart">16dip</item>
+        <item name="listPreferredItemPaddingEnd">16dip</item>
+
+        <item name="preferencePanelStyle">@style/PreferencePanel.Dialog</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Light.Dialog that has a nice minimum width for
+         a regular dialog. -->
+    <style name="Theme.Quantum.Light.Dialog.MinWidth">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Light.Dialog that does not include a title bar. -->
+    <style name="Theme.Quantum.Light.Dialog.NoActionBar">
+        <item name="android:windowActionBar">false</item>
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Light.Dialog.NoActionBar that has a nice minimum width for
+         a regular dialog. -->
+    <style name="Theme.Quantum.Light.Dialog.NoActionBar.MinWidth">
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Light.Dialog that has a fixed size. -->
+    <style name="Theme.Quantum.Light.Dialog.FixedSize">
+        <item name="windowFixedWidthMajor">@android:dimen/dialog_fixed_width_major</item>
+        <item name="windowFixedWidthMinor">@android:dimen/dialog_fixed_width_minor</item>
+        <item name="windowFixedHeightMajor">@android:dimen/dialog_fixed_height_major</item>
+        <item name="windowFixedHeightMinor">@android:dimen/dialog_fixed_height_minor</item>
+    </style>
+
+    <!-- Variant of Theme.Quantum.Light.Dialog.NoActionBar that has a fixed size. -->
+    <style name="Theme.Quantum.Light.Dialog.NoActionBar.FixedSize">
+        <item name="windowFixedWidthMajor">@android:dimen/dialog_fixed_width_major</item>
+        <item name="windowFixedWidthMinor">@android:dimen/dialog_fixed_width_minor</item>
+        <item name="windowFixedHeightMajor">@android:dimen/dialog_fixed_height_major</item>
+        <item name="windowFixedHeightMinor">@android:dimen/dialog_fixed_height_minor</item>
+    </style>
+
+    <!-- Theme for a window that will be displayed either full-screen on
+         smaller screens (small, normal) or as a dialog on larger screens
+         (large, xlarge). -->
+    <style name="Theme.Quantum.Light.DialogWhenLarge" parent="@android:style/Theme.Quantum.Light">
+    </style>
+
+    <!-- Theme for a window without an action bar that will be displayed either full-screen
+         on smaller screens (small, normal) or as a dialog on larger screens
+         (large, xlarge). -->
+    <style name="Theme.Quantum.Light.DialogWhenLarge.NoActionBar"
+            parent="@android:style/Theme.Quantum.Light.NoActionBar">
+    </style>
+
+    <!-- Quantum light theme for alert dialog windows, which is used by the
+         {@link android.app.AlertDialog} class.  This is basically a dialog
+         but sets the background to empty so it can do two-tone backgrounds.
+         For applications targeting Honeycomb or newer, this is the default
+         AlertDialog theme. -->
+    <style name="Theme.Quantum.Light.Dialog.Alert">
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="windowTitleStyle">@android:style/DialogWindowTitle.Quantum.Light</item>
+        <item name="windowContentOverlay">@null</item>
+        <item name="android:windowMinWidthMajor">@android:dimen/dialog_min_width_major</item>
+        <item name="android:windowMinWidthMinor">@android:dimen/dialog_min_width_minor</item>
+    </style>
+
+    <!-- Quantum Light theme for the TimePicker dialog windows, which is used by the
+         {@link android.app.TimePickerDialog} class. -->
+    <style name="Theme.Quantum.Light.Dialog.TimePicker">
+        <item name="windowBackground">@android:color/transparent</item>
+        <item name="windowTitleStyle">@android:style/DialogWindowTitle.Quantum.Light</item>
+        <item name="windowContentOverlay">@null</item>
+    </style>
+
+    <!-- Theme for a presentation window on a secondary display. -->
+    <style name="Theme.Quantum.Light.Dialog.Presentation" parent="@android:style/Theme.Quantum.Light.NoActionBar.Fullscreen" >
+    </style>
+
+    <!-- Default quantum (dark) for windows that want to have the user's selected
+         wallpaper appear behind them.  -->
+    <style name="Theme.Quantum.Wallpaper">
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:colorBackgroundCacheHint">@null</item>
+        <item name="android:windowShowWallpaper">true</item>
+    </style>
+
+    <!--Default quantum (dark) for windows that want to have the user's selected
+         wallpaper appear behind them and without an action bar. -->
+    <style name="Theme.Quantum.Wallpaper.NoTitleBar">
+        <item name="android:windowNoTitle">true</item>
+    </style>
+
+</resources>
diff --git a/data/keyboards/AVRCP.kl b/data/keyboards/AVRCP.kl
index 4c91ece..736b43c 100644
--- a/data/keyboards/AVRCP.kl
+++ b/data/keyboards/AVRCP.kl
@@ -14,8 +14,8 @@
 
 # Key layout used for Bluetooth AVRCP support.
 
-key 200   MEDIA_PLAY_PAUSE    WAKE
-key 201   MEDIA_PLAY_PAUSE    WAKE
+key 200   MEDIA_PLAY          WAKE
+key 201   MEDIA_PAUSE         WAKE
 key 166   MEDIA_STOP          WAKE
 key 163   MEDIA_NEXT          WAKE
 key 165   MEDIA_PREVIOUS      WAKE
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index 4735033..7b9b3fb 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -61,7 +61,7 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on December 2, 2013.
+<p style="clear:both"><em>Data collected during a 7-day period ending on January 8, 2014.
 <br/>Any versions with less than 0.1% distribution are not shown.</em>
 </p>
 
@@ -92,7 +92,7 @@
 </div>
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on December 2, 2013
+<p style="clear:both"><em>Data collected during a 7-day period ending on January 8, 2014.
 <br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p>
 
 
@@ -111,7 +111,7 @@
 
 
 <img alt="" style="float:right"
-src="//chart.googleapis.com/chart?cht=p&chs=400x250&chco=c4df9b,6fad0c&chl=GL%201.1%20only|GL%202.0|GL%203.0&chd=t%3A0.1,98.3,1.6&chf=bg,s,00000000" />
+src="//chart.googleapis.com/chart?chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chf=bg%2Cs%2C00000000&chd=t%3A0.1%2C93.5%2C6.4&chco=c4df9b%2C6fad0c&chs=400x250&cht=p" />
 
 <p>To declare which version of OpenGL ES your application requires, you should use the {@code
 android:glEsVersion} attribute of the <a
@@ -133,17 +133,17 @@
 </tr>
 <tr>
 <td>2.0</th>
-<td>96.3%</td>
+<td>93.5%</td>
 </tr>
 <tr>
 <td>3.0</th>
-<td>3.6%</td>
+<td>6.4%</td>
 </tr>
 </table>
 
 
 
-<p style="clear:both"><em>Data collected during a 7-day period ending on December 2, 2013</em></p>
+<p style="clear:both"><em>Data collected during a 7-day period ending on January 8, 2014</em></p>
 
 
 
@@ -161,17 +161,17 @@
 var VERSION_DATA =
 [
   {
-    "chart": "//chart.googleapis.com/chart?cht=p&chs=500x250&chf=bg%2Cs%2C00000000&chd=t%3A1.6%2C24.1%2C0.1%2C18.6%2C54.5%2C1.1&chl=Froyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chco=c4df9b%2C6fad0c",
+    "chart": "//chart.googleapis.com/chart?chl=Froyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chf=bg%2Cs%2C00000000&chd=t%3A1.3%2C21.2%2C0.1%2C16.9%2C59.1%2C1.4&chco=c4df9b%2C6fad0c&chs=500x250&cht=p",
     "data": [
       {
         "api": 8,
         "name": "Froyo",
-        "perc": "1.6"
+        "perc": "1.3"
       },
       {
         "api": 10,
         "name": "Gingerbread",
-        "perc": "24.1"
+        "perc": "21.2"
       },
       {
         "api": 13,
@@ -181,27 +181,27 @@
       {
         "api": 15,
         "name": "Ice Cream Sandwich",
-        "perc": "18.6"
+        "perc": "16.9"
       },
       {
         "api": 16,
         "name": "Jelly Bean",
-        "perc": "37.4"
+        "perc": "35.9"
       },
       {
         "api": 17,
         "name": "Jelly Bean",
-        "perc": "12.9"
+        "perc": "15.4"
       },
       {
         "api": 18,
         "name": "Jelly Bean",
-        "perc": "4.2"
+        "perc": "7.8"
       },
       {
         "api": 19,
         "name": "KitKat",
-        "perc": "1.1"
+        "perc": "1.4"
       }
     ]
   }
@@ -216,30 +216,31 @@
   {
     "data": {
       "Large": {
-        "hdpi": "0.5",
-        "ldpi": "0.6",
-        "mdpi": "3.8",
-        "tvdpi": "1.4",
-        "xhdpi": "0.6"
+        "hdpi": "0.6",
+        "ldpi": "0.9",
+        "mdpi": "4.5",
+        "tvdpi": "1.7",
+        "xhdpi": "0.7"
       },
       "Normal": {
-        "hdpi": "33.4",
+        "hdpi": "33.0",
         "ldpi": "0.1",
-        "mdpi": "14.6",
-        "xhdpi": "21.6",
-        "xxhdpi": "9.7"
+        "mdpi": "14.2",
+        "xhdpi": "20.1",
+        "xxhdpi": "10.6"
       },
       "Small": {
-        "ldpi": "8.8"
+        "ldpi": "8.2"
       },
       "Xlarge": {
-        "hdpi": "0.3",
-        "mdpi": "4.5",
-        "xhdpi": "0.1"
+        "hdpi": "0.4",
+        "ldpi": "0.1",
+        "mdpi": "4.7",
+        "xhdpi": "0.2"
       }
     },
-    "densitychart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg%2Cs%2C00000000&chd=t%3A9.5%2C22.9%2C1.4%2C34.2%2C22.3%2C9.7&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chco=c4df9b%2C6fad0c",
-    "layoutchart": "//chart.googleapis.com/chart?cht=p&chs=400x250&chf=bg%2Cs%2C00000000&chd=t%3A4.9%2C6.9%2C79.4%2C8.8&chl=Xlarge%7CLarge%7CNormal%7CSmall&chco=c4df9b%2C6fad0c"
+    "densitychart": "//chart.googleapis.com/chart?chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chf=bg%2Cs%2C00000000&chd=t%3A9.4%2C23.5%2C1.7%2C34.0%2C21.0%2C10.6&chco=c4df9b%2C6fad0c&chs=400x250&cht=p",
+    "layoutchart": "//chart.googleapis.com/chart?chl=Xlarge%7CLarge%7CNormal%7CSmall&chf=bg%2Cs%2C00000000&chd=t%3A5.4%2C8.5%2C78.0%2C8.2&chco=c4df9b%2C6fad0c&chs=400x250&cht=p"
   }
 ];
 
diff --git a/docs/html/distribute/index.jd b/docs/html/distribute/index.jd
index 54f9301..544fdff 100644
--- a/docs/html/distribute/index.jd
+++ b/docs/html/distribute/index.jd
@@ -11,7 +11,7 @@
   <div class="copy" style="position:relative;left:480px;width:360;">
     <h1 style="margin-bottom:10px;">Your Apps on Google Play</h1>
     <p>The most visited store in the world for Android apps.  Cloud-connected and always synced,
-    it's never been easierfor users to find and download your apps.</p>
+    it's never been easier for users to find and download your apps.</p>
     <p><a class="button" href="https://play.google.com/apps/publish/"
       >Go to Developer Console &raquo;</a></p>
   </div>
diff --git a/docs/html/google/play/billing/billing_integrate.jd b/docs/html/google/play/billing/billing_integrate.jd
index 949752a..dba43cd 100644
--- a/docs/html/google/play/billing/billing_integrate.jd
+++ b/docs/html/google/play/billing/billing_integrate.jd
@@ -174,7 +174,7 @@
 <h3 id="QueryDetails">Querying for Items Available for Purchase</h3>
 <p>In your application, you can query the item details from Google Play using the In-app Billing Version 3 API. To pass a request to the In-app Billing service, first create a {@link android.os.Bundle}  that contains a String {@link java.util.ArrayList} of product IDs with key "ITEM_ID_LIST", where each string is a product ID for an purchasable item.</p>
 <pre>
-ArrayList<String> skuList = new ArrayList<String>();
+ArrayList&lt;String&gt; skuList = new ArrayList&lt;String&gt; ();
 skuList.add("premiumUpgrade");
 skuList.add("gas");
 Bundle querySkus = new Bundle();
@@ -196,7 +196,7 @@
 <pre>
 int response = skuDetails.getInt("RESPONSE_CODE");
 if (response == 0) {
-   ArrayList<String> responseList 
+   ArrayList&lt;String&gt; responseList
       = skuDetails.getStringArrayList("DETAILS_LIST");
    
    for (String thisResponse : responseList) {
@@ -282,11 +282,11 @@
 <pre>
 int response = ownedItems.getInt("RESPONSE_CODE");
 if (response == 0) {
-   ArrayList<String> ownedSkus = 
+   ArrayList&lt;String&gt; ownedSkus =
       ownedItems.getStringArrayList("INAPP_PURCHASE_ITEM_LIST");
-   ArrayList<String> purchaseDataList = 
+   ArrayList&lt;String&gt;  purchaseDataList =
       ownedItems.getStringArrayList("INAPP_PURCHASE_DATA_LIST");
-   ArrayList<String> signatureList = 
+   ArrayList&lt;String&gt;  signatureList =
       ownedItems.getStringArrayList("INAPP_DATA_SIGNATURE");
    String continuationToken = 
       ownedItems.getString("INAPP_CONTINUATION_TOKEN");
diff --git a/docs/html/guide/topics/manifest/application-element.jd b/docs/html/guide/topics/manifest/application-element.jd
index 6bfa3dc..46500aa 100644
--- a/docs/html/guide/topics/manifest/application-element.jd
+++ b/docs/html/guide/topics/manifest/application-element.jd
@@ -40,6 +40,7 @@
 <dt>can contain:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
diff --git a/docs/html/guide/topics/manifest/meta-data-element.jd b/docs/html/guide/topics/manifest/meta-data-element.jd
index 56a214c..ee80c84 100644
--- a/docs/html/guide/topics/manifest/meta-data-element.jd
+++ b/docs/html/guide/topics/manifest/meta-data-element.jd
@@ -12,8 +12,10 @@
 <dt>contained in:</dt>
 <dd><code><a href="{@docRoot}guide/topics/manifest/activity-element.html">&lt;activity&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code>
-<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+<br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html">&lt;provider&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html">&lt;receiver&gt;</a></code></dd>
+<br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html">&lt;service&gt;</a></code>
 
 <dt>description:</dt>
 <dd>A name-value pair for an item of additional, arbitrary data that can 
diff --git a/docs/html/guide/topics/ui/dialogs.jd b/docs/html/guide/topics/ui/dialogs.jd
index 4754d11..0c6ec84 100644
--- a/docs/html/guide/topics/ui/dialogs.jd
+++ b/docs/html/guide/topics/ui/dialogs.jd
@@ -281,7 +281,7 @@
 &#64;Override
 public Dialog onCreateDialog(Bundle savedInstanceState) {
     AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-    builder.setTitle(R.string.pick_color);
+    builder.setTitle(R.string.pick_color)
            .setItems(R.array.colors_array, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                // The 'which' argument contains the index position
diff --git a/docs/html/legal.jd b/docs/html/legal.jd
index 1698af0f..aaa3c39 100644
--- a/docs/html/legal.jd
+++ b/docs/html/legal.jd
@@ -88,16 +88,12 @@
 href="http://www.android.com/us/developer-content-policy.html#showlanguages">Developer Program
 Policies</a></p></dd>
 
-  <dt>Google Maps API</dt>
-    <dd>The Android Maps APIs are a collection of services (including, but not limited to, the
-MapView and MapActivity classes) that allow you to include
-maps, geocoding, geolocation, and other content from Google and its content providers in your
-Android
-apps. If you want to develop an Android app that displays Google Maps data, you must agree
-to the terms of service, register, and get an API Key. Registration is free.    
+  <dt>Google Maps Android API</dt>
+    <dd>The Google Maps Android API is a collection of services that allow you
+      to include maps, geocoding, geolocation, and other content from Google and its content providers in your Android apps. If you want to develop an Android app that makes use of this API you must agree to the terms of service and obtain an API Key.
       <p><a
-href="https://developers.google.com/maps/documentation/android/maps-api-signup"
->Google Maps Android API Key Signup</a>, <a href="http://m.google.com/legalnotices">Mobile Legal
+href="https://developers.google.com/maps/documentation/android/start"
+>Google Maps Android API Getting Started</a>, <a href="http://m.google.com/legalnotices">Mobile Legal
 Notices</a></p>
     </dd>
 
diff --git a/docs/html/tools/help/uiautomator/UiSelector.jd b/docs/html/tools/help/uiautomator/UiSelector.jd
index c9a1eed..6d5b4e4 100644
--- a/docs/html/tools/help/uiautomator/UiSelector.jd
+++ b/docs/html/tools/help/uiautomator/UiSelector.jd
@@ -472,7 +472,7 @@
         <span class="sympad"><a href="#resourceIdMatches(java.lang.String)">resourceIdMatches</a></span>(String regex)</nobr>
 
         <div class="jd-descrdiv">Set the search criteria to match the resource ID
- of the widget, using a regular expression.http://blog.bettersoftwaretesting.com/</div>
+ of the widget, using a regular expression.</div>
 
   </td></tr>
 
diff --git a/docs/html/training/articles/security-tips.jd b/docs/html/training/articles/security-tips.jd
index 54aebac..e05b44c 100644
--- a/docs/html/training/articles/security-tips.jd
+++ b/docs/html/training/articles/security-tips.jd
@@ -182,10 +182,10 @@
 
 <h3 id="RequestingPermissions">Requesting Permissions</h3>
 
-<p>We recommend minimizing the number of permissions that your app requests
+<p>We recommend minimizing the number of permissions that your app requests.
 Not having access to sensitive permissions reduces the risk of
 inadvertently misusing those permissions, can improve user adoption, and makes
-your app less for attackers. Generally,
+your app less vulnerable for attackers. Generally,
 if a permission is not required for your app to function, do not request it.</p>
 
 <p>If it's possible to design your application in a way that does not require
diff --git a/docs/html/training/in-app-billing/preparing-iab-app.jd b/docs/html/training/in-app-billing/preparing-iab-app.jd
index 4698cf7..47fcbbd 100644
--- a/docs/html/training/in-app-billing/preparing-iab-app.jd
+++ b/docs/html/training/in-app-billing/preparing-iab-app.jd
@@ -30,7 +30,7 @@
 </div>
 </div>
 
-<p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to setting the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and  Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p>
+<p>Before you can start using the In-app Billing service, you'll need to add the library that contains the In-app Billing Version 3 API to your Android project. You also need to set the permissions for your application to communicate with Google Play. In addition, you'll need to establish a connection between your application and  Google Play. You should also verify that the In-app Billing API version that you are using in your application is supported by Google Play.</p>
 
 <h2 id="GetSample">Download the Sample Application</h2>
 <p>In this training class, you will use a reference implementation for the In-app Billing Version 3 API called the {@code TrivialDrive} sample application. The sample includes convenience classes to quickly set up the In-app Billing service, marshal and unmarshal data types, and handle In-app Billing requests from the main thread of your application.</p>
diff --git a/graphics/java/android/graphics/drawable/DrawableContainer.java b/graphics/java/android/graphics/drawable/DrawableContainer.java
index a1e0772..a98b84f2 100644
--- a/graphics/java/android/graphics/drawable/DrawableContainer.java
+++ b/graphics/java/android/graphics/drawable/DrawableContainer.java
@@ -50,6 +50,9 @@
     private Drawable mCurrDrawable;
     private int mAlpha = 0xFF;
 
+    /** Whether setAlpha() has been called at least once. */
+    private boolean mHasAlpha;
+
     private int mCurIndex = -1;
     private boolean mMutated;
 
@@ -117,6 +120,8 @@
 
     @Override
     public void setAlpha(int alpha) {
+        mHasAlpha = true;
+
         if (mAlpha != alpha) {
             mAlpha = alpha;
             if (mCurrDrawable != null) {
@@ -146,8 +151,11 @@
 
     @Override
     public void setColorFilter(ColorFilter cf) {
+        mDrawableContainerState.mHasColorFilter = true;
+
         if (mDrawableContainerState.mColorFilter != cf) {
             mDrawableContainerState.mColorFilter = cf;
+
             if (mCurrDrawable != null) {
                 mCurrDrawable.mutate().setColorFilter(cf);
             }
@@ -189,9 +197,11 @@
 
     @Override
     public void setAutoMirrored(boolean mirrored) {
-        mDrawableContainerState.mAutoMirrored = mirrored;
-        if (mCurrDrawable != null) {
-            mCurrDrawable.mutate().setAutoMirrored(mDrawableContainerState.mAutoMirrored);
+        if (mDrawableContainerState.mAutoMirrored != mirrored) {
+            mDrawableContainerState.mAutoMirrored = mirrored;
+            if (mCurrDrawable != null) {
+                mCurrDrawable.mutate().setAutoMirrored(mDrawableContainerState.mAutoMirrored);
+            }
         }
     }
 
@@ -210,7 +220,9 @@
         }
         if (mCurrDrawable != null) {
             mCurrDrawable.jumpToCurrentState();
-            mCurrDrawable.mutate().setAlpha(mAlpha);
+            if (mHasAlpha) {
+                mCurrDrawable.mutate().setAlpha(mAlpha);
+            }
         }
         if (mExitAnimationEnd != 0) {
             mExitAnimationEnd = 0;
@@ -353,12 +365,14 @@
                 d.mutate();
                 if (mDrawableContainerState.mEnterFadeDuration > 0) {
                     mEnterAnimationEnd = now + mDrawableContainerState.mEnterFadeDuration;
-                } else {
+                } else if (mHasAlpha) {
                     d.setAlpha(mAlpha);
                 }
+                if (mDrawableContainerState.mHasColorFilter) {
+                    d.setColorFilter(mDrawableContainerState.mColorFilter);
+                }
                 d.setVisible(isVisible(), true);
                 d.setDither(mDrawableContainerState.mDither);
-                d.setColorFilter(mDrawableContainerState.mColorFilter);
                 d.setState(getState());
                 d.setLevel(getLevel());
                 d.setBounds(getBounds());
@@ -394,6 +408,8 @@
     }
 
     void animate(boolean schedule) {
+        mHasAlpha = true;
+
         final long now = SystemClock.uptimeMillis();
         boolean animating = false;
         if (mCurrDrawable != null) {
@@ -507,6 +523,7 @@
         boolean mAutoMirrored;
 
         ColorFilter mColorFilter;
+        boolean mHasColorFilter;
 
         DrawableContainerState(DrawableContainerState orig, DrawableContainer owner,
                 Resources res) {
@@ -529,6 +546,7 @@
                 mExitFadeDuration = orig.mExitFadeDuration;
                 mAutoMirrored = orig.mAutoMirrored;
                 mColorFilter = orig.mColorFilter;
+                mHasColorFilter = orig.mHasColorFilter;
 
                 // Cloning the following values may require creating futures.
                 mConstantPadding = orig.getConstantPadding();
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index f2e9988..e8b3f64 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -64,10 +64,8 @@
     private int[] mPaddingR;
     private int[] mPaddingB;
 
-    private final Rect mCachedPadding = new Rect();
     private final Rect mTmpRect = new Rect();
     private boolean mMutated;
-    private boolean mHasCachedPadding;
 
     /**
      * Create a new layer drawable with the list of specified layers.
@@ -229,15 +227,18 @@
     }
 
     /**
-     * Look for a layer with the given id, and returns its {@link Drawable}.
+     * Looks for a layer with the given ID and returns its {@link Drawable}.
+     * <p>
+     * If multiple layers are found for the given ID, returns the
+     * {@link Drawable} for the matching layer at the highest index.
      *
      * @param id The layer ID to search for.
-     * @return The {@link Drawable} of the layer that has the given id in the hierarchy or null.
+     * @return The {@link Drawable} for the highest-indexed layer that has the
+     *         given ID, or null if not found.
      */
     public Drawable findDrawableByLayerId(int id) {
         final ChildDrawable[] layers = mLayerState.mChildren;
-        final int N = mLayerState.mNum;
-        for (int i = 0; i < N; i++) {
+        for (int i = mLayerState.mNum - 1; i >= 0; i--) {
             if (layers[i].mId == id) {
                 return layers[i].mDrawable;
             }
@@ -314,11 +315,6 @@
                 }
 
                 childDrawable.mDrawable = drawable;
-
-                if (refreshChildPadding(i, childDrawable)) {
-                    invalidatePadding();
-                }
-
                 return true;
             }
         }
@@ -328,7 +324,6 @@
 
     /**
      * Specifies the insets in pixels for the drawable at the specified index.
-     * Insets are used to adjust the drawable bounds.
      *
      * @param index the index of the drawable to adjust
      * @param l number of pixels to add to the left bound
@@ -350,14 +345,12 @@
      *
      * @param mode padding mode, one of:
      *            <ul>
-     *            <li>{@link #PADDING_MODE_NEST}
-     *            <li>{@link #PADDING_MODE_STACK}
+     *            <li>{@link #PADDING_MODE_NEST} <li>{@link #PADDING_MODE_STACK}
      *            </ul>
      */
     public void setPaddingMode(int mode) {
         if (mLayerState.mPaddingMode != mode) {
             mLayerState.mPaddingMode = mode;
-            invalidatePadding();
         }
     }
 
@@ -369,36 +362,19 @@
       return mLayerState.mPaddingMode;
     }
 
-    /**
-     * Invalidates cached padding.
-     */
-    private void invalidatePadding() {
-        mHasCachedPadding = false;
-        onBoundsChange(getBounds());
-    }
-
     @Override
     public void invalidateDrawable(Drawable who) {
-        final Callback callback = getCallback();
-        if (callback != null) {
-            callback.invalidateDrawable(this);
-        }
+        invalidateSelf();
     }
 
     @Override
     public void scheduleDrawable(Drawable who, Runnable what, long when) {
-        final Callback callback = getCallback();
-        if (callback != null) {
-            callback.scheduleDrawable(this, what, when);
-        }
+        scheduleSelf(what, when);
     }
 
     @Override
     public void unscheduleDrawable(Drawable who, Runnable what) {
-        final Callback callback = getCallback();
-        if (callback != null) {
-            callback.unscheduleDrawable(this, what);
-        }
+        unscheduleSelf(what);
     }
 
     @Override
@@ -419,19 +395,12 @@
 
     @Override
     public boolean getPadding(Rect padding) {
-        final Rect cachedPadding = mCachedPadding;
-        if (!mHasCachedPadding) {
-            if (mLayerState.mPaddingMode == PADDING_MODE_NEST) {
-                computeNestedPadding(cachedPadding);
-            } else {
-                computeStackedPadding(cachedPadding);
-            }
-
-            mHasCachedPadding = true;
+        if (mLayerState.mPaddingMode == PADDING_MODE_NEST) {
+            computeNestedPadding(padding);
+        } else {
+            computeStackedPadding(padding);
         }
 
-        padding.set(cachedPadding);
-
         return padding.left != 0 || padding.top != 0 || padding.right != 0 || padding.bottom != 0;
     }
 
@@ -587,7 +556,7 @@
         }
 
         if (paddingChanged) {
-            invalidatePadding();
+            onBoundsChange(getBounds());
         }
 
         return changed;
@@ -612,7 +581,7 @@
         }
 
         if (paddingChanged) {
-            invalidatePadding();
+            onBoundsChange(getBounds());
         }
 
         return changed;
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 05163c8..88f11db 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -42,6 +42,7 @@
 		SkiaColorFilter.cpp \
 		SkiaShader.cpp \
 		Snapshot.cpp \
+		SpotShadow.cpp \
 		StatefulBaseRenderer.cpp \
 		Stencil.cpp \
 		Texture.cpp \
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 22cd2d4..4f6da2b 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -3194,10 +3194,18 @@
     paint.setColor(mCaches.propertyShadowStrength << 24);
     paint.setAntiAlias(true); // want to use AlphaVertex
 
-    VertexBuffer shadowVertexBuffer;
+    VertexBuffer ambientShadowVertexBuffer;
     ShadowTessellator::tessellateAmbientShadow(width, height, casterTransform,
-            shadowVertexBuffer);
-    return drawVertexBuffer(shadowVertexBuffer, &paint);
+            ambientShadowVertexBuffer);
+    drawVertexBuffer(ambientShadowVertexBuffer, &paint);
+
+    VertexBuffer spotShadowVertexBuffer;
+    ShadowTessellator::tessellateSpotShadow(width, height,
+            getWidth(), getHeight(), casterTransform,
+            spotShadowVertexBuffer);
+    drawVertexBuffer(spotShadowVertexBuffer, &paint);
+
+    return DrawGlInfo::kStatusDrew;
 }
 
 status_t OpenGLRenderer::drawColorRects(const float* rects, int count, int color,
diff --git a/libs/hwui/ShadowTessellator.cpp b/libs/hwui/ShadowTessellator.cpp
index 49a3d2c..6385ef7 100644
--- a/libs/hwui/ShadowTessellator.cpp
+++ b/libs/hwui/ShadowTessellator.cpp
@@ -21,14 +21,30 @@
 
 #include "AmbientShadow.h"
 #include "ShadowTessellator.h"
+#include "SpotShadow.h"
 
 namespace android {
 namespace uirenderer {
 
+template<typename T>
+static inline T max(T a, T b) {
+    return a > b ? a : b;
+}
+
 // TODO: Support path as the input of the polygon instead of the rect's width
-// and height.
-void ShadowTessellator::tessellateAmbientShadow(float width, float height,
-        const mat4& casterTransform, VertexBuffer& shadowVertexBuffer) {
+// and height. And the z values need to be computed according to the
+// transformation for each vertex.
+/**
+ * Generate the polygon for the caster.
+ *
+ * @param width the width of the caster
+ * @param height the height of the caster
+ * @param casterTransform transformation info of the caster
+ * @param polygon return the caster's polygon
+ *
+ */
+void ShadowTessellator::generateCasterPolygon(float width, float height,
+        const mat4& casterTransform, int vertexCount, Vector3* polygon) {
 
     Vector3 pivot(width / 2, height / 2, 0.0f);
     casterTransform.mapPoint3d(pivot);
@@ -39,10 +55,6 @@
             pivot.x + width * zScaleFactor, pivot.y + height * zScaleFactor);
 
     // Generate the caster's polygon from the rect.
-    // TODO: support arbitrary polygon, and the z value need to be computed
-    // according to the transformation for each vertex.
-    const int vertexCount = 4;
-    Vector3 polygon[vertexCount];
     polygon[0].x = blockRect.left;
     polygon[0].y = blockRect.top;
     polygon[0].z = pivot.z;
@@ -55,19 +67,51 @@
     polygon[3].x = blockRect.left;
     polygon[3].y = blockRect.bottom;
     polygon[3].z = pivot.z;
+}
+
+void ShadowTessellator::tessellateAmbientShadow(float width, float height,
+        const mat4& casterTransform, VertexBuffer& shadowVertexBuffer) {
+
+    const int vertexCount = 4;
+    Vector3 polygon[vertexCount];
+    generateCasterPolygon(width, height, casterTransform, vertexCount, polygon);
 
     // A bunch of parameters to tweak the shadow.
     // TODO: Allow some of these changable by debug settings or APIs.
-    const int rays = 120;
+    const int rays = 128;
     const int layers = 2;
     const float strength = 0.5;
-    const float heightFactor = 120;
-    const float geomFactor = 60;
+    const float heightFactor = 128;
+    const float geomFactor = 64;
 
     AmbientShadow::createAmbientShadow(polygon, vertexCount, rays, layers, strength,
             heightFactor, geomFactor, shadowVertexBuffer);
 
 }
 
+void ShadowTessellator::tessellateSpotShadow(float width, float height,
+        int screenWidth, int screenHeight,
+        const mat4& casterTransform, VertexBuffer& shadowVertexBuffer) {
+    const int vertexCount = 4;
+    Vector3 polygon[vertexCount];
+    generateCasterPolygon(width, height, casterTransform, vertexCount, polygon);
+
+    // A bunch of parameters to tweak the shadow.
+    // TODO: Allow some of these changable by debug settings or APIs.
+    const int rays = 256;
+    const int layers = 2;
+    const float strength = 0.5;
+    int maximal = max(screenWidth, screenHeight);
+    Vector3 lightCenter(screenWidth / 2, 0, maximal);
+#if DEBUG_SHADOW
+    ALOGD("light center %f %f %f", lightCenter.x, lightCenter.y, lightCenter.z);
+#endif
+    const float lightSize = maximal / 8;
+    const int lightVertexCount = 16;
+
+    SpotShadow::createSpotShadow(polygon, vertexCount, lightCenter, lightSize,
+            lightVertexCount, rays, layers, strength, shadowVertexBuffer);
+
+}
 }; // namespace uirenderer
 }; // namespace android
diff --git a/libs/hwui/ShadowTessellator.h b/libs/hwui/ShadowTessellator.h
index 05cb00c..fff00b1 100644
--- a/libs/hwui/ShadowTessellator.h
+++ b/libs/hwui/ShadowTessellator.h
@@ -29,6 +29,14 @@
     static void tessellateAmbientShadow(float width, float height,
             const mat4& casterTransform, VertexBuffer& shadowVertexBuffer);
 
+    static void tessellateSpotShadow(float width, float height,
+            int screenWidth, int screenHeight,
+            const mat4& casterTransform, VertexBuffer& shadowVertexBuffer);
+
+private:
+    static void generateCasterPolygon(float width, float height,
+            const mat4& casterTransform, int vertexCount, Vector3* polygon);
+
 }; // ShadowTessellator
 
 }; // namespace uirenderer
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
new file mode 100644
index 0000000..5d489a7
--- /dev/null
+++ b/libs/hwui/SpotShadow.cpp
@@ -0,0 +1,839 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "OpenGLRenderer"
+
+#define SHADOW_SHRINK_SCALE 0.1f
+
+#include <math.h>
+#include <utils/Log.h>
+
+#include "SpotShadow.h"
+#include "Vertex.h"
+
+namespace android {
+namespace uirenderer {
+
+/**
+ * Calculate the intersection of a ray with a polygon.
+ * It assumes the ray originates inside the polygon.
+ *
+ * @param poly The polygon, which is represented in a Vector2 array.
+ * @param polyLength The length of caster's polygon in terms of number of
+ *                   vertices.
+ * @param point the start of the ray
+ * @param dx the x vector of the ray
+ * @param dy the y vector of the ray
+ * @return the distance along the ray if it intersects with the polygon FP_NAN if otherwise
+ */
+float SpotShadow::rayIntersectPoly(const Vector2* poly, int polyLength,
+        const Vector2& point, float dx, float dy) {
+    double px = point.x;
+    double py = point.y;
+    int p1 = polyLength - 1;
+    for (int p2 = 0; p2 < polyLength; p2++) {
+        double p1x = poly[p1].x;
+        double p1y = poly[p1].y;
+        double p2x = poly[p2].x;
+        double p2y = poly[p2].y;
+        // The math below is derived from solving this formula, basically the
+        // intersection point should stay on both the ray and the edge of (p1, p2).
+        // solve([p1x+t*(p2x-p1x)=dx*t2+px,p1y+t*(p2y-p1y)=dy*t2+py],[t,t2]);
+        double div = (dx * (p1y - p2y) + dy * p2x - dy * p1x);
+        if (div != 0) {
+            double t = (dx * (p1y - py) + dy * px - dy * p1x) / (div);
+            if (t >= 0 && t <= 1) {
+                double t2 = (p1x * (py - p2y) + p2x * (p1y - py) +
+                        px * (p2y - p1y)) / div;
+                if (t2 > 0) {
+                    return (float)t2;
+                }
+            }
+        }
+        p1 = p2;
+    }
+    return FP_NAN;
+}
+
+/**
+ * Calculate the centroid of a 2d polygon.
+ *
+ * @param poly The polygon, which is represented in a Vector2 array.
+ * @param polyLength The length of the polygon in terms of number of vertices.
+ * @return the centroid of the polygon.
+ */
+Vector2 SpotShadow::centroid2d(const Vector2* poly, int polyLength) {
+    double sumx = 0;
+    double sumy = 0;
+    int p1 = polyLength - 1;
+    double area = 0;
+    for (int p2 = 0; p2 < polyLength; p2++) {
+        double x1 = poly[p1].x;
+        double y1 = poly[p1].y;
+        double x2 = poly[p2].x;
+        double y2 = poly[p2].y;
+        double a = (x1 * y2 - x2 * y1);
+        sumx += (x1 + x2) * a;
+        sumy += (y1 + y2) * a;
+        area += a;
+        p1 = p2;
+    }
+
+    double centroidx = sumx / (3 * area);
+    double centroidy = sumy / (3 * area);
+    return Vector2((float)centroidx, (float)centroidy);
+}
+
+/**
+ * Sort points by their X coordinates
+ *
+ * @param points the points as a Vector2 array.
+ * @param pointsLength the number of vertices of the polygon.
+ */
+void SpotShadow::xsort(Vector2* points, int pointsLength) {
+    quicksortX(points, 0, pointsLength - 1);
+}
+
+/**
+ * compute the convex hull of a collection of Points
+ *
+ * @param points the points as a Vector2 array.
+ * @param pointsLength the number of vertices of the polygon.
+ * @param retPoly pre allocated array of floats to put the vertices
+ * @return the number of points in the polygon 0 if no intersection
+ */
+int SpotShadow::hull(Vector2* points, int pointsLength, Vector2* retPoly) {
+    xsort(points, pointsLength);
+    int n = pointsLength;
+    Vector2 lUpper[n];
+    lUpper[0] = points[0];
+    lUpper[1] = points[1];
+
+    int lUpperSize = 2;
+
+    for (int i = 2; i < n; i++) {
+        lUpper[lUpperSize] = points[i];
+        lUpperSize++;
+
+        while (lUpperSize > 2 && !rightTurn(
+                (double)lUpper[lUpperSize - 3].x, (double)lUpper[lUpperSize - 3].y,
+                (double)lUpper[lUpperSize - 2].x, (double)lUpper[lUpperSize - 2].y,
+                (double)lUpper[lUpperSize - 1].x, (double)lUpper[lUpperSize - 1].y)) {
+            // Remove the middle point of the three last
+            lUpper[lUpperSize - 2].x = lUpper[lUpperSize - 1].x;
+            lUpper[lUpperSize - 2].y = lUpper[lUpperSize - 1].y;
+            lUpperSize--;
+        }
+    }
+
+    Vector2 lLower[n];
+    lLower[0] = points[n - 1];
+    lLower[1] = points[n - 2];
+
+    int lLowerSize = 2;
+
+    for (int i = n - 3; i >= 0; i--) {
+        lLower[lLowerSize] = points[i];
+        lLowerSize++;
+
+        while (lLowerSize > 2 && !rightTurn(
+                (double)lLower[lLowerSize - 3].x, (double)lLower[lLowerSize - 3].y,
+                (double)lLower[lLowerSize - 2].x, (double)lLower[lLowerSize - 2].y,
+                (double)lLower[lLowerSize - 1].x, (double)lLower[lLowerSize - 1].y)) {
+            // Remove the middle point of the three last
+            lLower[lLowerSize - 2] = lLower[lLowerSize - 1];
+            lLowerSize--;
+        }
+    }
+    int count = 0;
+
+    for (int i = 0; i < lUpperSize; i++) {
+        retPoly[count] = lUpper[i];
+        count++;
+    }
+
+    for (int i = 1; i < lLowerSize - 1; i++) {
+        retPoly[count] = lLower[i];
+        count++;
+    }
+    // TODO: Add test harness which verify that all the points are inside the hull.
+    return count;
+}
+
+/**
+ * Test whether the 3 points form a right hand turn
+ *
+ * @param ax the x coordinate of point a
+ * @param ay the y coordinate of point a
+ * @param bx the x coordinate of point b
+ * @param by the y coordinate of point b
+ * @param cx the x coordinate of point c
+ * @param cy the y coordinate of point c
+ * @return true if a right hand turn
+ */
+bool SpotShadow::rightTurn(double ax, double ay, double bx, double by,
+        double cx, double cy) {
+    return (bx - ax) * (cy - ay) - (by - ay) * (cx - ax) > EPSILON;
+}
+
+/**
+ * Calculates the intersection of poly1 with poly2 and put in poly2.
+ *
+ *
+ * @param poly1 The 1st polygon, as a Vector2 array.
+ * @param poly1Length The number of vertices of 1st polygon.
+ * @param poly2 The 2nd and output polygon, as a Vector2 array.
+ * @param poly2Length The number of vertices of 2nd polygon.
+ * @return number of vertices in output polygon as poly2.
+ */
+int SpotShadow::intersection(Vector2* poly1, int poly1Length,
+        Vector2* poly2, int poly2Length) {
+    makeClockwise(poly1, poly1Length);
+    makeClockwise(poly2, poly2Length);
+    Vector2 poly[poly1Length * poly2Length + 2];
+    int count = 0;
+    int pcount = 0;
+
+    // If one vertex from one polygon sits inside another polygon, add it and
+    // count them.
+    for (int i = 0; i < poly1Length; i++) {
+        if (testPointInsidePolygon(poly1[i], poly2, poly2Length)) {
+            poly[count] = poly1[i];
+            count++;
+            pcount++;
+
+        }
+    }
+
+    int insidePoly2 = pcount;
+    for (int i = 0; i < poly2Length; i++) {
+        if (testPointInsidePolygon(poly2[i], poly1, poly1Length)) {
+            poly[count] = poly2[i];
+            count++;
+        }
+    }
+
+    int insidePoly1 = count - insidePoly2;
+    // If all vertices from poly1 are inside poly2, then just return poly1.
+    if (insidePoly2 == poly1Length) {
+        memcpy(poly2, poly1, poly1Length * sizeof(Vector2));
+        return poly1Length;
+    }
+
+    // If all vertices from poly2 are inside poly1, then just return poly2.
+    if (insidePoly1 == poly2Length) {
+        return poly2Length;
+    }
+
+    // Since neither polygon fully contain the other one, we need to add all the
+    // intersection points.
+    Vector2 intersection;
+    for (int i = 0; i < poly2Length; i++) {
+        for (int j = 0; j < poly1Length; j++) {
+            int poly2LineStart = i;
+            int poly2LineEnd = ((i + 1) % poly2Length);
+            int poly1LineStart = j;
+            int poly1LineEnd = ((j + 1) % poly1Length);
+            bool found = lineIntersection(
+                    poly2[poly2LineStart].x, poly2[poly2LineStart].y,
+                    poly2[poly2LineEnd].x, poly2[poly2LineEnd].y,
+                    poly1[poly1LineStart].x, poly1[poly1LineStart].y,
+                    poly1[poly1LineEnd].x, poly1[poly1LineEnd].y,
+                    intersection);
+            if (found) {
+                poly[count].x = intersection.x;
+                poly[count].y = intersection.y;
+                count++;
+            } else {
+                Vector2 delta = poly2[i] - poly1[j];
+                if (delta.lengthSquared() < 0.01) {
+                    poly[count] = poly2[i];
+                    count++;
+                }
+            }
+        }
+    }
+
+    if (count == 0) {
+        return 0;
+    }
+
+    // Sort the result polygon around the center.
+    Vector2 center(0.0f, 0.0f);
+    for (int i = 0; i < count; i++) {
+        center += poly[i];
+    }
+    center /= count;
+    sort(poly, count, center);
+
+    // TODO: Verify the intersection works correctly, like any random point
+    // inside both poly1 and poly2 should be inside the intersection, and the
+    // result intersection polygon is convex.
+
+    // Merge the vertices if they are too close.
+    poly2[0] = poly[0];
+    int resultLength = 1;
+    for (int i = 1; i < count; i++) {
+        Vector2 delta = poly[i] - poly[i - 1];
+        if (delta.lengthSquared() >= 0.01) {
+            poly2[resultLength] = poly[i];
+            resultLength++;
+        }
+    }
+
+    return resultLength;
+}
+
+/**
+ * Sort points about a center point
+ *
+ * @param poly The in and out polyogon as a Vector2 array.
+ * @param polyLength The number of vertices of the polygon.
+ * @param center the center ctr[0] = x , ctr[1] = y to sort around.
+ */
+void SpotShadow::sort(Vector2* poly, int polyLength, const Vector2& center) {
+    quicksortCirc(poly, 0, polyLength - 1, center);
+}
+
+/**
+ * Calculate the angle between and x and a y coordinate
+ */
+float SpotShadow::angle(const Vector2& point, const Vector2& center) {
+    return -(float)atan2(point.x - center.x, point.y - center.y);
+}
+
+/**
+ * Swap points pointed to by i and j
+ */
+void SpotShadow::swap(Vector2* points, int i, int j) {
+    Vector2 temp = points[i];
+    points[i] = points[j];
+    points[j] = temp;
+}
+
+/**
+ * quick sort implementation about the center.
+ */
+void SpotShadow::quicksortCirc(Vector2* points, int low, int high,
+        const Vector2& center) {
+    int i = low, j = high;
+    int p = low + (high - low) / 2;
+    float pivot = angle(points[p], center);
+    while (i <= j) {
+        while (angle(points[i], center) < pivot) {
+            i++;
+        }
+        while (angle(points[j], center) > pivot) {
+            j--;
+        }
+
+        if (i <= j) {
+            swap(points, i, j);
+            i++;
+            j--;
+        }
+    }
+    if (low < j) quicksortCirc(points, low, j, center);
+    if (i < high) quicksortCirc(points, i, high, center);
+}
+
+/**
+ * Sort points by x axis
+ *
+ * @param points points to sort
+ * @param low start index
+ * @param high end index
+ */
+void SpotShadow::quicksortX(Vector2* points, int low, int high) {
+    int i = low, j = high;
+    int p = low + (high - low) / 2;
+    float pivot = points[p].x;
+    while (i <= j) {
+        while (points[i].x < pivot) {
+            i++;
+        }
+        while (points[j].x > pivot) {
+            j--;
+        }
+
+        if (i <= j) {
+            swap(points, i, j);
+            i++;
+            j--;
+        }
+    }
+    if (low < j) quicksortX(points, low, j);
+    if (i < high) quicksortX(points, i, high);
+}
+
+/**
+ * Test whether a point is inside the polygon.
+ *
+ * @param testPoint the point to test
+ * @param poly the polygon
+ * @return true if the testPoint is inside the poly.
+ */
+bool SpotShadow::testPointInsidePolygon(const Vector2 testPoint,
+        const Vector2* poly, int len) {
+    bool c = false;
+    double testx = testPoint.x;
+    double testy = testPoint.y;
+    for (int i = 0, j = len - 1; i < len; j = i++) {
+        double startX = poly[j].x;
+        double startY = poly[j].y;
+        double endX = poly[i].x;
+        double endY = poly[i].y;
+
+        if (((endY > testy) != (startY > testy)) &&
+            (testx < (startX - endX) * (testy - endY)
+             / (startY - endY) + endX)) {
+            c = !c;
+        }
+    }
+    return c;
+}
+
+/**
+ * Make the polygon turn clockwise.
+ *
+ * @param polygon the polygon as a Vector2 array.
+ * @param len the number of points of the polygon
+ */
+void SpotShadow::makeClockwise(Vector2* polygon, int len) {
+    if (polygon == 0  || len == 0) {
+        return;
+    }
+    if (!isClockwise(polygon, len)) {
+        reverse(polygon, len);
+    }
+}
+
+/**
+ * Test whether the polygon is order in clockwise.
+ *
+ * @param polygon the polygon as a Vector2 array
+ * @param len the number of points of the polygon
+ */
+bool SpotShadow::isClockwise(Vector2* polygon, int len) {
+    double sum = 0;
+    double p1x = polygon[len - 1].x;
+    double p1y = polygon[len - 1].y;
+    for (int i = 0; i < len; i++) {
+
+        double p2x = polygon[i].x;
+        double p2y = polygon[i].y;
+        sum += p1x * p2y - p2x * p1y;
+        p1x = p2x;
+        p1y = p2y;
+    }
+    return sum < 0;
+}
+
+/**
+ * Reverse the polygon
+ *
+ * @param polygon the polygon as a Vector2 array
+ * @param len the number of points of the polygon
+ */
+void SpotShadow::reverse(Vector2* polygon, int len) {
+    int n = len / 2;
+    for (int i = 0; i < n; i++) {
+        Vector2 tmp = polygon[i];
+        int k = len - 1 - i;
+        polygon[i] = polygon[k];
+        polygon[k] = tmp;
+    }
+}
+
+/**
+ * Intersects two lines in parametric form. This function is called in a tight
+ * loop, and we need double precision to get things right.
+ *
+ * @param x1 the x coordinate point 1 of line 1
+ * @param y1 the y coordinate point 1 of line 1
+ * @param x2 the x coordinate point 2 of line 1
+ * @param y2 the y coordinate point 2 of line 1
+ * @param x3 the x coordinate point 1 of line 2
+ * @param y3 the y coordinate point 1 of line 2
+ * @param x4 the x coordinate point 2 of line 2
+ * @param y4 the y coordinate point 2 of line 2
+ * @param ret the x,y location of the intersection
+ * @return true if it found an intersection
+ */
+inline bool SpotShadow::lineIntersection(double x1, double y1, double x2, double y2,
+        double x3, double y3, double x4, double y4, Vector2& ret) {
+    double d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
+    if (d == 0.0) return false;
+
+    double dx = (x1 * y2 - y1 * x2);
+    double dy = (x3 * y4 - y3 * x4);
+    double x = (dx * (x3 - x4) - (x1 - x2) * dy) / d;
+    double y = (dx * (y3 - y4) - (y1 - y2) * dy) / d;
+
+    // The intersection should be in the middle of the point 1 and point 2,
+    // likewise point 3 and point 4.
+    if (((x - x1) * (x - x2) > EPSILON)
+        || ((x - x3) * (x - x4) > EPSILON)
+        || ((y - y1) * (y - y2) > EPSILON)
+        || ((y - y3) * (y - y4) > EPSILON)) {
+        // Not interesected
+        return false;
+    }
+    ret.x = x;
+    ret.y = y;
+    return true;
+
+}
+
+/**
+ * Compute a horizontal circular polygon about point (x , y , height) of radius
+ * (size)
+ *
+ * @param points number of the points of the output polygon.
+ * @param lightCenter the center of the light.
+ * @param size the light size.
+ * @param ret result polygon.
+ */
+void SpotShadow::computeLightPolygon(int points, const Vector3& lightCenter,
+        float size, Vector3* ret) {
+    // TODO: Caching all the sin / cos values and store them in a look up table.
+    for (int i = 0; i < points; i++) {
+        double angle = 2 * i * M_PI / points;
+        ret[i].x = sinf(angle) * size + lightCenter.x;
+        ret[i].y = cosf(angle) * size + lightCenter.y;
+        ret[i].z = lightCenter.z;
+    }
+}
+
+/**
+* Generate the shadow from a spot light.
+*
+* @param poly x,y,z vertexes of a convex polygon that occludes the light source
+* @param polyLength number of vertexes of the occluding polygon
+* @param lightCenter the center of the light
+* @param lightSize the radius of the light source
+* @param lightVertexCount the vertex counter for the light polygon
+* @param rays the number of vertexes to create along the edges of the shadow
+* @param layers the number of layers of triangles strips to create
+* @param strength the "darkness" of the shadow
+* @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
+*                            empty strip if error.
+*
+*/
+void SpotShadow::createSpotShadow(const Vector3* poly, int polyLength,
+        const Vector3& lightCenter, float lightSize, int lightVertexCount,
+        int rays, int layers, float strength, VertexBuffer& retStrips) {
+    Vector3 light[lightVertexCount * 3];
+    computeLightPolygon(lightVertexCount, lightCenter, lightSize, light);
+    computeSpotShadow(light, lightVertexCount, lightCenter,
+            poly, polyLength, rays, layers, strength, retStrips);
+}
+
+/**
+ * Generate the shadow spot light of shape lightPoly and a object poly
+ *
+ * @param lightPoly x,y,z vertex of a convex polygon that is the light source
+ * @param lightPolyLength number of vertexes of the light source polygon
+ * @param poly x,y,z vertexes of a convex polygon that occludes the light source
+ * @param polyLength number of vertexes of the occluding polygon
+ * @param rays the number of vertexes to create along the edges of the shadow
+ * @param layers the number of layers of triangles strips to create
+ * @param strength the "darkness" of the shadow
+ * @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
+ *                            empty strip if error.
+ */
+void SpotShadow::computeSpotShadow(const Vector3* lightPoly, int lightPolyLength,
+        const Vector3& lightCenter, const Vector3* poly, int polyLength,
+        int rays, int layers, float strength, VertexBuffer& shadowTriangleStrip) {
+    // Point clouds for all the shadowed vertices
+    Vector2 shadowRegion[lightPolyLength * polyLength];
+    // Shadow polygon from one point light.
+    Vector2 outline[polyLength];
+    Vector2 umbraMem[polyLength * lightPolyLength];
+    Vector2* umbra = umbraMem;
+
+    int umbraLength = 0;
+
+    // Validate input, receiver is always at z = 0 plane.
+    bool inputPolyPositionValid = true;
+    for (int i = 0; i < polyLength; i++) {
+        if (poly[i].z <= 0.00001) {
+            inputPolyPositionValid = false;
+            ALOGE("polygon below the surface");
+            break;
+        }
+        if (poly[i].z >= lightPoly[0].z) {
+            inputPolyPositionValid = false;
+            ALOGE("polygon above the light");
+            break;
+        }
+    }
+
+    // If the caster's position is invalid, don't draw anything.
+    if (!inputPolyPositionValid) {
+        return;
+    }
+
+    // Calculate the umbra polygon based on intersections of all outlines
+    int k = 0;
+    for (int j = 0; j < lightPolyLength; j++) {
+        int m = 0;
+        for (int i = 0; i < polyLength; i++) {
+            float t = lightPoly[j].z - poly[i].z;
+            if (t == 0) {
+                return;
+            }
+            t = lightPoly[j].z / t;
+            float x = lightPoly[j].x - t * (lightPoly[j].x - poly[i].x);
+            float y = lightPoly[j].y - t * (lightPoly[j].y - poly[i].y);
+
+            Vector2 newPoint = Vector2(x, y);
+            shadowRegion[k] = newPoint;
+            outline[m] = newPoint;
+
+            k++;
+            m++;
+        }
+
+        // For the first light polygon's vertex, use the outline as the umbra.
+        // Later on, use the intersection of the outline and existing umbra.
+        if (umbraLength == 0) {
+            for (int i = 0; i < polyLength; i++) {
+                umbra[i] = outline[i];
+            }
+            umbraLength = polyLength;
+        } else {
+            int col = ((j * 255) / lightPolyLength);
+            umbraLength = intersection(outline, polyLength, umbra, umbraLength);
+            if (umbraLength == 0) {
+                break;
+            }
+        }
+    }
+
+    // Generate the penumbra area using the hull of all shadow regions.
+    int shadowRegionLength = k;
+    Vector2 penumbra[k];
+    int penumbraLength = hull(shadowRegion, shadowRegionLength, penumbra);
+
+    // no real umbra make a fake one
+    if (umbraLength < 3) {
+        // The shadow from the centroid of the light polygon.
+        Vector2 centShadow[polyLength];
+
+        for (int i = 0; i < polyLength; i++) {
+            float t = lightCenter.z - poly[i].z;
+            if (t == 0) {
+                return;
+            }
+            t = lightCenter.z / t;
+            float x = lightCenter.x - t * (lightCenter.x - poly[i].x);
+            float y = lightCenter.y - t * (lightCenter.y - poly[i].y);
+
+            centShadow[i].x = x;
+            centShadow[i].y = y;
+        }
+
+        // Shrink the centroid's shadow by 10%.
+        // TODO: Study the magic number of 10%.
+        Vector2 shadowCentroid = centroid2d(centShadow, polyLength);
+        for (int i = 0; i < polyLength; i++) {
+            centShadow[i] = shadowCentroid * (1.0f - SHADOW_SHRINK_SCALE) +
+                    centShadow[i] * SHADOW_SHRINK_SCALE;
+        }
+#if DEBUG_SHADOW
+        ALOGD("No real umbra make a fake one, centroid2d =  %f , %f",
+                shadowCentroid.x, shadowCentroid.y);
+#endif
+        // Set the fake umbra, whose size is the same as the original polygon.
+        umbra = centShadow;
+        umbraLength = polyLength;
+    }
+
+    generateTriangleStrip(penumbra, penumbraLength, umbra, umbraLength,
+            rays, layers, strength, shadowTriangleStrip);
+}
+
+/**
+ * Generate a triangle strip given two convex polygons
+ *
+ * @param penumbra The outer polygon x,y vertexes
+ * @param penumbraLength The number of vertexes in the outer polygon
+ * @param umbra The inner outer polygon x,y vertexes
+ * @param umbraLength The number of vertexes in the inner polygon
+ * @param rays The number of points along the polygons to create
+ * @param layers The number of layers of triangle strips between the umbra and penumbra
+ * @param strength The max alpha of the umbra
+ * @param shadowTriangleStrip return an (x,y,alpha) triangle strip representing the shadow. Return
+ *                            empty strip if error.
+**/
+void SpotShadow::generateTriangleStrip(const Vector2* penumbra, int penumbraLength,
+        const Vector2* umbra, int umbraLength, int rays, int layers,
+        float strength, VertexBuffer& shadowTriangleStrip) {
+
+    int rings = layers + 1;
+    int size = rays * rings;
+
+    float step = M_PI * 2 / rays;
+    // Centroid of the umbra.
+    Vector2 centroid = centroid2d(umbra, umbraLength);
+#if DEBUG_SHADOW
+    ALOGD("centroid2d =  %f , %f", centroid.x, centroid.y);
+#endif
+    // Intersection to the penumbra.
+    float penumbraDistPerRay[rays];
+    // Intersection to the umbra.
+    float umbraDistPerRay[rays];
+
+    for (int i = 0; i < rays; i++) {
+        // TODO: Setup a lookup table for all the sin/cos.
+        float dx = sinf(step * i);
+        float dy = cosf(step * i);
+        umbraDistPerRay[i] = rayIntersectPoly(umbra, umbraLength, centroid,
+                dx, dy);
+        if (isnan(umbraDistPerRay[i])) {
+            ALOGE("rayIntersectPoly returns NAN");
+            return;
+        }
+        penumbraDistPerRay[i] = rayIntersectPoly(penumbra, penumbraLength,
+                centroid, dx, dy);
+        if (isnan(umbraDistPerRay[i])) {
+            ALOGE("rayIntersectPoly returns NAN");
+            return;
+        }
+    }
+
+    int stripSize = getStripSize(rays, layers);
+    AlphaVertex* shadowVertices = shadowTriangleStrip.alloc<AlphaVertex>(stripSize);
+    int currentIndex = 0;
+    // Calculate the vertex values in the penumbra area.
+    for (int r = 0; r < layers; r++) {
+        int firstInEachLayer = currentIndex;
+        for (int i = 0; i < rays; i++) {
+            float dx = sinf(step * i);
+            float dy = cosf(step * i);
+
+            for (int j = r; j < (r + 2); j++) {
+                float layerRatio = j / (float)(rings - 1);
+                float deltaDist = layerRatio * (umbraDistPerRay[i] - penumbraDistPerRay[i]);
+                float currentDist = penumbraDistPerRay[i] + deltaDist;
+                float op = calculateOpacity(layerRatio, deltaDist);
+                AlphaVertex::set(&shadowVertices[currentIndex],
+                        dx * currentDist + centroid.x,
+                        dy * currentDist + centroid.y,
+                        layerRatio * op * strength);
+                currentIndex++;
+            }
+        }
+
+        // Duplicate the vertices from one layer to another one to make triangle
+        // strip.
+        shadowVertices[currentIndex++] = shadowVertices[firstInEachLayer];
+        firstInEachLayer++;
+        shadowVertices[currentIndex++] = shadowVertices[firstInEachLayer];
+    }
+
+    int lastInPenumbra = currentIndex - 1;
+    shadowVertices[currentIndex++] = shadowVertices[lastInPenumbra];
+
+    // Preallocate the vertices (index as [firstInUmbra - 1]) for jumping from
+    // the penumbra to umbra.
+    currentIndex++;
+    int firstInUmbra = currentIndex;
+
+    // traverse the umbra area in a zig zag pattern for strips.
+    for (int k = 0; k < rays; k++) {
+        int i = k / 2;
+        if ((k & 1) == 1) {
+            i = rays - i - 1;
+        }
+        float dx = sinf(step * i);
+        float dy = cosf(step * i);
+
+        float ratio = 1.0;
+        float deltaDist = ratio * (umbraDistPerRay[i] - penumbraDistPerRay[i]);
+        float currentDist = penumbraDistPerRay[i] + deltaDist;
+        float op = calculateOpacity(ratio, deltaDist);
+        AlphaVertex::set(&shadowVertices[currentIndex],
+                dx * currentDist + centroid.x, dy * currentDist + centroid.y,
+                ratio * op * strength);
+        currentIndex++;
+
+    }
+
+    // Back fill the one vertex for jumping from penumbra to umbra.
+    shadowVertices[firstInUmbra - 1] = shadowVertices[firstInUmbra];
+
+#if DEBUG_SHADOW
+    for (int i = 0; i < currentIndex; i++) {
+        ALOGD("shadow value: i %d, (x:%f, y:%f, a:%f)", i, shadowVertices[i].x,
+                shadowVertices[i].y, shadowVertices[i].alpha);
+    }
+#endif
+}
+
+/**
+ * This is only for experimental purpose.
+ * After intersections are calculated, we could smooth the polygon if needed.
+ * So far, we don't think it is more appealing yet.
+ *
+ * @param level The level of smoothness.
+ * @param rays The total number of rays.
+ * @param rayDist (In and Out) The distance for each ray.
+ *
+ */
+void SpotShadow::smoothPolygon(int level, int rays, float* rayDist) {
+    for (int k = 0; k < level; k++) {
+        for (int i = 0; i < rays; i++) {
+            float p1 = rayDist[(rays - 1 + i) % rays];
+            float p2 = rayDist[i];
+            float p3 = rayDist[(i + 1) % rays];
+            rayDist[i] = (p1 + p2 * 2 + p3) / 4;
+        }
+    }
+}
+
+/**
+ * Calculate the opacity according to the distance and falloff ratio.
+ *
+ * @param distRatio The distance ratio of current sample between umbra and
+ *                  penumbra area.
+ * @param deltaDist The distance between current sample to the penumbra area.
+ * @return The opacity according to the distance between umbra and penumbra.
+ */
+float SpotShadow::calculateOpacity(float distRatio, float deltaDist) {
+    // TODO: Experiment on the opacity calculation.
+    float falloffRatio = 1 + deltaDist * deltaDist;
+    return (distRatio + 1 - 1 / falloffRatio) / 2;
+}
+
+/**
+ * Calculate the number of vertex we will create given a number of rays and layers
+ *
+ * @param rays number of points around the polygons you want
+ * @param layers number of layers of triangle strips you need
+ * @return number of vertex (multiply by 3 for number of floats)
+ */
+int SpotShadow::getStripSize(int rays, int layers) {
+    return  (2 + rays + ((layers) * 2 * (rays + 1)));
+}
+
+}; // namespace uirenderer
+}; // namespace android
+
+
+
+
diff --git a/libs/hwui/SpotShadow.h b/libs/hwui/SpotShadow.h
new file mode 100644
index 0000000..d8db43bf
--- /dev/null
+++ b/libs/hwui/SpotShadow.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HWUI_SPOT_SHADOW_H
+#define ANDROID_HWUI_SPOT_SHADOW_H
+
+#include "Debug.h"
+#include "Vector.h"
+#include "VertexBuffer.h"
+
+namespace android {
+namespace uirenderer {
+
+class SpotShadow {
+public:
+    static void createSpotShadow(const Vector3* poly, int polyLength,
+            const Vector3& lightCenter, float lightSize, int lightVertexCount,
+            int rays, int layers, float strength, VertexBuffer& retStrips);
+
+private:
+    static void computeSpotShadow(const Vector3* lightPoly, int lightPolyLength,
+            const Vector3& lightCenter, const Vector3* poly, int polyLength,
+            int rays, int layers, float strength, VertexBuffer& retstrips);
+
+    static void computeLightPolygon(int points, const Vector3& lightCenter,
+            float size, Vector3* ret);
+
+    static int  getStripSize(int rays, int layers);
+    static void smoothPolygon(int level, int rays, float* rayDist);
+    static float calculateOpacity(float jf, float deltaDist);
+    static float rayIntersectPoly(const Vector2* poly, int polyLength,
+            const Vector2& point, float dx, float dy);
+
+    static Vector2 centroid2d(const Vector2* poly, int polyLength);
+
+    static void xsort(Vector2* points, int pointsLength);
+    static int hull(Vector2* points, int pointsLength, Vector2* retPoly);
+    static bool rightTurn(double ax, double ay, double bx, double by, double cx, double cy);
+    static int intersection(Vector2* poly1, int poly1length, Vector2* poly2, int poly2length);
+    static void sort(Vector2* poly, int polyLength, const Vector2& center);
+
+    static float angle(const Vector2& point, const Vector2& center);
+    static void swap(Vector2* points, int i, int j);
+    static void quicksortCirc(Vector2* points, int low, int high, const Vector2& center);
+    static void quicksortX(Vector2* points, int low, int high);
+
+    static bool testPointInsidePolygon(const Vector2 testPoint, const Vector2* poly, int len);
+    static void makeClockwise(Vector2* polygon, int len);
+    static bool isClockwise(Vector2* polygon, int len);
+    static void reverse(Vector2* polygon, int len);
+    static inline bool lineIntersection(double x1, double y1, double x2, double y2,
+            double x3, double y3, double x4, double y4, Vector2& ret);
+
+    static void generateTriangleStrip(const Vector2* penumbra, int penumbraLength,
+            const Vector2* umbra, int umbraLength, int rays, int layers,
+            float strength, VertexBuffer& retstrips);
+
+    static const double EPSILON = 1e-7;
+}; // SpotShadow
+
+}; // namespace uirenderer
+}; // namespace android
+
+#endif // ANDROID_HWUI_SPOT_SHADOW_H
diff --git a/libs/hwui/Vector.h b/libs/hwui/Vector.h
index 5110272..15b9d6b 100644
--- a/libs/hwui/Vector.h
+++ b/libs/hwui/Vector.h
@@ -36,6 +36,10 @@
         x(px), y(py) {
     }
 
+    float lengthSquared() const {
+        return x * x + y * y;
+    }
+
     float length() const {
         return sqrt(x * x + y * y);
     }
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index 49f498e..26e9cc5 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -31,7 +31,8 @@
     public static final int ENCODING_INVALID = 0;
     /** Default audio data format */
     public static final int ENCODING_DEFAULT = 1;
-    // These two values must be kept in sync with JNI code for AudioTrack, AudioRecord
+
+    // These two values must be kept in sync with core/jni/android_media_AudioFormat.h
     /** Audio data format: PCM 16 bit per sample. Guaranteed to be supported by devices. */
     public static final int ENCODING_PCM_16BIT = 2;
     /** Audio data format: PCM 8 bit per sample. Not guaranteed to be supported by devices. */
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 68ac15a..46b74da 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -1009,7 +1009,7 @@
                 (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
                 synchronized (mA2dpAvrcpLock) {
                     if (mA2dp != null && mAvrcpAbsVolSupported) {
-                        mA2dp.setAvrcpAbsoluteVolume(index);
+                        mA2dp.setAvrcpAbsoluteVolume(index / 10);
                     }
                 }
             }
diff --git a/media/jni/Android.mk b/media/jni/Android.mk
index 685bbcc..dea971e 100644
--- a/media/jni/Android.mk
+++ b/media/jni/Android.mk
@@ -37,7 +37,7 @@
     libcamera_client \
     libmtp \
     libusbhost \
-    libjhead \
+    libexif \
     libstagefright_amrnb_common \
 
 LOCAL_REQUIRED_MODULES := \
@@ -47,7 +47,7 @@
     libstagefright_amrnbenc
 
 LOCAL_C_INCLUDES += \
-    external/jhead \
+    external/libexif/ \
     external/tremor/Tremor \
     frameworks/base/core/jni \
     frameworks/av/media/libmedia \
diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp
index eb7d51c..052d97d 100644
--- a/media/jni/android_media_MediaDrm.cpp
+++ b/media/jni/android_media_MediaDrm.cpp
@@ -186,6 +186,7 @@
             nativeParcel->setData(obj->data(), obj->dataSize());
             env->CallStaticVoidMethod(mClass, gFields.post_event, mObject,
                     jeventType, extra, jParcel);
+            env->DeleteLocalRef(jParcel);
         }
     }
 
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 4be9cd6..5e3fb1a 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -826,16 +826,19 @@
         jstring exclusionListObj = (jstring)env->CallObjectMethod(
                 proxyProps, fields.proxyConfigGetExclusionList);
 
-        const char *exclusionList =
-            env->GetStringUTFChars(exclusionListObj, NULL);
-
         if (host != NULL && exclusionListObj != NULL) {
-            thisplayer->updateProxyConfig(host, port, exclusionList);
-        }
+            const char *exclusionList = env->GetStringUTFChars(exclusionListObj, NULL);
 
-        if (exclusionList != NULL) {
-            env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
-            exclusionList = NULL;
+            if (exclusionList != NULL) {
+                thisplayer->updateProxyConfig(host, port, exclusionList);
+
+                env->ReleaseStringUTFChars(exclusionListObj, exclusionList);
+                exclusionList = NULL;
+            } else {
+                thisplayer->updateProxyConfig(host, port, "");
+            }
+        } else if (host != NULL) {
+            thisplayer->updateProxyConfig(host, port, "");
         }
 
         if (host != NULL) {
diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp
index 72ce3cc..4fbc55a 100644
--- a/media/jni/android_mtp_MtpDatabase.cpp
+++ b/media/jni/android_mtp_MtpDatabase.cpp
@@ -37,7 +37,10 @@
 #include "mtp.h"
 
 extern "C" {
-#include "jhead.h"
+#include "libexif/exif-content.h"
+#include "libexif/exif-data.h"
+#include "libexif/exif-tag.h"
+#include "libexif/exif-utils.h"
 }
 
 using namespace android;
@@ -750,6 +753,22 @@
     return result;
 }
 
+static void foreachentry(ExifEntry *entry, void *user) {
+    char buf[1024];
+    ALOGI("entry %x, format %d, size %d: %s",
+            entry->tag, entry->format, entry->size, exif_entry_get_value(entry, buf, sizeof(buf)));
+}
+
+static void foreachcontent(ExifContent *content, void *user) {
+    ALOGI("content %d", exif_content_get_ifd(content));
+    exif_content_foreach_entry(content, foreachentry, user);
+}
+
+static long getLongFromExifEntry(ExifEntry *e) {
+    ExifByteOrder o = exif_data_get_byte_order(e->parent->parent);
+    return exif_get_long(e->data, o);
+}
+
 MtpResponseCode MyMtpDatabase::getObjectInfo(MtpObjectHandle handle,
                                             MtpObjectInfo& info) {
     char            date[20];
@@ -792,23 +811,22 @@
 
     // read EXIF data for thumbnail information
     if (info.mFormat == MTP_FORMAT_EXIF_JPEG || info.mFormat == MTP_FORMAT_JFIF) {
-        ResetJpgfile();
-         // Start with an empty image information structure.
-        memset(&ImageInfo, 0, sizeof(ImageInfo));
-        ImageInfo.FlashUsed = -1;
-        ImageInfo.MeteringMode = -1;
-        ImageInfo.Whitebalance = -1;
-        strncpy(ImageInfo.FileName, (const char *)path, PATH_MAX);
-        if (ReadJpegFile((const char*)path, READ_METADATA)) {
-            Section_t* section = FindSection(M_EXIF);
-            if (section) {
-                info.mThumbCompressedSize = ImageInfo.ThumbnailSize;
-                info.mThumbFormat = MTP_FORMAT_EXIF_JPEG;
-                info.mImagePixWidth = ImageInfo.Width;
-                info.mImagePixHeight = ImageInfo.Height;
-            }
+
+        ExifData *exifdata = exif_data_new_from_file(path);
+        if (exifdata) {
+            //exif_data_foreach_content(exifdata, foreachcontent, NULL);
+
+            // XXX get this from exif, or parse jpeg header instead?
+            ExifEntry *w = exif_content_get_entry(
+                    exifdata->ifd[EXIF_IFD_EXIF], EXIF_TAG_PIXEL_X_DIMENSION);
+            ExifEntry *h = exif_content_get_entry(
+                    exifdata->ifd[EXIF_IFD_EXIF], EXIF_TAG_PIXEL_Y_DIMENSION);
+            info.mThumbCompressedSize = exifdata->data ? exifdata->size : 0;
+            info.mThumbFormat = MTP_FORMAT_EXIF_JPEG;
+            info.mImagePixWidth = getLongFromExifEntry(w);
+            info.mImagePixHeight = getLongFromExifEntry(h);
+            exif_data_unref(exifdata);
         }
-        DiscardData();
     }
 
     checkAndClearExceptionFromCallback(env, __FUNCTION__);
@@ -824,22 +842,16 @@
 
     if (getObjectFilePath(handle, path, length, format) == MTP_RESPONSE_OK
             && (format == MTP_FORMAT_EXIF_JPEG || format == MTP_FORMAT_JFIF)) {
-        ResetJpgfile();
-         // Start with an empty image information structure.
-        memset(&ImageInfo, 0, sizeof(ImageInfo));
-        ImageInfo.FlashUsed = -1;
-        ImageInfo.MeteringMode = -1;
-        ImageInfo.Whitebalance = -1;
-        strncpy(ImageInfo.FileName, (const char *)path, PATH_MAX);
-        if (ReadJpegFile((const char*)path, READ_METADATA)) {
-            Section_t* section = FindSection(M_EXIF);
-            if (section) {
-                outThumbSize = ImageInfo.ThumbnailSize;
-                result = malloc(outThumbSize);
-                if (result)
-                    memcpy(result, section->Data + ImageInfo.ThumbnailOffset + 8, outThumbSize);
+
+        ExifData *exifdata = exif_data_new_from_file(path);
+        if (exifdata) {
+            if (exifdata->data) {
+                result = malloc(exifdata->size);
+                if (result) {
+                    memcpy(result, exifdata->data, exifdata->size);
+                }
             }
-            DiscardData();
+            exif_data_unref(exifdata);
         }
     }
 
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 3fb6f38..e393c90 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"ብሩህነት"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"ራስ-አዙር"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"አዙሪት ተቆልፏል"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"ወደ ቁመት አቀማመጥ ተቆልፏል"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"ወደ መሬት ገጽታ ተቆልፏል"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"የግቤት ስልት"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"አካባቢ"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"አካባቢ ጠፍቷል"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index b86b7d4..1488864 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркост"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоматична ориентация"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Ориентацията е заключена"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Заключено във вертикален режим"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Заключено в хоризонтален режим"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Метод на въвеждане"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Местоположение"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Местоположението е изключено"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index d3686ce..04b3d69 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -136,7 +136,7 @@
     <string name="accessibility_battery_level" msgid="7451474187113371965">"Batteri <xliff:g id="NUMBER">%d</xliff:g> procent."</string>
     <string name="accessibility_settings_button" msgid="799583911231893380">"Systemindstillinger."</string>
     <string name="accessibility_notifications_button" msgid="4498000369779421892">"Underretninger."</string>
-    <string name="accessibility_remove_notification" msgid="3603099514902182350">"Ryd meddelelse."</string>
+    <string name="accessibility_remove_notification" msgid="3603099514902182350">"Ryd underretning."</string>
     <string name="accessibility_gps_enabled" msgid="3511469499240123019">"GPS aktiveret."</string>
     <string name="accessibility_gps_acquiring" msgid="8959333351058967158">"GPS samler data."</string>
     <string name="accessibility_tty_enabled" msgid="4613200365379426561">"TeleTypewriter aktiveret."</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index c9e17e9..a82e2d7 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brillo"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automáticamente"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotación bloqueada"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Bloqueada en vertical"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Bloqueada en horizontal"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Método de introducción"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Ubicación"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Ubicación desactivada"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 745979c..2cb40a0 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"روشنایی"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"چرخش خودکار"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"چرخش قفل شد"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"قفل شده در حالت عمودی"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"قفل شده در حالت افقی"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"روش ورودی"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"مکان"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"مکان خاموش"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 033189d..70b30e6 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminosité"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotation auto"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotation bloquée"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Verrouillé en mode portrait"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Verrouillé en mode paysage"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Mode de saisie"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Localisation"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Localisation désactivée"</string>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index 2990879e..1124163 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Պայծառություն"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Ինքնապտտում"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Պտտումը կողպված է"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Միայն ուղղաձիգ"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Միայն հորիզոնական"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Մուտքագրման եղանակը"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Տեղադրություն"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Անջատել տեղադրությունը"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index f85ddce..0bee9f0 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"画面の明るさ"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動回転"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"画面の向きをロック"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"縦向きにロック済み"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"横向きにロック済み"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"入力方法"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"現在地"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"現在地OFF"</string>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index b14ca3e..fe0a047 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"სიკაშკაშე"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"ავტო მობრუნება"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"როტაციის ჩაკეტვა"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"პორტრეტზე ჩაკეტილი"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"ლანდშაფტზე ჩაკეტილი"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"შეყვანის მეთოდი"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"მდებარეობა"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"მდებარეობა გამორთულია"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 81c6208..f72549d 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"밝기"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"자동 회전"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"회전 잠금"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"세로 모드로 고정됨"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"가로 모드로 고정됨"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"입력 방법"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"위치"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"위치 사용 중지"</string>
diff --git a/packages/SystemUI/res/values-lo-rLA/strings.xml b/packages/SystemUI/res/values-lo-rLA/strings.xml
index 15b51e8..59cf520 100644
--- a/packages/SystemUI/res/values-lo-rLA/strings.xml
+++ b/packages/SystemUI/res/values-lo-rLA/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"ຄວາມສະຫວ່າງ"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"ໝຸນໜ້າຈໍອັດຕະໂນມັດ"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"ລັອກການປ່ຽນລວງ"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"ລັອກເປັນຮູບລວງຕັ້ງ"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"ລັອກເປັນຮູບລວງນອນ"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"ວິທີການປ້ອນຂໍ້ມູນ"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"ສະຖານທີ່"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"ຂໍ້ມູນສະຖານທີ່ປິດຢູ່"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 6d3ebd8..4230b2e 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Spilgtums"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automātiska pagriešana"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Pagriešana bloķēta"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Fiksēts portreta režīmā"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Fiksēts ainavas režīmā"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Ievades metode"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Atrašanās vieta"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Atrašanās vieta izslēgta"</string>
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn-rMN/strings.xml
index 244de73..d6c68bc 100644
--- a/packages/SystemUI/res/values-mn-rMN/strings.xml
+++ b/packages/SystemUI/res/values-mn-rMN/strings.xml
@@ -183,8 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Тодрол"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автомат эргэх"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Эргүүлэлт түгжигдсэн"</string>
-    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Босоо байдлаар түгжих"</string>
-    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Хэвтээ байдлаар түгжих"</string>
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Босоо байдлаар түгжсэн"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Хэвтээ байдлаар түгжсэн"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Оруулах арга"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Байршил"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Байршил идэвхгүй"</string>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index 0d461b0..114d03e 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Kecerahan"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Auto Putar"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Putaran Dikunci"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Dikunci kepada Potret"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Dikunci kepada Landskap"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Kaedah Input"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Lokasi"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Lokasi Dimatikan"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 1e3d682..e077fc6 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brilho"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Girar automat."</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotação bloqueada"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Bloqueado no modo retrato"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Bloqueado no modo paisagem"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Método de entrada"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Localização"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Localização desativada"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index ba3e6df..9cfb329 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Luminozitate"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Rotire automată"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Rotire blocată"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Blocat la afișarea „portret”"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Blocat la afișarea „peisaj”"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Metodă de introducere"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Locație"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Localizarea este dezactivată"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 4d8d3e8..7a89d27 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -187,10 +187,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Яркость"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Автоповорот"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Автоповорот выкл."</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Только вертикально"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Только горизонтально"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Способ ввода"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Передача геоданных"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Местоположение выкл."</string>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index d66e10f..13c60946 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Jas"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Automatické otáčanie"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Otáčanie uzamknuté"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Uzamknuté na výšku"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Uzamknuté na šírku"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Metóda vstupu"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Poloha"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Poloha vypnutá"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index c01b4e0..1a6e06f 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -181,10 +181,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Ung\'avu"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Zungusha Otomatiki"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Mzunguko Umefungwa"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Imefungwa katika mkamo Wima"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Imefungwa katika mkao Mlalo"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Mbinu ya uingizaji"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Kutambua Eneo"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Kitambua eneo kimezimwa"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 798db3c..b5c24d7 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"ความสว่าง"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"หมุนอัตโนมัติ"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"ล็อกการหมุนแล้ว"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"ล็อกที่แนวตั้ง"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"ล็อกที่แนวนอน"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"วิธีป้อนข้อมูล"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"ตำแหน่ง"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"ปิดตำแหน่ง"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 7bf48b8..3704c48 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Brightness"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"I-auto Rotate"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Naka-lock ang Pag-rotate"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Naka-lock sa Portrait"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Naka-lock sa Landscape"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Pamamaraan ng Pag-input"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Lokasyon"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Naka-off ang Lokasyon"</string>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index da87195..56e5c88 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Parlaklık"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Otomatik Döndür"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Dönme Kilitlendi"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Dikey Görünüme Kilitlendi"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Yatay Görünüme Kilitlendi"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Giriş Yöntemi"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Konum"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Konum Bilgisi Kapalı"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index af3e0a9..700c20d 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -183,10 +183,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"Độ sáng"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"Tự động xoay"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"Khóa xoay"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"Đã khóa ở chế độ xoay dọc"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"Đã khóa ở chế độ xoay ngang"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"Phương thức nhập"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"Vị trí"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"Tắt vị trí"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index ce1b3dc..5909fbf 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自动旋转"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"屏幕方向:锁定"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"锁定为纵向"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"锁定为横向"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"输入法"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"位置信息"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"位置信息服务已关闭"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index e1e0768..d229347 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動旋轉"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已鎖定屏幕旋轉功能"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"已鎖定為直向"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"已鎖定為橫向"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"輸入法"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"位置"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"位置關閉"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 5e93ee0..83fdd12 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -185,10 +185,8 @@
     <string name="quick_settings_brightness_label" msgid="6968372297018755815">"亮度"</string>
     <string name="quick_settings_rotation_unlocked_label" msgid="336054930362580584">"自動旋轉"</string>
     <string name="quick_settings_rotation_locked_label" msgid="8058646447242565486">"已鎖定螢幕旋轉功能"</string>
-    <!-- no translation found for quick_settings_rotation_locked_portrait_label (1553131290066230775) -->
-    <skip />
-    <!-- no translation found for quick_settings_rotation_locked_landscape_label (7216265671276086593) -->
-    <skip />
+    <string name="quick_settings_rotation_locked_portrait_label" msgid="1553131290066230775">"已鎖定為縱向"</string>
+    <string name="quick_settings_rotation_locked_landscape_label" msgid="7216265671276086593">"已鎖定為橫向"</string>
     <string name="quick_settings_ime_label" msgid="7073463064369468429">"輸入法"</string>
     <string name="quick_settings_location_label" msgid="5011327048748762257">"定位"</string>
     <string name="quick_settings_location_off_label" msgid="7464544086507331459">"定位服務已關閉"</string>
diff --git a/packages/SystemUI/src/com/android/systemui/LoadAverageService.java b/packages/SystemUI/src/com/android/systemui/LoadAverageService.java
index 610e42b..59ffe03 100644
--- a/packages/SystemUI/src/com/android/systemui/LoadAverageService.java
+++ b/packages/SystemUI/src/com/android/systemui/LoadAverageService.java
@@ -195,9 +195,10 @@
             int systemW = (systemTime*W)/totalTime;
             int irqW = ((iowaitTime+irqTime+softIrqTime)*W)/totalTime;
 
-            int x = RIGHT - mPaddingRight;
-            int top = mPaddingTop + 2;
-            int bottom = mPaddingTop + mFH - 2;
+            int paddingRight = getPaddingRight();
+            int x = RIGHT - paddingRight;
+            int top = getPaddingTop() + 2;
+            int bottom = getPaddingTop() + mFH - 2;
 
             if (irqW > 0) {
                 canvas.drawRect(x-irqW, top, x, bottom, mIrqPaint);
@@ -212,16 +213,16 @@
                 x -= userW;
             }
 
-            int y = mPaddingTop - (int)mAscent;
-            canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth-1,
+            int y = getPaddingTop() - (int)mAscent;
+            canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth-1,
                     y-1, mShadowPaint);
-            canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth-1,
+            canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth-1,
                     y+1, mShadowPaint);
-            canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth+1,
+            canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth+1,
                     y-1, mShadow2Paint);
-            canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth+1,
+            canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth+1,
                     y+1, mShadow2Paint);
-            canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth,
+            canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth,
                     y, mLoadPaint);
 
             int N = stats.countWorkingStats();
@@ -233,7 +234,7 @@
 
                 userW = (st.rel_utime*W)/totalTime;
                 systemW = (st.rel_stime*W)/totalTime;
-                x = RIGHT - mPaddingRight;
+                x = RIGHT - paddingRight;
                 if (systemW > 0) {
                     canvas.drawRect(x-systemW, top, x, bottom, mSystemPaint);
                     x -= systemW;
@@ -243,18 +244,18 @@
                     x -= userW;
                 }
 
-                canvas.drawText(st.name, RIGHT-mPaddingRight-st.nameWidth-1,
+                canvas.drawText(st.name, RIGHT-paddingRight-st.nameWidth-1,
                         y-1, mShadowPaint);
-                canvas.drawText(st.name, RIGHT-mPaddingRight-st.nameWidth-1,
+                canvas.drawText(st.name, RIGHT-paddingRight-st.nameWidth-1,
                         y+1, mShadowPaint);
-                canvas.drawText(st.name, RIGHT-mPaddingRight-st.nameWidth+1,
+                canvas.drawText(st.name, RIGHT-paddingRight-st.nameWidth+1,
                         y-1, mShadow2Paint);
-                canvas.drawText(st.name, RIGHT-mPaddingRight-st.nameWidth+1,
+                canvas.drawText(st.name, RIGHT-paddingRight-st.nameWidth+1,
                         y+1, mShadow2Paint);
                 Paint p = mLoadPaint;
                 if (st.added) p = mAddedPaint;
                 if (st.removed) p = mRemovedPaint;
-                canvas.drawText(st.name, RIGHT-mPaddingRight-st.nameWidth, y, p);
+                canvas.drawText(st.name, RIGHT-paddingRight-st.nameWidth, y, p);
             }
         }
 
@@ -270,8 +271,8 @@
                 }
             }
 
-            int neededWidth = mPaddingLeft + mPaddingRight + maxWidth;
-            int neededHeight = mPaddingTop + mPaddingBottom + (mFH*(1+NW));
+            int neededWidth = getPaddingLeft() + getPaddingRight() + maxWidth;
+            int neededHeight = getPaddingTop() + getPaddingBottom() + (mFH*(1+NW));
             if (neededWidth != mNeededWidth || neededHeight != mNeededHeight) {
                 mNeededWidth = neededWidth;
                 mNeededHeight = neededHeight;
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
index be42bc0..35c824b 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
@@ -57,7 +57,7 @@
     public RecentsHorizontalScrollView(Context context, AttributeSet attrs) {
         super(context, attrs, 0);
         float densityScale = getResources().getDisplayMetrics().density;
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper = new SwipeHelper(SwipeHelper.Y, this, densityScale, pagingTouchSlop);
         mFadedEdgeDrawHelper = FadedEdgeDrawHelper.create(context, attrs, this, false);
         mRecycledViews = new HashSet<View>();
@@ -239,9 +239,9 @@
         if (mFadedEdgeDrawHelper != null) {
 
             mFadedEdgeDrawHelper.drawCallback(canvas,
-                    left, right, top, bottom, mScrollX, mScrollY,
+                    left, right, top, bottom, getScrollX(), getScrollY(),
                     0, 0,
-                    getLeftFadingEdgeStrength(), getRightFadingEdgeStrength(), mPaddingTop);
+                    getLeftFadingEdgeStrength(), getRightFadingEdgeStrength(), getPaddingTop());
         }
     }
 
@@ -280,7 +280,7 @@
         super.onFinishInflate();
         setScrollbarFadingEnabled(true);
         mLinearLayout = (LinearLayout) findViewById(R.id.recents_linear_layout);
-        final int leftPadding = mContext.getResources()
+        final int leftPadding = getContext().getResources()
             .getDimensionPixelOffset(R.dimen.status_bar_recents_thumbnail_left_margin);
         setOverScrollEffectPadding(leftPadding, 0);
     }
@@ -297,7 +297,7 @@
         super.onConfigurationChanged(newConfig);
         float densityScale = getResources().getDisplayMetrics().density;
         mSwipeHelper.setDensityScale(densityScale);
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper.setPagingTouchSlop(pagingTouchSlop);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index 788e843..ef56044 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -330,7 +330,7 @@
     }
 
     private void showImpl(boolean show) {
-        sendCloseSystemWindows(mContext, BaseStatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS);
+        sendCloseSystemWindows(getContext(), BaseStatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS);
 
         mShowing = show;
 
@@ -372,11 +372,11 @@
     }
 
     public void dismiss() {
-        ((RecentsActivity) mContext).dismissAndGoHome();
+        ((RecentsActivity) getContext()).dismissAndGoHome();
     }
 
     public void dismissAndGoBack() {
-        ((RecentsActivity) mContext).dismissAndGoBack();
+        ((RecentsActivity) getContext()).dismissAndGoBack();
     }
 
     public void onAnimationCancel(Animator animation) {
@@ -424,7 +424,7 @@
     }
 
     public void updateValuesFromResources() {
-        final Resources res = mContext.getResources();
+        final Resources res = getContext().getResources();
         mThumbnailWidth = Math.round(res.getDimension(R.dimen.status_bar_recents_thumbnail_width));
         mFitThumbnailToXY = res.getBoolean(R.bool.config_recents_thumbnail_image_fits_to_xy);
     }
@@ -440,7 +440,7 @@
                 invalidate();
             }
         });
-        mListAdapter = new TaskDescriptionAdapter(mContext);
+        mListAdapter = new TaskDescriptionAdapter(getContext());
         mRecentsContainer.setAdapter(mListAdapter);
         mRecentsContainer.setCallback(this);
 
@@ -474,7 +474,7 @@
             if (show && h.iconView.getVisibility() != View.VISIBLE) {
                 if (anim) {
                     h.iconView.setAnimation(
-                            AnimationUtils.loadAnimation(mContext, R.anim.recent_appear));
+                            AnimationUtils.loadAnimation(getContext(), R.anim.recent_appear));
                 }
                 h.iconView.setVisibility(View.VISIBLE);
             }
@@ -506,7 +506,7 @@
             if (show && h.thumbnailView.getVisibility() != View.VISIBLE) {
                 if (anim) {
                     h.thumbnailView.setAnimation(
-                            AnimationUtils.loadAnimation(mContext, R.anim.recent_appear));
+                            AnimationUtils.loadAnimation(getContext(), R.anim.recent_appear));
                 }
                 h.thumbnailView.setVisibility(View.VISIBLE);
             }
@@ -617,7 +617,7 @@
         } else {
             mRecentTaskDescriptions.addAll(tasks);
         }
-        if (((RecentsActivity) mContext).isActivityShowing()) {
+        if (((RecentsActivity) getContext()).isActivityShowing()) {
             refreshViews();
         }
     }
@@ -726,13 +726,13 @@
         // Currently, either direction means the same thing, so ignore direction and remove
         // the task.
         final ActivityManager am = (ActivityManager)
-                mContext.getSystemService(Context.ACTIVITY_SERVICE);
+                getContext().getSystemService(Context.ACTIVITY_SERVICE);
         if (am != null) {
             am.removeTask(ad.persistentTaskId, ActivityManager.REMOVE_TASK_KILL_PROCESS);
 
             // Accessibility feedback
             setContentDescription(
-                    mContext.getString(R.string.accessibility_recents_item_dismissed, ad.getLabel()));
+                    getContext().getString(R.string.accessibility_recents_item_dismissed, ad.getLabel()));
             sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
             setContentDescription(null);
         }
@@ -741,7 +741,7 @@
     private void startApplicationDetailsActivity(String packageName) {
         Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                 Uri.fromParts("package", packageName, null));
-        intent.setComponent(intent.resolveActivity(mContext.getPackageManager()));
+        intent.setComponent(intent.resolveActivity(getContext().getPackageManager()));
         TaskStackBuilder.create(getContext())
                 .addNextIntentWithParentStack(intent).startActivities();
     }
@@ -758,7 +758,7 @@
             final View selectedView, final View anchorView, final View thumbnailView) {
         thumbnailView.setSelected(true);
         final PopupMenu popup =
-            new PopupMenu(mContext, anchorView == null ? selectedView : anchorView);
+            new PopupMenu(getContext(), anchorView == null ? selectedView : anchorView);
         mPopup = popup;
         popup.getMenuInflater().inflate(R.menu.recent_popup_menu, popup.getMenu());
         popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@@ -793,15 +793,15 @@
     protected void dispatchDraw(Canvas canvas) {
         super.dispatchDraw(canvas);
 
-        int paddingLeft = mPaddingLeft;
+        int paddingLeft = getPaddingLeft();
         final boolean offsetRequired = isPaddingOffsetRequired();
         if (offsetRequired) {
             paddingLeft += getLeftPaddingOffset();
         }
 
-        int left = mScrollX + paddingLeft;
-        int right = left + mRight - mLeft - mPaddingRight - paddingLeft;
-        int top = mScrollY + getFadeTop(offsetRequired);
+        int left = getScrollX() + paddingLeft;
+        int right = left + getRight() - getLeft() - getPaddingRight() - paddingLeft;
+        int top = getScrollY() + getFadeTop(offsetRequired);
         int bottom = top + getFadeHeight(offsetRequired);
 
         if (offsetRequired) {
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
index 6dddc39..297fe0d 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
@@ -57,7 +57,7 @@
     public RecentsVerticalScrollView(Context context, AttributeSet attrs) {
         super(context, attrs, 0);
         float densityScale = getResources().getDisplayMetrics().density;
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop);
 
         mFadedEdgeDrawHelper = FadedEdgeDrawHelper.create(context, attrs, this, true);
@@ -69,7 +69,7 @@
     }
 
     private int scrollPositionOfMostRecent() {
-        return mLinearLayout.getHeight() - getHeight() + mPaddingTop;
+        return mLinearLayout.getHeight() - getHeight() + getPaddingTop();
     }
 
     private void addToRecycledViews(View v) {
@@ -248,9 +248,9 @@
         if (mFadedEdgeDrawHelper != null) {
             final boolean offsetRequired = isPaddingOffsetRequired();
             mFadedEdgeDrawHelper.drawCallback(canvas,
-                    left, right, top + getFadeTop(offsetRequired), bottom, mScrollX, mScrollY,
+                    left, right, top + getFadeTop(offsetRequired), bottom, getScrollX(), getScrollY(),
                     getTopFadingEdgeStrength(), getBottomFadingEdgeStrength(),
-                    0, 0, mPaddingTop);
+                    0, 0, getPaddingTop());
         }
     }
 
@@ -289,7 +289,7 @@
         super.onFinishInflate();
         setScrollbarFadingEnabled(true);
         mLinearLayout = (LinearLayout) findViewById(R.id.recents_linear_layout);
-        final int leftPadding = mContext.getResources()
+        final int leftPadding = getContext().getResources()
             .getDimensionPixelOffset(R.dimen.status_bar_recents_thumbnail_left_margin);
         setOverScrollEffectPadding(leftPadding, 0);
     }
@@ -306,7 +306,7 @@
         super.onConfigurationChanged(newConfig);
         float densityScale = getResources().getDisplayMetrics().density;
         mSwipeHelper.setDensityScale(densityScale);
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper.setPagingTouchSlop(pagingTouchSlop);
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index 9f9524b..6f839bd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -119,7 +119,7 @@
         }
 
         if (!numberEquals) {
-            if (icon.number > 0 && mContext.getResources().getBoolean(
+            if (icon.number > 0 && getContext().getResources().getBoolean(
                         R.bool.config_statusBarShowNumber)) {
                 if (mNumberBackground == null) {
                     mNumberBackground = getContext().getResources().getDrawable(
@@ -240,10 +240,10 @@
 
     void placeNumber() {
         final String str;
-        final int tooBig = mContext.getResources().getInteger(
+        final int tooBig = getContext().getResources().getInteger(
                 android.R.integer.status_bar_notification_info_maxnum);
         if (mIcon.number > tooBig) {
-            str = mContext.getResources().getString(
+            str = getContext().getResources().getString(
                         android.R.string.status_bar_notification_info_overflow);
         } else {
             NumberFormat f = NumberFormat.getIntegerInstance();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
index cb17ac6..eb63a54 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java
@@ -37,6 +37,8 @@
     private static final boolean DEBUG = false;
     private static final boolean DEBUG_COLORS = false;
 
+    public static final boolean HIGH_END = ActivityManager.isHighEndGfx();
+
     public static final int MODE_OPAQUE = 0;
     public static final int MODE_SEMI_TRANSPARENT = 1;
     public static final int MODE_TRANSLUCENT = 2;
@@ -48,7 +50,6 @@
 
     private final String mTag;
     private final View mView;
-    private final boolean mSupportsTransitions = ActivityManager.isHighEndGfx();
     private final BarBackgroundDrawable mBarBackground;
 
     private int mMode;
@@ -57,7 +58,7 @@
         mTag = "BarTransitions." + view.getClass().getSimpleName();
         mView = view;
         mBarBackground = new BarBackgroundDrawable(mView.getContext(), gradientResourceId);
-        if (mSupportsTransitions) {
+        if (HIGH_END) {
             mView.setBackground(mBarBackground);
         }
     }
@@ -67,18 +68,22 @@
     }
 
     public void transitionTo(int mode, boolean animate) {
+        // low-end devices do not support translucent modes, fallback to opaque
+        if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT)) {
+            mode = MODE_OPAQUE;
+        }
         if (mMode == mode) return;
         int oldMode = mMode;
         mMode = mode;
         if (DEBUG) Log.d(mTag, String.format("%s -> %s animate=%s",
                 modeToString(oldMode), modeToString(mode),  animate));
-        if (mSupportsTransitions) {
-            onTransition(oldMode, mMode, animate);
-        }
+        onTransition(oldMode, mMode, animate);
     }
 
     protected void onTransition(int oldMode, int newMode, boolean animate) {
-        applyModeBackground(oldMode, newMode, animate);
+        if (HIGH_END) {
+            applyModeBackground(oldMode, newMode, animate);
+        }
     }
 
     protected void applyModeBackground(int oldMode, int newMode, boolean animate) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
index aba7afa..a3cf0f2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
@@ -143,7 +143,7 @@
             }
         }
         StatusBarIcon icon = new StatusBarIcon(iconPkg, UserHandle.CURRENT, iconId, 0, 0, "Demo");
-        StatusBarIconView v = new StatusBarIconView(mContext, null);
+        StatusBarIconView v = new StatusBarIconView(getContext(), null);
         v.setTag(slot);
         v.set(icon);
         addView(v, 0, new LinearLayout.LayoutParams(mIconSize, mIconSize));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java
index 2a43cf6..1ea920d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java
@@ -28,6 +28,9 @@
 
 import com.android.internal.policy.IKeyguardService;
 
+import java.util.ArrayList;
+import java.util.List;
+
 
 /**
  * Facilitates event communication between navigation bar and keyguard.  Currently used to
@@ -40,6 +43,8 @@
     static final String KEYGUARD_CLASS = "com.android.keyguard.KeyguardService";
 
     private static KeyguardTouchDelegate sInstance;
+    private static final List<OnKeyguardConnectionListener> sConnectionListeners =
+            new ArrayList<OnKeyguardConnectionListener>();
 
     private volatile IKeyguardService mService;
 
@@ -52,6 +57,10 @@
             Slog.v(TAG, "Connected to keyguard");
             mService = IKeyguardService.Stub.asInterface(service);
 
+            for (int i = 0; i < sConnectionListeners.size(); i++) {
+                OnKeyguardConnectionListener listener = sConnectionListeners.get(i);
+                listener.onKeyguardServiceConnected(KeyguardTouchDelegate.this);
+            }
         }
 
         @Override
@@ -59,6 +68,11 @@
             Slog.v(TAG, "Disconnected from keyguard");
             mService = null;
             sInstance = null; // force reconnection if this goes away
+
+            for (int i = 0; i < sConnectionListeners.size(); i++) {
+                OnKeyguardConnectionListener listener = sConnectionListeners.get(i);
+                listener.onKeyguardServiceDisconnected(KeyguardTouchDelegate.this);
+            }
         }
 
     };
@@ -182,4 +196,13 @@
         }
     }
 
+    public static void addListener(OnKeyguardConnectionListener listener) {
+        sConnectionListeners.add(listener);
+    }
+
+    public interface OnKeyguardConnectionListener {
+
+        void onKeyguardServiceConnected(KeyguardTouchDelegate keyguardTouchDelegate);
+        void onKeyguardServiceDisconnected(KeyguardTouchDelegate keyguardTouchDelegate);
+    }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 839016d..0f3add3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -57,6 +57,8 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 
+import static com.android.systemui.statusbar.phone.KeyguardTouchDelegate.OnKeyguardConnectionListener;
+
 public class NavigationBarView extends LinearLayout {
     final static boolean DEBUG = false;
     final static String TAG = "PhoneStatusBar/NavigationBarView";
@@ -172,6 +174,25 @@
         }
     };
 
+    private final OnKeyguardConnectionListener mKeyguardConnectionListener =
+            new OnKeyguardConnectionListener() {
+                @Override
+                public void onKeyguardServiceConnected(
+                        KeyguardTouchDelegate keyguardTouchDelegate) {
+                    post(new Runnable() {
+                        @Override
+                        public void run() {
+                            mCameraDisabledByDpm = isCameraDisabledByDpm();
+                        }
+                    });
+                }
+
+                @Override
+                public void onKeyguardServiceDisconnected(
+                        KeyguardTouchDelegate keyguardTouchDelegate) {
+                }
+            };
+
     private class H extends Handler {
         public void handleMessage(Message m) {
             switch (m.what) {
@@ -201,7 +222,7 @@
         mDisplay = ((WindowManager)context.getSystemService(
                 Context.WINDOW_SERVICE)).getDefaultDisplay();
 
-        final Resources res = mContext.getResources();
+        final Resources res = getContext().getResources();
         mBarSize = res.getDimensionPixelSize(R.dimen.navigation_bar_size);
         mVertical = false;
         mShowMenu = false;
@@ -211,6 +232,7 @@
 
         mBarTransitions = new NavigationBarTransitions(this);
 
+        KeyguardTouchDelegate.addListener(mKeyguardConnectionListener);
         mCameraDisabledByDpm = isCameraDisabledByDpm();
         watchForDevicePolicyChanges();
     }
@@ -218,7 +240,7 @@
     private void watchForDevicePolicyChanges() {
         final IntentFilter filter = new IntentFilter();
         filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
-        mContext.registerReceiver(new BroadcastReceiver() {
+        getContext().registerReceiver(new BroadcastReceiver() {
             public void onReceive(Context context, Intent intent) {
                 post(new Runnable() {
                     @Override
@@ -302,7 +324,7 @@
 
     @Override
     public void setLayoutDirection(int layoutDirection) {
-        getIcons(mContext.getResources());
+        getIcons(getContext().getResources());
 
         super.setLayoutDirection(layoutDirection);
     }
@@ -323,7 +345,7 @@
             mTransitionListener.onBackAltCleared();
         }
         if (DEBUG) {
-            android.widget.Toast.makeText(mContext,
+            android.widget.Toast.makeText(getContext(),
                 "Navigation icon hints = " + hints,
                 500).show();
         }
@@ -395,7 +417,7 @@
 
     private boolean isCameraDisabledByDpm() {
         final DevicePolicyManager dpm =
-                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+                (DevicePolicyManager) getContext().getSystemService(Context.DEVICE_POLICY_SERVICE);
         if (dpm != null) {
             try {
                 final int userId = ActivityManagerNative.getDefault().getCurrentUser().id;
@@ -457,7 +479,7 @@
 
     private void watchForAccessibilityChanges() {
         final AccessibilityManager am =
-                (AccessibilityManager) mContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
+                (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
 
         // Set the initial state
         enableAccessibility(am.isTouchExplorationEnabled());
@@ -494,7 +516,7 @@
         if (hasCamera) {
             // Warm up KeyguardTouchDelegate so it's ready by the time the camera button is touched.
             // This will connect to KeyguardService so that touch events are processed.
-            KeyguardTouchDelegate.getInstance(mContext);
+            KeyguardTouchDelegate.getInstance(getContext());
         }
     }
 
@@ -570,7 +592,7 @@
 
     private String getResourceName(int resId) {
         if (resId != 0) {
-            final android.content.res.Resources res = mContext.getResources();
+            final android.content.res.Resources res = getContext().getResources();
             try {
                 return res.getResourceName(resId);
             } catch (android.content.res.Resources.NotFoundException ex) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsScrollView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsScrollView.java
index 8a2f8d6..175805a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsScrollView.java
@@ -42,7 +42,7 @@
         if (getChildCount() > 0) {
             View child = getChildAt(0);
             scrollRange = Math.max(0,
-                    child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));
+                    child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop()));
         }
         return scrollRange;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 4901823..7b03195 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -60,7 +60,7 @@
         mNotificationPanel = (NotificationPanelView) findViewById(R.id.notification_panel);
         int minHeight = getResources().getDimensionPixelSize(R.dimen.notification_row_min_height);
         int maxHeight = getResources().getDimensionPixelSize(R.dimen.notification_row_max_height);
-        mExpandHelper = new ExpandHelper(mContext, latestItems, minHeight, maxHeight);
+        mExpandHelper = new ExpandHelper(getContext(), latestItems, minHeight, maxHeight);
         mExpandHelper.setEventSource(this);
         mExpandHelper.setScrollView(mScrollView);
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
index 72497c5..cadb44a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -70,7 +70,7 @@
         filter.addAction(Intent.ACTION_TIME_CHANGED);
         filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
         filter.addAction(Intent.ACTION_LOCALE_CHANGED);
-        mContext.registerReceiver(mIntentReceiver, filter, null, null);
+        getContext().registerReceiver(mIntentReceiver, filter, null, null);
 
         updateClock();
     }
@@ -80,7 +80,7 @@
         super.onDetachedFromWindow();
 
         mDateFormat = null; // reload the locale next time
-        mContext.unregisterReceiver(mIntentReceiver);
+        getContext().unregisterReceiver(mIntentReceiver);
     }
 
     protected void updateClock() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
index 075a951..467e19a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
@@ -126,7 +126,7 @@
 
         int minHeight = getResources().getDimensionPixelSize(R.dimen.notification_row_min_height);
         int maxHeight = getResources().getDimensionPixelSize(R.dimen.notification_row_max_height);
-        mExpandHelper = new ExpandHelper(mContext, this, minHeight, maxHeight);
+        mExpandHelper = new ExpandHelper(getContext(), this, minHeight, maxHeight);
 
         mContentHolder = (ViewGroup) findViewById(R.id.content_holder);
         mContentSlider = (ViewGroup) findViewById(R.id.content_slider);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
index a5596f3..266cecf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
@@ -93,7 +93,7 @@
         }
 
         float densityScale = getResources().getDisplayMetrics().density;
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop);
     }
 
@@ -218,7 +218,7 @@
         super.onConfigurationChanged(newConfig);
         float densityScale = getResources().getDisplayMetrics().density;
         mSwipeHelper.setDensityScale(densityScale);
-        float pagingTouchSlop = ViewConfiguration.get(mContext).getScaledPagingTouchSlop();
+        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
         mSwipeHelper.setPagingTouchSlop(pagingTouchSlop);
     }
 
diff --git a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
index 663c357..e0c59ab 100644
--- a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
+++ b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
@@ -71,6 +71,8 @@
     public static final int MAX_BMAP_IN_INTENT = 750000;
     private static final float WALLPAPER_SCREENS_SPAN = 2f;
 
+    protected static Point sDefaultWallpaperSize;
+
     protected CropView mCropView;
     protected Uri mUri;
 
@@ -204,32 +206,34 @@
     }
 
     static protected Point getDefaultWallpaperSize(Resources res, WindowManager windowManager) {
-        Point minDims = new Point();
-        Point maxDims = new Point();
-        windowManager.getDefaultDisplay().getCurrentSizeRange(minDims, maxDims);
+        if (sDefaultWallpaperSize == null) {
+            Point minDims = new Point();
+            Point maxDims = new Point();
+            windowManager.getDefaultDisplay().getCurrentSizeRange(minDims, maxDims);
 
-        int maxDim = Math.max(maxDims.x, maxDims.y);
-        int minDim = Math.max(minDims.x, minDims.y);
+            int maxDim = Math.max(maxDims.x, maxDims.y);
+            int minDim = Math.max(minDims.x, minDims.y);
 
-        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
-            Point realSize = new Point();
-            windowManager.getDefaultDisplay().getRealSize(realSize);
-            maxDim = Math.max(realSize.x, realSize.y);
-            minDim = Math.min(realSize.x, realSize.y);
+            if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
+                Point realSize = new Point();
+                windowManager.getDefaultDisplay().getRealSize(realSize);
+                maxDim = Math.max(realSize.x, realSize.y);
+                minDim = Math.min(realSize.x, realSize.y);
+            }
+
+            // We need to ensure that there is enough extra space in the wallpaper
+            // for the intended parallax effects
+            final int defaultWidth, defaultHeight;
+            if (isScreenLarge(res)) {
+                defaultWidth = (int) (maxDim * wallpaperTravelToScreenWidthRatio(maxDim, minDim));
+                defaultHeight = maxDim;
+            } else {
+                defaultWidth = Math.max((int) (minDim * WALLPAPER_SCREENS_SPAN), maxDim);
+                defaultHeight = maxDim;
+            }
+            sDefaultWallpaperSize = new Point(defaultWidth, defaultHeight);
         }
-
-        // We need to ensure that there is enough extra space in the wallpaper
-        // for the intended
-        // parallax effects
-        final int defaultWidth, defaultHeight;
-        if (isScreenLarge(res)) {
-            defaultWidth = (int) (maxDim * wallpaperTravelToScreenWidthRatio(maxDim, minDim));
-            defaultHeight = maxDim;
-        } else {
-            defaultWidth = Math.max((int) (minDim * WALLPAPER_SCREENS_SPAN), maxDim);
-            defaultHeight = maxDim;
-        }
-        return new Point(defaultWidth, defaultHeight);
+        return sDefaultWallpaperSize;
     }
 
     public static int getRotationFromExif(String path) {
@@ -785,16 +789,13 @@
             WindowManager windowManager,
             final WallpaperManager wallpaperManager) {
         final Point defaultWallpaperSize = getDefaultWallpaperSize(res, windowManager);
-
-        new AsyncTask<Void, Void, Void>() {
-            public Void doInBackground(Void ... args) {
-                // If we have saved a wallpaper width/height, use that instead
-                int savedWidth = sharedPrefs.getInt(WALLPAPER_WIDTH_KEY, defaultWallpaperSize.x);
-                int savedHeight = sharedPrefs.getInt(WALLPAPER_HEIGHT_KEY, defaultWallpaperSize.y);
-                wallpaperManager.suggestDesiredDimensions(savedWidth, savedHeight);
-                return null;
-            }
-        }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void) null);
+        // If we have saved a wallpaper width/height, use that instead
+        int savedWidth = sharedPrefs.getInt(WALLPAPER_WIDTH_KEY, defaultWallpaperSize.x);
+        int savedHeight = sharedPrefs.getInt(WALLPAPER_HEIGHT_KEY, defaultWallpaperSize.y);
+        if (savedWidth != wallpaperManager.getDesiredMinimumWidth() ||
+                savedHeight != wallpaperManager.getDesiredMinimumHeight()) {
+            wallpaperManager.suggestDesiredDimensions(savedWidth, savedHeight);
+        }
     }
 
     protected static RectF getMaxCropRect(
diff --git a/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java b/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java
index 5d8d0d1..df6fca4c 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneLayoutInflater.java
@@ -24,7 +24,8 @@
 public class PhoneLayoutInflater extends LayoutInflater {
     private static final String[] sClassPrefixList = {
         "android.widget.",
-        "android.webkit."
+        "android.webkit.",
+        "android.app."
     };
     
     /**
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
index a6cae66..812e817 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java
@@ -108,6 +108,9 @@
         if (!context.bindServiceAsUser(intent, mKeyguardConnection,
                 Context.BIND_AUTO_CREATE, UserHandle.OWNER)) {
             if (DEBUG) Log.v(TAG, "*** Keyguard: can't bind to " + KEYGUARD_CLASS);
+            mKeyguardState.showing = false;
+            mKeyguardState.showingAndNotHidden = false;
+            mKeyguardState.secure = false;
         } else {
             if (DEBUG) Log.v(TAG, "*** Keyguard started");
         }
diff --git a/rs/java/android/renderscript/BaseObj.java b/rs/java/android/renderscript/BaseObj.java
index 1a15ce6..eee4936 100644
--- a/rs/java/android/renderscript/BaseObj.java
+++ b/rs/java/android/renderscript/BaseObj.java
@@ -16,6 +16,8 @@
 
 package android.renderscript;
 
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
 /**
  * BaseObj is the base class for all RenderScript objects owned by a RS context.
  * It is responsible for lifetime management and resource tracking. This class
@@ -107,17 +109,30 @@
         return mName;
     }
 
-    protected void finalize() throws Throwable {
-        if (!mDestroyed) {
-            if(mID != 0 && mRS.isAlive()) {
+    private void helpDestroy() {
+        boolean shouldDestroy = false;
+        synchronized(this) {
+            if (!mDestroyed) {
+                shouldDestroy = true;
+                mDestroyed = true;
+            }
+        }
+
+        if (shouldDestroy) {
+            // must include nObjDestroy in the critical section
+            ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock();
+            rlock.lock();
+            if(mRS.isAlive()) {
                 mRS.nObjDestroy(mID);
             }
+            rlock.unlock();
             mRS = null;
             mID = 0;
-            mDestroyed = true;
-            //Log.v(RenderScript.LOG_TAG, getClass() +
-            // " auto finalizing object without having released the RS reference.");
         }
+    }
+
+    protected void finalize() throws Throwable {
+        helpDestroy();
         super.finalize();
     }
 
@@ -126,12 +141,11 @@
      * primary use is to force immediate cleanup of resources when it is
      * believed the GC will not respond quickly enough.
      */
-    synchronized public void destroy() {
+    public void destroy() {
         if(mDestroyed) {
             throw new RSInvalidStateException("Object already destroyed.");
         }
-        mDestroyed = true;
-        mRS.nObjDestroy(mID);
+        helpDestroy();
     }
 
     /**
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index d2c7456..b0ef156 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -18,6 +18,7 @@
 
 import java.io.File;
 import java.lang.reflect.Method;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import android.content.Context;
 import android.content.res.AssetManager;
@@ -147,6 +148,7 @@
     }
 
     ContextType mContextType;
+    ReentrantReadWriteLock mRWLock;
 
     // Methods below are wrapped to protect the non-threadsafe
     // lockless fifo.
@@ -174,7 +176,18 @@
     native void rsnContextDestroy(long con);
     synchronized void nContextDestroy() {
         validate();
-        rsnContextDestroy(mContext);
+
+        // take teardown lock
+        // teardown lock can only be taken when no objects are being destroyed
+        ReentrantReadWriteLock.WriteLock wlock = mRWLock.writeLock();
+        wlock.lock();
+
+        long curCon = mContext;
+        // context is considered dead as of this point
+        mContext = 0;
+
+        wlock.unlock();
+        rsnContextDestroy(curCon);
     }
     native void rsnContextSetSurface(long con, int w, int h, Surface sur);
     synchronized void nContextSetSurface(int w, int h, Surface sur) {
@@ -259,8 +272,10 @@
         validate();
         return rsnGetName(mContext, obj);
     }
+
+    // nObjDestroy is explicitly _not_ synchronous to prevent crashes in finalizers
     native void rsnObjDestroy(long con, long id);
-    synchronized void nObjDestroy(long id) {
+    void nObjDestroy(long id) {
         // There is a race condition here.  The calling code may be run
         // by the gc while teardown is occuring.  This protects againts
         // deleting dead objects.
@@ -1092,6 +1107,7 @@
         if (ctx != null) {
             mApplicationContext = ctx.getApplicationContext();
         }
+        mRWLock = new ReentrantReadWriteLock();
     }
 
     /**
@@ -1186,6 +1202,8 @@
      */
     public void destroy() {
         validate();
+        nContextFinish();
+
         nContextDeinitToClient(mContext);
         mMessageThread.mRun = false;
         try {
@@ -1194,7 +1212,6 @@
         }
 
         nContextDestroy();
-        mContext = 0;
 
         nDeviceDestroy(mDev);
         mDev = 0;
diff --git a/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java b/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
index 33e64bd..ce149d9 100644
--- a/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
+++ b/rs/java/android/renderscript/ScriptIntrinsic3DLUT.java
@@ -84,10 +84,23 @@
      * @param aout Output allocation
      */
     public void forEach(Allocation ain, Allocation aout) {
-        forEach(0, ain, aout, null);
+        forEach(ain, aout, null);
     }
 
     /**
+     * Invoke the kernel and apply the lookup to each cell of ain
+     * and copy to aout.
+     *
+     * @param ain Input allocation
+     * @param aout Output allocation
+     * @param opt Launch options for kernel
+     */
+    public void forEach(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        forEach(0, ain, aout, null, opt);
+    }
+
+
+    /**
      * Get a KernelID for this intrinsic kernel.
      *
      * @return Script.KernelID The KernelID object.
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBlend.java b/rs/java/android/renderscript/ScriptIntrinsicBlend.java
index 40f1a3e..d4038c2 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicBlend.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicBlend.java
@@ -40,14 +40,14 @@
 
     }
 
-    private void blend(int id, Allocation ain, Allocation aout) {
+    private void blend(int id, Allocation ain, Allocation aout, Script.LaunchOptions opt) {
         if (!ain.getElement().isCompatible(Element.U8_4(mRS))) {
             throw new RSIllegalArgumentException("Input is not of expected format.");
         }
         if (!aout.getElement().isCompatible(Element.U8_4(mRS))) {
             throw new RSIllegalArgumentException("Output is not of expected format.");
         }
-        forEach(id, ain, aout, null);
+        forEach(id, ain, aout, null, opt);
     }
 
     /**
@@ -57,7 +57,18 @@
      * @param aout The destination buffer
      */
     public void forEachClear(Allocation ain, Allocation aout) {
-        blend(0, ain, aout);
+        forEachClear(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = {0, 0, 0, 0}
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachClear(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(0, ain, aout, opt);
     }
 
     /**
@@ -77,7 +88,18 @@
      * @param aout The destination buffer
      */
     public void forEachSrc(Allocation ain, Allocation aout) {
-        blend(1, ain, aout);
+        forEachSrc(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = src
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSrc(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        forEachDst(ain, aout, null);
     }
 
     /**
@@ -102,6 +124,19 @@
     }
 
     /**
+     * Sets dst = dst
+     *
+     * This is a NOP.
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachDst(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        // N, optOP
+    }
+
+    /**
      * Get a KernelID for the Dst kernel.
      *
      * @return Script.KernelID The KernelID object.
@@ -117,7 +152,18 @@
      * @param aout The destination buffer
      */
     public void forEachSrcOver(Allocation ain, Allocation aout) {
-        blend(3, ain, aout);
+        forEachSrcOver(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = src + dst * (1.0 - src.a)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSrcOver(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(3, ain, aout, opt);
     }
 
     /**
@@ -136,7 +182,18 @@
      * @param aout The destination buffer
      */
     public void forEachDstOver(Allocation ain, Allocation aout) {
-        blend(4, ain, aout);
+        forEachDstOver(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = dst + src * (1.0 - dst.a)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachDstOver(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(4, ain, aout, opt);
     }
 
     /**
@@ -155,7 +212,18 @@
      * @param aout The destination buffer
      */
     public void forEachSrcIn(Allocation ain, Allocation aout) {
-        blend(5, ain, aout);
+        forEachSrcIn(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = src * dst.a
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSrcIn(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(5, ain, aout, opt);
     }
 
     /**
@@ -174,7 +242,18 @@
      * @param aout The destination buffer
      */
     public void forEachDstIn(Allocation ain, Allocation aout) {
-        blend(6, ain, aout);
+        forEachDstIn(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = dst * src.a
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachDstIn(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(6, ain, aout, opt);
     }
 
     /**
@@ -193,7 +272,18 @@
      * @param aout The destination buffer
      */
     public void forEachSrcOut(Allocation ain, Allocation aout) {
-        blend(7, ain, aout);
+        forEachSrcOut(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = src * (1.0 - dst.a)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSrcOut(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(7, ain, aout, opt);
     }
 
     /**
@@ -212,7 +302,18 @@
      * @param aout The destination buffer
      */
     public void forEachDstOut(Allocation ain, Allocation aout) {
-        blend(8, ain, aout);
+        forEachDstOut(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = dst * (1.0 - src.a)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachDstOut(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(8, ain, aout, opt);
     }
 
     /**
@@ -232,7 +333,19 @@
      * @param aout The destination buffer
      */
     public void forEachSrcAtop(Allocation ain, Allocation aout) {
-        blend(9, ain, aout);
+        forEachSrcAtop(ain, aout, null);
+    }
+
+    /**
+     * dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb
+     * dst.a = dst.a
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSrcAtop(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(9, ain, aout, opt);
     }
 
     /**
@@ -252,7 +365,19 @@
      * @param aout The destination buffer
      */
     public void forEachDstAtop(Allocation ain, Allocation aout) {
-        blend(10, ain, aout);
+        forEachDstAtop(ain, aout, null);
+    }
+
+    /**
+     * dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb
+     * dst.a = src.a
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachDstAtop(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(10, ain, aout, opt);
     }
 
     /**
@@ -271,7 +396,18 @@
      * @param aout The destination buffer
      */
     public void forEachXor(Allocation ain, Allocation aout) {
-        blend(11, ain, aout);
+        forEachXor(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachXor(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(11, ain, aout, opt);
     }
 
     /**
@@ -300,7 +436,18 @@
      * @param aout The destination buffer
      */
     public void forEachMultiply(Allocation ain, Allocation aout) {
-        blend(14, ain, aout);
+        forEachMultiply(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = src * dst
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachMultiply(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(14, ain, aout, opt);
     }
 
     /**
@@ -396,7 +543,18 @@
      * @param aout The destination buffer
      */
     public void forEachAdd(Allocation ain, Allocation aout) {
-        blend(34, ain, aout);
+        forEachAdd(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = min(src + dst, 1.0)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachAdd(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(34, ain, aout, opt);
     }
 
     /**
@@ -415,7 +573,18 @@
      * @param aout The destination buffer
      */
     public void forEachSubtract(Allocation ain, Allocation aout) {
-        blend(35, ain, aout);
+        forEachSubtract(ain, aout, null);
+    }
+
+    /**
+     * Sets dst = max(dst - src, 0.0)
+     *
+     * @param ain The source buffer
+     * @param aout The destination buffer
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEachSubtract(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
+        blend(35, ain, aout, opt);
     }
 
     /**
diff --git a/rs/java/android/renderscript/ScriptIntrinsicBlur.java b/rs/java/android/renderscript/ScriptIntrinsicBlur.java
index 2b36d27..e7e33b8 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicBlur.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicBlur.java
@@ -84,10 +84,23 @@
      *             type.
      */
     public void forEach(Allocation aout) {
-        forEach(0, null, aout, null);
+        forEach(aout, null);
     }
 
     /**
+     * Apply the filter to the input and save to the specified
+     * allocation.
+     *
+     * @param aout Output allocation. Must match creation element
+     *             type.
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach(Allocation aout, Script.LaunchOptions opt) {
+        forEach(0, null, aout, null, opt);
+    }
+
+
+    /**
      * Get a KernelID for this intrinsic kernel.
      *
      * @return Script.KernelID The KernelID object.
diff --git a/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java b/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
index 4b0d507..57d917c 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicColorMatrix.java
@@ -206,7 +206,6 @@
         setMatrix();
     }
 
-
     /**
      * Invoke the kernel and apply the matrix to each cell of input
      * {@link Allocation} and copy to the output {@link Allocation}.
@@ -223,6 +222,26 @@
      * @param aout Output allocation
      */
     public void forEach(Allocation ain, Allocation aout) {
+        forEach(ain, aout, null);
+    }
+
+    /**
+     * Invoke the kernel and apply the matrix to each cell of input
+     * {@link Allocation} and copy to the output {@link Allocation}.
+     *
+     * If the vector size of the input is less than four, the
+     * remaining components are treated as zero for the matrix
+     * multiply.
+     *
+     * If the output vector size is less than four, the unused
+     * vector components are discarded.
+     *
+     *
+     * @param ain Input allocation
+     * @param aout Output allocation
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
         if (!ain.getElement().isCompatible(Element.U8(mRS)) &&
             !ain.getElement().isCompatible(Element.U8_2(mRS)) &&
             !ain.getElement().isCompatible(Element.U8_3(mRS)) &&
@@ -247,7 +266,7 @@
             throw new RSIllegalArgumentException("Unsuported element type.");
         }
 
-        forEach(0, ain, aout, null);
+        forEach(0, ain, aout, null, opt);
     }
 
     /**
diff --git a/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java b/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
index a1a1b7e..fb91fdc 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java
@@ -106,7 +106,19 @@
      *             type.
      */
     public void forEach(Allocation aout) {
-        forEach(0, null, aout, null);
+        forEach(aout, null);
+    }
+
+    /**
+     * Apply the filter to the input and save to the specified
+     * allocation.
+     *
+     * @param aout Output allocation. Must match creation element
+     *             type.
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach(Allocation aout, Script.LaunchOptions opt) {
+        forEach(0, null, aout, null, opt);
     }
 
     /**
diff --git a/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java b/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
index 8b66896..0357560 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java
@@ -107,10 +107,23 @@
      *             type.
      */
     public void forEach(Allocation aout) {
-        forEach(0, null, aout, null);
+        forEach(aout, null);
     }
 
     /**
+     * Apply the filter to the input and save to the specified
+     * allocation.
+     *
+     * @param aout Output allocation. Must match creation element
+     *             type.
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach(Allocation aout, Script.LaunchOptions opt) {
+        forEach(0, null, aout, null, opt);
+    }
+
+
+    /**
      * Get a KernelID for this intrinsic kernel.
      *
      * @return Script.KernelID The KernelID object.
diff --git a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
index 536663d..95b610a 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
@@ -67,6 +67,24 @@
      * @param ain The input image
      */
     public void forEach(Allocation ain) {
+        forEach(ain, null);
+    }
+
+    /**
+     * Process an input buffer and place the histogram into the
+     * output allocation. The output allocation may be a narrower
+     * vector size than the input. In this case the vector size of
+     * the output is used to determine how many of the input
+     * channels are used in the computation. This is useful if you
+     * have an RGBA input buffer but only want the histogram for
+     * RGB.
+     *
+     * 1D and 2D input allocations are supported.
+     *
+     * @param ain The input image
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach(Allocation ain, Script.LaunchOptions opt) {
         if (ain.getType().getElement().getVectorSize() <
             mOut.getType().getElement().getVectorSize()) {
 
@@ -78,9 +96,11 @@
             throw new RSIllegalArgumentException("Output type must be U32 or I32.");
         }
 
-        forEach(0, ain, null, null);
+        forEach(0, ain, null, null, opt);
     }
 
+
+
     /**
      * Set the coefficients used for the RGBA to Luminocity
      * calculation. The default is {0.299f, 0.587f, 0.114f, 0.f}.
@@ -137,6 +157,7 @@
         setVar(1, aout);
     }
 
+
     /**
      * Process an input buffer and place the histogram into the
      * output allocation. The dot product of the input channel and
@@ -148,6 +169,21 @@
      * @param ain The input image
      */
     public void forEach_Dot(Allocation ain) {
+        forEach_Dot(ain, null);
+    }
+
+    /**
+     * Process an input buffer and place the histogram into the
+     * output allocation. The dot product of the input channel and
+     * the coefficients from 'setDotCoefficients' are used to
+     * calculate the output values.
+     *
+     * 1D and 2D input allocations are supported.
+     *
+     * @param ain The input image
+     * @param opt LaunchOptions for clipping
+     */
+    public void forEach_Dot(Allocation ain, Script.LaunchOptions opt) {
         if (mOut.getType().getElement().getVectorSize() != 1) {
             throw new RSIllegalArgumentException("Output vector size must be one.");
         }
@@ -156,7 +192,7 @@
             throw new RSIllegalArgumentException("Output type must be U32 or I32.");
         }
 
-        forEach(1, ain, null, null);
+        forEach(1, ain, null, null, opt);
     }
 
 
diff --git a/rs/java/android/renderscript/ScriptIntrinsicLUT.java b/rs/java/android/renderscript/ScriptIntrinsicLUT.java
index 001095c..69ff64a 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicLUT.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicLUT.java
@@ -114,7 +114,6 @@
         mDirty = true;
     }
 
-
     /**
      * Invoke the kernel and apply the lookup to each cell of ain
      * and copy to aout.
@@ -123,11 +122,23 @@
      * @param aout Output allocation
      */
     public void forEach(Allocation ain, Allocation aout) {
+        forEach(ain, aout, null);
+    }
+
+    /**
+     * Invoke the kernel and apply the lookup to each cell of ain
+     * and copy to aout.
+     *
+     * @param ain Input allocation
+     * @param aout Output allocation
+     * @param opt Options for clipping
+     */
+    public void forEach(Allocation ain, Allocation aout, Script.LaunchOptions opt) {
         if (mDirty) {
             mDirty = false;
             mTables.copyFromUnchecked(mCache);
         }
-        forEach(0, ain, aout, null);
+        forEach(0, ain, aout, null, opt);
     }
 
     /**
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 84d9a22..5cf3a83 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -224,28 +224,28 @@
 }
 
 static void
-nDeviceDestroy(JNIEnv *_env, jobject _this, jint dev)
+nDeviceDestroy(JNIEnv *_env, jobject _this, jlong dev)
 {
     LOG_API("nDeviceDestroy");
     return rsDeviceDestroy((RsDevice)dev);
 }
 
 static void
-nDeviceSetConfig(JNIEnv *_env, jobject _this, jint dev, jint p, jint value)
+nDeviceSetConfig(JNIEnv *_env, jobject _this, jlong dev, jint p, jint value)
 {
     LOG_API("nDeviceSetConfig  dev(%p), param(%i), value(%i)", (void *)dev, p, value);
     return rsDeviceSetConfig((RsDevice)dev, (RsDeviceParam)p, value);
 }
 
 static jlong
-nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jint sdkVer, jint ct)
+nContextCreate(JNIEnv *_env, jobject _this, jlong dev, jint ver, jint sdkVer, jint ct)
 {
     LOG_API("nContextCreate");
     return (jint)rsContextCreate((RsDevice)dev, ver, sdkVer, (RsContextType)ct, 0);
 }
 
 static jlong
-nContextCreateGL(JNIEnv *_env, jobject _this, jint dev, jint ver, jint sdkVer,
+nContextCreateGL(JNIEnv *_env, jobject _this, jlong dev, jint ver, jint sdkVer,
                  int colorMin, int colorPref,
                  int alphaMin, int alphaPref,
                  int depthMin, int depthPref,
diff --git a/services/Android.mk b/services/Android.mk
index 8bd7629..80fd35a 100644
--- a/services/Android.mk
+++ b/services/Android.mk
@@ -43,3 +43,7 @@
 
 include $(BUILD_SHARED_LIBRARY)
 
+ifeq (,$(ONE_SHOT_MAKEFILE))
+include $(call all-makefiles-under, $(LOCAL_PATH))
+endif
+
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index e60231a..0d535cc 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -1411,7 +1411,7 @@
     public void unregisterListener(IMountServiceListener listener) {
         synchronized (mListeners) {
             for(MountServiceBinderListener bl : mListeners) {
-                if (bl.mListener == listener) {
+                if (bl.mListener.asBinder() == listener.asBinder()) {
                     mListeners.remove(mListeners.indexOf(bl));
                     listener.asBinder().unlinkToDeath(bl, 0);
                     return;
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
old mode 100644
new mode 100755
index 125621a..ca6a649
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -458,11 +458,11 @@
 
     final void moveToFront() {
         if (isAttached()) {
-            mStacks.remove(this);
-            mStacks.add(this);
             if (isOnHomeDisplay()) {
                 mStackSupervisor.moveHomeStack(isHomeStack());
             }
+            mStacks.remove(this);
+            mStacks.add(this);
         }
     }
 
@@ -1149,7 +1149,7 @@
                     } else if (isActivityOverHome(r)) {
                         if (DEBUG_VISBILITY) Slog.v(TAG, "Showing home: at " + r);
                         showHomeBehindStack = true;
-                        behindFullscreen = !isHomeStack();
+                        behindFullscreen = !isHomeStack() && r.frontOfTask && task.mOnTopOfHome;
                     }
                 } else {
                     if (DEBUG_VISBILITY) Slog.v(
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 1e0be23..7c3e474 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -59,6 +59,8 @@
 import android.graphics.Point;
 import android.hardware.display.DisplayManager;
 import android.hardware.display.DisplayManager.DisplayListener;
+import android.hardware.display.DisplayManagerGlobal;
+import android.hardware.display.VirtualDisplay;
 import android.os.Binder;
 import android.os.Bundle;
 import android.os.Debug;
@@ -79,6 +81,7 @@
 import android.util.SparseIntArray;
 import android.view.Display;
 import android.view.DisplayInfo;
+import android.view.Surface;
 import com.android.internal.app.HeavyWeightSwitcherActivity;
 import com.android.internal.os.TransferPipe;
 import com.android.server.am.ActivityManagerService.PendingActivityLaunch;
@@ -88,6 +91,7 @@
 import java.io.FileDescriptor;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -119,6 +123,7 @@
     static final int HANDLE_DISPLAY_CHANGED = FIRST_SUPERVISOR_STACK_MSG + 6;
     static final int HANDLE_DISPLAY_REMOVED = FIRST_SUPERVISOR_STACK_MSG + 7;
 
+    private final static String VIRTUAL_DISPLAY_BASE_NAME = "ActivityViewVirtualDisplay";
 
     // For debugging to make sure the caller when acquiring/releasing our
     // wake lock is the system process.
@@ -212,11 +217,13 @@
     /** Stack id of the front stack when user switched, indexed by userId. */
     SparseIntArray mUserStackInFront = new SparseIntArray(2);
 
+    // TODO: Add listener for removal of references.
     /** Mapping from (ActivityStack/TaskStack).mStackId to their current state */
-    SparseArray<ActivityContainer> mActivityContainers = new SparseArray<ActivityContainer>();
+    SparseArray<WeakReference<ActivityContainer>> mActivityContainers =
+            new SparseArray<WeakReference<ActivityContainer>>();
 
     /** Mapping from displayId to display current state */
-    SparseArray<ActivityDisplay> mActivityDisplays = new SparseArray<ActivityDisplay>();
+    private SparseArray<ActivityDisplay> mActivityDisplays = new SparseArray<ActivityDisplay>();
 
     public ActivityStackSupervisor(ActivityManagerService service) {
         mService = service;
@@ -1670,15 +1677,9 @@
                                 // We don't need to start a new activity, and
                                 // the client said not to do anything if that
                                 // is the case, so this is it!
-                                if (r.task == null)  Slog.v(TAG,
-                                    "startActivityUncheckedLocked: task left null",
-                                    new RuntimeException("here").fillInStackTrace());
                                 return ActivityManager.START_RETURN_INTENT_TO_CALLER;
                             }
                             top.deliverNewIntentLocked(callingUid, r.intent);
-                            if (r.task == null)  Slog.v(TAG,
-                                "startActivityUncheckedLocked: task left null",
-                                new RuntimeException("here").fillInStackTrace());
                             return ActivityManager.START_DELIVERED_TO_TOP;
                         }
                     }
@@ -1691,9 +1692,6 @@
                         r.requestCode, Activity.RESULT_CANCELED, null);
             }
             ActivityOptions.abort(options);
-            if (r.task == null)  Slog.v(TAG,
-                "startActivityUncheckedLocked: task left null",
-                new RuntimeException("here").fillInStackTrace());
             return ActivityManager.START_CLASS_NOT_FOUND;
         }
 
@@ -2099,9 +2097,14 @@
     }
 
     ActivityStack getStack(int stackId) {
-        ActivityContainer activityContainer = mActivityContainers.get(stackId);
-        if (activityContainer != null) {
-            return activityContainer.mStack;
+        WeakReference<ActivityContainer> weakReference = mActivityContainers.get(stackId);
+        if (weakReference != null) {
+            ActivityContainer activityContainer = weakReference.get();
+            if (activityContainer != null) {
+                return activityContainer.mStack;
+            } else {
+                mActivityContainers.remove(stackId);
+            }
         }
         return null;
     }
@@ -2135,7 +2138,7 @@
             IActivityContainerCallback callback) {
         ActivityContainer activityContainer = new ActivityContainer(parentActivity, stackId,
                 callback);
-        mActivityContainers.put(stackId, activityContainer);
+        mActivityContainers.put(stackId, new WeakReference<ActivityContainer>(activityContainer));
         if (parentActivity != null) {
             parentActivity.mChildContainers.add(activityContainer.mStack);
         }
@@ -2729,11 +2732,17 @@
     }
 
     public void handleDisplayAddedLocked(int displayId) {
+        boolean newDisplay;
         synchronized (mService) {
-            ActivityDisplay activityDisplay = new ActivityDisplay(displayId);
-            mActivityDisplays.put(displayId, activityDisplay);
+            newDisplay = mActivityDisplays.get(displayId) == null;
+            if (newDisplay) {
+                ActivityDisplay activityDisplay = new ActivityDisplay(displayId);
+                mActivityDisplays.put(displayId, activityDisplay);
+            }
         }
-        mWindowManager.onDisplayAdded(displayId);
+        if (newDisplay) {
+            mWindowManager.onDisplayAdded(displayId);
+        }
     }
 
     public void handleDisplayRemovedLocked(int displayId) {
@@ -2961,6 +2970,48 @@
             return this;
         }
 
+        @Override
+        public void createActivityView(Surface surface, int width, int height, int density) {
+            DisplayManagerGlobal dm = DisplayManagerGlobal.getInstance();
+            VirtualDisplay virtualDisplay;
+            long ident = Binder.clearCallingIdentity();
+            try {
+                virtualDisplay = dm.createVirtualDisplay(mService.mContext,
+                        VIRTUAL_DISPLAY_BASE_NAME, width, height, density, surface,
+                        DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC |
+                        DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY);
+            } finally {
+                Binder.restoreCallingIdentity(ident);
+            }
+
+            final Display display = virtualDisplay.getDisplay();
+            final int displayId = display.getDisplayId();
+
+            mWindowManager.handleDisplayAdded(displayId);
+
+            synchronized (mService) {
+                ActivityDisplay activityDisplay = new ActivityDisplay(display);
+                mActivityDisplays.put(displayId, activityDisplay);
+                attachToDisplayLocked(activityDisplay);
+                activityDisplay.mVirtualDisplay = virtualDisplay;
+            }
+        }
+
+        @Override
+        public void deleteActivityView() {
+            synchronized (mService) {
+                if (!isAttached()) {
+                    return;
+                }
+                VirtualDisplay virtualDisplay = mActivityDisplay.mVirtualDisplay;
+                if (virtualDisplay != null) {
+                    virtualDisplay.release();
+                    mActivityDisplay.mVirtualDisplay = null;
+                }
+                detachLocked();
+            }
+        }
+
         ActivityStackSupervisor getOuter() {
             return ActivityStackSupervisor.this;
         }
@@ -2990,9 +3041,17 @@
          * stacks, bottommost behind. Accessed directly by ActivityManager package classes */
         final ArrayList<ActivityStack> mStacks = new ArrayList<ActivityStack>();
 
+        /** If this display is for an ActivityView then the VirtualDisplay created for it is stored
+         * here. */
+        VirtualDisplay mVirtualDisplay;
+
         ActivityDisplay(int displayId) {
-            mDisplayId = displayId;
-            mDisplay = mDisplayManager.getDisplay(displayId);
+            this(mDisplayManager.getDisplay(displayId));
+        }
+
+        ActivityDisplay(Display display) {
+            mDisplay = display;
+            mDisplayId = display.getDisplayId();
             mDisplay.getDisplayInfo(mDisplayInfo);
         }
 
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 073e24a..12ef65a 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -31,6 +31,7 @@
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
+import android.os.Process;
 import android.os.RemoteException;
 import android.os.SystemClock;
 import android.os.SystemProperties;
@@ -675,7 +676,8 @@
         if (surface == null) {
             throw new IllegalArgumentException("surface must not be null");
         }
-        if ((flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC) != 0) {
+        if (callingUid != Process.SYSTEM_UID &&
+                (flags & DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC) != 0) {
             if (mContext.checkCallingPermission(android.Manifest.permission.CAPTURE_VIDEO_OUTPUT)
                     != PackageManager.PERMISSION_GRANTED
                     && mContext.checkCallingPermission(
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index b71fc19..f3b040e 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -4816,21 +4816,23 @@
     }
 
     /**
-     * Create a new TaskStack and place it next to an existing stack.
+     * Create a new TaskStack and place it on a DisplayContent.
      * @param stackId The unique identifier of the new stack.
+     * @param displayId The unique identifier of the DisplayContent.
      */
     public void createStack(int stackId, int displayId) {
-        synchronized (mWindowMap) {
-            final int numDisplays = mDisplayContents.size();
-            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
-                final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
-                if (displayContent.getDisplayId() == displayId) {
+        final long origId = Binder.clearCallingIdentity();
+        try {
+            synchronized (mWindowMap) {
+                final DisplayContent displayContent = mDisplayContents.get(displayId);
+                if (displayContent != null) {
                     TaskStack stack = displayContent.createStack(stackId);
                     mStackIdToStack.put(stackId, stack);
                     performLayoutAndPlaceSurfacesLocked();
-                    return;
                 }
             }
+        } finally {
+            Binder.restoreCallingIdentity(origId);
         }
     }
 
@@ -4861,7 +4863,6 @@
             final TaskStack stack = task.mStack;
             EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, taskId, "removeTask");
             stack.removeTask(task);
-            stack.getDisplayContent().layoutNeeded = true;
         }
     }
 
@@ -7040,6 +7041,8 @@
         public static final int TAP_OUTSIDE_STACK = 31;
         public static final int NOTIFY_ACTIVITY_DRAWN = 32;
 
+        public static final int REMOVE_STARTING_TIMEOUT = 33;
+
         @Override
         public void handleMessage(Message msg) {
             if (DEBUG_WINDOW_TRACE) {
@@ -7441,9 +7444,7 @@
                 }
 
                 case DO_DISPLAY_ADDED:
-                    synchronized (mWindowMap) {
-                        handleDisplayAddedLocked(msg.arg1);
-                    }
+                    handleDisplayAdded(msg.arg1);
                     break;
 
                 case DO_DISPLAY_REMOVED:
@@ -10786,11 +10787,13 @@
         mH.sendMessage(mH.obtainMessage(H.DO_DISPLAY_ADDED, displayId, 0));
     }
 
-    private void handleDisplayAddedLocked(int displayId) {
-        final Display display = mDisplayManager.getDisplay(displayId);
-        if (display != null) {
-            createDisplayContentLocked(display);
-            displayReady(displayId);
+    public void handleDisplayAdded(int displayId) {
+        synchronized (mWindowMap) {
+            final Display display = mDisplayManager.getDisplay(displayId);
+            if (display != null) {
+                createDisplayContentLocked(display);
+                displayReady(displayId);
+            }
         }
     }
 
diff --git a/services/tests/Android.mk b/services/tests/Android.mk
new file mode 100644
index 0000000..40369ee
--- /dev/null
+++ b/services/tests/Android.mk
@@ -0,0 +1,3 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(call all-makefiles-under, $(LOCAL_PATH))